Skip to main content

Is it possible to obtain the coordinates/geometry of the clicked location from a maptip?

Comments

2 comments

  • Zack Robison

    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
  • Lauren MacLean

    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

Please sign in to leave a comment.