GMSMapView Compass Button Not Available

I am using google maps for iOS application using quick access. I added a map (GMSMapView) to the story panel and tried to click on this button

mapView.settings.compassButton = true 

But I can not see the compass button.

+5
source share
1 answer

If the navigation bar is visible, there is a compass button behind it. To make it appear under the navigation bar, you need to add a registration to the top of the map view.

Objective-c

 UIEdgeInsets mapInsets = UIEdgeInsetsMake(80.0, 0.0, 0.0, 0.0); GMSMapView *mapView; mapView.padding = mapInsets; 

Swift

 let mapInsets = UIEdgeInsets(top: 80.0, left: 0.0, bottom: 0.0, right: 0.0) mapView.padding = mapInsets 
+2
source

All Articles