Please add support for multiple pins in the same location. Currently, if multiple pins have the exact same coordinates, or even every similar coordinates, it is impossible to select all but the top most pin. I see that there is an option in the view settings to add clustering, but the pins stay clustered at all zoom levels in the case of identical coordinates, so this is not a solution.
My recommendation is to add support for the Overlapping Marker Spiderfier plugin to have the pins separate when selected. The details of the plugin can be found here:
https://github.com/jawj/OverlappingMarkerSpiderfier
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 2883653-n20.patch | 8.17 KB | hanoii |
Comments
Comment #2
danielen commented+1 same here.
Comment #3
ruslan piskarov+1 same here.
Comment #4
danielen commentedI've tested quickly a possible implementation.
I am of the opinion that it could be more difficult to add overlappingmarkerspiderfier without rewriting big parts in the code (in the javascript files). It can be that I'm simply on the wrong path.
A simpler solution could be that we:
Maybe you have another idea?
Comment #5
ruslan piskarovHello, DNicastro.
I like your another solution.
We can implement a similar to https://stackoverflow.com/questions/20490654/more-than-one-marker-on-sam....
What do you think about?
Comment #6
eagilson commentedI think that offsetting pins could work. Though the mathematics of that could get complicated if there are lots of stacked pins or nearby pins.
My initial plan was to search in the code for where the group map pins checkbox was created and enabled. Then try to add the spiderfy in a similar way. Though I have not had time to look at the code yet to check its feasibility.
Comment #7
christianadamski commentedJust saying: there is already MarkerCluster support.
Comment #8
eagilson commentedMarker Cluster does not solve the problem. Consider a case where two or more pins have the exact same coordinates. In this case the Marker Cluster exists for all zoom levels. Additionally, clicking on the Marker Cluster does not bring up information on any of the pins in the cluster. So with Marker Cluster enabled, none of the stacked pins can be selected. Without Marker Cluster, only one can, the pin the map places on top. Spiderfy would enable the selection of any of the pins in the stack.
Comment #9
didebru1+ same here
All I could so far is to solve the cluster vanish problem by adding a maxZoom property to
before:
after:
Comment #10
hanoiiWhile this doesn't fix the issue, #2906266: Allow for any MarkerClusterer options, not just styles allows for setting up maxZoom properly along other options.
I might work on a possible solution for this as I think I'll need it. I think a solution could be done by grouping data, assuming the lat/long is exactly the same.
Comment #11
hanoiiActually, I got to work on this and kind of added OverlappingMarkerSpiderfier to google maps.
The patch also adds a Max Zoom setting to marker clusterer.
Please review.
Comment #12
didebruDoes not work for me, I just see 1 marker on a 14 marker cluster.
Comment #13
hanoii@Insasse I assume you enabled it on the views display settings, right? The patch brings in the option to enable it the same as with marker clusterer.
Comment #14
hanoiiAnd in case you did.. can you dig a bit deeper into it. Is there a JS error. Can you confirm the OSM library is being loaded, etc.
Comment #15
hanoiiAh, and one more thing, you need to clear cache, so that the new library is picked up. That could have been.
Comment #16
didebruMissed to enabled it in the view :) thanks now it works but it looks a bit uncommon now. When there are multiple markers for same location a single marker is shown and you have to click on it to spiderfie it but as a normal user I would not know there are multiple markers.
Comment #17
didebruComment #18
didebruMaybe we should use the markerclusterer image there, too?
Comment #19
hanoiiHmm. We are gonna face tons of custom cases where one will want something else. OMS supports certain customizations through js events so as long as things can be done outside of the module, I don't think we should be adding extra logic to this patch. I might, though, come up with a simple + sign or something if its easy, but then again, I still think the logic should be kept as simple as possible and left customizations for the theme/site side of things.
Comment #20
hanoiire roll
Comment #21
christianadamski commentedJust FYI: This is included in the not-yet-public 8.x-2.x branch. I modified this to 1.) respect existing Marker icons and 2.) use a designated MarkerIcon with a "+" in it, to signify markers that will split up if clicked.
Comment #22
christianadamski commented@Insasse, I'm also at Vienna and will do a BoF tomorrow from 12-13 :)
Comment #23
christianadamski commentedThis is done in 8.x-2.x.
@hanoii - I kind of used your patch, but completely split it up, altered and extended it. I still will add you as a comitter, I simply technically don't know how yet.
Comment #25
christianadamski commentedAh, that was easier than expected. It's technically an empty commit, but it should still count.