Change Map Type MKMapView

I am trying to develop a user interface to change the views of mapType. I would like to realize this by adding a fold effect to the lower right corner of the map, where the user can click or click and drag in the lower right corner, and the map will fold enough to show 3 different mapTypes: regular, hybrid and satellite.

This is the same functionality as google maps on iPhone. Download the application and pay attention to the "paper folding" button in the lower right corner. Click on it and check the effects. This is what I am trying to accomplish.

Is there any way to do this? If not, what could be another way to implement this function.

+4
source share
2 answers

WorldCities sample code from the Apple library uses this implementation and should be a great place to learn how to switch map types. MapViewController.m in particular gives the specifics on it. As for getting the curl you're looking for, a representation of a modal view controller with your map type switch controller using UIModalTransitionStylePartialCurl would be just that. Hope this helps

+2
source

When you use a different controller, you cannot directly associate it with the first MKMapView view MKMapView and change its map type. Someone told me to use NSNotification , but I still don't know how to do this.

0
source

All Articles