Giuseppe, "treshold" should be "threshold". I also have "distance: 50"
Regards, Donald From: [email protected] [mailto:[email protected]] On Behalf Of Giuseppe Falcone Sent: 05 November 2013 15:26 To: [email protected] Subject: [OpenLayers-Users] cluster strategy problem Hi all, I have a problem with a WFS Vector layer that return data in geoJSON format. I have implemented this strategies: "strategies": [ new OpenLayers.Strategy.BBOX(), new OpenLayers.Strategy.Cluster({treshold:3}) ] this is my layer style configuration: "styleMap": new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ externalGraphic: "core/stub/simpleIcon.png", label: "${label}", cursor: "pointer" }, { context:{ externalGraphic: function(feature) { if (feature.cluster) feature.attributes.externalGraphic = "core/stub/clusterIcon.png"; return feature.attributes.externalGraphic; }, label: function(feature) { return feature.cluster ? feature.cluster.length : ""; } } }) }) Well, the features returned have always cluster attribute, also if the feature is isolated there is a cluster array that contains a single feature. In this manner I see always cluster icons, also on single feature. Anyone has some ideas? Thanks a lot. Giuseppe _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
