AnsweredAssumed Answered

Wrong coordinates showing up on map

Question asked by mshah12 on Jan 2, 2018
Latest reply on Jan 2, 2018 by rscheitlin

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:


// Create a Map, add the basemapMap to the Map:
var map = new Map({
basemap: basemapMap,
center: [0, 0],
slider: false,
layers: []

// Add the Map to the MapView:
var view = new MapView({
view.on("pointer-move", function(evt){
var coordinates = webMercatorUtils.webMercatorToGeographic(evt.mapPoint);
dom.byId("info").innerHTML = coordinates.x.toFixed(5) + ", " + coordinates.y.toFixed(5);