Open topic with navigation
The Tools Module makes it possible to create tools for other modules.
Any module can configure and register a tool. You can configure a module to contain a
tools node that defines the tools to create for that module.
Modules that contain tools should use the Tool Registry object of the Application to register their tools.
showStatusMessages: When this property is set to
true, a tool's
statusText is displayed on the map when the user selects the tool. By default,
Every tool has a
statusText property. In the factory configuration,
statusText properties are used to provide instructions for how to use the tool.
For example, the status text for the Rectangle drawing tool is "Click and drag to draw a rectangle on the map." When the user selects the Rectangle drawing tool, the text appears on the map.
Status Text message for the Rectangle drawing tool displayed on the map
tools: An array of tools with the properties listed below. By default, the
tools array is empty in the Tools Module. Tools are configured in the module that uses them. For example, the Identify Module has tools that perform different types of identify operation. Similarly, the Editing Module has editing tools.
name: The name of the tool.
If your viewer is going to be available in more than one language, enter the text key that the tool name is assigned to.
command: The command that the tool runs.
For a list of commands, see Viewer Commands and Events.
drawMode: The type of geometry the user draws, upon which the tool operates.
isSticky: When set to
true, the tool remains selected after the user has used it. To deselect the tool, the user must click the tool a second time, or click a different tool. This allows the user to use a tool repeatedly without having to reselect it each time.
If you do not want a tool to remain selected after it is used, set
iconUri: The image that displays beside the tool.
statusText: The status message to display when the tool's input method is via mouse, often containing instructions for the user. You can use a text key or the literal text.
keyboardStatusText: The status message to display when the tool's input method is via keyboard, often containing keyboard shortcut hints for the user. You can use a text key or the literal text.
No view models