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

more detailed bounds/hull #51

Closed
StilgarBF opened this issue Feb 13, 2015 · 4 comments
Closed

more detailed bounds/hull #51

StilgarBF opened this issue Feb 13, 2015 · 4 comments

Comments

@StilgarBF
Copy link

A feature in markercluster, that I miss here is the ability to show detailed bounds/hull (area with the inlcuded markers) on mouseover.
cluster.bounds only includes max/min lat and lon which will give me a rectangle.

It would be nice to add a builtin "showBoundsOnMouseover" or at least give access to detailed bounds.

As an alternative: is it possible to get a list of all included Markers from a cluster, to calculate the confex hull?

@fungiboletus
Copy link
Member

Hello,

You can find here an example of how to get the markers from a cluster. You also need to enable the feature using PruneCluster.Cluster.ENABLE_MARKERS_LIST = true;. It's not enabled by default because it slows down the application.

I have not implemented a showBoundsOnmouseover feature for different reasons :

  • Our application is for mobile touch device first, so no mouseover
  • When you have a lot of markers, the hull is more or less a square corresponding to the grid clustering
  • You need to update a hull in real-time when displayed

This feature can definitely be added in the library, but I don't plan developing it.

@StilgarBF
Copy link
Author

Thanks for the fast response.
got it working now. : http://www.freifunk-karte.de/

I'll close this issue since there are no plans of adding that feature and its no longer an issue for me.

Great work on that Plugin. :-D

@fungiboletus
Copy link
Member

Hum, it's pretty nice. Can I keep the showClusterHull on the side? I maybe add it as an option when I will have time.

A small issue : if I zoom using the mousewheel, the old clusterArea stays on the map. I think you can check if the clusterArea is still on the map and use setLatLngs instead of creating a new polygon object.

@StilgarBF
Copy link
Author

You can use whatever part you like.
Thanks for the bugnote - will fix that. I think I will remove that poly on zoom.

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