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

Enhancement for MarkerWithLabel #14

Open
dinkom opened this issue Mar 13, 2015 · 1 comment
Open

Enhancement for MarkerWithLabel #14

dinkom opened this issue Mar 13, 2015 · 1 comment

Comments

@dinkom
Copy link

dinkom commented Mar 13, 2015

Hi guys,

I would like to extend MarkerClustererPlus to automatically aggregate values in labels (if the user chooses so and the label content is a number), instead of aggregating just the markers themselves. This functionality would extend the user's possibilities when working with MarkerWithLabel, but the normal Marker objects would not be affected.

Use case: I use one MarkerWithLabel to display the number of, for instance, visitors in one place. I don't want to use a 100 markers for one place, one is enough with a proper label. Now imagine I have N of these and they start to cluster. The cluster's default behaviour would be to show the number N, but now it could show the total number of viewers instead.
Default behaviour would remain default and for the user to start using this functionality, one more property would have to be set on the MarkerClustererPlus (for instance "aggregateLabelValues = true").

I have already done most of it locally (I just need to add the extra property to decide when the functionality kicks in) and I use it in production, it works good. If you are interested, I can make a pull request during the weekend, when I finish it.

What do you think?
@iloveitaly @mahnunchik

@mahnunchik
Copy link
Owner

@dinkom @iloveitaly
I think that this functionality can be included in the library.

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

2 participants