Optimized Waypoint Sequence for Fastest Car Route
To find the order of waypoints between the Berlin Main Station (start
) and the Berlin HERE Campus (end
) for the fastest route, send the following GET request:
https://wse.ls.hereapi.com/2/findsequence.json
?start=Berlin-Main-Station;52.52282,13.37011
&destination1=East-Side-Gallery;52.50341,13.44429
&destination2=Olympiastadion;52.51293,13.24021
&end=HERE-Berlin-Campus;52.53066,13.38511
&mode=fastest;car
&apiKey={YOUR_API_KEY}
- optimal sequence of waypoints for the fastest route, numbered from
0
to3
(sequence
) - information about each route segment (
interconnection
) in between two consecutive waypoints including the distance between them in meters and the estimated time in seconds - meta information about the request
{
"results": [
{
"waypoints": [
{
"id": "BerlinMainStation",
"lat": 52.52282,
"lng": 13.37011,
"sequence": 0,
...
},
{
"id": "OlympicStadium",
"lat": 52.51293,
"lng": 13.24021,
"sequence": 1,
...
},
{
"id": "EastSideGallery",
"lat": 52.50341,
"lng": 13.44429,
"sequence": 2,
...
},
{
"id": "HEREBerlinCampus",
"lat": 52.53066,
"lng": 13.38511,
"sequence": 3,
...
}
],
"distance": "34675",
"time": "3704",
"interconnections": [
{
"fromWaypoint": "BerlinMainStation",
"toWaypoint": "Olympiastadion",
"distance": 11480,
"time": 1130,
...
},
{
"fromWaypoint": "OlympicStadium",
"toWaypoint": "EastSideGallery",
"distance": 15931,
"time": 1723,
...
},
{
"fromWaypoint": "EastSideGallery",
"toWaypoint": "HEREBerlinCampus",
"distance": 7264,
"time": 851,
...
}
],
"description": "Targeted best time; without traffic",
...
}
],
...
}