<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19222"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=875190217-23042012><FONT color=#0000ff 
size=2 face=Arial>Are you sure you can use <SPAN style="WHITE-SPACE: pre" 
class=Apple-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=875190217-23042012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=875190217-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.&nbsp; The 
GML file is passed in as a parameter.&nbsp; <B>Deprecated</B>.&nbsp; To be 
removed in 3.0.&nbsp; Instead use OpenLayers.Layer.Vector with Protocol.HTTP and 
Strategy.Fixed.&nbsp; 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>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=875190217-23042012>Layer.Vector&nbsp;works with 
Strategy.Filter.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 
face=Arial></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=875190217-23042012><FONT color=#0000ff 
size=2 face=Arial>Arnd</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader 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></DIV>
<DIV 
style="BACKGROUND-COLOR: #fff; FONT-FAMILY: times new roman, new york, times, serif; COLOR: #000; FONT-SIZE: 12pt">
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt">Hello,</DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt">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-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt">I'm 
working with the strategy filter but I don't get results.</DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt"><BR></DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt">This 
is an extract of my code:</DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt"><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=Apple-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=Apple-tab-span></SPAN>property: 
'latitude',</FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif"><SPAN 
style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN>value: 
undefined</FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif"><SPAN 
style="WHITE-SPACE: pre" class=Apple-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',&#13;&#10; 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=Apple-tab-span></SPAN>{</FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif"><SPAN 
style="WHITE-SPACE: pre" class=Apple-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=Apple-tab-span></SPAN>strategies: 
filterStrategy</FONT></DIV>
<DIV><FONT face="'times new roman', 'new york', times, serif"><SPAN 
style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN>});&nbsp;</FONT></DIV>
<DIV><FONT 
face="'times new roman', 'new york', times, serif">map.addLayer(puntigml);<SPAN 
style="WHITE-SPACE: pre" class=Apple-tab-span> </SPAN><BR></FONT></DIV>
<DIV><BR></DIV>
<DIV>Thanks for the help!</DIV>
<DIV><BR></DIV>
<DIV>Francesco</DIV></DIV></DIV></BODY></HTML>