<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Thank you, now it works perfectly.</span></div><div><span><br></span></div><div><span>Thanks again,</span></div><div><span><br></span></div><div><span>Francesco</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">Da:</span></b> Arnd Wippermann <arnd.wippermann@web.de><br> <b><span style="font-weight: bold;">A:</span></b> 'Francesco Geri' <francescogeri@yahoo.it> <br><b><span style="font-weight: bold;">Cc:</span></b> users@openlayers.org <br> <b><span style="font-weight:
bold;">Inviato:</span></b> Luned́ 23 Aprile 2012 19:06<br> <b><span style="font-weight: bold;">Oggetto:</span></b> AW: [OpenLayers-Users] gml filter<br> </font> </div> <br><meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv36169718">
<div>
<div dir="ltr" align="left"><span class="yiv36169718875190217-23042012"><font color="#0000ff" size="2" face="Arial">Are you sure you can use <span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span><font color="#000000" size="3" face="Times New Roman">strategies for Layer.GML and not only Layer.Vector with
Protocol.HTTP.</font></font></span></div>
<div dir="ltr" align="left"><span class="yiv36169718875190217-23042012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="yiv36169718875190217-23042012"><font color="#0000ff" size="2" face="Arial">from OpenLayers apidocs</font></span></div>
<div dir="ltr" align="left">Create a vector layer by parsing a GML file. The
GML file is passed in as a parameter. <b>Deprecated</b>. To be
removed in 3.0. Instead use OpenLayers.Layer.Vector with Protocol.HTTP and
Strategy.Fixed. Provide the protocol with a format parameter to get the
parser you want for your data.</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="yiv36169718875190217-23042012">Layer.Vector works with
Strategy.Filter.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"></font> </div>
<div dir="ltr" align="left"><span class="yiv36169718875190217-23042012"><font color="#0000ff" size="2" face="Arial">Arnd</font></span></div><br>
<div dir="ltr" lang="de" class="yiv36169718OutlookMessageHeader" align="left">
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>Von:</b> openlayers-users-bounces@lists.osgeo.org
[mailto:openlayers-users-bounces@lists.osgeo.org] <b>Im Auftrag von
</b>Francesco Geri<br><b>Gesendet:</b> Montag, 23. April 2012
16:34<br><b>An:</b> openlayers-users@lists.osgeo.org<br><b>Betreff:</b>
[OpenLayers-Users] gml filter<br></font><br></div>
<div style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; ">
<div style="font-size: 12pt; font-family: times, serif; ">Hello,</div>
<div style="font-size: 12pt; font-family: times, serif; ">I
have a gml file and I would like to filter the features visualization based on
the presence of an attribute. In particular I have a gml file that may or not
have the latitude attribute: if this attribute is present the features should
not be viewed.</div>
<div style="font-size: 12pt; font-family: times, serif; ">I'm
working with the strategy filter but I don't get results.</div>
<div style="font-size: 12pt; font-family: times, serif; "><br></div>
<div style="font-size: 12pt; font-family: times, serif; ">This
is an extract of my code:</div>
<div style="font-size: 12pt; font-family: times, serif; "><br></div>
<div>
<div><font face="'times new roman', 'new york', times, serif">filter = new
OpenLayers.Filter.Logical({</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>type:
OpenLayers.Filter.Comparison.LIKE,</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>property:
'latitude',</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>value:
undefined</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>});</font></div>
<div><font face="'times new roman', 'new york', times, serif"><br></font></div>
<div><font face="'times new roman', 'new york',
times, serif">filterStrategy =
new OpenLayers.Strategy.Filter({filter: filter});</font></div>
<div><font face="'times new roman', 'new york', times, serif">puntigml = new
OpenLayers.Layer.GML("Point", "provider.gml",</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>{</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>projection: new
OpenLayers.Projection("EPSG:4326"),</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>strategies:
filterStrategy</font></div>
<div><font face="'times new roman', 'new york', times, serif"><span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"></span>}); </font></div>
<div><font face="'times new roman', 'new york', times, serif">map.addLayer(puntigml);<span style="WHITE-SPACE:pre;" class="yiv36169718Apple-tab-span"> </span><br></font></div>
<div><br></div>
<div>Thanks for the help!</div>
<div><br></div>
<div>Francesco</div></div></div></div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div> </div></body></html>