Hello everyone:


I want to use a Filter.Function to filter the features for a certain style.
But the function that I'm passing to Filter.Function doesn't even get called.
How can I use the OpenLayers.Filter.Function filter?

Here is what I have:


    var my_filter = new OpenLayers.Filter.Function({
        evaluate:function(attributes) {
           console.log(attributes);
           var x=0; 
           return true;
        
        }
    });
    var ruleLow = new OpenLayers.Rule({
        filter:my_filter
      });


    var my_style=new OpenLayers.Style( {pointRadius: 10, fillColor: "#FF3300",
                   fillOpacity: 0.5, strokeColor: "#FF3300"},ruleLow);
    var my_style_map=new OpenLayers.StyleMap({
        "temporary":my_style,
        "default":my_style,
        "select":my_style

    });
    this.vectors= new OpenLayers.Layer.Vector(
        "Vector Layer",
        {
            styleMap:my_style_map,
            renderers:this.renderer,
        }
    );



Thank you for your time and kind concern.
Jenia
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to