AGSMapViewDidEndZoomingNotification and AGSMapViewDidEndPanningNotification notifications replacement.

05-26-2017 02:28 PM
New Contributor III
AGSMapViewDidEndZoomingNotification and AGSMapViewDidEndPanningNotification notifications have been removed. To be informed when a user pans or zooms the maps, you can register a block with the viewpointChangedHandler.

Is there any better way to track these removed notifications? Because for the viewpointChangedHandler the comment says:

Do not perform any heavy-lifting in this handler as it may adversely impact the rendering performance.

So I see that the AGSMapViewDidEndZoomingNotification can be achieved probably by KVO observing of AGSMapView's mapScale property. What's about AGSMapViewDidEndPanningNotification? viewpointChangedHandler notifies me every time but for me the final notification is enough and I don't see any easy way to learn when the viewpointChangedHandler fires the final notification.

3 Replies
Esri Contributor

If you need to know when the user is done navigating on the map with interaction then KVO on this property:

@property (nonatomic, assign, readonly, getter=isNavigating) BOOL navigating;

New Contributor

Hi Ryan Olson

Actually sometimes while dragging, pinch in and pinch out, viewpointChangedHandler block executed multiple times but we need the last execution notification of this change handler. Can you please explain little bit regarding this. Actually i am using Arcgis runtime ios 100.1.0 and Objective C.

Your help is highly appreciated.

0 Kudos
Esri Contributor

try to add a KVO observer on the "navigating" property:

/** Specifies whether a pan or zoom animation is in progress.

@since 100


@property (nonatomic, assign, readonly, getter=isNavigating) BOOL navigating;

0 Kudos