[OpenLayers-Users] request and parse GML
Barbara Fiederer
barbara.fiederer at web.de
Thu Nov 19 03:44:16 EST 2009
Hi Pedro, hi list,
it might not be perfect, but this is how it works. Maybe it helps someone else.
var filter = new OpenLayers.Format.Filter({version: "1.1.0"});
var xml = new OpenLayers.Format.XML();
var filter1 = new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.OR,
filters: [
new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "myAttributeName",
value: "myAttributeValue"
}),
new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "myAttributeName",
value: "myAttributeValue"
})
]
});
filter = xml.write(filter.write(filter1));
var sellayer = new OpenLayers.Layer.WFS(
"Selected Features",
"http://myDomain.com/geoserver/wfs",
{
typename: 'namespace:features', //e.g.'topp:tasmania_roads'
srs: 'EPSG:11111',
tiled: 'true',
filter:filter
}
);
map.addLayer(sellayer);
Thanks for your help.
Babsi
_____________________________________________________________
DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für
16,99 Euro/mtl.!* Hier klicken: http://produkte.web.de/go/02/
More information about the Users
mailing list