Google Maps iOS Disable Rotation & Tilt

Trying to turn off rotation and tilt on my map view, but keep zooming and scrolling. I tried the following code, but the zoom and scroll enabled was throwing an error as it says the property is not part of the map view.

  self.mapView.userInteractionEnabled = NO;
  self.mapView.zoomEnabled = YES;
  self.mapView.scrollEnabled = YES;

      

Thank,

Curtis

+3


source to share


2 answers


I had several answers to this, but I was able to work it out myself. There is such a thing called GMSUI Settings, which you must call using the following code.

self.mapView.settings.rotateGestures = NO;
self.mapView.settings.tiltGestures = NO;

      



Hope this solved something for others.

+13


source


If you don't need Google Maps on Apple Maps I would recommend using MKMapView

https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html

The following properties are defined



zoomEnabled
scrollEnabled
pitchEnabled
rotateEnabled

      

Step

would be the slope you were looking for.

0


source







All Articles