function zoomToLocation(location) { pt = new esri.geometry.Point(location.coords.longitude, location.coords.latitude); var outSR = new esri.SpatialReference({ wkid: 3006}); gsvc.project([ pt ], outSR, function(projectedPoints) { pt = projectedPoints[0]; map.centerAndZoom(pt, 8); }); }
function projectPoint() { var outSR = new esri.SpatialReference({ wkid: 3006}); gsvc.project([ pt ], outSR, function(projectedPoints) { pt = projectedPoints[0]; // do something with coordinates }); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.