diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 13 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 15 | ||||
-rw-r--r-- | platform/ios/src/MGLMapViewDelegate.h | 18 |
3 files changed, 2 insertions, 44 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 904046ac15..1046644f8c 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1880,7 +1880,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { _usingLocaleBasedCountryLabels = [[self bestLanguageForUser] isEqualToString:@"en"]; } -- (void)mapViewRegionIsChanging:(MGLMapView *)mapView reason:(MGLCameraChangeReason)reason +- (void)mapViewRegionIsChanging:(MGLMapView *)mapView { [self updateHUD]; } @@ -1890,17 +1890,6 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { [self updateHUD]; } -- (void)mapView:(MGLMapView *)mapView didSingleTapAtCoordinate:(CLLocationCoordinate2D)coordinate -{ - [self.navigationController setNavigationBarHidden:!self.navigationController.navigationBarHidden animated:YES]; - -#if 0 - MGLPointAnnotation *annot = [[MGLPointAnnotation alloc] init]; - annot.coordinate = coordinate; - [self.mapView addAnnotation:annot]; -#endif -} - - (void)mapView:(MGLMapView *)mapView didUpdateUserLocation:(MGLUserLocation *)userLocation { [self updateHUD]; } diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 126acb8f0f..d2496d8627 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1579,7 +1579,6 @@ public: [self deselectAnnotation:self.selectedAnnotation animated:YES]; UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nextElement); - // Should we call mapView:didSingleTapAtCoordinate: here? If so, what coordinate? return; } @@ -1594,17 +1593,6 @@ public: { [self deselectAnnotation:self.selectedAnnotation animated:YES]; } - else - { - // An annotation wasn't selected or deselected. - if ([self.delegate respondsToSelector:@selector(mapView:didSingleTapAtCoordinate:)]) - { - CGPoint pointInView = [singleTap locationInView:singleTap.view]; - CLLocationCoordinate2D tapCoordinate = [self convertPoint:pointInView toCoordinateFromView:singleTap.view]; - - [self.delegate mapView:self didSingleTapAtCoordinate:tapCoordinate]; - } - } } /** @@ -1983,8 +1971,7 @@ public: { id<MGLAnnotation>annotation = [self annotationForGestureRecognizer:(UITapGestureRecognizer*)gestureRecognizer persistingResults:NO]; if(!annotation) { - // Only allow this gesture to be recognized if the delegate implements the single tap method - return [self.delegate respondsToSelector:@selector(mapView:didSingleTapAtCoordinate:)]; + return NO; } } } diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index c0abe1fe1a..abb2e9be03 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -166,24 +166,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MGLMapView *)mapView regionDidChangeWithReason:(MGLCameraChangeReason)reason animated:(BOOL)animated; - -#pragma mark Responding to user gestures - -/** - Tells the delegate that the user has tapped on the map view. - - This method will not be called when the user single taps on an annotation, or if an annotation - is currently selected. - - @param mapView The map view that was tapped. - @param coordinate Location of tap in world coordinates. - - @note If you implement this method, custom tap gesture recognizers that are installed will fail to - trigger, since the built-in single tap recognizer will no longer fail. - */ -- (void)mapView:(MGLMapView *)mapView didSingleTapAtCoordinate:(CLLocationCoordinate2D)coordinate; - - #pragma mark Loading the Map /** |