var map = Gp.Map.load( "map", // html div { // Geoportal access key obtained here : http://professionnels.ign.fr/ign/contrats apiKey: "cartes", // map center center : { location : "73 avenue de Paris, Saint-Mandé" }, // map zoom level zoom : 15, // layers to display layersOptions : { "GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2" : { } }, // Listening to mapEvents mapEventsOptions : { // when map has finished to initialize and to render "mapLoaded" : function(evt) { alert("map ready !") ; } } } ) ; 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; }