A nice feature would be that when a user clicks on a cluster, the map automatically zooms in to view the features within that cluster.
I figure this would be a setting in the views interface, between the 'Cluster threshold' and 'Popups on clusters' settings, but I couldn't work it out myself so no patch, sorry.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | openlayers-zoom_to_cluster.patch | 3.27 KB | Anonymous (not verified) |
Comments
Comment #1
phayes commentedI think better would be a seperate behavior that when you click on a feature it zooms to it, you could then apply this behavior to any layer (including the cluster layer)
Comment #2
Anonymous (not verified) commentedAny progress on this?
Comment #3
phayes commentedNope.
If you wanted to try your hand at creating a new behavior. This would be an easy first start. ;-)
It might be a open-source social faux-pas, but i'm shamelessly in favour of small bounties on small feature requests like this one that are easy, but no one shows an interest in tackling.
Comment #4
Anonymous (not verified) commentedMight have a crack at it when I finish the site I'm working on...
Comment #5
zzolo commentedPutting as a 2.x feature. Trying to get 1.0 out.
BWPanda, please feel free to make a patch for this for 1.x (it always appreciated). We can always put it in a 1.1 release or whatever.
Comment #6
Anonymous (not verified) commentedI'm starting to look into this. Because I like to test as I go, I need to make a map with this behaviour attached, however I'm not sure how to do this...
I've posted previously about this here: #552314: Create map preset with zoom-to-features behaviour
If you could please explain (in the other issue) how to go about attaching a behaviour to a map preset, I can test this further. Thanks!
Comment #7
Anonymous (not verified) commentedHere's the beginnings of a patch for 6.x-1.x-dev.
For some reason the code in
OL.Behaviors.clusterFeatureSelectedisn't being run (I put analert()in there but it didn't appear when clicking on a cluster). I'm not sure why.I'm also not sure how to make the map zoom to the features in the cluster.
It needs some work, so hopefully someone with more knowledge than me can look into it :)
Comment #8
zzolo commentedSorry to be so late on this one. Hopefully I will have some time to look at this in more detail this week. Putting back to 1.x. Open up a new issue for a 2.x feature.
Comment #9
tmcw commentedMarking as by design, it seems like this isn't a release task for 1.x.
Comment #10
daattaa commentedIs there any examples or resoucres to implement this in 2.x?