问题
Ey guys, I was wondering if it was at all possible to display an MKMapView without an active internet connection, and if so, how would I go about doing that? Thanks in advance!
回答1:
mhm, Jasconius, i'm not sure you are right, the MKMapView uses google on-line services, as you can read on the apple help:
Important: The MapKit framework uses Google services to provide map data. Use of this class and the associated interfaces binds you to the Google Maps/Google Earth API terms of service. You can find these terms of service at http://code.google.com/apis/maps/iphone/terms.html.
If your app works... are you sure it just have chaced the map area on your device when you tried it once you were on-line? If you use googleMap when you are on-line and load the italy map, then you close your the app, then go in airplane mode and restart the app then you are able to look at italy again, but if you try to go to france you don't see it...
I tried to to use an off line map with MKMapView, but i had this problem... now i'm using a map of my own using a UIScroll and a CATiledLayer loading a pdf file, the result is similar to the MKMapView...
luca
回答2:
You don't have to do anything special. The map data is stored on the device. It just works.
I work on a map based app and I just ran it in airplane mode. It's fine.
来源:https://stackoverflow.com/questions/4169478/displaying-mkmapview-without-internet-access