I am having trouble getting the correct lat/long coordinates to show up on my map. I have coordinates showing up but they do not reset when they hit 180 or -180. It keeps going on onto 190..191..etc and -182...-190...etc. I keep getting a "Uncaught TypeError: Cannot read property 'clone' of undefined at Object.f. webMercatorToGeographic... Here is code I'm using:
Solved! Go to Solution.
Mansi,
Sounds like you need to normalize the point:
https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#normalize
Mansi,
Sounds like you need to normalize the point:
https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#normalize
Thank you so much. That worked. I added a point.normalize() underneath the var point = view.toMap(mpx, mpy) and the coordinates are correctly displaying now. Thank you so much.
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.