'HERE Waypoints Sequence API specifying vehicle height, width, length
I'm a bit confused by how to specify vehicle height, length, and width in the Waypoints Sequence v8 API reference. According to this reference, height is specified as "350cm or 3.5m or 138in. For truck restrictions and toll cost."
However, you can't actually use "cm", "m", or "in" as the API throws an error:
{"results":null,"errors":["Wrong number format (height=260cm) Error ID: 160bf878-2b03-4b6c-bd08-6cf022da5e19"],"processingTimeDesc":null,"responseCode":"400","warnings":null,"requestId":null}
Here is my API call where height, width, and length are specified in centimeters without explicitly saying "cm":
https://wps.hereapi.com/2/findsequence.json?apiKey=<api_key>&commercial=1&start=start;33.77665,-118.21688&end=end;34.88298,-117.05651&destination1=destination1;35.31211,-119.09033&destination2=destination2;34.41922,-118.49697&improveFor=time&mode=fastest;truck;traffic:disabled&height=260&width=260&length=800&vehicleWeight=9100&vehicleNumberAxles=4&fuelType=Diesel
But this returns
{"results":null,"errors":["Number is out of range. It should be within range [0,50] (height=260) Error ID: 5cd35dba-da99-4ab0-aeb9-56d58e961672"],"processingTimeDesc":null,"responseCode":"400","warnings":null,"requestId":null}
The same thing happens with width (range [0,50]
) and length (range [0,300]
). Based on these numbers, it seems like the API is expecting a number in terms of meters. However, I want to verify this because length with a range of up to 300m is very long.
Solution 1:[1]
Thank you for the feedback, we'll correct the documentation. Waypoint Sequence v8 doesn't support units for these parameters(height, width) and we have reported an internal request to fix the documentation. Please find a working request for reference: https://wps.hereapi.com/2/findsequence.json?apiKey=&start=WiesbadenCentralStation;50.0715,8.2434&destination1=FranfurtCentralStation;50.1073,8.6647&destination2=DarmstadtCentralStation;49.8728,8.6326&destination3=FrankfurtAirport;50.050639,8.569641&destination4=HanauCentralStation;50.1218,8.9298&end=MainzCentralStation;50.0021,8.259&improveFor=distance&mode=fastest;truck;traffic:disabled;&hasTrailer=true&limitedWeight=18&height=3.5&width=2.5&length=18.35
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | HERE Developer Support |