0

I'm encountering two issues when using HERE SDK for Android, they may be related or may not be, but I'm not entirely sure:

  1. Route calculation waypoint limit

There's a limit to the amount of waypoints that can be used when calculating a route (Roughly 200?), where the following error is given when trying to calculate such a route that exceeds this limit:

[routing] <head><title>414 Request-URI Too Large</title></head>
[routing] <body>
[routing] <center><h1>414 Request-URI Too Large</h1></center>
[routing] <hr><center>openresty</center>
[routing] </body>
[routing] </html>
[routing] , error code: 414

Is there a way around for this? I've tried separating the route into multiple segments and calculating them but I'd much prefer if it was just one route instead.

  1. Simulation stoppage

When navigating long routes through the simulator, at some point the simulator stops feeding location data to the visual navigator, no errors or logs what so ever, it just stops randomly and stays there. Seomtimes it's easier to recreate this issue by making the simulator speed really fast (20, etc.), any idea why this occurs?

user13191088
  • 36
  • 1
  • 5

1 Answers1

0

The error message indicates that the route is calculated on the backend. If the waypoints are appended to the URL then it can become probably too large.

Try calculating such routes offline, then no limitation should occur as the route would then be calculated on the device. Use the OfflineRoutingEngine for this.

Alternatively, you should be able to use the importRoute method to create routes from an unlimited list of coordinates. With such a high number of waypoints, you seem to seek after a very strict shape of the route, so this method could fit.

The second problem can be related if it happens only for routes with many waypoints. For example, if a very long route with just two waypoints would not show this issue, it may be related, otherwise not. Probably, it's best to isolate this issue and file a bug report to the HERE team.

Nusatad
  • 3,231
  • 3
  • 11
  • 17
  • Thanks for the reply. I've tried using the OfflineRoutingEngine as you've mentioned, but this simply doesn't calculate it at all as it says "Route Calculation Failed: NO_ROUTE_FOUND", and it's probably not as accurate as online routing anyway. As for ImportRoute, it seems that I don't have enough permissions to use it as it says "Forbidden" so I will look into that after. – user13191088 Dec 17 '21 at 09:47