Well, the cause for this "experience" is quite simple - here's the xServer2 response:I am calculating a route for a large truck but the route takes a path that is forbidden for this kind of vehicle - what are we doing wrong?
To consider the so-called truck attributes data properly you need to provide two ingredients:
- Proper releant attributes of the vehicle, either via a reference to a storedProfile (e.g. "truck40t") or through a requestProfile
- Request the consideration of the additional data such as the PTV_TruckAttributes through a so-called feature layer theme.
- PTV_TruckAttributes
- PTV_RestrictionZones
- PTV_PreferredRoutes (and more)
Here's a sample request:
Code: Select all
{
"storedProfile":"truck40t",
"requestProfile":{
"featureLayerProfile":{
"themes":[
{
"id":"PTV_TruckAttributes",
"enabled":true
}
]
}
},
"waypoints": [
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 8.3880776809,
"y": 48.99174118
}
}
},
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 8.377723763,
"y": 48.98747636
}
}
}
],
"resultFields": {
"polyline": true
}
}