Projecting with Geometry Service Troubles

Discussion created by DuncanRager on Jul 26, 2011
Latest reply on Jul 27, 2011 by DuncanRager

I'm attempting to take the center point of my map (with a spatial reference in UTM NAD 1983) and reproject it over into something else... doesn't matter which right now, because none of them seem to be working for me. The code below is what I hope to achieve, flipping from UTM to WebMercator.

gsvc = new esri.tasks.GeometryService("http://server/ArcGIS/rest/services/Geometry/GeometryServer");
  xCenter = (map.extent.xmax - map.extent.xmin)/2;
  yCenter = (map.extent.ymax - map.extent.ymin)/2;
  utmPoint = new esri.geometry.Point(xCenter, yCenter, new esri.SpatialReference({wkid:26918}));
  webMerc = new esri.SpatialReference({wkid:3857});
  gsvc.project([ utmPoint ], webMerc, function(point){
   webPoint = point[0];

This doesn't do anything in the web app. I checked to make sure the geometry service was up, and it is. I also tried adding an error function parameter, and it never fired. I remember reading a post somewhere about the Geometry Service taking to long to process and it couldn't return the results before the next line of code fired... does that sound like something that could be happening?

Does anyone have a better way of converting from UTM to Web Mercator on the fly?