README
MapboxDuration Package
Calculation of travel time (in sec) between points based on the type of transport
- Domain: Mapbox
- Credentials: accessToken
How to get credentials:
- Log in or Sign up for a Mapbox Account
- Navigate to your Account Settings to get your accessToken
Custom datatypes:
Datatype | Description | Example |
---|---|---|
Datepicker | String which includes date and time | |
Map | String which includes latitude and longitude coma separated | |
List | Simple array | |
Select | String with predefined values | |
Array | Array of objects |
MapboxDuration.getDrivingDuration
Сalculate the duration of travel by car
Field | Type | Description |
---|---|---|
accessToken | credentials | The api key obtained from Mapbox |
coordinates | List | List of Maps (coordinates) minimum 2 pairs of coordinates. Maximum 100 pairs. |
MapboxDuration.getDrivingDurationByFile
Сalculate the duration of travel by car (json file coordinates)
Field | Type | Description |
---|---|---|
accessToken | credentials | The api key obtained from Mapbox |
coordinates | File | File with coordinates in json format. Maximum 100 pairs of coordinates like [[longitude1,latitude1], [longitude2,latitude2]]. |
MapboxDuration.getWalkingDuration
Сalculate the duration of travel by walking
Field | Type | Description |
---|---|---|
accessToken | credentials | The api key obtained from Mapbox |
coordinates | List | List of Maps (coordinates) minimum 2 pairs of coordinates. Maximum 100 pairs. |
MapboxDuration.getWalkingDurationByFile
Сalculate the duration of travel by walking (json file coordinates)
Field | Type | Description |
---|---|---|
accessToken | credentials | The api key obtained from Mapbox |
coordinates | File | File with coordinates in json format. Maximum 100 pairs of coordinates like [[longitude1,latitude1], [longitude2,latitude2]]. |
MapboxDuration.getCyclingDuration
Сalculate the duration of travel by cycling
Field | Type | Description |
---|---|---|
accessToken | credentials | The api key obtained from Mapbox |
coordinates | List | List of Maps (coordinates) minimum 2 pairs of coordinates. Maximum 100 pairs. |
MapboxDuration.getCyclingDurationByFile
Сalculate the duration of travel by cycling (json file coordinates)
Field | Type | Description |
---|---|---|
accessToken | credentials | The api key obtained from Mapbox |
coordinates | File | File with coordinates in json format. Maximum 100 pairs of coordinates like [[longitude1,latitude1], [longitude2,latitude2]]. |
Examples
MapboxDuration.getCyclingDuration
{
"accessToken": "Your-accessToken-here",
"coordinates": [{
"-122.42,37.78",
"-77.03, 38.91"
}]
}
Response
{
"callback":"success",
"contextWrites":
{
"to":[
{
"code":"Ok",
"durations":[
[0,14753.7,23437],
[14639.3,0,29524.6],
[22498.4,29708.1,0]
]
}
]
}
}
MapboxDuration.getCyclingDurationByFile
coordinates.json
[
[13.41894, 52.50055],
[14.10293, 52.50055],
[13.50116, 53.10293]
]
Response
{
"callback": "success",
"contextWrites":
{
"to":[
{
"code": "Ok",
"durations": [
[0,14753.7,23437],
[14639.3,0,29524.6],
[22498.4,29708.1,0]
]
}
]
}
}
Followers: 5
Resources:
Product Website API Creator:

Volodimir Kudriachenko
volodimir.kudriachenko
Log In to Rate API