Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: adding interface instead of Marker in cluster #439

Open
Psijic opened this issue Sep 24, 2023 · 0 comments
Open

Improvement: adding interface instead of Marker in cluster #439

Psijic opened this issue Sep 24, 2023 · 0 comments

Comments

@Psijic
Copy link

Psijic commented Sep 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant