NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

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

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 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 ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 31 Jul '15, 10:56

question was seen: 25,694 times

last updated: 15 Feb '19, 20:52

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum