AGSPoint *pt = addressCandidate.location; AGSMutablePoint *newPoint = [AGSMutablePoint pointWithX:pt.x y:pt.y spatialReference:self.mapView.spatialReference];
[self.locator locationsForAddress:addresses returnFields:outFields outSpatialReference:self.mapView.spatialReference];
[self.locator locationsForAddress:addresses returnFields:outFields outSpatialReference:self.mapView.spatialReference];
Hmm, not sure why you're still having problems.
Can you print the point to the console and see if the x,y, and spatial ref values look okay. Use NSLog(@"Point: %@", point);
2010-10-31 17:05:26.223 iWatch[470:207] Point: AGSPoint: x = -1.785897, y = 43.031819, spatial reference: [AGSSpatialReference: wkid = 102100, wkt = null]
- (void)geometryServiceTask:(AGSGeometryServiceTask *)geometryServiceTask operation:(NSOperation *)op didReturnProjectedGeometries:(NSArray *)newGeometry
Ok. I am stumped. I'm not sure why your 931 Geocode Service does not give you back the correctly projected results.
For using the Geometry Service, your input geometries must have a valid spatial reference. Without this info, the geometry service cannot truly project your geometries.
If you're still having problems, I can take a look at your code to see what might be going on.
[self.locator locationsForAddress:addresses returnFields:outFields outSpatialReference:self.mapView.spatialReference];