Hello,
can I get full list of contries inculded in the route in RouteResponse?
Get list of countries in route
- Bernd Welter
- Site Admin
- Posts: 2684
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Get list of countries in route
Hello Artem,
request the ResultFields and ask for COUNTRY_EVENTS: Here's a sample route from Luxemburg to Barcelona:
and the response:
Is that what you are looking for?
Bernd
request the ResultFields and ask for COUNTRY_EVENTS: Here's a sample route from Luxemburg to Barcelona:
Code: Select all
{
"waypoints": [
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 6.22029,
"y": 49.61513
}
}
},
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 2.1700100683,
"y": 41.388038574
}
}
}
],
"resultFields": {
"eventTypes": [
"COUNTRY_EVENT"
]
}
}
Code: Select all
{
"$type": "RouteResponse",
"distance": 1160646,
"travelTime": 55429.948,
"events": [
{
"$type": "CountryEvent",
"eventType": "COUNTRY_EVENT",
"coordinate": {
"x": 6.2202900472,
"y": 49.615130034
},
"distanceFromStart": 0,
"travelTimeFromStart": 0,
"country": "LU"
},
{
"$type": "CountryEvent",
"eventType": "COUNTRY_EVENT",
"coordinate": {
"x": 6.1213250692,
"y": 49.472504164
},
"distanceFromStart": 23232,
"travelTimeFromStart": 1398.32,
"country": "FR"
},
{
"$type": "CountryEvent",
"eventType": "COUNTRY_EVENT",
"coordinate": {
"x": 2.8653062122,
"y": 42.465136293
},
"distanceFromStart": 998299,
"travelTimeFromStart": 47117.747,
"country": "ES"
}
],
"violated": false
}
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
-
- Posts: 2
- Joined: Tue Feb 02, 2021 4:26 pm
Re: Get list of countries in route
Yes, thanks a lot