/plugins/feature_info

The feature_info plugin module exports the feature_info plugin method.

Dictionary entries:

  • toolbar_current_location

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.

Parameters:
NameTypeDescription
pluginObject

The plugin config object from the locale.

mapviewmapview

The mapview for the highlight feature info interaction.

(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.

Parameters:
NameTypeDescription
pluginObject

The plugin config object from the locale.

mapviewmapview

The mapview for the highlight feature info interaction.

Properties
NameTypeAttributesDescription
plugin.featuresboolean<optional>

Include the cluster features[] label in the output.

plugin.cssstring<optional>

The css for the content element passed to the mapview popup.