Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
hi, i wanted to discuss workarrounds for clustering across multiple layers.
as strk stated, clustering is per-layer by design
http://drupal.org/node/592816#comment-3524958
maybe the most easiest way would be to merge multiple layers into one and then cluster?
i think this is useful, because on a map we sometimes want to use clustering in order to avoid point-overlaps without thinking from which clusters those points came. on the other hand the workarround prevents us from using layer-selection and different styles per layer...
Comments
Comment #1
strk CreditAttribution: strk commenteddifferent styles on the same layer you can obtain with dynamic styles (attribute driven, either PHP and JS).
Comment #2
dasjothanks!
any hints on how can i approach the merge-layers task?
Comment #3
strk CreditAttribution: strk commentedJust have a single OpenLayers Data display return all the features you're interested in.
(assuming that's the source of your layers)
Comment #4
dasjoi can't have them in a single display, i explain this in #927550: related content types on a single map don't work
Comment #5
tmcw CreditAttribution: tmcw commentedThere's a serious conceptual problem here: if you're using different layers in order to have each layer have a different style, and then you enable clustering that runs between layers, what style do clusters have? What layer-selection style do they have?
Comment #6
zzolo CreditAttribution: zzolo commentedI think this feature request would be cool, but I think it is actually a pretty hard problem.
Any solution that would go in this module would have to be flexible enough for most cases.
Comment #7
dasjotmcw: having separate styles for clusters would do the job, i think
Comment #8
tmcw CreditAttribution: tmcw commentedThis just isn't going to happen, since it'll never happen in the OpenLayers.js project.
Comment #9
drupalninja99 CreditAttribution: drupalninja99 commentedRe: "There's a serious conceptual problem here: if you're using different layers in order to have each layer have a different style, and then you enable clustering that runs between layers, what style do clusters have? What layer-selection style do they have?"
-Clusters have a number by default which would work across layers. I would be interested in any sort of fix/workaround for this.
Comment #10
dshields CreditAttribution: dshields commentedIt WOULD be nice to be able to cluster points across multiple layers. I wonder if anyone's had any success with this..
Comment #11
zmove CreditAttribution: zmove commented+1 here. I'm looking to do this.
Comment #12
hilrap CreditAttribution: hilrap commenteddito