Reputation:
I am new to Mapkit View. I want to display when I give lat and long without destination. Is it possible to display maps through terrain, satellite view in MapKit? Any tutorial link? I have seen some examples with accessing Google map API (html file). Is it necessary?
Upvotes: 8
Views: 11707
Reputation: 9764
You can set any of the following Map Type
for MapView
map.mapType = MKMapType.hybrid
map.mapType = MKMapType.hybridFlyover
map.mapType = MKMapType.mutedStandard
map.mapType = MKMapType.satellite
map.mapType = MKMapType.satelliteFlyover
map.mapType = MKMapType.standard
Hybrid - A satellite image of the area with road and road name information layered on top.
Standard - A street map that shows the position of all roads and some road names..
Satellite - Satellite imagery of the area.
HybridFlyover - A hybrid satellite image with flyover data where available.
SatelliteFlyover - A satellite image of the area with flyover data where available.
MutedStandard - A street map where your data is emphasized over the underlying map details.
hybrid , satellite , standard
are available for iOS 3 and above
hybridFlyover , satelliteFlyover
are available for iOS 9 and above
mutedStandard
are available for iOS 11 and above
Upvotes: 4
Reputation: 408
Or You can set it Programmatically as
mapView.mapType = MKMapTypeSatellite;
if not supported in Swift 3 try this:
map.mapType = MKMapType.satellite;
Upvotes: 10
Reputation: 119
This is perhaps different with Objective-C, but in Swift it would be one of the following (add to viewDidLoad(), for instance):
mapView.mapType = MKMapType.Standard; // default: road map
mapView.mapType = MKMapType.Satellite;
mapView.mapType = MKMapType.Hybrid;
Upvotes: 3