osmbonuspack icon indicating copy to clipboard operation
osmbonuspack copied to clipboard

Improvement: adding interface instead of Marker in cluster

Open Psijic opened this issue 2 years ago • 0 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.

Psijic avatar Sep 24 '23 21:09 Psijic