NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

2
1

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%20Mazur's gravatar image

Andrey Mazur
31112
accept rate: 0%

edited 07 Dec '13, 22:50

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


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.

permanent link

answered 25 Aug '11, 19:11

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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.
Based on the scale you plan to do this you might consider running your own server. Most of the routers mentioned on wiki is open source so you would not have to program your own routing.

permanent link

answered 25 Aug '11, 19:09

LM_1's gravatar image

LM_1
3.3k335188
accept rate: 10%

edited 26 Aug '11, 18:36

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...
PS: if you use their service buy them some RAM to get faster response ;-)

(26 Aug '11, 18:49) LM_1

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×305
×290
×113

question asked: 25 Aug '11, 17:42

question was seen: 48,961 times

last updated: 11 Apr '19, 08:50

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum