6

how can I implement algorithms such as Dijkstra or backtracking on Google Maps integrated in Android ? For example I want to compute a route from city A to city B such that I pay the lowest price for gas.

Péter Török
  • 114,404
  • 31
  • 268
  • 329
bogdan
  • 73
  • 1
  • 3

2 Answers2

1

Check this post. It has the Route finding Example. Google removes the Route finding api. But we have develop the code for the draw the route using Overlay. this is what done on that working example.

Community
  • 1
  • 1
Praveen
  • 90,477
  • 74
  • 177
  • 219
  • 1
    we are developing that code with our OWN Logic from the available package. then Who want to authorize it? that example helps you for that. – Praveen Jul 19 '10 at 14:27
  • Ok, thank you very much. I asked that because of some posts from that link saying you can get blocked your google key for maps – bogdan Jul 19 '10 at 14:33
1

Since Google Maps doesn't provide access to the actual road data, I don't think it is possible to implement your own routing algorithm.

You could use road data from another source such as http://openstreetmap.org .

RoToRa
  • 37,635
  • 12
  • 69
  • 105
  • Thanks, do you have any example ? – bogdan Jul 19 '10 at 14:26
  • 1
    The best would be to probably start here: http://wiki.openstreetmap.org/wiki/Routing There is a link to the Routing mailing list, where you can get more information. Also there is a new Stackoverflow-like help site for OSM: http://help.openstreetmap.org/ – RoToRa Jul 19 '10 at 14:39