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

I want to know the distance and the time that is between two points. They would be a latitude and longitude coordenates, and i need a JSON or equivalent type response, because I want to save this information, and i need to make it a few times.

i have being looking in mapquest and in cloud made, but i cant find the way to do it with a latitude and longitude point, only with a street name.

Any Idea? A lot of thanks!

asked 25 May '12, 09:14

Dreamcacher's gravatar image

Dreamcacher
6113
accept rate: 0%


This can easily be done via CloudMade which accepts lat/lon as start, end and intermediate points, just take a look at the Routing HTTP API Examples. In fact, it is even more work to do it with an address instead of lat/lon :).

As a fast and open alternative you can also use OSRM which also offers an API to its routing service with JSON responses. It only provides routing for cars so far, but is actively developed.

permanent link

answered 25 May '12, 10:14

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 25 May '12, 10:32

it's a good option, but i need the route by walking and with car, and this looks like only is available in the car option, but it's a great point to start.

Thanks!

(25 May '12, 10:32) Dreamcacher
1

No, please just take a look at the link I provided. CloudMade allows you to choose the route type between car, foot and bicycle.

(25 May '12, 10:34) scai ♦

oh! i'm sorry, i saw the route_type_modifier (modifier of the route type, for now only valid value is "shortest" for route type "car") and i didnt see anymore ^^

but you are right in route_type (type of the route ("car", "foot", "bicycle")) appears what you say

A lot of thanks!

(25 May '12, 10:49) Dreamcacher

You're welcome :)

(25 May '12, 15:13) scai ♦

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
×63
×55
×45
×29

question asked: 25 May '12, 09:14

question was seen: 27,054 times

last updated: 02 Jun '20, 10:40

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