Force side of street on HERE Maps API route waypoints - here-api

When generating a route using the HERE API, I would like to force the route to travel down a certain side of the street. For example, there may be a pickup point on the westbound side of the 2-way street. A U-turn is not possible, thus, I need to ensure the route travels westbound through the waypoint and not eastbound. Is this possible?

Please check the Waypoint Parameter "passThrough":
http://developer.here.com/rest-apis/documentation/routing/topics/resource-param-type-waypoint.html

Related

HereAPI - Can't reach waypoints requested

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.
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

HERE Maps - truck restrictions

I'm using the Here API to calculate routes for trucks with 40t. Using the HERE devtools, i got the same error of my APP. The answer is "The API can't calculate the route because of illegal access". I checked the map (image attached) and in the street where my journey will start, with a difference of some meters, it exists two limitations 12t and 18t. The street is one way... If you see the satellite image exists several trucks... The company is testing the software says the trucks goes their...
Can some help me on this?
https://fleet.api.here.com/2/calculateroute.json?waypoint0=41.325299,2.141551&waypoint1=stopOver,3600!41.3291843,2.0317197&waypoint2=stopOver,3600!40.91260530,-8.42291420&waypoint3=38.855951,-9.104382&mode=fastest;truck;traffic:enabled&departure=2020-08-19T02:57:58&alternatives=0&weightPerAxle=14t&limitedWeight=40t&height=4m&width=2.55m&length=16.5m&trailersCount=
If you want to ignore the restrictions for trucks in the route, add the parameter truckRestrictionPenalty and set the value to soft.
The route violating truck restrictions is indicated in the response with dedicated route and manoeuvre notes. The route with the note of the type violation and the text truckRestriction may be travelled at your own responsibility. While driving on such a route, extra care has to be taken as it may result in a vehicle or road infrastructure damage.
You can read more about the parameter here.
Thanks for your feedback, but we are using the Fleet Telematics Api not the Routing API. Using your info, We researched a litle more and we found the equivalent parameter: ignoreWaypointVehicleRestriction.
We added these params &ignoreWaypointVehicleRestriction=5000;0;all and the API returned the route with the warning.
Thanks,

Here-api TransitRadius for intermediate waypoints

I'm using a following request to calculate a driving route. What is the correct syntax for specifying the transit radius? For some reason the transit radius isn't honoured for the intermediate waypoint (waypoint1) while working correctly for the final waypoint.
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={appId&app_code={appCode}&waypoint0=geo!50.035035,19.925015;1500&waypoint1=geo!50.06684315082262,19.923276861182046;1500&waypoint2=geo!50.07842990411413,20.032238457351923;1500&mode=fastest;car;traffic:enabled&arrival=2020-05-29T17:27:42.000Z&routeAttributes=shape
I've done an experiment comparison with and without requesting a transfer radius. It seems to be honoured for start and endpoints only.
I sent the same request using the routing v7 and authenticated with the APIKEY and I am not getting a loop, but the route leaves the highway, to access the park gate and then comes back onto the highway. I am not able to recreate the loop that you are getting.
Call used
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?xnlp=CL_JSMv3.1.16.1&apikey=&waypoint0=50.035035%2C19.925015%3B1500&waypoint1=50.06684315082262%2C19.923276861182046&waypoint2=50.07842990411413%2C20.032238457351923%3B1500&mode=fastest%3Bcar%3Btraffic%3Aenabled&arrival=2020-05-29T17%3A27%3A42.000Z&routeAttributes=shape&representation=display

About routing between multiple locations with truck

I have the following content in the link (https://www.developer.here.com/documentation/android-premium/dev_guide/topics/routing.html):
You can use RouteWaypoint to add more waypoint details to your route calculations. These details include whether the waypoint is a deliberate stopover or a crossing point through which the route must pass. This affects routing because the path containing the stopover or route may be different. For example, the calculated route may suggest a U-turn maneuver after a stopover, while a route containing the same location as the waypoint is recommended to continue on the same street. The via waypoint type is only supported in car routes and is not supported in other route types.
I guess this passage means that your company's SDK supports path planning between multiple points, but it seems to only support the "car" type. I want to confirm if the truck type is supported.
Adding multiple waypoints for Trucks is supported, but waypoints will always be of type "Stop_Over" , you cannot have a waypoint as type "Via_point" when using Truck Routing. More details can be found in https://www.developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/routing/RouteWaypoint.Type.html
VIA_WAYPOINT
public static final RouteWaypoint.Type VIA_WAYPOINT
No maneuver is generated for a VIA waypoint. After the VIA waypoint, route will continue in the same direction as when it's approached.
Via waypoints will "force" the route to pass through them, but they will not cause any guidance, announcement or maneuvers.
VIA waypoints are not considered during Guidance triggered re-routing nor do they trigger any callbacks upon arrival at the waypoint.
This is only supported by RouteOptions.TransportMode.CAR . It's ignored for other transport modes.

Deeplinking complex route in Here WeGo

For our use case, we need a turn-by-turn navigation on a mobile device but using a custom route.
Please let me know if the following usage scenario is possible:
Given an array of points (lat/long) that the route needs to pass through, get a route using CalculateRoute.
Create a deeplink for HERE WeGo (e.g. iOS) using the sequence of waypoints obtained in step #1
Navigate turn by turn in HERE WeGo along the route
So far I was successful in #1 but could not create a deeplink with the same route for HERE WeGo. When I create a link, the app simplifies the route to only include origin and destination points and omits all "via" points.
Would appreciate advice on this.
In general passing the waypoints one after the other should open the route with the intermediate points (at least on wego.here.com) , not so sure if this work out of the box in HERE WE Go https://developer.here.com/documentation/deeplink-web/dev_guide/topics/share-route.html

Resources