//Tell the map to "listen" for mouse movements, and run the showCoordinates function        dojo.connect(map, "onLoad", function() {          //after map loads, connect to listen to mouse move & drag events          dojo.connect(map, "onMouseMove", showCoordinates);          dojo.connect(map, "onMouseDrag", showCoordinates);        });     function showCoordinates(evt) {        //get mapPoint from event        //The map is in web mercator - modify the map point to display the results in geographic        var mp = esri.geometry.webMercatorToGeographic(evt.mapPoint);        //display mouse coordinates        dojo.byId("info").innerHTML = mp.x + ", " + mp.y;      }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.