89569.25265 45236.32566
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(respondToGeomChanged:) name:AGSSketchGraphicsLayerGeometryDidChangeNotification object:nil];
self.sketchLayer.geometry
AGSMutablePoint *currentSketchValue = self.sketchLayer.geometry;
Solved! Go to Solution.
- (void) didOpenWebMap:(AGSWebMap *)webMap intoMapView:(AGSMapView *)mapView { ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(respondToGeomChanged:) name:AGSSketchGraphicsLayerGeometryDidChangeNotification object:nil]; ... } - (void)respondToGeomChanged: (NSNotification*) notification { if([self.sketchLayer.geometry isValid] && ![self.sketchLayer.geometry isEmpty]) { AGSGeometry *currentSketchValue2 = (AGSEnvelope*)AGSGeometryWebMercatorToGeographic(self.sketchLayer.geometry); NSLog(@"AGSGeometryWebMercatorToGeographic: %@", currentSketchValue2); } }
AGSMutablePoint: x = -13628019.829820, y = 4549121.863850, spatial reference: [ AGSSpatialReference: wkid = 102100, wkt = null ]
- (void) didOpenWebMap:(AGSWebMap *)webMap intoMapView:(AGSMapView *)mapView { ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(respondToGeomChanged:) name:AGSSketchGraphicsLayerGeometryDidChangeNotification object:nil]; ... } - (void)respondToGeomChanged: (NSNotification*) notification { if([self.sketchLayer.geometry isValid] && ![self.sketchLayer.geometry isEmpty]) { AGSGeometry *currentSketchValue2 = (AGSEnvelope*)AGSGeometryWebMercatorToGeographic(self.sketchLayer.geometry); NSLog(@"AGSGeometryWebMercatorToGeographic: %@", currentSketchValue2); } }
AGSGeometry *currentSketchValue2 = (AGSEnvelope*)AGSGeometryWebMercatorToGeographic(self.sketchLayer.geometry);