SMK Usage Guide

A versatile and lightweight toolkit for building a simple web map.

This project is maintained by qqnluaq

SMK / Configuration / Tools

Identify Tool

If this tool is enabled, clicking on the map will try to identify all features under the click, within radius pixels (default radius unit). The results of this search will be display in the panel, if showPanel is true. It also adds a button to the toolbar, that optionally will show a panel containing a list of features found on the map.

This is default configuration for the Identify tool (click on a property name for more information):

{ "tools": [ {
    "type":      "identify",
    "title":     "Identify Features",
    "showTitle": false,
    "showPanel": true,
    "showHeader": true,
    "enabled":   false,
    "icon":      "info_outline",
    "order":     5,
    "position":  [ "list-menu", "toolbar" ],
    "command":   {
        "navigator":     true,
        "zoom":          true,
        "select":        true,
        "attributeMode": false,
        "radius":        false,
        "radiusUnit":    false,
        "nearBy":        true
    },
    "attributeView":  "default",
    "radius":         5,
    "radiusUnit":     "px",
    "internalLayers": [ ... ]
} ] }

Type Property

"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 Property

"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 Property

"showTitle": Boolean

If true, then the title of the tool is shown beside the button in the toolbar. Defaults to false.

ShowPanel Property

"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 Property

"showHeader": Boolean

If true, then the tool panel will have a header, showing title and close button.

Enabled Property

"enabled": Boolean

If true then the tool will be available when the map starts. If false, then the tool will not be available.

Icon Property

"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 Property

"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 Property

"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 Property

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

Zoom Sub-Property

"command": { "zoom": Boolean }

If true, shows a button for zooming to current feature.

Select Sub-Property

"command": { "select": Boolean }

If true, shows a button for adding the current feature to the selection.

AttributeMode Sub-Property

"command": { "attributeMode": Boolean }

If true, shows a drop-down list for selecting how the feature attributes should be presented.

Radius Sub-Property

"command": { "radius": Boolean }

If true, shows the search radius value.

RadiusUnit Sub-Property

"command": { "radiusUnit": Boolean }

If true, shows the search radius units drop-down.

NearBy Sub-Property

"command": { "nearBy": Boolean }

If true, shows a button that does the identify query at the devices current location.

AttributeView Property

"attributeView": String

Determines how the attributes are presented for a feature. These are the possible modes:

Note

One of the modes possible when attributeView == "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 attributeView to always use it.

Radius Property

"radius": Number

The distamce to use for the search radius when doing a query for the point that was clicked on the map. The value is in the units specified by the radiusUnit property.

RadiusUnit Property

"radiusUnit": String

The unit that the radius property is using for measurement. The allowed values are:

InternalLayers Property

"internalLayers": Array

TBD