Skip to content

Instantly share code, notes, and snippets.

@kyroskoh
Last active February 23, 2018 04:05
Show Gist options
  • Save kyroskoh/23410a2c6469dbcea7d0b19349357a83 to your computer and use it in GitHub Desktop.
Save kyroskoh/23410a2c6469dbcea7d0b19349357a83 to your computer and use it in GitHub Desktop.
OSRM Car (Drive) Server HTTP API

OSRM Car (Drive) Server HTTP API

Assumption

Assuming that your OSRM Service is running on the default port: 5000.


Format:

http://ip:5000/route/v1/car/lng1,lat1;lng2,lat2?steps=true&geometries=polyline&overview=full

Note: lng1 and lat1 = Point A's Lat and Lng, while lng2 and lat2 = Point B's Lat and Lng.


Browser:

http://ip:5000/route/v1/car/103.84201,1.319787;103.80147,1.27342?steps=true&geometries=polyline&overview=full

or

Terminal using curl:

curl "http://ip:5000/route/v1/car/103.84201,1.319787;103.80147,1.27342?steps=true&geometries=polyline&overview=full"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment