在 iPhone 上离线使用 OpenStreetMap
我正在开发 iPhone 应用程序。项目和我的小组正在尝试离线使用 OpenStreetMap。 我一直在谷歌搜索教程,但找不到任何像样的教程。你们中的任何人都可以帮助我并给我一个好的教程的链接吗?
我们需要能够离线访问地图。现在我已经下载了我所在城市的地图图像图块并将其放入数据库文件中,它在 iPhone 模拟器上运行,但我希望能够“限制”用户视图,因为你可以滚动出边界,然后你可以看到未下载图块的灰色区域。 我需要知道如何编辑的其他功能是添加标记(例如,当您在 iPhone 上打开应用程序时,我想在地图上包含一个公交车站)
任何帮助将不胜感激 谢谢!
I am working on an iPhone app. project and my group is trying to use the OpenStreetMap offline.
I have been Googling for tutorials but can't find any decent tutorials. Can any of you guys help me out and give me a link for good tutorial?
We need to be able to access the map offline. Right now I have downloaded the map image tiles for my city and put it into the database file and it runs on the iPhone simulator but I want to be able to "limit" the user view because you could scroll out of bounds and you can see the grey area where no tiles were downloaded.
Other features I need to know how to edit is adding a marker (for example, I want to include a bus stop on the map when you open the app on iPhone)
Any help would be appreciated guys
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我构建了一个也使用 OpenStreetMap 的应用程序。我使用了route-me 库。默认情况下,如果您不进行配置,它会从 Internet 获取其图块,然后将最近检索到的图块缓存在文档目录的数据库中。
代码可读且不会太大。我必须绘制层而不是一层,所以我覆盖了一些类(TileSource 和 Tile)并让它在两层上工作。
我认为调整切片缓存以使其内容永久离线并将其限制在特定区域并不困难。顺便说一句,route-me 还知道一些数据库格式作为图块源。但我从未使用过它们。
github 站点上的 wiki 文档告诉您如何将route-me 包含在您自己的项目中。我使用了指向如何在 Xcode 4 中执行此操作的外部链接。
https://github.com /路线-我/路线-我
I build an app which also uses OpenStreetMap. I used route-me library for it. By default, if you do no configuration, it fetches its tiles from the internet and then caches the most recently retrieved tiles in a database in your documents directory.
The code is readable and not too big. I had to draw to layers instead of one, so i overrode some classes (TileSource and Tile) and got it working with two layers.
I don't think it would be hard to adjust the tilecache to keep its contents permanently offline and to limit it to a specific area. By the way, route-me also knows some db formats as tile source. But I've never used them.
The wiki documentation on the github site tells you how to include route-me in your own project. I used the external link that pointed to how to do it in Xcode 4.
https://github.com/route-me/route-me