Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set MKMapView view angle and turn off 3D building?

I am currently working on a navigation app. Is there a way to set view angle in MapKit? I know Google Map iOS SDK has it as one of parameter in viewing camera that you could set, but I wasn't able to find it in MapKit.

Also is there a bool value to turn off 3D building? They are kind of annoying for a navigation app.

Thanks in advance!

like image 642
Zian Chen Avatar asked Mar 30 '13 03:03

Zian Chen


3 Answers

Add in viewDidLoad or viewWillAppear:

self.mapView.pitchEnabled = YES;   
self.mapView.pitchEnabled = NO;
like image 188
Hasan Sawaed Avatar answered Oct 27 '22 19:10

Hasan Sawaed


        self.mapView.showsBuildings = false

(swift code) Turns off buildings.

like image 26
Morgz Avatar answered Oct 27 '22 20:10

Morgz


Swift 4

mapView.settings.tiltGestures = false
like image 24
Kilo Loco Avatar answered Oct 27 '22 21:10

Kilo Loco