<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">Hello everyone. I'm glad to share with you how to use the OpenLayers.Filter.Function!! (so I solved the problem that I had):</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">that what I had to change basically.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">Thanks anyways.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div><div><div><span style="font-size: 16px;"> var my_filter = new OpenLayers.Filter.Function({</span></div><div><span style="font-size: 16px;"> <span style="font-weight: bold;"> type:
OpenLayers.Filter.Function,</span></span></div><div><span style="font-size: 16px;"> evaluate:function(attributes) {</span></div><div><span style="font-size: 16px;"> console.log(attributes);</span></div><div><span style="font-size: 16px;"> var x=0; </span></div><div><span style="font-size: 16px;"> return true;</span></div><div><span style="font-size: 16px;"> </span></div><div><span style="font-size: 16px;"> }</span></div><div><span style="font-size: 16px;"> });</span></div><div><span style="font-size: 16px;"> var ruleLow = new OpenLayers.Rule({</span></div><div><span style="font-size: 16px;"> filter:my_filter,</span></div><div><span style="font-size: 16px;">
});</span></div><div><span style="font-size: 16px;"><br></span></div><div><span style="font-size: 16px;"><br></span></div><div><span style="font-size: 16px;"> var my_style=new OpenLayers.Style( {pointRadius: 7, fillColor: "#FF3300",</span></div><div><span style="font-size: 16px;"> fillOpacity: 0.5, strokeColor: "#FF3300"},<span style="font-weight: bold;">{rules:[ruleLow]}</span>);</span></div><div><span style="font-size: 16px;"><br></span></div><div><span style="font-size: 16px;"> var my_style_map=new OpenLayers.StyleMap({</span></div><div><span style="font-size: 16px;"> "temporary":my_style,</span></div><div><span style="font-size: 16px;"> "default":my_style,</span></div><div><span style="font-size: 16px;"> "select":my_style</span></div><div><span style="font-size:
16px;"><br></span></div><div><span style="font-size: 16px;"> });</span></div><div><span style="font-size: 16px;"> this.vectors= new OpenLayers.Layer.Vector(</span></div><div><span style="font-size: 16px;"> "Vector Layer",</span></div><div><span style="font-size: 16px;"> {</span></div><div><span style="font-size: 16px;"> styleMap: my_style_map, </span></div><div><span style="font-size: 16px;"> renderers:this.renderer,</span></div><div><span style="font-size: 16px;"> }</span></div><div><span style="font-size: 16px;"> );</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></div></div> </div></body></html>