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.
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.