function go() { var map = new ol.Map({ target: 'map', layers: [ new ol.layer.GeoportalWMTS({ layer: "GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2" }) ], view: new ol.View({ center: [288074.8449901076, 6247982.515792289], zoom: 12 }) }); var mpCtrl = new ol.control.GeoportalMousePosition({ collapsed : true, editCoordinates : true, positionMarker : { url : "turquoiseBlue" }, displayCoordinates : true, displayAltitude : false, systems : [ { crs : "EPSG:4326", label : "Géographiques", type : "Geographical" }, { crs : "EPSG:3857", label : "Mercator", type : "Metric" }, { crs : "EPSG:2154", label : "Lambert 93", type : "Metric", geoBBox : { left: -9.86, bottom : 41.15, right : 10.38, top : 51.56 } }, { crs : "EPSG:27572", label : "Lambert II étendu", type : "Metric", geoBBox : { left: -4.87, bottom : 42.33, right : 8.23, top : 51.14 } }, { crs : "EPSG:32630", label : "UTM 30N (France métropolitaine)", type : "Metric", geoBBox : { left: -6., bottom : 0., right : 0., top : 84. } }, { crs : "EPSG:32620", label : "UTM 20N (Guadeloupe,Martinique)", type : "Metric", geoBBox : { left: -66., bottom : 0., right : -60., top : 84. } }, { crs : "EPSG:4467", label : "UTM 21N (Saint-Pierre-et-Miquelon)", type : "Metric", geoBBox : { left: -57.1, bottom : 43.41, right : -55.9, top : 47.37 } }, { crs : "EPSG:2972", label : "UTM 22N (Guyane)", type : "Metric", geoBBox : { left: -54.6, bottom : 2.11, right : -49.46, top : 8.88 } }, { crs : "EPSG:4471", label : "UTM 38S (Mayotte)", type : "Metric", geoBBox : { left: 43.68, bottom : -14.49, right : 46.7, top : -11.33 } }, { crs : "EPSG:2975", label : "UTM 40S (Réunion)", type : "Metric", geoBBox : { left: 51.83, bottom : -24.72, right : 58.24, top : -18.28 } } ], units : ["DEC", "DMS", "RAD", "GON"] }); map.addControl(mpCtrl); } Gp.Services.getConfig({ apiKey: "cartes,calcul", onSuccess: go }); var infoDiv = document.getElementById("info"); infoDiv.innerHTML = "<p> Extension OL version " + Gp.olExtVersion + " (" + Gp.olExtDate + ")</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"; font-size: 10px; }