1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
function geoservicesReady() {
var coordControl = 1; //Flag pour ajouter ou no le widget des coordonnées
if (coordControl) {
/************************* GeoportalMousePosition OL IGN *************************/
//Afficher le controle de positionnement avec altitude
var geoMPControl = new ol.control.GeoportalMousePosition({
editCoordinates : true,
"collapsed" : false,
"graggable" : true,
"displayCoordinates" : true,
"displayAltitude" : true,
"altitude" : {
"triggerDelay" : 100,
"responseDelay" : 500,
"noDataValue" : -99999,
"noDataValueTolerance" : 99000,
"serviceOptions" : {}
},
"systems" : [
{
"crs" : "EPSG:4326",
"label" : "Géographiques",
"type" : "Geographical"
},
{
"crs" : "EPSG:3857",
"label" : "Web Mercator",
"type" : "Metric"
},
{
"label" : "Lambert 93",
"crs" : "EPSG:2154",
"type" : "Metric",
"geoBBox" : {
"left" : -9.86,
"bottom" : 41.15,
"right" : 10.38,
"top" : 51.56
}
}
],
"units" : ["DEC", "DMS"]
});
map.addControl(geoMPControl);
/************************* GeoportalMousePosition OL IGN *************************/
}
var searchControl = 1; //Flag pour ajouter ou non le widget de recherche
if (searchControl) {
/************************* Recherche adresse IGN *************************/
var geoSE = new ol.control.SearchEngine({
collapsed : true,
geocodeOptions : {},
autocompleteOptions : {}
});
map.addControl(geoSE);
/************************* Recherche adresse IGN FIN *************************/
}
}
Gp.Services.getConfig({
apiKey: "essentiels",
onSuccess: geoservicesReady //fonction
}); |
Partager