Rectification<br><br>My feature have feature.attributes.Nom but not feature.Nom. It's possible to filter under an attributes?<br><br>Cheers<br><br>Jim<br><br><div class="gmail_quote">2009/12/23 Jimmy Aumard <span dir="ltr"><<a href="mailto:jimmy.aumard@gmail.com">jimmy.aumard@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br><br>I have problems with filters. I try to create filter dynamically to select many feature on my layer.<br>
<br>Some test code :<br><br>var layer=map.getLayersBy('name','franch')[0];<br>var filter= new OpenLayers.Filter.Comparison({<br>
type: OpenLayers.Filter.Comparison.LIKE,<br> property: "Nom",<br> value: "test"<br> });<br>for(i=0;i<layer.features.length;i++){<br> var feature=layer.features[i];<br>
alert(feature.attributes.Nom);<br> if(filter.evaluate(feature)){<br> alert('ee');<br>}<br>}<br><br>I have features with an attribute "Nom" = "test" but the filter return alway false.<br>
<br>What I'm doing wrong?<br><br>Regards,<br><br>Jim<br clear="all"><font color="#888888"><br>-- <br>Aumard Jimmy<br>Développeur - <a href="http://www.kinaxia.fr" target="_blank">http://www.kinaxia.fr</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Aumard Jimmy<br>Développeur - <a href="http://www.kinaxia.fr">http://www.kinaxia.fr</a><br>