地图渲染:从数据到图像图块:良好实践/示例代码/教程
我正在开发 iPhone 离线地图项目。 所以我想直接在iPhone中生成图块,并且我需要构建一个快速高效的算法来渲染图块。
您知道一些相关资源吗? (我知道存在一些框架,例如 mapnik,但我需要尽可能简单的东西,我将实现之后很酷的东西)。 我不介意语言,因为我将为此重新发明轮子(除非某些东西完全适合:带有核心数据的 Objective C,我对此表示怀疑......)
我真的在谈论来自瓷砖的图形生成节点和路径(我使用 openstreetmap 数据,但如果需要的话我不介意安排结构,我真的需要最快的方法,
谢谢。
I'm working on a iPhone offline map project.
So i would like to generate the tiles directly in the iPhone, and I need to build a fast and efficient algorithm to render the tiles.
Do you know some resources for that ? (I know some frameworks exist, like mapnik, but i need something as simple as possible, and i'll implement the cool stuff afterwards).
I don't mind the language as I will re-invent the wheel for this (except if something perfectly fits : objective c with core data, which i doubt...)
I'm really taling about the graphic generation of the tiles from nodes and paths (i use openstreetmap data, but i would'nt mind arranging the structure if necesary, i really need the fastest way to do it.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mapnik 使用 Cairo,Cairo 可以使用 Quartz 进行硬件加速。我不知道这是否适用于 iPhone,但如果适用,那肯定是阻力最小的途径。地图渲染非常困难,请使用库来完成,在这种情况下不要重新发明轮子。
Mapnik uses Cairo, and Cairo can be hardware accelerated with Quartz. I don't know if that would work on an iPhone, but if it did that's certainly the path of least resistance. Map rendering is extremely hard, use a library to do it, do NOT reinvent the wheel in this case.
您可以使用 Maptiler (www.maptiler.com) 创建图块,然后在 iOS 中的地图上显示您的位置: https://github.com/klokantech/maptiler-ios-start
You can create the tiles with Maptiler (www.maptiler.com) and then this to display your position on the maps in iOS: https://github.com/klokantech/maptiler-ios-start