Capture location coordinates in code when clicking in viewer #1794
-
How can I get location coordinates for any location clicked in viewer? I want the location in JavaScript code. I got to know that MeasureLocationTool is a class which gets location coordinates, but I am looking for specific example to use this class in JavaScript code. I need to get location coordinates programmatically when I click anywhere in the viewer. The Measure Location feature does that and show the coordinates in a notification message, but in my React app how do I capture those coordinates? Is that possible by subscribing to some event? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
MeasureLocationTool is a tool, not an API. It sounds like you should extend the tool to add whatever new behavior you need. |
Beta Was this translation helpful? Give feedback.
MeasureLocationTool is a tool, not an API. It sounds like you should extend the tool to add whatever new behavior you need.
Alternatively, look at the APIs used in the implementation of MeasureLocationTool - you will find answers there.