KVO to the rescue!
You should attach a key-value-observer (KVO) to the panning/zooming properties of the mapview.
When these properties toggle ON/OFF, your observer will automatically be informed. You can use that to update the text label.
More info on KVO here : http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObs...
Hi ~ Have you ever tried to use KVO for panning/zooming ?I implement the following code in the sub class of AGSMapView when touch ended.- (void)begin2log{
preVisibleArea = self.visibleArea;
NSLog(@"%@",self.visibleArea);
NSLog(@"%d",self.panning);
NSLog(@"A %d",self.animating);
[super touchesEnded:panTouches withEvent:panEvent];
while (self.visibleArea != preVisibleArea) {
NSLog(@"YES");
NSLog(@"%d",self.panning);
preVisibleArea = self.visibleArea;
}
while (self.animating) {
NSLog(@"YES");
}
NSLog(@"%d",self.animating);
NSLog(@"%d",self.panning);
NSLog(@"End");
NSLog(@"%@",self.visibleArea);
}
By these code , I found panning/zooming is just the info when touch begin , and after the swipe touch end (and the map is panning), the map view's visibleArea/panning/zooming immediately changed , but the map is still panning . By double check the API document , I found map view has a property named animating , and this is what the property I'm looking for , but when I track this property , the map view stops animating panning/zooming.I guess in the SDK , the code holds panning/zooming is just an animation.Does Esri plan to put ArcGIS Runtime SDK for iOS on the Github so that we can develop it together and make it better ?Thanks for your reply Best regards Frank Lin