AnsweredAssumed Answered

Getting x and y coordinates of a graphic on a feature layer when clicking it

Question asked by xupla on Mar 17, 2014
Latest reply on Mar 18, 2014 by xupla
I have a feature layer with a set of points in it. I want to get the x and y coordinates of a specific graphic when clicking it. I have done the following code but it is not giving the exact location.

on(map, "dbl-click", getCoordinates);  function getCoordinates(event) {                  var mp = esri.geometry.webMercatorToGeographic(event.mapPoint);                 alert(mp.x.toFixed(6) + ", " + mp.y.toFixed(6));                                                              }


I want to get the coordinates of the "M" symbol when the user clicks it.

Thanks for your help