Calculate the distance between two locations (non-straight line)
SDK apifmDevelopment reference
This method calculates the distance required for the given longitude and latitude points on the two maps under the specified route planning method (Unit is meter)
```javascript
WXAPI.mapDistanceNavigationV2({
mode: 'Calculation method: driving (driving), walking (walking), bicycling: bicycle',
from: '39.071510,117.190091',
to: '39.071510,117.190091'
})
```
Return data:
```json
{
"code": 0,
"data": {
"result": {
"rows": [
{
"elements": [
{
"distance": 10
}
]
}
]
},
"message": "query ok",
"request_id": "882506288691942125",
"status": 0
},
"msg": "success"
}
```
In this example, the distance between these two points is 10 meters `distance`