Posted by BWPanda on September 7, 2009 at 5:08am
5 followers
| Project: | OpenLayers |
| Version: | 6.x-1.x-dev |
| Component: | OL API |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
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.
Comments
#1
I 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)
#2
Any progress on this?
#3
Nope.
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.
#4
Might have a crack at it when I finish the site I'm working on...
#5
Putting 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.
#6
I'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!
#7
Here'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 :)
#8
Sorry 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.
#9
Marking as by design, it seems like this isn't a release task for 1.x.
#10
Is there any examples or resoucres to implement this in 2.x?