From the course: Advanced iOS App Development: MapKit & Core Location

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add satellite and flyover modes

Add satellite and flyover modes - iOS Tutorial

From the course: Advanced iOS App Development: MapKit & Core Location

Start my 1-month free trial

Add satellite and flyover modes

- [Instructor] You can now make standard and flyover maps by changing the camera. There's one more ingredient you can add to our pizza of maps; satellite imagery. You saw in storyboard that we have a map type. Now we'll use that map type programmatically to set the satellite imagery. Go back to the ViewController code and shut off the app. Another of the actions I set up for you is changeMapType. We'll toggle between the map types on this button, so I'll use the switch case control structure to go through all the values for the MKMapType enumeration. So go ahead and add this: switch mapView dot mapType and then braces. The first case I'll add is standard, the one we've been using. I'll switch that one into satellite. Satellite will show a plain, flat, satellite image without any annotations. So that'll be case dot standard and I'll change that to mapView dot mapType equals satellite. Then I'll use switch from satellite to hybrid, which will show the annotations. Case dot satellite…

Contents