[OpenLayers-Dev] Bug in rendering features with cluster strategy

Eric Lemoine eric.c2c at gmail.com
Mon Nov 3 03:11:55 EST 2008


Yes, this looks like a bug in OpenLayers.

I'm under the impression that this isn't a bug in the cluster strategy
but either in Layer.Vector or in Control.SelectFeature. Indeed, I
think SelectFeature calls layer.drawFeature on feature
selection/unselection without checking whether the feature is in the
layer. And i'm saying this may be a bug in Layer.Vector because it may
be that drawFeature should be responsible for checking whether the
feature is in the layer before actually drawing it.

This is just coming from the top of my head so i may be wrong, but i'm
feeling this is a good track to follow :)


2008/11/2, Ivan Grcic <ivan.grcic at geofoto.hr>:
> Hi list,
> i discovered a bug while developing my OL application, in cluster
> strategy class.
> Bug occurs when you hover over one feature that represent a cluster
> (or externalGraphic or like in cluster example - vector circle
> http://openlayers.org/dev/examples/strategy-cluster.html)
> When you zoom in/out while that feature-cluster is selected (by
> quickly double-clicking or easier using scroll on ur mouse), on next
> zoom that cluster is rendered (stays on screen) together with newly
> created clusters! And clearly it shouldnt be there. The old
> ("phantom") cluster is not selectable, as he doesnt exist on the new
> zoom level..he just stays there on screen...annoying me :)
> As you zoom in again and again, phantom clusters always render, always
> at the same position in the map div...
> Please confirm that this is a bug, im going crazy here with this one :|
> --
> Ivan Grcic
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

More information about the Dev mailing list