Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would it be possible have gmap zoom in on the area of clustered markers instead of showing a text list of the markers available?
For example, if a user was looking at a worldview map where five markers were in a cluster over Seattle, instead of bringing up a list of the items in the cluster when clicked, gmap could autozoom into the area (Downtown Seattle for example) showing the 5 markers.
Comment | File | Size | Author |
---|---|---|---|
#9 | Clusterer_PopUp_Fix.txt | 2.19 KB | oranki42 |
#8 | invisible.jpg | 90 KB | rares |
#8 | better zoom.jpg | 71.17 KB | rares |
#8 | still clustered.jpg | 31.13 KB | rares |
Comments
Comment #1
Scott Falconer CreditAttribution: Scott Falconer commentedI can put up a cash bounty for this feature...anyone interested give me an idea on how long you'd think it take and we can figure out a price.
Comment #2
ray007 CreditAttribution: ray007 commentedThe popup-action for cluster markers is hardcoded in the Clusterer.js file (if we're talking about Jef's clusterer).
Maybe not trivial, but should be doable in 2 days work.
Comment #3
Scott Falconer CreditAttribution: Scott Falconer commentedI was able to modify the Clusterer.PopUp function in clusterer2.js (based on another modification found here to get it to work as I needed. Thanks for pointing me in the right direction.
Works in OSX in Firefox and Safari. Haven't had a chance to test in IE.
Comment #4
ray007 CreditAttribution: ray007 commentedThanks for sharing this code.
Changing the clusterer2.js script is of course the easy way, if you want to change the popup-action for cluster markers generally.
Maybe we should make a contrib-directory to save such hacks?
Making a configurable way to have different cluster-actions on demand is a bit more involved, but maybe that's not really needed.
Comment #5
marcoBauli CreditAttribution: marcoBauli commentedthat works sweet, thanks! :)
Comment #6
bdragon CreditAttribution: bdragon commentedFixed as part of my work today on marker managers.
http://drupal.org/cvs?commit=171293
http://drupal.org/cvs?commit=171294
Comment #8
rares CreditAttribution: rares commented@bdragon, thanks for the amazing patch for this.
I have an issues to report with new implementation. If you think this should be a new issue (or two new issues), just mark this closed and I can post new issues. Just thought that there's already way too many issues in the queue.
I have:
/* $Id: clusterer_marker.js,v 1.4 2009/02/12 23:45:23 bdragon Exp $ */
and am using Activate on 3 or more markers and Cluster on 3 or more markers.
The following behavior applies when I use the zoom-in behavior for clusterer.
- There are some zoom thresholds and marker layouts that make it difficult to see the markers when zoomed in. For instance, I have a cluster for New York and Boston, and when I click on it, I can't see Boston, because it is right in the top-right corner. See invisible.jpg
by changing line 85, the markers are easier to see.
The second issue is that the markers that were in the initial cluster still have a cluster icon, and still behave as clusters. If I click on one of them, I get a zoom in to the street level for that single marker (see still clustered.jpg)
Comment #9
oranki42 CreditAttribution: oranki42 commentedHi,
I've written a patch for clusterer2.js with a new version of Clusterer.PopUp = function ( cluster ); Basically if you click on a cluster it now zooms until zoomlevel 17 is reached and then it starts listing the markers below. Some one would still need to add tabbing to it. But hey now it works al lot nicer. Together with the fix for the clusterer_marker.js to put the text not/the title in the popup it should work like a dream for most default drupal sites. Perhaps someone can create a patch or what you dev-guy's do?
Comment #10
david.a.king CreditAttribution: david.a.king commentedI get a problem with this in IE (6,7,8) - clicking on a cluster which is set to zoom gives the following error:
Message: Object doesn't support this property or method
in this area:
for (var k in cluster.markers)
bounds.extend(cluster.markers[k].getPoint());
Currently bodging with an "if IE.." but i'd love to know if there's a way around it!
thanks,
david
Comment #11
elioshI'd like to follow this issue, but i don't know how to subscribe :-(
so....
subscribe...
:-D
Comment #12
Summit CreditAttribution: Summit commentedSubscribe, greetings, Martijn
Comment #13
emudojo CreditAttribution: emudojo commentedsubscribing