[英]featureId filtering in wfs openlayers
我想为wfs图层定义一个featureId拟合器,如下所示:
wfs = new OpenLayers.Layer.Vector("WFS Vectore", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:4326",
url: "http://localhost:8080/geoserver/iran/wms?service=WFS",
featureType: "population",
featureNS: "http://iran.kadaster.org",
geometryName: "the_geom"
}),
filter:
new OpenLayers.Filter.FeatureId({
fids: ['population.913', 'population.912']
//type: ?????
})
});
我不知道在过滤选项中设置什么“类型”变量?
过滤器类型FeatureId上没有'type'属性。
这就够了。
filter:new OpenLayers.Filter.FeatureId({
fids: ['population.913', 'population.912'];
});
问题被设置为fids字段。 当您将fids设置为['population.913', 'population.912']
,这意味着它的fids等于'population.913'
和'population.912'
。 如果将fids字段设置为'population.912'
或'population.913'
则会得到正确的响应
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.