I`m developing an android app that is tracking the user`s position and at each location update it`s refreshing the polyline representing the user`s journey on the map (V2). The trip can be quite long and I`m saving all of these trips to a local database and later possibly readding them to a map. In order to not overuse memory, I`d like to optimize these polylines so they contain as few LatLng
s as possible, e.g. if the user is stuck at a position for a long time, I`m definitely not gonna need all of the LatLng
s of that position.
Any tips how I could do that?
In the end I used simplify to do it, with a 1 meter tolerance I got a polyline of 60 points instead of 1000.