Copy to drawing layer function
In our old GE site we had a 'copy to drawing layer' function that allowed a user to copy an identified feature to a drawing layer. Once copied it could then be edited and styled as a drawing or added to the results with the name 'Drawing'.
Is this a function within VSW because I couldn't see it anywhere? As many of our users have requested it.
I have come up with a command on the results list menu to add a selected feature as a drawing that can be edited, but I can't seem to get it to add to the results list rather than replace the list already displayed. Is there another command needed?
At the moment it says:
-
Hi Helen, I didn't even realize yet that copy to drawing layer isn't available in Web. That's a bummer. Thanks for posting what you came up with. Were you able to figure how how to add it to the results list?
0 -
Hi Chelsea, no I haven't got any further with this unfortunately. Any suggestions are much appreciated.
0 -
Hi Helen,
Were you able to figure out a 'copy to drawing layer' function in VSW? I tried the command way just like you have but with no luck. Appreciate any help on this.
Thanks!
0 -
Hi Surya Rathanlal ,
This is what I'm using now. If you have more than one feature, it asks if you want to merge them into one shape. I generally use it on our parcel layer. I removed our server name at the bottom, so you may need to put your own in to import it.
{ "_properties": { "isServerWorkflow": false }, "components": [ { "id": 2, "steps": [ { "id": 3, "inputs": {}, "position": "0,0", "purpose": "start", "title": "Start", "transitions": [ { "id": 33, "inputs": {}, "position": "90,60 90,110", "sourceConnector": "bottom", "target": { "id": 28 } } ] }, { "action": "gcx:wf:core::If", "description": "If multiple", "id": 10, "inputs": { "condition": { "accessors": [ "$getWorkflowInputs" ], "annotations": [ { "count": 18, "index": 0, "kind": "idref" } ], "code": "$getWorkflowInputs.inputs.context.length > 1", "source": "$getWorkflowInputs.inputs.context.length > 1 " } }, "position": "-220,450", "title": "", "transitions": [ { "branch": "true", "id": 23, "inputs": {}, "position": "-220,495 -290,495 -290,600", "target": { "id": 21 } }, { "branch": "false", "id": 26, "inputs": {}, "position": "20,495 40,495 40,920 -450,920 -450,940", "sourceConnector": "right", "target": { "id": 41 }, "targetConnector": "top" } ] }, { "action": "gcx:wf:core::If", "id": 13, "inputs": { "condition": { "accessors": [ "$form1" ], "annotations": [ { "count": 6, "index": 0, "kind": "idref" } ], "code": "$form1.result == 'nah'", "source": "$form1.result=='nah'" } }, "position": "-340,810", "title": "If no", "transitions": [ { "branch": "true", "id": 14, "inputs": {}, "position": "-340,840 -450,840 -450,940", "sourceConnector": "left", "target": { "id": 41 }, "targetConnector": "top" }, { "branch": "false", "id": 20, "inputs": {}, "position": "-220,840 210,840 210,870", "sourceConnector": "right", "target": { "id": 15 }, "targetConnector": "top" } ] }, { "action": "gcx:wf:arcgis::GetFeatureGeometries", "id": 15, "inputs": { "features": { "accessors": [ "$convertToGraphic" ], "annotations": [ { "count": 17, "index": 0, "kind": "idref" } ], "code": "$convertToGraphic.result", "source": "$convertToGraphic.result" }, "union": true }, "name": "getFeatureGeometries1", "position": "90,870", "title": "Get Feature Set Geometries", "transitions": [ { "id": 31, "inputs": {}, "position": "210,930 210,980", "sourceConnector": "bottom", "target": { "id": 30 } } ] }, { "action": "gcx:wf:app::RunCommand", "id": 18, "inputs": { "commandName": "map.add-markup", "commandParameter": { "accessors": [ "$featureSet1" ], "annotations": [ { "count": 12, "index": 0, "kind": "idref" } ], "code": "$featureSet1.featureSet", "source": "$featureSet1.featureSet" } }, "position": "90,1080", "title": "Run Command" }, { "action": "gcx:wf:forms:form:DisplayForm", "id": 21, "inputs": { "form": { "accessors": [], "code": "resources.forms[values.id]", "values": { "id": 22 } } }, "name": "form1", "position": "-410,600", "title": "merge or nah?", "transitions": [ { "id": 25, "inputs": {}, "position": "-290,720 -290,790 -280,790 -280,810", "sourceConnector": "bottom", "target": { "id": 13 }, "targetConnector": "top" } ] }, { "action": "gcx:wf:core::GetWorkflowInputs", "id": 28, "inputs": {}, "name": "getWorkflowInputs", "position": "-30,110", "title": "Get Workflow Inputs", "transitions": [ { "id": 47, "inputs": {}, "position": "90,170 90,220", "sourceConnector": "bottom", "target": { "id": 50 }, "targetConnector": "top" } ] }, { "action": "gcx:wf:arcgis::CreateFeatureSet", "id": 30, "inputs": { "geometries": { "accessors": [ "$getFeatureGeometries1" ], "annotations": [ { "count": 22, "index": 0, "kind": "idref" } ], "code": "$getFeatureGeometries1.geometries", "source": "$getFeatureGeometries1.geometries" } }, "name": "featureSet1", "position": "90,980", "title": "Create Feature Set", "transitions": [ { "id": 32, "position": "210,1040 210,1080", "target": { "id": 18 } } ] }, { "action": "gcx:wf:app::RunCommand", "id": 41, "inputs": { "commandName": "map.add-markup", "commandParameter": { "accessors": [ "$convertToGraphic" ], "annotations": [ { "count": 17, "index": 0, "kind": "idref" } ], "code": "$convertToGraphic.result", "source": "$convertToGraphic.result" } }, "position": "-570,940", "title": "Run Command" }, { "action": "gcx:wf:app::RunOperation", "description": "This operation will convert the current VSW Feature to an esri.Graphic.\n\nThe converted graphic's attributes can be referenced for the data linking logic.\n", "id": 50, "inputs": { "operationName": "results.to-graphics", "operationParameter": { "accessors": [ "$getWorkflowInputs" ], "annotations": [ { "count": 18, "index": 0, "kind": "idref" } ], "code": "$getWorkflowInputs.inputs.context", "source": "$getWorkflowInputs.inputs.context" } }, "name": "convertToGraphic", "position": "-30,220", "title": "Run Operation", "transitions": [ { "id": 11, "inputs": {}, "position": "-30,315 -100,315 -100,450", "sourceConnector": "left", "target": { "id": 10 }, "targetConnector": "right" } ] } ] } ], "deploymentConfig": { "supportedApps": { "VSW": true }, "worksOffline": false }, "designerVersion": "5.41.0+34", "forms": [ { "defaults": {}, "elements": { "footer": { "enabled": true, "items": { "0": { "default": true, "index": 0, "label": { "markdown": "Merge All into One" }, "validates": true, "value": "merge" }, "1": { "index": 1, "label": { "markdown": "Keep Individual" }, "validates": false, "value": "nah" } }, "section": "footer", "type": "ButtonBar" }, "header": { "section": "header", "title": { "markdown": "Do you want to.." }, "type": "Header" } }, "id": 22 } ], "licenseInfo": { "licenseUrl": "https://YOURSERVER/Geocortex/Workflow/service/auth/license" }, "start": { "id": 3 } }0 -
Thank you for sharing this! I'll try something similar to this.
0 -
Chelsea Rozek - thanks for providing the workflow. This worked without any modification.
0 -
In the HTML version you could do a “Select by location” if you first identified the wanted area and combined that area with a query. It was a very powerfull function. I hope it will be a standard function soon :-)
0 -
I am fairly sure you can just add a menu item to a layers result action and there is a tool called measure but you can do custom command and replace measurement.create-graphics with drawing.create-graphics and that would get you what you need. https://developers.vertigisstudio.com/docs/web/api-argument-definitions/#definition-CreateGraphicsResult:~:text=Result%20of%20the%20%22drawing.create%2Dgraphics%22%20and%20%22measurement.create%2Dgraphics%22%20operations.
[
"drawing.create-graphics",
"map.add-markup"
]
2
Please sign in to leave a comment.
Comments
8 comments