Tools

Configuration of toolsets

Tools are integrated into an app with the help of toolsets. The following example shows the configuration of the two toolsets that are preconfigured in the default app:

{
    "toolset": {
        "ToolsetManager": {
            "toolsets": [
                {
                    "id": "mapview_tools",
                    "tools": [
                        "locateMeTool",
                        "zoomInTool",
                        "zoomOutTool",
                        "compassTool",
                        "restoreInitialViewTool",
                        "viewmodeSwitcherTool"
                    ],
                    "registerWidget": {
                        "widgetRole": "mapview_tools"
                    },
                    "container": "ignore",
                    "windowType": "container",
                    "cssClass": "muted"
                },
                {
                    "id": "drawer_left",
                    "title": "Werkzeuge",
                    "cssClass": "ct-main-app-menu",
                    "tools": [
                        "selection-ui-tool",
                        "printingToggleTool",
                        "sharelinkTool",
                        "coordinateconversionToggleTool",
                        "distanceMeasurement2DToggleTool",
                        "areaMeasurement2DToggleTool",
                        "lineMeasurement3DToggleTool",
                        "areaMeasurement3DToggleTool"
                    ],
                    "registerWidget": {
                        "widgetRole": "drawer_button"
                    },
                    "container": "ignore",
                    "windowType": "drawer_left"
                }
            ]
        }
    }
}

The toolset with the ID mapview_tools is displayed in the bottom right corner of the default app and contains tools such as zooming. The toolset with the ID drawer_left is opened in the default app to the left of the search and expanded from the left side. The section "tools": […​] indicates which tools are displayed in the respective toolset. To customize the app to your needs, remove entries or add new ones (see list of tools).

You can add more toolsets to an app.

An overview of the different types of toolsets and their configuration can be found in the bundle documentation .

Activate tool at start of an app

To activate a tool automatically when an app starts, use the following configuration:

{
    "toolrules": {
        "ToolActiveStateManager": {
            "activateOnStartToolIds": [
                "tocToggleTool"
            ]
        }
    }
}

With this example configuration, the map content control is displayed directly when the app is started.

List of tools

Use the ID from the following table to make the respective function available in an app:

Bundle Tool ID Function

coordinateconversion

coordinateconversionToggleTool

Display, Transform, Copy and Search Coordinates

editing

editingToggleTool

Create or edit map objects

legend

legendToggleTool

Show legend

locateme

locateMeTool

Show the current location on the map

mapnavigation

compassTool

Align map to north

mapnavigation

restoreInitialViewTool

Return to initial view

mapnavigation

zoomInTool

Zoom in map

mapnavigation

zoomOutTool

Zoom out map

measurement-2d

distanceMeasurement2DToggleTool

Measure the distance between two points

measurement-2d

areaMeasurement2DToggleTool

Measure an area and its perimeter

measurement-3d

lineMeasurement3DToggleTool

Measure the distance between two points

measurement-3d

areaMeasurement3DToggleTool

Measure an area and its perimeter

portal-webscene-slides

slideSelectorToggleTool

Open Web Scenes slides

printing

printingToggleTool

Create a printout of the map

resultcenter

resultcenterToggleTool

Open result center

selection-ui

selection-ui-tool

Select objects on the map

share-link

sharelinkTool

Share app with parameterized link

sketching

sketchToggleTool

Draw objects on the map

sketching

pointSketchTool

Draw a point on the map

sketching

lineSketchTool

Draw a line on the map

sketching

rectangleSketchTool

Draw a rectangle on the map

sketching

polygonSketchTool

Draw a polygon on the map

sketching

circleSketchTool

Draw a circle on the map

sketching

deleteAllSketchTool

Delete all drawings

sketching

deleteSelectedSketchTool

Delete selected drawings

toc

tocToggleTool

Map content control

viewmodeswitcher

viewmodeSwitcherTool

Switch between 2D and 3D view

Providing User Specific Tools

The following configuration can be used in combination with map.apps User Management , security.manager or ArcGIS Online/Portal for ArcGIS.

To provide user specific tools, you can configure the toolrules bundle. Assign the role to the tool to make it accessible by users with this role.

{
    "toolrules": {
        "ToolRuleManager": {
            "_rules": {
                "agsprinttool": {
                    "roles": [
                        "maAdmin"
                    ],
                    "ruleSuccessProperty": "visibility"
                }
            }
        }
    }
}