<div dir="ltr">Hi all,<div><br></div><div>I have a problem with a WFS Vector layer that return data in geoJSON format.</div><div>I have implemented this strategies:</div><div><br></div><div><div>"strategies": [</div>
<div>          new OpenLayers.Strategy.BBOX(),</div><div>          new OpenLayers.Strategy.Cluster({treshold:3})</div><div> ]</div></div><div><br></div><div>this is my layer style configuration:</div><div><div>"styleMap": new OpenLayers.StyleMap({</div>
<div>     "default": new OpenLayers.Style({</div><div>           externalGraphic: "core/stub/simpleIcon.png",</div><div>                 label: "${label}",</div><div>                 cursor: "pointer"</div>
<div>           },</div><div>           {</div><div>               context:{</div><div>                   externalGraphic: function(feature) {</div><div>                        if (feature.cluster)</div><div>                              feature.attributes.externalGraphic = "core/stub/clusterIcon.png";</div>
<div>                        return feature.attributes.externalGraphic;</div><div>                   },</div><div>                   label: function(feature) {</div><div>                         return feature.cluster ? feature.cluster.length : "";</div>
<div>                    }</div><div>                }</div><div>              })</div><div> })</div></div><div><br></div><div>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?</div>
<div>Thanks a lot.</div><div>Giuseppe</div></div>