Geometry Picker - Natively Select All Visible Layers and Display with web map pre-configured Attributes
Is it possible for VertiGIS Studio Workflow - Display Form - Geometry Picker to natively query only visible layers on the web map?
I currently get it working to show selected result from "Query Layer" using "Show Results". However, the attributes of selected features are based on "Output Fields" of "Query Layer" activity, but not natively grabbing the configured "attributes" of layers of the web map used by VertiGIS Studio Web application.
I would like to have a way to use geometry picker to select on the map, and automatically grab all visible layers' selected features without creating "Query Layer"s for over 60 different feature layers on the web map.
Cheers,
Reno
-
Below is the JSON of an example workflow for querying the layers of a VSWeb map object using user supplied geometry.
The key is to use the tasks.identify operation documented in our Developer Documentation API reference.
{
"_properties":
{
"isServerWorkflow": false
},
"components":
[
{
"id": 2,
"steps":
[
{
"id": 3,
"inputs":
{
},
"position": "0,60",
"purpose": "start",
"title": "Start",
"transitions":
[
{
"id": 5,
"position": "90,120 90,170",
"target":
{
"id": 4
}
}
]
},
{
"action": "gcx:wf:arcgis::GetMap",
"description": "Get's the map extension object from the currently active web-map.",
"id": 4,
"inputs":
{
},
"name": "map1",
"position": "-30,170",
"title": "Get Map",
"transitions":
[
{
"id": 8,
"position": "90,300 90,340",
"sourceConnector": "bottom",
"target":
{
"id": 6
}
}
]
},
{
"action": "gcx:wf:forms:form:DisplayForm",
"description": "Presents the geometry picker to the user for them to select a geometry to perform the identify operation.",
"id": 6,
"inputs":
{
"form":
{
"accessors":
[
],
"code": "resources.forms[values.id]",
"values":
{
"id": 7
}
}
},
"name": "form1",
"position": "-30,340",
"title": "Display Form",
"transitions":
[
{
"id": 10,
"position": "90,550 90,590",
"sourceConnector": "bottom",
"target":
{
"id": 11
},
"targetConnector": "top"
}
]
},
{
"action": "gcx:wf:app::RunOperation",
"description": "Use the selected geometry and the map extension objects as inputs to the tasks.identify operation.\n\nSee our developer documentation (https://developers.vertigisstudio.com/docs/web/api-commands-operations-events) for more details on operations, commands, and their parameters.",
"id": 11,
"inputs":
{
"operationName": "tasks.identify",
"operationParameter":
{
"accessors":
[
"$form1",
"$map1"
],
"annotations":
[
{
"count": 6,
"index": 10,
"kind": "idref"
},
{
"count": 5,
"index": 52,
"kind": "idref"
}
],
"code": "{ geometry: $form1.state.geometryPicker1.value, maps: $map1.map.extension }",
"source": "{geometry:$form1.state.geometryPicker1.value, maps: $map1.map.extension}"
}
},
"name": "runOperation1",
"position": "-30,590",
"title": "Run Operation",
"transitions":
[
{
"id": 13,
"position": "90,910 90,950",
"sourceConnector": "bottom",
"target":
{
"id": 12
},
"targetConnector": "top"
}
]
},
{
"action": "gcx:wf:arcgis::SelectFeatures",
"description": "Display the results in the viewer.",
"id": 12,
"inputs":
{
"features":
{
"accessors":
[
"$runOperation1"
],
"annotations":
[
{
"count": 14,
"index": 0,
"kind": "idref"
}
],
"code": "$runOperation1.result",
"source": "$runOperation1.result"
}
},
"position": "-30,950",
"title": "Show Results"
}
]
}
],
"deploymentConfig":
{
"supportedApps":
{
"GWV": true
}
},
"designerVersion": "5.33.1+4",
"forms":
[
{
"defaults":
{
},
"elements":
{
"footer":
{
"enabled": true,
"items":
{
"0":
{
"default": true,
"index": 0,
"label":
{
"markdown": "Submit"
},
"validates": true,
"value": "submit"
}
},
"section": "footer",
"type": "ButtonBar"
},
"geometryPicker1":
{
"autoActivate": true,
"enabled": true,
"format": "polygon",
"index": 0,
"itemLabel":
{
"markdown": "Location"
},
"prompt":
{
"markdown": "Draw a Polygon Geometry to Perform an Identify"
},
"rowIndex": 0,
"rowNumber": 0,
"size": 1,
"title":
{
"markdown": "Geometry Picker"
},
"type": "GeometryPicker"
},
"header":
{
"section": "header",
"title":
{
"markdown": "Use Geometry Picker to Identify Map Features"
},
"type": "Header"
}
},
"id": 7
}
],
"licenseInfo":
{
"licenseeId": "88cb61d6-af47-9b3e-5181-ed674c4c0815"
},
"start":
{
"id": 3
}
}0
Please sign in to leave a comment.
Comments
1 comment