Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.95k stars 996 forks source link

When spidering markers at edge of screen, move the map to show them #22

Open danzel opened 12 years ago

ghoffa commented 11 years ago

My two cents for what its worth,

Interesting feature but I'm not sure I would use in my app because ever time the map moves a lot happens. Many times the map extents are used as input parameters to a new database call which populates the map. In a worse case scenario a map move could change the way we render our markers so that the cluster in question wouldn't even be available.

stevevance commented 11 years ago

@ghoffa Consider this: When you tap a marker to open its popup info window, the map pans if necessary to show the info window. Are the "movestart" and "moveend" events fired with this? If that happens, then it's possible to pan the map without firing the event that I presume causes your map to run some functions.

ghoffa commented 11 years ago

errr.... yes. @stevevance That is true. So ... I'm taking it back. The aforementioned popup behavior works nicely on my application, so I suspect this feature would too.

j-r-t commented 9 years ago

@danzel Basically autopan isn't it? Has this been implemented? I saw this behaviour in PruneCluster and I'm wondering if this functionality is available in markercluster? http://sintef-9012.github.io/PruneCluster/examples/realworld.50000.html

ETA: It's quite an awesome feature.

anatel commented 4 years ago

Would also like this feature, is it possible to achieve this behavior in some other way?