Angular service
ToolsService source
Description
List of spatial-hub tools. Includes client side tools with names matching Tool*Service. Includes tools from spatial-service/capabilities.
Methods
-
checkStatus (interface)
-
Begin tool status monitoring.
Monitoring will repeat until execution is finished.
When successful #executeResult is called.
Parameters
Name Type Description interface Scope scope
-
execute (interface, tool, input) -> Promise(Boolean)
-
Run a tool
Returns
Type Description Promise(Boolean) true the tool is successful
-
executeResult (interface)
-
Process tool output. Does download, display and/or add to the map as defined by capabilities and view config.
Parameters
Name Type Description interface Scope scope
-
getCap (tool) -> Map
-
Get tool capabilities (info including inputs/outputs)
Parameters
Name Type Description tool string name
Returns
Type Description Map capabilities information
-
getViewConfig (tool) -> Map
-
Get spatial-hub view config for a tool. View config overrides capabilities to control display and defaults.
Parameters
Name Type Description tool string name
Returns
Type Description Map view config including capabilities override information
-
init (name) -> Promise
-
Initialize client side tool
Parameters
Name Type Description name string of client side tool
Returns
Type Description Promise
-
isLocalTask (name) -> boolean
-
Test if a tool name is a client side tool
Parameters
Name Type Description name string of tool
Returns
Type Description boolean true when it is a client side tool
-
isTool (name) -> boolean
-
Test if a tool name is a client side or remote tool
Parameters
Name Type Description name string of tool
Returns
Type Description boolean true when it is a client side or remote tool
-
refresh (interface, tool, input) -> Promise(Boolean)
-
Run a tool
Returns
Type Description Promise(Boolean) true the tool is successful