Dear OpenStreetMap support, I represent a start-up project called WayLinker (www.waylinker.com). We use web maps to help car and truck drivers find passengers of cargo around the country. I would like to know whether it is possible to build our service around OSM. Can we create a PHP service via OSM API that would address OSM with Route Start and route End coordinates and in return receive a fastest/shortest route? I have looked through the wiki, but haven't found examples of an external routing API. Can you please clarify this topic ? asked 25 Aug '11, 17:42 Andrey Mazur aseerel4c26 ♦ |
There's an overview about routing with OSM on the wiki page Routing. You will be interested specifically in the list of Online Routers. There is a comparison of several services at the bottom of the page, check out the row "API open for 3rd party applications" to find some that might be suitable for you. None of these routing services is operated by OpenStreetMap directly; they are all using OpenStreetMap data but are operated by third parties. There may be usage restrictions if you are planning to use them heavily, and you might be forced to run your own server or pay for a commercial service. answered 25 Aug '11, 19:11 Frederik Ramm ♦ |
OSM servers keep map data, not routing. If you want a routing service based on OSM see online_routers. For cars only YOURS and MapQuest seem to have a public API for routing. answered 25 Aug '11, 19:09 LM_1 Thanks everyone. But all the solutions mentioned above seem to give a 3-rd party API that integrates the map in to the web site and gives us an ability to use various functions inside the map itself. Yet what we need is an API that can work via HTTP requests much like this -> http://code.google.com/apis/maps/documentation/directions/ . The thing is that Google does not provide direction services to a large number of countries, for instance Russia. So can someone tell me is there any http based API like Google has ? Thank you in advance for all your answers.
(26 Aug '11, 18:20)
Andrey Mazur
1
Looking at API documentation of YOURS and more specifically the example the response contains the nodes. This seems to me exactly what Google does, only the coordinates encoding is xml, not JSON. I doubt you get anything better...
(26 Aug '11, 18:49)
LM_1
|