var map = Gp.Map.load( "map", // html div { // Geoportal access key obtained here : http://professionnels.ign.fr/ign/contrats apiKey: "jhyvi0fgmnuxvfv0zjzorvdn", // layers to display zoom : 12, projection : "EPSG:4326", center : { x : -61.545, y : 16.239, projection : "CRS:84" }, layersOptions : { "OI.OrthoimageCoverage" : {}, "BU.Building" : { queryable : true } }, // additional tools to display on the map controlsOptions : { "layerSwitcher" : {}, "getfeatureinfo" : { // activate GFI on BU.Building layer layers : { "BU.Building" : {} } } } } ) ; 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; }