Maps a string (must be a layer ID) to a behaviour configuration for that layer.
OptionalafterThis method can be used to extend, filter, or otherwise modify a GFI result.
List of features by layer ID
Extended, filtered, or otherwise modified result
OptionalcoordinateThe plugin will react to these coordinate positions in the store.
This allows it to react to e.g. the address search or the pins plugin.
Please see the example configuration for the common use-cases.
Please mind that, when referencing another plugin, that plugin must be in addPlugins before this one.
OptionalcustomIf required, a user can change the stroke and fill of the highlighted feature. The default style as seen in the example will be used for each part that is not customized. An empty object will return the complete default style while e.g. for an object without a configured fill the default fill will be applied.
OptionaldirectIf true, a feature can be selected without defining a value in gfi.coordinateSources.
It is also possible to add multiple features to the selection by using the modifier key (CTRL on Windows or Command on macOS). To delesect a feature, simply reclick it with the modifier key pressed. To create a new selection, click anywhere else without pressing the modifier key.
Be careful when using this parameter together with some values set in coordinateSources as it may lead to unexpected results.
The features need to be distinguishable by their properties for the functionality to properly work.
Does not work together with extendedMasterportalapiMarkers.
OptionaldisplayShould the component be visible at all.
OptionalfeatureIf defined, a list of available vector layer features is visible when no feature is selected.
Only usable if renderType is set to iconMenu and window is set to true for at least one configured layer.
OptionallayoutThe region where the plugin should be rendered. Required for nine-regions layout, ignored otherwise.
OptionalmaxLimits the viewable GFIs per layer by this number. The first n elements are chosen arbitrarily. Useful if you e.g. just want one result, or to limit an endless stream of returns to e.g. 10. Infinite by default.
OptionalmodeMethod of calculating which feature has been chosen by the user.
bboxDot utilizes the bbox-url parameter using the clicked coordinate while intersects uses a Filter to calculate the intersected features.
Layers can have their own gfiMode parameter which would override this global mode.
To apply this, add the desired value to the parameter in the mapConfiguration.
OptionalmultiIf configured, multiple features can be selected at once by using the modifier key (CTRL on Windows or Command on macOS) and dragging the mouse. Can only be used in Desktop environments.
If set to 'box', the selection will be done in a box.
If set to 'circle', the selection will be done in a circle.
Similar to directSelect, features can be added and removed by selection / unselecting them.
The features need to be distinguishable by their properties for the functionality to properly work.
Does not work together with extendedMasterportalapiMarkers of @polar/core.
OptionalrenderDefines if the plugin is rendered independent or as part of the icon menu. This is automatically set by the icon menu; you should not need to touch this.
Plugin options for gfi plugin.
Example
An example configuration for the plugin might look like this: