Matrix API computes the distance and duration of the fastest route between all pairs of supplied coordinates. Full URL for requests is https://api.strues-maps.lt/v1/table. Only successful requests are counted towards hard limits and are billed.
points=long1
,lat1
;long2
,lat2
;long3
,lat3
;
Longitudes and latitudes must be supplied in WGS84 projection, also known as EPSG 4326. Number of coordinates supplied are only limited by maximum length of URI.
api_key=your_personal_api_key
Api key is provided after registration. Api key is used for service configuration like hard limits and billing.
signature=your_personal_signature
Signature which must be used with api key is provided after registration.
200
- Successful response
Request was successfully. Response body contains distance and duration of the fastest route between all pairs of supplied coordinates.
400
- Bad request exception
Returned if parameters are not provided or provided in an invalid format.
401
- Unauthorized
Returned if api key or signature is invalid.
429
- Too many requests
Returned if hard limits are reached.
402
- Payment required
Returned if user has insufficient funds to make a request.
500
- Internal server error
Returned if unexpected error has occurred. We are working on it to resolve it.
{
"code": "Ok",
"durations": [
[
0,
524.3,
],
[
574.5,
0,
]
],
"distances": [
[
0,
5225.7,
],
[
5740.6,
0,
]
]
}
code
- "Ok" or "NoTable"
durations[i][j]
- array of arrays that stores the matrix in row-major order.
durations[i][j] gives the travel time from the i-th waypoint to the j-th waypoint.
Values are given in seconds.
distances[i][j]
- array of arrays that stores the matrix in row-major order.
distances[i][j] gives the travel distance from the i-th waypoint to the j-th waypoint.
Values are given in meters.