A versatile and lightweight toolkit for building a simple web map.
This project is maintained by bcgov
Add a button to the toolbar, that shows a panel containing the current selection set.
When this tool is enabled, the "identify"
tool tool has an additional action available for features.
The feature can be copied to the selection, so it appears in this panel.
This is default configuration for the Select tool (click on a property name for more information):
{ "tools": [ { "type": "select", "title": "Selected Features", "showTitle": false, "showPanel": true, "showHeader": true, "enabled": false, "icon": "select_all", "order": 6, "position": [ "list-menu", "toolbar" ], "command": { "navigator": true, "zoom": true, "select": true, "attributeMode": false, "clear": true, "remove": true, }, "attributeMode": "default", } ] }
"type"
: String
(Required)
The name of the type of this tool. Identifies the tool in the configuration, this is required.
Must be one of these values:
"about"
,
"basemaps"
,
"bespoke"
,
"coordinate"
,
"directions"
,
"identify"
,
"layers"
,
"legend"
,
"list-menu"
,
"location"
,
"markup"
,
"measure"
,
"minimap"
,
"pan"
,
"query"
,
"scale"
,
"search"
,
"select"
,
"shortcut-menu"
,
"toolbar"
,
"version"
,
or
"zoom"
.
"title"
: String
The title of this tool. Tools that display a panel will use this as the title of the panel. The toolbar button for this tool will use this as the tooltip. Tools have a default title, and setting this property will override the default title with one of the author’s choosing.
"showTitle"
: Boolean
If true
, then the title of the tool is shown beside the button in the toolbar.
Defaults to false
.
"showPanel"
: Boolean
If true
, then the tool panel will be shown.
If false
, then the tool panel will not be shown when the tool is active.
"showHeader"
: Boolean
If true
, then the tool panel will have a header, showing title and close button.
"enabled"
: Boolean
If true
then the tool will be available when the map starts.
If false
, then the tool will not be available.
"icon"
: String
If the tool adds a button to a toolbar, this property gives the name of the icon to display on the button. The icon set used is the Material Design Icons.
"order"
: Integer
If the tool adds a button to a toolbar, this property controls the order in which the tools are added to the toolbar.
The default value is 1
, but some tools have other values as their default.
The tools are added left-to-right in ascending order.
"position"
: String
Some tools show a button that activates the tool, and that button must be positioned in one of the tool button containers.
The tool button containers are: toolbar
, list-menu
, and shortcut-menu
.
This property’s value is the name of the container, or null
to prevent button from appearing.
The tool button container must itself be enabled.
"command"
: Object
Determines which controls are visible on the panels for this tool.
"command"
: { "navigator": Boolean }
If true
, shows the navigation controls for selecting among many matched features.
"command"
: { "zoom": Boolean }
If true
, shows a button for zooming to current feature.
"command"
: { "select": Boolean }
If true
, shows a button for adding the current feature to the selection.
"command"
: { "attributeMode": Boolean }
If true
, shows a drop-down list for selecting how the feature attributes should be presented.
"command"
: { "clear": Boolean }
If true
, shows a button to clear the selection.
"command"
: { "remove": Boolean }
If true
, shows a button to remove a feature from the selection.
"attributeMode"
: String
Determines how the attributes are presented for a feature. These are the possible modes:
"default"
: choose the best mode for the feature"feature-description"
: show the contents of the description
attribute as HTML"feature-attributes"
: show the attributes as defined in the attributes
configuration for the layer."feature-properties"
: show all the attributes for the feature without any further interpretation.One of the modes possible when attributeMode == "default"
is one that uses the feature template defined for the layer.
This mode is the most preferred one if possible, but it is not possible to force attributeMode
to always use it.