jawj / OverlappingMarkerSpiderfier

Deals with overlapping markers in Google Maps JS API v3, Google Earth-style
http://blog.mackerron.com
838 stars 237 forks source link

Feature request - PRESPIDERFIED markers #155

Open bongobongo opened 6 years ago

bongobongo commented 6 years ago

I would like to see a new feature called PRESPIDERFIED added to OverlappingMarkerSpiderfier.

Let say there are 350 markers in the same location. When these markers get spiderfied it gets kind of messy (to many markers jammed together).

If it was possible to PRESPIDERFY all these markers, into a maximum (developer definable maximum number), e.g.: 50, then when user click the spiderfiable icon before they have been PRESPIDERFIED, then they should be spiderfied into markers which are spiderfiable one more time (where each of these PRESPIDERFIED markers do not "contain" more than 50 spiderfiable markers. This way the map would not be to cluttered with markers and the markers would be more manageable by the user.

It would be nice if possible to control the icon for the markers for these two levels. Personally I would prefer both PRESPIDERFIABLE and SPIDERFIABLE markers to be blue. The only difference, visually, between these to kind of markers, in my application would be a number on the marker (settable by the developer using markersNearMarker on the PRESPIDERFIED marker), showing the user how many markers is below current marker. Then when the user click one of the PRESPIDERFIED markers, I would show those "normally" spiderfied markers as green with no label.

In this particular case with 350 markers in same location, in my applicaation - ideally the user would first see one blue marker which where labeled the number 350 (no difference from todays view). When user click this marker - then he should see the blue PRESPIDERFIED markers (in this particular case - 7 markers), where each where labeled the number 50. When the user click one of these PRESPIDERFIED markers - then he would see 6 PRESPIDERFIED blue markers plus the 50 SPIDERFIED green markers.

Any chance to see this implemented?

Whatever you decide to do, thank you for OverlappingMarkerSpiderfier.