'Compressed routes in HERE
We're novices using this SDK. We are showing a Map polyline with this method:
ArrayList<GeoCoordinates> coordinates = new ArrayList<>();
coordinates.add(new GeoCoordinates(52.53032, 13.37409));
coordinates.add(new GeoCoordinates(52.5309, 13.3946));
coordinates.add(new GeoCoordinates(52.53894, 13.39194));
coordinates.add(new GeoCoordinates(52.54014, 13.37958));
We get these track points from a collection of Firestore. The problem is that we have routes with 60000 track points (lat/lng). Does exist a way to get that from a compressed object with all the route? We need that the route requires the minor data possible from Firestore storage.
Thanks!!
Solution 1:[1]
What you want is probably not only creating a polyline, but to create a route. If such a route comes from a different vendor, you can use the RoutingEngine's importRoute() feature. It allows to set a large list of coordinates. From the resulting Route object you can get the polyline as property.
Creating such a list of coordinates is not dependent on the HERE SDK in any way, except that you need to create a GeoCoordinates instance for each point. Accessing such data from Firestore and then iterate over the data in a loop should do the trick.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nusatad |
