Is it possible to obtain the coordinates/geometry of the clicked location from a maptip?
Obviously for a point feature, this is just the feature geometry accessible by running the workflow with a {$Geometry} or {$Feature} parameter.
But what if I have a line or polygon, and I want to show the maptip to the user and have them click a link to run a workflow which gets both the {$Feature} AND the actual point along the line that they've clicked?
-
The only object that MapTips have access to, as far as I know, is the feature itself. If you need the x,y of a given click, you can grab that in the right-click context menu ("Map Context Menu") and pass it to a workflow-commanding button there. You'd then get the mapPoint from the {{context}} token in the menu and access it in WF5 with a Get Inputs activity e.g. $getWorkflowInputs.inputs.context.geometry. That's probably the easy solution for you.
Another option, if you must use a MapTip for to initiate your workflow, is to dive into the app object itself and extend it a little. I expect that you can subscribe to the InvokeMapTip.postExecute event in the commandRegistry or add a command to the InvokeMapTip behavior in the behaviorRegistry that can store the lat/long someplace that you can grab it from in your workflows. You'll need to be a bit more code-comfy for this route.
0 -
Thanks Zack, we have different tools being run from the map context menu that use the {{context} - this scenario really must be run from the map tip. I guess I'll have to dig into the object options as you've suggested. thanks very much for giving some direction for me to get started!
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare