6

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.

Community
  • 1
  • 1
Gayan
  • 1,425
  • 4
  • 21
  • 41
  • I guess if we can get a set of lats/longs of a certain route, it is quite easy to draw polylines. MapBox provides a way to draw poly lines on the map. Can somebody provide a solution for the above question, that is how to get a set of lats/longs of a route/path when we provide the starting and end points. – Sukitha Udugamasooriya Oct 16 '12 at 09:48
  • Have you found any working solutions yet? I will have to implemented similar functionality, however no solutions still exist. – Centurion Mar 05 '13 at 09:38
  • hi can u tell me how you have done offline maps with MapBox. – 08442 May 07 '13 at 05:39
  • can u give me some sample project/code how to do this please help – 08442 May 08 '13 at 12:48
  • Have a look https://github.com/graphhopper/graphhopper-ios/ – Karussell May 12 '16 at 13:43

3 Answers3

4

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.

Daniel
  • 23,129
  • 12
  • 109
  • 154
  • @Danial: First I really Thank for your in detail explanation. Appreciate your information. As you said Im seeking for already implement routing library or engine. If its route for specific area it doesn't matter for me. Im considering only for the routing (within 10x10 kms is more than enough for me). I would really appreciate if you share any routing library or engine for my need ? Thanks – Gayan Oct 17 '12 at 05:07
  • There are many commercial offline routing engines/SDKs for iOS. Also open source, see the answer from Umamaheswari – Karussell May 12 '16 at 13:42
0

In offline case also you can get the current location by using only GPS and you can draw overlay lines from current location to the interesting point for that you have to do some calculations

Anshad Rasheed
  • 2,526
  • 1
  • 14
  • 32
0

You can make offline routing by using graphhopper library by making graph data which contains (Street names, routes,edges) . Graph data is taken by .pbf file which can be taken by (Use this:http://download.geofabrik.de) and use commands(in Terminal) that was given by (https://github.com/graphhopper/graphhopper-ios/tree/master/graphhopper-ios-sample) to convert .pbf into graph data. Then we can make offline routing with its instruction (All given in graphhopper iOS sample).please refer that carefully. because i have done and finish my project successfully.