Comment récupérer un flux WFS avec le SDK GpOl3 ?
Bonjour,
J'ai une application web (PREVARISC) qui permet d'afficher une carte dans une page. J'ai intégré le SDK et tout fonctionne bien en affichant des couches WMS.
Je souhaite rajouter une couche WFS pour obtenir des informations dynamiques sur certains objets mais cela ne fonctionne pas. Il y à plien d'exemple pour le WMS mais le WFS semble avoir été oublié...
Voici mon code :
map = Gp.Map.load(
"map", // html div
{
// Geoportal access key obtained here : http://professionnels.ign.fr/ign/contrats
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxx",
// layers to display
zoom : 15,
center : {
x : 4.595979,
y : 44.718361,
projection : "CRS:84"
},
layersOptions : {
"GEOGRAPHICALGRIDSYSTEMS.MAPS" : {},
"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD" : {},
"CADASTRALPARCELS.PARCELS" : {}
},
// additional tools to display on the map
controlsOptions : {
"layerSwitcher" : {},
"search" : {},
"orientation" : {},
"graphicscale" : {},
"route" : {},
"mouseposition" : {
maximised : false,
displayAltitude : true,
displayCoordinates : true
},
"isocurve" : {},
"graticule" : {},
"layerimport" : {},
"length" : {},
"area" : {},
"azimuth" : {},
"elevationpath" : {},
"reversesearch" : {},
"drawing" : {}
},
// Repères visuels
markersOptions : [{
content : "<h1>EMPLACEMENT</h1>"
}],
}
Comment rajoutes-t-on des couches WFS ? de la même manière que le WMS, si oui avec quels paramètres ?
"COUCHE" : {
title : "COUCHE WFS",
format : "WFS",
url : "http://wxs.ign.fr/Cle IGN/geoportail/wfs",
version : "2.0.0",
layers : ["BDTOPO"],
service : "GetCapabilities"
},
Merci par avance pour votre aide.