function go() { map = L.map("map",{crs : L.CRS.EPSG4326}).setView([16.239, -61.545], 12); L.geoportalLayer.WMS({ layer: "OI.OrthoimageCoverage", }, { // leafletParams opacity: 0.7, }).addTo(map); L.geoportalLayer.WMS({ layer: "BU.Building" },{ // on surcharche le style car les styles par defaut pour le WMS INSPIRE vecteur // ne sont pas bien renseignes dans l'autoconf (en cours de correction) styles : "inspire_common:DEFAULT", transparent : true, }).addTo(map); L.geoportalLayer.WMS({ layer: "TN.RoadTransportNetwork", },{ styles : "inspire_common:DEFAULT", transparent : true, }).addTo(map); L.geoportalLayer.WMS({ layer: "HY.PhysicalWaters", },{ styles : "inspire_common:DEFAULT", transparent : true, }).addTo(map); L.geoportalLayer.WMS({ layer: "GN.GeographicalNames", },{ styles : "inspire_common:DEFAULT", transparent : true, }).addTo(map); } Gp.Services.getConfig({ apiKey: "jhyvi0fgmnuxvfv0zjzorvdn", onSuccess: go }); var infoDiv = document.getElementById("info"); infoDiv.innerHTML = "<p> Extension Leaflet version " + Gp.leafletExtVersion + " (" + Gp.leafletExtDate + ")</p>";
<div id="map"></div> <div id="info"></div>
#map { padding: 5px; width: 100%; height: 300px; box-shadow: 0 0 10px #999; } #info { padding: 5px; width: 100%; height: 20px; font-family: monospace; }