Select to view content in your preferred language

map zoomed notification

849
3
04-23-2011 12:23 PM
ChristopherEbright
Deactivated User
I am trying to get a notification message for when the map has zoomed, to then fire off another method to do something. I read in the API docs that there is a notification sent out from AGSMapView for "MapDidEndZooming":

"The map component broadcasts four notifications - MapViewDidLoad, MapTimeExtentChanged, MapDidEndPanning and MapDidEndZooming. Observers interested in these notifications can register for them using the default NSNotificationCenter."

I have tried this in my viewController implementation:

self.mapView.layerDelegate = self;
[[NSNotificationCenter defaultCenter] addObserver:self   selector:@selector(didReceiveZoomMessage: ) name:MapDidEndZooming object:nil];

but I keep getting error stating the "MapDidEndZooming" is undeclared.
0 Kudos
3 Replies
DiveshGoyal
Esri Regular Contributor
Use @"MapDidEndZooming" as the name argument. It needs to be a string.
0 Kudos
ChristopherEbright
Deactivated User
Thanks Divesh! That worked.
0 Kudos
JamesRichards1
Regular Contributor
Just curious - Why are these 4 notifications not implemented in a protocol?
0 Kudos