Routing (bike, walking, car)
Routing service (a.k.a. turn-by-turn) lets you integrate routing and navigation into a web or mobile application.
tip
When using that, just use our Enterprise Dashboard or guild API Key to create your API Key try for free!
Base URL
The base URL for all API requests is:
https://mapapis.openmap.vn/v1
Endpoint
GET /direction
Example
Request:
/direction?origin=10.78746,106.69855&destination=10.79135,106.70238&vehicle=car&apikey=YOUR_API_KEY
Request params
Param | Description | Example |
---|---|---|
origin | The origin (start) coordinate string (Required) | 21.0267400,105.7740100 |
destination | The destination coordinate string. Split by ; for more than 2 destinations (Required) | 21.0196200,105.8576430 |
alternatives | Boolean, if true , Directions service may return several routes | true |
vehicle | Vehicle type. Options are car , bike , motor , taxi , truck , walking | car |
language | Language of the route instructions. Options are en , vi | en |
admin_v2 | Return information about new locations after administrative boundary consolidation | true |
Response:
{
"geocoded_waypoints": [
{
"geocoder_status": "OK",
"place_id": "aDpeRUVL2x1AdDRBA7hDHZIKgn98vRK8RgkI4XSm-2rhyHnRCK5GxdCtWThA"
},
{
"geocoder_status": "OK",
"place_id": "PlopbmUIDBBLUVJUyq6O8Ek5XJQE5gr5SqVosbjiqvRJbUINeN1S9U1JHgRg"
}
],
"routes": [
{
"bounds": {},
"legs": [
{
"distance": {
"text": "1.76 km",
"value": 1762
},
"duration": {
"text": "2 minutes",
"value": 143
},
"end_address": "