AnsweredAssumed Answered

How to get the Lat/Long coordinates of a point drawn with the drawbox dijit in a custom widget

Question asked by bharloe8 on Jun 23, 2017
Latest reply on May 8, 2020 by wpgis5673

I have been trying to create a custom widget that allows the user to click on the map and pass the lat/long coordinates of that click into a URL for an internal tool. I am really struggling with AMD javascript and understanding how to use the dojo framework. I have created a custom widget that essentially displays the way I want it to, and allows the user to draw a point. I have been unable to figure out how to get that point's lat/long for use in the link. Basically I know that I need a function that upon click erases the previous point, draws a new point, gets that point's lat/long, and passes that along to another function. I've pretty much ran out of ideas for trying to figure out how to do the step getting lat/long from that point specifically. I'm sure this has to do with my poor understanding of dojo, but unfortunately I don't have the time to dive deep into understanding dojo in my current capacity. Any advice on how to implement the function I'm describing would be greatly appreciated. My current widget is attached in a zip file.