//Header file interface TouchableMapView : AGSMapView { ... } //Mainfile @implementation TouchableMapView -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; ...... } -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; ....... } -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesEnded:touches withEvent:event]; ...... } -(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesCancelled:touches withEvent:event]; ........ } @end
//Is called when map did end panning [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mapViewDidEndPanning name:@MapDidEndPanning object:nil]; //is called when map did end zooming [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mapViewDidEndPanning name:@MapDidEndZooming object:nil];
-(void) mapViewDidEndPanning:(NSNotification *) notification { //Check name of notification: if([[notification name] isEqualToString:@MapDidEndZooming]) { ... }else{ ... } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.