Skip to content Skip to sidebar Skip to footer

Here Maps: Give Directions To Correct Side Of The Street

Occasionally when calculating a route it seems the vehicle ends being directed to the wrong side of the street. I realize we can specify pass through waypoints before the final des

Solution 1:

You can use NavigationWaypointParameter with LinkPositions to set a direction you want to drive through a certain waypoint. For example:

https://route.api.here.com/routing/7.2/calculateroute.json?
app_code={app_code}
&app_id={app_id}
&mode=fastest;car
&waypoint0=link!-22020941
&waypoint1=link!-948669856

This should give you the route you are looking for, with the bus heading towards the south-east with the destination on its right.

Arrival heading south-east

You can change the direction of the link traversal by changing it's prefix. For example, changing -948669856 to +948669856 gives you the original, shorter route, with the bus heading north-west and the destination on the left side of the road.

Arrival heading north-west

Note that you can get the link ids through reverse geocoding using the Geocoder API. The link id is the <ReferenceID> under <MapReference> in the <Result>.

Post a Comment for "Here Maps: Give Directions To Correct Side Of The Street"