1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Exemple WFS parcellaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- SDK Géoportail -->
<link rel="stylesheet" href="/js/sdk-ol/GpOl3.css" />
<script src="/js/sdk-ol/GpOl3.js"></script>
</head>
<body>
<div>
<p>Ajout d'une couche WFS parcellaire sur les fonds de cartes IGN et les photographies aériennes (utilisation du SDK Géoportail)</p>
</div>
<div id="map" style="width: 700px; height: 700px;"></div>
<script>
var map = Gp.Map.load(
"map", // div HTML
{
apiKey: "CLE",
center : {
x : 4.47140,
y : 44.00320,
projection : "EPSG:4326"
},
// niveau de zoom
zoom : 14,
// Couches à afficher. Plus d'options ici : https://ignf.github.io/geoportal-sdk/latest/jsdoc/Gp.LayerOptions.html
layersOptions : {
// Photographies aériennes
"ORTHOIMAGERY.ORTHOPHOTOS" : {
opacity : 0.5
},
// Cartes IGN
"GEOGRAPHICALGRIDSYSTEMS.MAPS" : {
opacity : 0.1
},
// Couche WFS
"Parcelles WFS" : {
title : "Parcelles WFS",
format : "WFS",
url : "http://wxs.ign.fr/CLE/geoportail/wfs",
typeNames : "BDPARCELLAIRE-VECTEUR_WLD_BDD_WGS84G:parcelle",
version : "2.0.0",
maxFeatures : 200
},
},
// Contrôles additionnels (ici le gestionnaire de couches)
controlsOptions : {
"layerswitcher" : {
maximised : true
},
}
}
) ;
</script>
</body>
</html> |
Partager