Rectification<br><br>My feature have feature.attributes.Nom but not feature.Nom. It&#39;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">&lt;<a href="mailto:jimmy.aumard@gmail.com">jimmy.aumard@gmail.com</a>&gt;</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(&#39;name&#39;,&#39;franch&#39;)[0];<br>var filter= new OpenLayers.Filter.Comparison({<br>
            type: OpenLayers.Filter.Comparison.LIKE,<br>            property: &quot;Nom&quot;,<br>            value: &quot;test&quot;<br>        });<br>for(i=0;i&lt;layer.features.length;i++){<br>    var feature=layer.features[i];<br>

        alert(feature.attributes.Nom);<br>    if(filter.evaluate(feature)){<br>    alert(&#39;ee&#39;);<br>}<br>}<br><br>I have features with an attribute &quot;Nom&quot; = &quot;test&quot; but the filter return alway false.<br>

<br>What I&#39;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>