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.

Set map features

Set map features - iOS Tutorial

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

Start my 1-month free trial

Set map features

- [Instructor] You may have noticed all that extra stuff on our map. There's the compass and sometimes place markers for locations. These are all user controlled. Let's look at them a little closer. To test this out, we'll add another property, isOn, to the view controller. So stop the app again. Go back up to properties. And under pitch, add var, isOn, and make that false. You'll also find an action called toggle map features, that I added for you. And in toggle map features, add this to the action. MapView that shows buildings equals isOn. Shows buildings turns on and off the buildings feature. Underneath that, type isOn equals not isOn. Shows buildings turns on and off the buildings feature. Since we can only see that on a device, set your simulator to run on the device. Run the code. With Naples selected, tap the features button, the buildings disappear, tap it again and the buildings reappear. Tap Chicago, set for 45 degrees, then tap the button for features. The buildings…

Contents