How many times have you tried to geocode a point somewhere in the continental United States and the point appears off the coast of East Africa? For example, you call Esri Support and we tell you that the locator is giving you lat/long but your map service is using a projection other than WGS 1984, Web Mercator, for instance. Solution? Re-project your geocoded results: from Geographic to Web Mercator. If your map service uses a spatial reference other than Web Mercator, then you would need to use a Geometry Service to do the reprojection.
locator = new esri.tasks.Locator("http://<SERVER>/ArcGIS/rest/services/<LOCATORSERVICE>/GeocodeServer"); locator.outSpatialReference = new esri.SpatialReference(102113);
This property is available only with ArcGIS Server 10.0 and later releases. So, make sure that in your 2.x Web API application, you are working with Locator services hosted on a 10.0 machine.
- Kripa J., Esri Support Analyst - SDK group, Esri Support Services