0

I am trying to execute a rather simple request using Here FleetApi Demo, this is the request I am trying to do:

https://fleet.api.here.com/2/calculateroute.json?waypoint0=19.3411164,-99.2533428&waypoint1=19.415757,-99.177453&waypoint2=19.344366,-99.251718&mode=fastest;car;traffic:disabled&departure=2021-09-21T11:05:44&alternatives=0&weightPerAxle=0.87t&limitedWeight=1.739t&height=1.67m&width=1.8m&length=4.41m

But this error is returned:

Couldn't reach way point 1 (start links -703403377 703403377 dest links -895284559 895284559 ), closest link to destination reached: 1291258613 at 19.34133/-99.25233, issues: gate

This request has a similar situation on waypoint 2 but this returns the following issue:

Couldn't reach way point 2 (start links 895284559 dest links -832770028 832770028 ), closest link to destination reached: -1077091646 at 19.34552/-99.25272, issues: one way

In both situations, it is possible to travel these routes but Here is unable to calculate it. The only way to do so is by adding a radius to search for the waypoint but that returns wrong routing:

In this example, waypoint blue is the desired waypoint but waypoint green is returned which is not acceptable solution.

Is there a workaround to these issues or am I doing something wrong?

We use Google Maps Directions API to retrieve lat,lon of waypoints.

pp__b
  • 123
  • 7
  • Could you please paste the request packet,which is giving below error? Couldn't reach way point 2 (start links 895284559 dest links -832770028 832770028 ), closest link to destination reached: -1077091646 at 19.34552/-99.25272, issues: one way –  Sep 23 '21 at 07:24
  • Hey Here, thanks for the response. Do you mean the params passed to the API? I posted the complete link with all query params that cause this error to appear. You can find them here: { "alternatives": "0", "departure": "2021-09-21T11:05:44", "height": "1.67m", "length": "4.41m", "limitedWeight": "1.739t", "mode": "fastest;car;traffic:disabled", "waypoint0": "19.3411164,-99.2533428", "waypoint1": "19.415757,-99.177453", "waypoint2": "19.344366,-99.251718", "weightPerAxle": "0.87t", "width": "1.8m" } – pp__b Sep 23 '21 at 16:09
  • Thank you for the response. I am checking and will get back to you soon. –  Sep 24 '21 at 10:55

1 Answers1

1

When you throw the request into demo tool https://tcs.ext.here.com/examples/v3/fleet_telematics_api (expert mode). It will show the error and a red flag at the nearest reached point. Then you see that this is a industrial area or leisure park or similar. The fleet telematics APIs applies various vehicle restrictions and gate restrictions while calculating the route.

If you want to ignore those restrictions you have to set &ignoreWaypointVehicleRestriction=100000 and &traverseGates=true in the request query. Then ,it will ignore the VehicleRestriction and allows the router to traverse all gates.
Sample Request.

https://fleet.api.here.com/2/calculateroute.json?waypoint0=19.3411164,-99.2533428&waypoint1=19.415757,-99.177453&waypoint2=19.344366,-99.251718&mode=fastest;car;traffic:disabled&departure=2021-09-21T11:05:44&alternatives=0&weightPerAxle=0.87t&limitedWeight=1.739t&height=1.67m&width=1.8m&length=4.41m&&ignoreWaypointVehicleRestriction=800000&traverseGates=true

For more details regarding &ignoreWaypointVehicleRestriction=100000 and &traverseGates=true flags ,please refer below API document.

https://developer.here.com/documentation/fleet-telematics/api-reference.html#tag%2FRouting-Extensions-&-Route-Matching%252Fpaths%252F~1v8~1calculateroute.json%252Fget