Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a delegate, callback, or other method that can be used to detect that the extent of the map has been changed in the ESRI iOS SDK?

share|improve this question
up vote 2 down vote accepted

According to the class reference for AGSMapView, there are two NSNotifications that are broadcast whenever the map pans or zooms to a new extent. Set up a listener for those notifications.

The map component also broadcasts 2 notifications -

AGSMapViewDidEndPanningNotification and #AGSMapViewDidEndZoomingNotification .

share|improve this answer

As answered already, you can use the 2 notifications: AGSMapViewDidEndPanningNotification and AGSMapViewDidEndZoomingNotification

However, if you need more immediate feedback you can add an observer to the AGSMapVeiw's visibleAreaEnvelope property:

[self.mapView addObserver:self forKeyPath:@"visibleAreaEnvelope" options:NSKeyValueObservingOptionNew context:nil];

Then you can react to that change like so:

-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{
    if (
        [keyPath isEqualToString:@"resolution"] ||
        [keyPath isEqualToString:@"visibleAreaEnvelope"] ||
        [keyPath isEqualToString:@"rotationAngle"] ||
        [keyPath isEqualToString:@"mapScale"]){
        NSLog(@"   ---> %@ changed...", keyPath);
    else {
        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.