Thank you, now it works perfectly.

Thanks again,

Francesco


________________________________
 Da: Arnd Wippermann <[email protected]>
A: 'Francesco Geri' <[email protected]> 
Cc: [email protected] 
Inviato: Lunedì 23 Aprile 2012 19:06
Oggetto: AW: [OpenLayers-Users] gml filter
 

Are you sure you can use strategies for Layer.GML and not only Layer.Vector 
with 
Protocol.HTTP.
 
from OpenLayers apidocs
Create a vector layer by parsing a GML file.  The 
GML file is passed in as a parameter.  Deprecated.  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.
 
Layer.Vector works with 
Strategy.Filter.
 
Arnd


________________________________
 Von: [email protected] 
[mailto:[email protected]] Im Auftrag von Francesco Geri
Gesendet: Montag, 23. April 2012 
16:34
An: [email protected]
Betreff: [OpenLayers-Users] gml filter


Hello,
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.
I'm 
working with the strategy filter but I don't get results.

This 
is an extract of my code:

filter = new 
OpenLayers.Filter.Logical({
type: 
OpenLayers.Filter.Comparison.LIKE,
property: 
'latitude',
value: 
undefined
});

filterStrategy = 
new OpenLayers.Strategy.Filter({filter: filter});
puntigml = new 
OpenLayers.Layer.GML("Point", "provider.gml",
{
projection: new 
OpenLayers.Projection("EPSG:4326"),
strategies: 
filterStrategy
}); 
map.addLayer(puntigml);


Thanks for the help!

Francesco
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to