Improvement: adding interface instead of Marker in cluster
Psijic opened this issue · comments
public void add(Marker marker)
- this makes you need to duplicate your markers array in memory. Better to use IMarker
interface with all minimal set of methods (3 is enough in Google Maps):
getPosition()
getTitle()
getSnippet()
Also not sure if it's easy to get your marker by index (id
is not the case because you need extra memory to set it and to use find
method that is not O(1) but O(n) of performance). And relatedObject
made my app went to ANR twice as fast with 5000 markers.