手机离线时是否可以缓存iOS地图以供使用? [英] Is it possible to cache iOS maps for use when the phone is offline?

查看:68
本文介绍了手机离线时是否可以缓存iOS地图以供使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以要求iOS应用存储一个位置的地图图像,以便在用户未连接到互联网时可用?

Is it possible to request that an iOS app stores map images of a location so that they are available when the user is not connected to the internet?

即如果用户在伦敦,是否可以强制该应用为巴塞罗那提供地图图像并进行缓存,以便一旦用户到达该位置(没有互联网连接),地图就已经被缓存了?

i.e. if a user is in London, is it possible to force the app to source map images for Barcelona and keep them cached, so that once the user arrives in the location (without internet connectivity) the maps are already cached?

谢谢

推荐答案

不幸的是,苹果不允许任何人这样做. MapKit.framework 严格用于显示它们.但是,请使用CoreGraphics对特定区域(即地图)进行截屏",然后将其另存为图像,然后再显示该图像.

Unfortunately apple doesn't allow anybody to do that.The MapKit.framework is strictly for displaying them. However use CoreGraphics to take a "screenshot" of the certain area(i.e. the map) and save it as an image, then display that image later.

这篇关于手机离线时是否可以缓存iOS地图以供使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆