Hi list (or should i say hi Eric :)

I have a problem with using cluster strategy. I use gml file exported
with geoserver getFeature request to display my vector layer.
When using "normal" gml layer i get my features displayed without
problem, so i guess that means my GML file is valid:

myGmlLayer= new OpenLayers.Layer.GML("My name", "fileFromGeoserver.gml");

When using that same file but with cluster strategy, i get following
error in my firebug window


feature.geometry is null
                         OpenLayers.js (line 535)
return exist;},shouldCluster:function(cl...ck:this.merge,scope:this});return
true;}

this is my code for cluster layer:
    var style = new OpenLayers.Style({
        pointRadius: "${radius}",
     }, {
        context: {
          radius: function(feature) {
                        return Math.min(feature.attributes.count,4) + 3;
          }
        }
     });

        myGmlLayer= new OpenLayers.Layer.Vector("GML", {
                                        strategies: [new 
OpenLayers.Strategy.Fixed(), new
OpenLayers.Strategy.Cluster()],
                    protocol: new OpenLayers.Protocol.HTTP({
                                                url: "fileFromGeoserver.gml",
                        format: new OpenLayers.Format.GML()
                    }),

                    styleMap:new OpenLayers.StyleMap({
                          "default": style,
                          }
                        })


        });

Should my features inside gml file have some particular syntax for
geometry column? Hmm i dont think so, because it gets displayed
properly with OpenLayers.Layer.GML...

Any thoughts about it? I can post a bit of gml file if necessary..

Regards,
Ivan
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev

Reply via email to