[OpenLayers-Users] OpenLayers.Filter.Function does not work: the filtering function never gets called. Solved
ivlev jenia
jenia2009 at yahoo.com
Mon Jul 23 16:02:32 PDT 2012
Hello everyone. I'm glad to share with you how to use the OpenLayers.Filter.Function!! (so I solved the problem that I had):
that what I had to change basically.
Thanks anyways.
var my_filter = new OpenLayers.Filter.Function({
type: 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: 7, fillColor: "#FF3300",
fillOpacity: 0.5, strokeColor: "#FF3300"},{rules:[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,
}
);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120723/c1e2af3f/attachment.html>
More information about the Users
mailing list