dojo.connect(tb, "onDrawEnd", writeCoordinates); ... function writeCoordinates(geometry) { dojo.byId("coordinateInfo").innerHTML = "X coordinate is: " + geometry.x.toFixed(3) + ", Y coordinate is: " + geometry.y.toFixed(3); } ... <span id="coordinateInfo"></span>
dojo.connect(toolbar,"onDrawEnd",function(geometry){ if (geometry.type=="point") { // Do something.... alert(geometry.x+", "+geometry.y); } });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.