/plugins/feature_info
The feature_info plugin module exports the feature_info plugin method.
Dictionary entries:
- toolbar_current_location
- Source
Requires
Methods
(inner) feature_info(plugin, mapview)
The feature_info plugin method adds a button to the #mapButton element to call the toggleFeatureInfoHighlight method.
The plugin param will turned into an object if configured as true in the locale.
Name | Type | Description |
---|---|---|
plugin | Object | The plugin config object from the locale. |
mapview | mapview | The mapview for the highlight feature info interaction. |
- Source
(inner) toggleFeatureInfoHighlight(plugin, mapview)
The meathod will toggle a highlight interaction with a custom getFeature callback method.
The getFeature method will log the feature properties to the dev console and create a mapview popup with the stringified feature properties object in a pre-code block.
Name | Type | Description |
---|---|---|
plugin | Object | The plugin config object from the locale. |
mapview | mapview | The mapview for the highlight feature info interaction. |
Name | Type | Attributes | Description |
---|---|---|---|
plugin.features | boolean | <optional> | Include the cluster features[] label in the output. |
plugin.css | string | <optional> | The css for the content element passed to the mapview popup. |
- Source