This specific route doesn't work when height is set to 420cm:
https://fleet.api.here.com/2/calculateroute.json?
jsonAttributes=41
&waypoint0=53.94499,10.85676
&waypoint1=41.59747,-4.72606
¤cy=EUR
&mode=fastest;truck;traffic:disabled
&legAttributes=none
&tollVehicleType=3
&trailerType=2
&trailersCount=1
&vehicleNumberAxles=3
&trailerNumberAxles=2
&tiresCount=10
&hybrid=0
&emissionType=6
&fuelType=diesel
&height=420cm
&trailerHeight=420cm
&length=1650cm
&width=255cm
&heightAbove1stAxle=100cm
&vehicleWeight=12000kg
&limitedWeight=40000kg
&commercial=1
&driver_cost=1000
&vehicle_cost=1
&app_id=
&app_code=
The api returns an error:
{"issues":[{"message":"Couldn't reach way point 1 (start links 1208480385 -1208480385 dest links 564534255 -564534255 ), link 1208480385's through traffic restriction might apply"},{"message":"Request id: cbf5e720-a40e-45fe-9c87-cb92c39d3b85"}],"response":null,"error_id":"cbf5e720-a40e-45fe-9c87-cb92c39d3b85","response_code":"400 Bad Request"}
Setting both height parameters to 400cm instead makes it work.
I've tried to check truck restrictions along the route but couldn't find any, for that I used this mapping example provided by Here Fleet Telematics API and checked the "Truck restrictions" checkbox
Can you tell where the restriction is for this specific route?
Answering my own question. I think it fails with 420cm height because many countries in Europe has a default height restriction of 400cm, while we in Finland have 420cm. So just using 400cm height for this specific route should be ok.
Related
Im using the "avoidareas" parameter to remove some points from the initial trip. This method worked a couple of months ago, but now it returns the same route as the initial trip, ignoring the "avoidareas" parameter.
Here is the exemple im working with:
"https://fleet.ls.hereapi.com/2/calculateroute.json?apiKey={YOUR API KEY}&mode=fastest;truck;traffic:enabled;¤cy=EUR&restTimes=EU&traverseGates=true&tollVehicleType=3&trailerType=2&trailersCount=1&length=13.6&width=2.4m&height=3m&limitedWeight=24000kg&legAttributes=li,-mn,sh&linkAttributes=wn,le,sh,-fc&mapMatchRadius=5000&ignoreWaypointVehicleRestriction=5000;0;all&departure=2022-09-08T16:00:00&waypoint0=40.613223,-3.2451044&waypoint1=39.919898,-8.634333&avoidareas41.6419,-5.16831;41.541900000000005,-5.06831"
Am i doing something wrong? Has something been updated?
The 'avoidAreas' feature works, but the request needs to be verified for the following:
the parameter name is in camelCase, so it should be 'avoidAreas', you are missing "=" sign right after avoidareas in your request url,
avoid area rectangle should be specified by latMax,lonMin;latMin,lonMax
A sample request looks like https://fleet.api.here.com/2/calculateroute.json?waypoint0=50.112698,8.675777&waypoint1=48.544180,9.662530&mode=fastest;truck;traffic:enabled&departure=2022-08-09T13:12:35&alternatives=0&weightPerAxle=3.25t&limitedWeight=7.5t&height=3.4m&width=2.5m&length=7.2m&trailersCount=1&avoidAreas=48.988757459020015,8.436328214242295;48.94714399157084,8.493687099461848
Thanks
/MS
I want to avoid specific streets when using the routing API. I have data points to create a geofence or polygon to represent those specific streets.
The router API accepts only up to 20 bounding boxes. I tried to send 20 avoid area bounding boxes to represent the road, but the result is not reliable (e.g. on diagonal roads).
Is there a way to send a geofence/polygon instead of bounding boxes?
Or any other way to avoid certain streets?
Thank you very much
Please try to use avoid[segments] instead of avoid[areas] for avoiding specific roads. In the case of having too many roads to avoid, you can also put the avoid[segments] parameters into request body and send a POST request to the same endpoint.
In order to get the segmentId of the roads you would like to avoid, you can do a normal routing call with parameter spans=segmentId added and then look at the topologySegmentId attributes in spans section of the response.
https://developer.here.com/documentation/routing-api/api-reference-swagger.html
HERE Routing API now supports polygons for avoid area, https://www.here.com/learn/blog/routing-supports-polygons-for-avoid-areas
You have to make below calls for your usecase.
1>Rest call to get segmentId For the route.
https://router.hereapi.com/v8/routes? apikey={your_app_id}& origin=32.834496,74.81515& destination=32.811632,75.816037& return=polyline,summary,actions,instructions& spans=segmentId& transportMode=car&
2>Rest Call to get the get Route with avoid[segments]
https://router.hereapi.com/v8/routes? apikey={your_app_id}& origin=32.834496,74.81515& destination=32.811632,74.816037& return=polyline,summary,actions,instructions& spans=segmentId& transportMode=car& avoid[segments]=here:cm:segment:808368834,here:cm:segment:808095972
Is there a possibility to give some more params in the waypoint API? Things like speedlimit, height, width etc. When I create a route with the waypoint API with type truck the time between the destinations is too much and with type car the time between the destinations is too little.
Based on what I see in the Swagger docs (https://developer.here.com/documentation/routing-api/api-reference-swagger.html), there appear to be a list of options under "Supported place options:", including:
course
sideOfStreetHint
matchSideOfStreet
nameHint
radius
minCourseDistance
This then is separated from the next section, waypoint options, which only supports "stopDuration"
I'd say it's only stopDuration.
I am using this link
Fleet Telematics API
but I am getting an error.
Couldn't reach way point 1 (start links -1022136892 -1022136890 -1022136876 -1022136875 1022136875 1022136876 1022136890 1022136892 dest links -1240614930 1240614930 )
Why is this happening? I provided valid coordinates.
This is not an error (afaik) because the parameters are strict enough to not be able to find a route. It looks like the limitedWeight parameter is the one causing it to return this.
I have set up goal to URL destination: '/pageview.html'.
If I execute below URL on my universal analytic page views will increase by 1 (which is correct). Also my goal will increase by 1 (which is also correct).
Link 1 example
http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-4&cid=987987987&t=pageview&sr=-&sd=-&ul=-&je=0&fl=-&dt=%2Fphonecallleads.html&dh=www.wednesday.co.uk&dr=http%3A%2F%2Fwww.wednesday.co.uk%2Fbla%3Fhehe%3Dvisitor&dp=/phonecallleads.html&z=321321321
How ever if I execute the same link again but with different number in 'z' parameter to prevent caching on my analytic page views will increase by 1 (which is correct) but my goal will not increase... Why is my goal not increasing ?
Link example 2 witch different 'z' parameter
http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-4&cid=987987987&t=pageview&sr=-&sd=-&ul=-&je=0&fl=-&dt=%2Fphonecallleads.html&dh=www.wednesday.co.uk&dr=http%3A%2F%2Fwww.wednesday.co.uk%2Fbla%3Fhehe%3Dvisitor&dp=/phonecallleads.html&z=654654654
Thank you Eike Pierstorff.
The issue was that UA counts goals only once per session.
To resolve that issue I have added an extra parameter to the URL - Session control which starts new session once request is submitted.
&sc=start