[OpenLayers-Users] Cluster-Strategy: how to uncluster?

Gerrit osm at 00l.de
Sun Sep 6 05:04:11 EDT 2009


Hey Christopher.

Heidt, Christopher M. wrote:
> Take a look at the threshold property:
>
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Strategy/Cluster-js.html#OpenLayers.Strategy.Cluster.threshold
> I think its what your looking for.

I already tried to use the threshold-property, but the map did not
reflect a changed threshold.
Finally I came across you AppendableCluster() and it behaves exactly as
expected. Thank you for that.

But now, disabling the clustering strategy seems clumsy to me, so I try
to improve.
I have a couple of point-features on a vector layer. Whenever I select a
single feature, its properties are loaded into a html-form for the user
to edit.
When a cluster is selected, a list of its features is shown to pick from.
All this already works fine.

But the user should be able to move the currently edited feature on the
map. So what I need is a way to seperate a single feature from its
cluster until i remerge them.
Ideally it would work as
  myFeature.canCluster = false;
or something like this. But this does not seem to exist.
Can you please point me in the right direction?

> also i recommend taking a look at the src for the cluster strategy,
it'll give you alot on insight into what is actually happening.
> clusterStrategy.features holds your original features, armed with that
knowledge it's then pretty easy to implement a toggle to flip in and old
of cluster mode.

Hmm, I tried.
Where would I find a non-compressed, better documented openlayers.js?

cheers,

Gerrit

>
>
> -----Original Message-----
> From: users-bounces at openlayers.org on behalf of Gerrit
> Sent: Sat 9/5/2009 4:05 AM
> To: users at openlayers.org
> Subject: [OpenLayers-Users] Cluster-Strategy: how to uncluster?
>
> Hi.
>
> I have a couple of point-features on a map and defined a cluster
> strategy on the vectorlayer.
> When I reach the highest zoom level, some points are still clustered due
> to proximity.
> On the highest level however I do not want any clustering at all.
> How can I achieve this?
>
> I tried clusterStrategy.deactivate(), but for it to take effect, I need
> to remove all features from the layer and repopulate it.
> I tried map.frefresh() and clusterlayer.redraw(), but to no effect.
>
> Any suggestions?
>
> Thanks,
>
> Gerrit
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>




More information about the Users mailing list