Handling Unreachable Destinations in HERE Routing
Overview
--------
When using HERE Routing with transportMode=scooter, you may encounter cases where the destination is unreachable. This typically happens when the destination is located in areas that scooters cannot access, such as motorway rest areas. In such cases, the routing engine will stop at the nearest accessible point, often at the motorway entrance. This behavior is by design.
Root Cause
----------
The destination lies in a restricted area for scooters (e.g., motorway rest area).
Routing service adheres to access rules and avoids prohibited roads.
Recommended Solution
--------------------
To minimize routing failures and get the closest possible arrival point to the intended destination, use the following parameters in your routing request:
radius: Expands the arrival search area around the destination.
+ Example: radius=200 (meters)
radiusPenalty: Applies a penalty for arriving farther from the destination, ensuring the closest possible point is chosen.
+ Example: radiusPenalty=3600
### Example Request<br />https://router.hereapi.com/v8/routes?origin=-6.207168,106.664443&destination=-6.214554,106.676658;radius=200;radiusPenalty=3600&return=polyline,summary,actions,instructions&transportMode=scooter <br /> <br /><br />
Why This Works
--------------
radius allows the routing engine to consider nearby points when the exact destination is inaccessible.
radiusPenalty ensures the engine still prioritizes proximity to the destination, avoiding overly distant arrival points.
Additional Notes
----------------
For normal destinations, this configuration will not cause early or far-away arrivals because the penalty mechanism ensures the nearest point is selected.
Example of normal routing behavior:
+ From: -6.219142,106.67328
+ To: -6.220408,106.677203

Key Takeaway
When destinations are inaccessible for certain transportMode, such as scooter, try using radius and radiusPenalty parameters in HERE Routing API to reduce routing failures and ensure arrival at the closest possible point to the intended destination