[OpenLayers-Users] Show only one feature of the WFS
Alextave
andrea.alri90 at gmail.com
Sat Oct 5 02:55:05 PDT 2013
Well thank you for your advice, I managed to solve the problem. I use an
FeatureId filter in this way:
var Parametri_WFSAltroN=new Object();
Parametri_WFSAltroN.url="http://localhost:8080/services/WFSbabDB";
Parametri_WFSAltroN.featureType="AltroN";
Parametri_WFSAltroN.featureNS="http://www.deegree.org/app";
Parametri_WFSAltroN.featurePrefix="app";
Parametri_WFSAltroN.geometryName="Forma";
Parametri_WFSAltroN.outputFormat="GML2";
Parametri_WFSAltroN.filter=new OpenLayers.Filter.FeatureId({
fids: ["APP_ALTRON_Giardini di Sennacherib"]
});
var WFSAltroN=new OpenLayers.Protocol.WFS.v1_1_0(Parametri_WFSAltroN);
var LayerWFSAltroN=new OpenLayers.Layer.Vector("WFSSB", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: WFSAltroN,
});
In the creation of LayerWFSAltroN the strategies must not be BBOX() because
it makes conflict with the FeatureId filter, although I don't know why.
Thanks so much again!
Andrea
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Show-only-one-feature-of-the-WFS-tp5081567p5081952.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list