I wish to get the distance and the travel time from one map point to another in open street map in json format for my laravel based website. How can i do this? Since i am new to open street map, i am not aware of the steps to follow. Please help me. Thanks in advance

asked 31 Jul '15, 10:56

sujitha's gravatar image

sujitha
11223
accept rate: 0%


Computing the travel distance between two points requires a routing engine. A routing engine needs to be run on a server. There are a couple of people who operate such servers and who will let you use them for free, for example the server at http://map.project-osrm.org. That site also contains documentation about how to call the server and get a JSON response (or just switch on your browser's net debugger and see what requests it sends).

Be aware however that if you should set up a web site that makes many such routing requests, or even a commercial site of which such routing is an integral part, then you should not use these volunteer run resources, but instead set up your own routing server. The software and the data are free for the taking - but the computing resources need to be paid for by someone!

permanent link

answered 31 Jul '15, 11:10

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
71.3k846451113
accept rate: 24%

Your answer
toggle preview

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:

×276
×49

question asked: 31 Jul '15, 10:56

question was seen: 9,529 times

last updated: 15 Feb, 20:52

powered by OSQA