var map = Gp.Map.load( "map", // html div { // Geoportal access key obtained here : http://geoservices.ign.fr apiKey: "essentiels,cartes", // layers to display zoom : 6, center : { x : 2.642212, y : 46.811339, projection : "CRS:84" }, layersOptions : { "ORTHOIMAGERY.ORTHOPHOTOS" : {}, "GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2" : { opacity : 0.3 } }, // additional tools to display on the map controlsOptions : { "layerSwitcher" : {} } } ) ; var infoDiv = document.getElementById("info"); infoDiv.innerHTML = "<p> SDK version " + Gp.sdkVersion + " (" + Gp.sdkDate + ")</p>";
<div id="map"></div> <div id="info"></div>
#map { padding: 5px; width: 100%; height: 600px; box-shadow: 0 0 10px #999; } #info { padding: 5px; width: 100%; height: 20px; font-family: "monospace"; font-size: 10px; }