离线地图与路由 - iOS [英] Offline Map With Routing - iOS

查看:157
本文介绍了离线地图与路由 - iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与一个与离线地图应用程序相关的项目进行工作。因为我搜索了显示定义区域的离线地图。我使用 MapBox 进行脱机映射。我可以在此地图上添加注释并绘制线条。



但我的要求是离线地图与路由。我厌倦了找到一个离线路由库或离线路由引擎来嵌入Xcode。



欣赏你是否有任何线索或示例项目/代码实现这个



注意:这个问题与我的问题有关。没有人回复这个。



谢谢。

解决方案

离线意味着没有互联网,iPhone在大多数情况下仍然能够从GPS获取当前位置。这意味着您可以非常信心,您可以离线查找用户的当前位置。



离线路由的问题是电话是愚蠢的,它只记住要显示的瓦片数据的MB数量。



路由是完全不同的,它需要一个点A和B,并且可以在A和B之间进行最短,最快,最便宜的或全部的路由。

这需要更多的方法来完成,毕竟如果你认为在MVC方面,tile只是转储视图,他们不太了解它们周围的什么,除了什么在他们的内部这将是计算路线的控制者,因此您需要拥有跨越所需路线的所有数据。



对于每个地图服务您将找到不同的路线,也许不是根据实际的路径,而是在估计的时间,努力等方面,这意味着如果您有自己的地图(在数据库中离线),则由您使用数据,所以你应该做出自己的路由算法,我肯定不是你想做的。



那么你有什么选择?在这个时刻,这不可能在你想要的范围内。即使您有离线地图数据库,您仍然需要路由算法。


I'm working with a project its related to Offline map application.Because of that I searched for offline map which shows the defined area. I used MapBox for offline mapping. I can add annotation on this map and draw lines.

But my requirement is offline map with routing. I was fed up to find a offline routing library or offline routing engine to embedded to Xcode.

Appreciate if any of you have any clue or sample project/code to implement this

Note : This question is related to my one. No one replied to this as well

Thanks.

解决方案

Offline implies no internet, the iPhone is still able in most cases to get the users current location from the GPS. That means that you can be quite confidant that you can find out the current location of the user whilst offline.

The problem with offline routing is that the Phone is dumb, it only remembers the x amount of MB of data in terms of tiles to display.

Routing is something completely different, it takes a point A and B and works out the shortest, fastest, cheapest or all of those between A and B.

This takes a lot more then tiles to accomplish, after all if you think in terms of MVC, tiles are just the dump views, they don't know much about what's around them except what's inside of them. It would be the "controller" who would calculate routes, and for that you would need to be in possession of all the data spanning the desired area for routing.

For each mapping service you will find a different route, maybe not in terms of actual path, but in estimated time, effort etc, what this means is that if you have your own maps (offline in a database), it's up to you to use that data, so you should make your own routing algorithm which I'm sure isn't what you want to do.

So what are your options? At the moment this just isn't possible in the scope you want. Even if you had an offline maps database, you still need a routing algorithm.

这篇关于离线地图与路由 - iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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