ios - 在 iOS 中使用导航的私有(private)属性(property)离线 map

标签 ios objective-c swift maps mbtiles

我想为我的大学校园(覆盖近 3-4 英里)制作离线 map 。像新生或客人一样,可以导航到校园内的各个街区。学生可以在 map 上看到自己在当前位置的标记,并且可以从预定义的地点列表中选择目的地,应用程序将导航它们。

我探索了很多,比如 ma​​ptiles 可以帮助我显示 map 。但是还有其他有效的显示校园 map 的方法吗?而且我不知道我将如何导航用户(因为私有(private)属性(property)区域超出了 Google map (或其他一些)API 的范围)。

任何建议都会有所帮助。 :)

已编辑

这是谷歌地图 link到我家。

我在学习ArcGIS从最近几天开始,学习了使用“ArcGIS for Desktop”创建其“地理数据库”以在 iPhone 上呈现离线 map 。

但是,现在我关心的是如何导航用户。

我将欢迎使用任何不同的方法来完成它的任何建议/想法。

最佳答案

您可以使用 MapBox 实现这一目标。

MapBox 是 GoogleMaps 的替代品,支持离线 map 。

Mapbox iOS SDK
There are three methods available to the Mapbox iOS SDK for offline maps. With cache-based methods, the RMTileCache for an RMMapView can be configured to keep map tiles around based on their count or based on their age in the cache.

Caching based on previous user interaction

Tiles are automatically cached once they are downloaded for display based on the user’s panning and zooming of the map. For example, if a user views the map, then zooms out, then zooms back in later when offline, the original tiles will be present in cache and will display without need for a network connection.

Proactive background caching for certain map regions

Using RMTileCache and the RMTileCacheBackgroundDelegate protocol, the developer can enable the user to download a certain bounding box and zoom range in the background in advance of actually displaying them on screen. Callbacks trigger, allowing the developer to report progress to the user or even to cancel a download in progress.

Tiles that already exist in cache will be skipped over during this background download instead of re-downloaded.

MBTiles prepackaged tiles

Using the MBTiles format for map tile storage, developers can build apps that read the tiles straight out of the MBTiles file and do not ever need a network connection. Since MBTiles is an open format, files can be created manually or with TileMill, as well as many other applications and utilities such as mbutil.

您需要最后一个(即 MBTiles 预打包磁贴)。

来源:https://www.mapbox.com/help/ios-offline/

关于ios - 在 iOS 中使用导航的私有(private)属性(property)离线 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31513807/

相关文章:

iphone - 如何在采取行动之前知道几个区 block 是否已经执行完毕?

ios - 应用程序强制退出时如何恢复下载?

ios - CALayer 的 "filter"属性在 iOS 中是如何工作的?

iphone - 使用 CATransition 重新创建 iOS 应用打开过渡

iPhone - 在应用程序处于后台时播放闹钟声音

ios - 一种使用 UIPinchGestureRecognizer UIRotationGestureRecognizer 和 UIPanGestureRecognizer 添加 Instagram 类布局指南的方法?

ipad - "didChangeSection:"NSfetchedResultsController 委托(delegate)方法未被调用

ios - 如何延迟一个协议(protocol)的委托(delegate)方法的执行,直到另一个协议(protocol)的委托(delegate)方法完成执行?

arrays - 如何使用实例变量访问另一个变量中的对象并返回

ios - 滑动删除时,TableView 的页眉和页 footer 分也会滑动