Skip to content

Commit

Permalink
Merge pull request #215 from Dataport/documentation/improvement_to_pl…
Browse files Browse the repository at this point in the history
…ugins_and_core

Update Readme Documentation
  • Loading branch information
Softwarecules authored Jan 13, 2025
2 parents 672dd30 + 030c479 commit efc36ba
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ const Plugin = (options: PluginOptions) => (instance: Vue) =>
})
```

Please note that the order of certain plugins is relevant when other plugins are referenced, e.g. `@polar/plugin-gfi`'s `coordinateSources` requires the sources to have previously been set up.

Please note that all configuration added via plugin constructors can be overridden in the `createMap`'s parameter `mapConfiguration`. You may use either object (or a mix of them) to create the configuration, e.g. use the constructors for a base configuration and the `mapConfiguration` object to override it for various use cases.

How exactly you do this is up to you and influences the minimum API call requirements your client has.

If the storeModule features a `setupModule` action, it will be executed automatically after initialization.

### initializeLayerList
Expand Down Expand Up @@ -510,3 +516,14 @@ map.$store.watch(
This is, for example, useful to listen to search results, draw features, or marker coordinates. The plugins document how exactly to use their respective fields.

To add content to the `MoveHandle`, the mutation `setMoveHandle` can be used. The values needed are described in `@polar/lib-custom-types:MoveHandleProperties`.

### Getters

You may desire to listen to whether the loader is currently being shown.

| fieldName | type | description |
| - | - | - |
| map | Map \| null | Returns the openlayers map object. |
| hovered | Feature \| null | If `useExtendedMasterportalApiMarkers` is active, this will return the currently hovered marker. Please mind that it may be a clustered feature. |
| selected | Feature \| null | If `useExtendedMasterportalApiMarkers` is active, this will return the currently selected marker. Please mind that it may be a clustered feature. |
| selectedCoordinates | Array \| null | If `useExtendedMasterportalApiMarkers` is active, this will return the coordinates of the currently selected marker. |
2 changes: 1 addition & 1 deletion packages/plugins/Attributions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ All parameters are optional. However, setting neither `layerAttributions` nor `s
| layerAttributions | layerAttribution[]? | List of attributions that are shown when the matching layer is visible. |
| listenToChanges | string[]? | Store variable paths to listen to for changes. Will update the currently visible layers depending on the current map state on changes to these values. Please mind that, when referencing another plugin, that plugin must be in `addPlugins` before this one. |
| renderType | 'iconMenu' \| 'independent' \| 'footer'? | Defines whether this plugin ('independent') or the IconMenu ('iconMenu') should handle opening the information box or if a small information box should always be visible ('footer'). Defaults to 'independent'. |
| staticAttributions | string[]? | List of static attributions that are always shown. |
| staticAttributions | string[]? | List of static attributions that are always shown. May contain HTML elements. |
| windowWidth | number? | If `renderType` is set to `independent`, sets the width of the container of the attributions. Defaults to 500. |

For details on the `displayComponent` attribute, refer to the [Global Plugin Parameters](../../core/README.md#global-plugin-parameters) section of `@polar/core`.
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/Gfi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ customHighlightStyle: {

| fieldName | type | description |
| - | - | - |
| mode | 'visible' \| 'loaded' | Whether to show only features currently visible in the map view's bounding box or to display all loaded features. In the latter case, if you desire to display all features of a layer (seen or not), set its loading strategy to `'all'`. |
| mode | 'visible' \| 'loaded' | Whether to show only features currently visible in the map view's bounding box or to display all loaded features. In the latter case, if you desire to display all features of a layer (seen or not), set its loading strategy to `'all'`. The loading strategy is a value in the OpenLayers vector source configuration; see [ol/loadingStrategy](https://openlayers.org/en/latest/apidoc/module-ol_loadingstrategy.html) for further details. |
| bindWithCoreHoverSelect | boolean? | If `true`, the hover/select fields in the core's state will be listened to and interacted with. This will result in a bilateral hovering and selecting of features with the core. Defaults to `false`. |
| pageLength | number? | A number >0 that sets the limit to the feature list's length. If the length is surpassed, additional features can be reached by using the pagination that is generated in such a case. If not defined, the list can be of arbitrary length. |
| text | (function \| string)[]? | Array of one to three entries that will produce title, subtitle, and an additional subtitle for the list view. If string, the text item will simply be that feature's value for the denoted property. If function, it's assumed to match the function signature `(feature: OpenLayersFeature): string`, and the returned string will be used for the text item. |
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/Legend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Legend

The Legend module offers legend images as supplied by OGC services.
The Legend module offers legend images as supplied by OGC services via `GetLegendGraphic` and `GetLegendURL` calls.

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/Pins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The usage of `displayComponent` has no influence on the creation of Pins on the
| initial | initial? | Configuration options for setting an initial pin. |
| movable | enum["drag", "click", "none"]? | Whether a user may drag and re-click the pin (`drag`), only re-click it (`click`) or may only be placed programmatically (`none`). Defaults to 'none'. |
| style | style? | Display style configuration. |
| toastAction | string? | If `boundaryLayerId` is set, and the pin is moved or created outside the boundary, this string will be used as action to send a toast information to the user. If no toast information is desired, leave this field undefined; for testing purposes, you can still find information in the console. |
| toastAction | string? | If `boundaryLayerId` is set, and the pin is moved or created outside the boundary, this string will be used as the path to an action within the store to send a toast notification to the user. If no toast notification is desired, leave this field undefined; for testing purposes, you can still find information in the console. |
| toZoomLevel | number? | Zoom level to use on outside input by e.g. address search. Defaults to `0`. |


Expand Down

0 comments on commit efc36ba

Please sign in to comment.