Tools

map.apps introduces a tool concept that enables you to provide custom tools. Tools can be used in multiple ways, for example as tool buttons in a toolset container or as window icons. Tool buttons don’t need to be programmed. Instead they are defined as a component with given properties, such as icon class. If the tool is available within an app, map.apps creates a tool button and render it in the application.

Toolsets

Tools can be organized in toolsets. A toolset is an aggregation of tools that can appear in several different looks, for example icon sets or menus. By configuration the layout of this toolsets can be defined (for example attached to one of the borders or as tool window with a title bar).

Further information
For further information refer to the Toolset documentation.

Tool Rules

Each tool can be endowed with certain rules. You can use tool rules to update the state of the tool (for example its visibility or whether it’s enabled) based on external parameters like the role of the currently logged in user or active layout template.

Further information
For further information refer to the Toolrules bundle documentation.

The following table lists all available rules including the bundle required to use that rule.

Rule Bundle Description

isAuthenticated

toolrules

Matches if

  • the client has successfully authenticated and isAuthenticated is set to true

    or

  • the client has not successfully authenticated and isAuthenticated is set to false.

Example
"isAuthenticated": true

roles

toolrules

Matches if the authenticated user is in at least one of the specified roles.

Example
"roles": ["maAdmin", "maEditor"]

<storeId>StoreAvailable

toolrules

Matches if

  • a store with id <storeId> is available and <storeId>StoreAvailable is set to true

    or

  • a store with id <storeId> is not available and <storeId>StoreAvailable is set to false.

Example
"omnisearchStoreAvailable": true,
"selectionStoreAvailable": true

layoutTemplateNames,

subLayoutNames,

layoutBreakPointNames

templatelayout

Matches when one of the specified names matches the regarding property of the currently active layout.

Example
"layoutTemplateNames": ["modern"],
"subLayoutNames": ["small"],
"layoutBreakPointNames": ["small-landscape","small-portait"]

minimumSelectedApps

appmanagement

Matches when the number of selected apps is higher or equal to the specified value.

Example
"minimumSelectedApps": 1

viewmode

map-widget

Matches when the view mode of the current map is equal to the view mode specified for the rule. This is either "2D" or "3D".

Example
"viewmode": "2D"