Any word from you guys (ESRI) as to whether hooking up gesture recognizers is recommended or not?
// Add gesture recognizers to map view UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mapPannedByTouch]; UIPinchGestureRecognizer *pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(mapPinchedByTouch]; [self.mapView addGestureRecognizer:panGestureRecognizer]; [self.mapView addGestureRecognizer:pinchGestureRecognizer];
- (void)mapPannedByTouch:(UIGestureRecognizer*)gestureRecognizer { NSLog(@map panned by touch!); } - (void)mapPinchedByTouch:(UIGestureRecognizer*)gestureRecognizer { NSLog(@map pinched by touch!); }
No, it is not recommended to hooking up gesture recognizers. If you do so then it'll interfere the functionality of map. In current SDK, there is no easy way to differentiate between programmatically panning/zooming the map and one actually touching and pinching the map. However, the next version of the SDK will have that functionality.Regards,Nimesh
The new version of ArcGIS SDK for iOS is available now.Regards,Nimesh
This question is not answered. I've been developing to the latest API for iOS and I still don't see a delegate function that fires on user touch pan and zoom. Basic stuff to know the user's interactions here. Clicking or tap and hold gives me nothing. Unless I'm missing something.
There is an interacting flag on AGSMapView for you to determine whether interaction with map is by user or not.
Interacting: Whether the map is currently being dragged, pinched, rotated or scrolled by the user.
Hope this helps!
Regards,
Nimesh
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.