Navigation API computes the most efficient route between starting and ending coordinates. Full URL for requests is https://api.strues-maps.lt/v1/route. Only successful requests are counted towards hard limits and are billed.
start.long=long1
Longitude of starting location. Longitudes must be supplied in WGS84 projection, also known as EPSG 4326.
start.lat=lat1
Latitude of starting location. Latitudes must be supplied in WGS84 projection, also known as EPSG 4326.
end.long=long2
Longitude of destination. Longitudes must be supplied in WGS84 projection, also known as EPSG 4326.
end.lat=lat2
Latitude of destination. Latitudes must be supplied in WGS84 projection, also known as EPSG 4326.
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",
"routes": [
{
"legs": [
{
"steps": [
{
"intersections": [
{
"out": 0,
"entry": [true],
"bearings": [283],
"location": [
23.895149,
54.93023
]
}
],
"driving_side": "right",
"geometry": "ewgnIi...",
"mode": "driving",
"duration": 17.2,
"maneuver": {
"bearing_after": 283,
"type": "depart",
"modifier": "right",
"bearing_before": 0,
"location": [
23.895149,
54.93023
]
},
"weight": 29.2,
"distance": 49.9,
"name": ""
},
{
"intersections": [
{
"in": 0,
"entry": [true],
"bearings": [323],
"location": [
23.930107,
54.908578
]
}
],
"driving_side": "right",
"geometry": "{jcnIyz...",
"mode": "driving",
"duration": 0,
"maneuver": {
"bearing_after": 0,
"type": "arrive",
"modifier": "right",
"bearing_before": 143,
"location": [
23.930107,
54.908578
]
},
"weight": 0,
"distance": 0,
"name": ""
}
],
"distance": 5215.4,
"duration": 524.3,
"summary": "Street A, Street B",
"weight": 588.1
}
],
"distance": 5215.4,
"duration": 524.3,
"weight_name": "routability",
"weight": 588.1
}
]
}
code
- "Ok" or "NoRoute"
routes[i]
- An array of route objects, ordered by descending recommendation rank.
routes[i].distance
- The distance traveled by the route in meters.
routes[i].duration
- The estimated travel time in seconds.
routes[i].geometry
- The whole encoded geometry of the route value.
routes[i].legs
- The legs between the given waypoints, an array of objects.
routes[i].legs[j].distance
- The distance traveled by leg in meters.
routes[i].legs[j].duration
- The estimated travel time in seconds.
routes[i].legs[j].summary
- names of two major roads used, can be empty if route is too short.
routes[i].legs[j].steps[k]
- array of objects describing the turn-by-turn instructions.
routes[i].legs[j].steps[k].distance
- The distance of travel from the maneuver to the subsequent step, in meters.
routes[i].legs[j].steps[k].duration
- The estimated travel time in seconds.
routes[i].legs[j].steps[k].geometry
- Encoded geometry of route segment.
routes[i].legs[j].steps[k].name
- Name of the road along which travel proceeds.
routes[i].legs[j].steps[k].mode
- Mode of transportation, usually "driving".
routes[i].legs[j].steps[k].maneuver
- An object representing the maneuver.
routes[i].legs[j].steps[k].maneuver.location
- Coordinates of maneuver. Coordinates will be supplied in WGS84 projection,
also known as EPSG 4326.
routes[i].legs[j].steps[k].maneuver.bearing_before
- The clockwise angle from true north to the direction
of travel immediately before the maneuver.
routes[i].legs[j].steps[k].maneuver.bearing_after
- The clockwise angle from true north to the direction
of travel immediately after the maneuver.
routes[i].legs[j].steps[k].maneuver.type
- Type of the maneuver.
turn
: a basic turn into direction of the modifier
new name
: no turn is taken/possible, but the road name changes. The road can take a turn itself, following modifier.
depart
: indicates the departure of the leg.
arrive
: indicates the destination of the leg.
merge
: merge onto a street (e.g. getting on the highway from a ramp, the modifier specifies the direction of the merge).
ramp
: Deprecated. Replaced by on_ramp and off_ramp.
on ramp
: take a ramp to enter a highway (direction given my modifier).
off ramp
: take a ramp to exit a highway (direction given my modifier).
fork
: take the left/right side at a fork depending on modifier.
end of road
: road ends in a T intersection turn in direction of modifier.
use lane
: going straight on a specific lane.
continue
: turn in direction of modifier to stay on the same road.
roundabout
: traverse roundabout, has additional field exit with NR if the roundabout is
left. the modifier specifies the direction of entering the roundabout.
rotary
: a traffic circle. While very similar to a larger version of a roundabout, it does
not necessarily follow roundabout rules for right of way.
roundabout turn
: describes a turn at a small roundabout that should be treated as normal
turn. The modifier indicates the turn direction. Example instruction: At the roundabout turn left.
notification
: not an actual turn but a change in the driving conditions. For example the
travel mode. If the road takes a turn itself, the modifier describes the direction.
routes[i].legs[j].steps[k].maneuver.modifier
- An optional string indicating the direction change of the
maneuver.
uturn
: indicates reversal of direction.
sharp right
: a sharp right turn.
right
: a normal turn to the right.
slight right
: a slight turn to the right.
straight
: no relevant change in direction.
slight left
: a slight turn to the left.
left
: a normal turn to the left.
sharp left
: a sharp turn to the left.
routes[i].legs[j].steps[k].maneuver.exit
- An optional integer indicating number of the exit to take. The
field exists for roundabouts and rotary type field.
routes[i].legs[j].steps[k].intersections[l]
- An intersection gives a full representation of any cross-way
the path passes bay. For every step, the very first intersection corresponds to the location of the maneuver. Further
intersections are listed for every cross-way until the next turn instruction.
routes[i].legs[j].steps[k].intersections[l].location
- Coordinates of intersection. Coordinates will be supplied
in WGS84 projection, also known as EPSG 4326.
routes[i].legs[j].steps[k].intersections[l].bearings
- A list of bearing values that are available at the
intersection. The bearings describe all available roads at the intersection.
routes[i].legs[j].steps[k].intersections[l].entry
- A list of entry flags, corresponding in a 1:1 relationship
to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates
that the turn onto the respective road would violate a restriction.
routes[i].legs[j].steps[k].intersections[l].in
- index into bearings/entry array. Used to calculate the bearing
just before the turn. Namely, the clockwise angle from true north to the direction of travel immediately before the
maneuver/passing the intersection. Bearings are given relative to the intersection. To get the bearing in the direction
of driving, the bearing has to be rotated by a value of 180. The value is not supplied for depart maneuvers.
routes[i].legs[j].steps[k].intersections[l].out
- index into the bearings/entry array. Used to extract the
bearing just after the turn. Namely, The clockwise angle from true north to the direction of travel immediately after
the maneuver/passing the intersection. The value is not supplied for arrive maneuvers.
routes[i].legs[j].steps[k].intersections[l].lanes
- array of objects that denote the available turn lanes
at the intersection. If no lane information is available for an intersection, the lanes property will not be present.
routes[i].legs[j].steps[k].intersections[l].lanes[m].indications
- an indication (e.g. marking on the road)
specifying the turn lane. A road can have multiple indications (e.g. an arrow pointing straight and left). The indications
are given in an array, each containing one of the following types.
none
: No dedicated indication is shown.
uturn
: An indication signaling the possibility to reverse (i.e. fully bend arrow).
sharp right
: An indication indicating a sharp right turn (i.e. strongly bend arrow).
right
: An indication indicating a right turn (i.e. bend arrow).
slight right
: An indication indicating a slight right turn (i.e. slightly bend arrow).
straight
: No dedicated indication is shown (i.e. straight arrow).
slight left
: An indication indicating a slight left turn (i.e. slightly bend arrow).
left
: An indication indicating a left turn (i.e. bend arrow).
sharp left
: An indication indicating a sharp left turn (i.e. strongly bend arrow).
routes[i].legs[j].steps[k].intersections[l].lanes[m].valid
- a boolean flag indicating whether the lane is a valid choice in the current maneuver.