[OpenLayers-Users] How to use geoserver filter function with
openlayers?
zoggo
zoegge at gmx.ch
Wed Mar 24 09:13:51 EDT 2010
Hi there,
I'm using Geoserver 2.0 with Openlayers 2.8. My geoserver is supporting a
lot filter functions
http://docs.geoserver.org/2.0.x/en/user/filter/function_reference.html
http://docs.geoserver.org/2.0.x/en/user/filter/function_reference.html . How
can I access a filter function like centroid.
My WFS Layer looks like this:
var propertyFilter1 = new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LIKE,
property: 'GEMEINDENA',
value: '*m*'
});
var propertyFilter2 = new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LIKE,
property: 'GEMEINDENA',
value: '*M*'
});
var propertyFilter = new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.OR,
filters: [propertyFilter1,propertyFilter2]
});
var layerGemeinden = new OpenLayers.Layer.Vector("Gemeindegrenzen ZH", {
strategies: [new OpenLayers.Strategy.BBOX()],
filter: propertyFilter,
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "http://www.stadtlandfluss-gmbh.ch:8080/geoserver/ows",
featureType: "GemeindenZH",
feature: "gbis",
featureNS: "http://www.stadtlandfluss.ch/gbis",
srsName: "EPSG:900913"
}),
srsName: "EPSG:21781"
});
Maybe there's a way using ocg:filter??? It would be great to use this filter
function with openlayers.
--
View this message in context: http://n2.nabble.com/How-to-use-geoserver-filter-function-with-openlayers-tp4790799p4790799.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list