function projectPoint() {
var outSR = new esri.SpatialReference({ wkid: 3006});
gsvc.project([ pt ], outSR, function(projectedPoints) {
pt = projectedPoints[0];
// do something with coordinates
});
}
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); }); }