Nita,When we say a location is Longitude: -85.74, Latitude: 38.25, which means it's a point offset from Longitude: 0, Latitude: 0 on a sphere/ellipsoid (earth) surface under geographic coordinate system. If you want to use meters as unit, that means you want to represent the location in a 2D projected coordiante system from an origin point. Without projection information, it doesn't have a meaningful location x, y values.What I'm trying to say is you would like to show a meaningful location here. Back to your question, you can use the following code snippet to show the x, y values under current projection of your map. dojo.connect(measurement, "onMeasureEnd", function(toolName, geometry){ if (toolName === "location") { measurement.resultValue.domNode.innerHTML = "x: "+ geometry.x + "<br/>y: " + geometry.y; } });
dojo.connect(measurement, "onMeasureEnd", function(toolName, geometry){ if (toolName === "location") { measurement.resultValue.domNode.innerHTML = "x: "+ geometry.x + "<br/>y: " + geometry.y; } });
Not so sure how you can use meters to represent location. It means it offsets from an origin point?
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.