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

strk’s picture

different styles on the same layer you can obtain with dynamic styles (attribute driven, either PHP and JS).

dasjo’s picture

thanks!
any hints on how can i approach the merge-layers task?

strk’s picture

Just have a single OpenLayers Data display return all the features you're interested in.
(assuming that's the source of your layers)

dasjo’s picture

i can't have them in a single display, i explain this in #927550: related content types on a single map don't work

tmcw’s picture

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...

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?

zzolo’s picture

Category: support » feature

I 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.

dasjo’s picture

tmcw: having separate styles for clusters would do the job, i think

tmcw’s picture

Status: Active » Closed (won't fix)

This just isn't going to happen, since it'll never happen in the OpenLayers.js project.

drupalninja99’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Re: "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.

dshields’s picture

It WOULD be nice to be able to cluster points across multiple layers. I wonder if anyone's had any success with this..

zmove’s picture

Issue summary: View changes

+1 here. I'm looking to do this.

hilrap’s picture

dito