I'm trying to use the example of the reverse geocode but having my data: placelocator and tiledMapServiceLayer in UTM-WGS84, the method "esri.geometry.geographicToWebMercator" in this case is not useful, the problem is that I do not know how to replace it . Can anyone help me?code snippet:function init() { var map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(new esri.geometry.Extent(-95.2991, 38.9379, -95.2476, 38.963, new esri.SpatialReference({wkid:4326}))) });... dojo.connect(map, "onClick", function(evt) { map.graphics.clear(); locator.locationToAddress(esri.geometry.webMercatorToGeographic(evt.mapPoint), 100); });thanks in advance
dojo.connect(map, "onClick", function(evt) { map.graphics.clear(); gsvc = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); var outSR = new esri.SpatialReference({wkid:4326}); gsvc.project( [evt.mapPoint], ourSR, function(projectedPoints) { pt = projectedPoints[0]; locator.locationToAddress(pt, 100); }); });
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.