Search code examples
here-api

polyline issue - getting the same polyline as the last call - rest of data is new


Using python herepy API integration and am route_v8 version. Calling the route API with polyline return gets me the new data but old polyline (from previos call). If I do the call again I become the new/correct one. I checked directly in the response and the result is the same polyline. Any ideas why this could happen?

Previous call results (start/end geolocation of first stop and polyline for the map):

end: {lat: 45.8223962, lng: 14.8474556}
polyline: "BGqv163Ci6t1b-..._E8VAoG8B0K8BkNAsJT6F"
start: {lat: 46.0500373, lng: 14.5069131}

Call with new route - the start and end geolocation change but the polyline stays the same/old one.

end: {lat: 46.2553703, lng: 14.1628533}
polyline: "BGqv163Ci6t1b-..._E8VAoG8B0K8BkNAsJT6F"
start: {lat: 46.0500373, lng: 14.5069131}

Tried to call 2 times and then the issue is corrected, but that means 2 calls and it is redundant.


Solution

  • The API worked correctly. The string compare function had an issues with the long string compare. If someone will have the same issues its most likely async calls to the polyline maps.