Until recently I thought there are only three options that can be set to MKMapView mapType.
[mapView setMapType:MKMapTypeStandard];
[mapView setMapType:MKMapTypeHybrid];
[mapView setMapType:MKMapTypeSatellite];
But as mentioned in this link how could I load the Google map in terrain view in iphone, one can also get "Terrain type(not mentioned in docs)" by setting
[mapView setMapType:3];
Interesting thing is maximum zoom in allowed in Terrain mode is different from other native
modes. Instead of 3 above I tried integers <3 but that does not work(MapView shows Standard
type only).
Does anyone know if there are more options to set as type of MKMapView
?
Thanks in advance.
The MKMapView class supports the ability to annotate the map with custom information. Because a map may have large numbers of annotations, map views differentiate between the annotation objects used to manage the annotation data and the view objects for presenting that data on the map.
MapKit lets you bring the world's most detailed city experiences from Apple Maps to your apps and websites, all with a focus on privacy. And you can use the new Maps Server API to create more functional experiences across platforms.
MKCoordinateSpan is the width and height of the map view in degrees, namely the latitudeDelta and longitudeDelta.
I came across this problem too. I'd used [mapView setMapType:MKMapTypeSatellite];
in my init
method and the map type wouldn't change.
What fixed it was moving that line to my viewDidLoad
method:
- (void)viewDidLoad {
[mapView setMapType:MKMapTypeSatellite];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With