我想为wfs层定义一个featureId fiter,如下所示:
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: ?????
})
});我不知道在筛选选项中设置了什么类型变量?
发布于 2014-08-26 10:49:33
问题被设置为fids字段。当您将fids设置为['population.913', 'population.912']时,这意味着它的fids等于'population.913'和'population.912'。如果将fids字段设置为'population.912'或'population.913',则会得到正确的响应。
发布于 2014-08-26 10:08:14
在过滤器类型FeatureId上没有“类型”属性。
API文档
这就够了。
filter:new OpenLayers.Filter.FeatureId({
fids: ['population.913', 'population.912'];
});https://stackoverflow.com/questions/25468998
复制相似问题