需求
鼠标点击地图后获取当前的经纬度
效果 需添加API
“esri/geometry/support/webMercatorUtils”
代码
view.on("click",function(e){ geom = webMercatorUtils.xyToLngLat(e.mapPoint.x,e.mapPoint.y); console.log(geom[0],geom[1]); });