When using the HERE Maps router API to calculate a trucking route in an online application, we encountered an issue where an invalid trucking route was returned even though a valid trucking route existed.
We believe this to potentially be a bug in the HERE platform, as our request is well-formed, and reversing the origin and destination does return the correct route. We are of course open to any corrections we can make on our end.
Here is our request body:
{
routingMode: "fast",
transportMode: "truck",
origin: "42.946054623602855,-87.91001428574813",
destination: "42.870838078655176,-87.88293617736036",
return: "polyline",
units: "imperial",
spans: "truckAttributes"
}
We are using the the endpoint documented here: https://developer.here.com/documentation/routing-api/api-reference-swagger.html
Here is a screenshot directly from the relevant app, with potentially identifying information redacted and a corrected route marked. The pink line is a representation of the correct/expected route, and the dark blue line is the polyline that the system actually returned. The pictured point is the destination, and the origin point is off-screen.
It should be noted that when reversing the destination and origin, the correct route is actually returned (this screenshot was generated usingan official reference tool):
However, due to the nature of our application, it is very important to keep the origin and destination as-is within the logic of the code, so swapping the parameters isn't actually a solution to our problem.
Changing the waypoints in any way is also not a feasible solution - the waypoints in our system are provided by the user, and users will often have specific reason to place waypoints in very specific locations.