From 94331793ad51fc5d1843171c42a1659fdf972bf1 Mon Sep 17 00:00:00 2001 From: Armand Bahi <armand.bahi@veremes.com> Date: Thu, 22 Nov 2018 12:14:13 +0100 Subject: [PATCH] Ajout de la proj de la carte en comparaison --- src/module_vmap/module/css/vmap.less | 4 ++++ .../javascript/app/vmap/map/mapcompare.js | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/module_vmap/module/css/vmap.less b/src/module_vmap/module/css/vmap.less index 45c84806..855050db 100644 --- a/src/module_vmap/module/css/vmap.less +++ b/src/module_vmap/module/css/vmap.less @@ -2453,3 +2453,7 @@ div.vmap-select-scale-alert{ border: 1px solid #8a8a8a !important; color: #333; } + +.ol-current-projection-compare{ + bottom: 29px; +} diff --git a/src/module_vmap/module/javascript/app/vmap/map/mapcompare.js b/src/module_vmap/module/javascript/app/vmap/map/mapcompare.js index 03b6375a..35319a4e 100644 --- a/src/module_vmap/module/javascript/app/vmap/map/mapcompare.js +++ b/src/module_vmap/module/javascript/app/vmap/map/mapcompare.js @@ -537,7 +537,10 @@ nsVmap.MapCompare.prototype.mapCompareController = function ($scope, $window, $e }); // Affiche le nom de la carte - this_.setMapName(); + this_.displayMapName(); + + // Affiche le nom de la carte + this_.displayMapProj(); }) /** @@ -771,8 +774,8 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.addView = function (o } }; -nsVmap.MapCompare.prototype.mapCompareController.prototype.setMapName = function () { - oVmap.log('nsVmap.nsMapManager.LayersTree.prototype.LayertreeController.prototype.setMapName'); +nsVmap.MapCompare.prototype.mapCompareController.prototype.displayMapName = function () { + oVmap.log('nsVmap.nsMapManager.LayersTree.prototype.LayertreeController.prototype.displayMapName'); if ($("#map-name-compare").length == 0) { $('#olMapCompare').children().children('.ol-overlaycontainer-stopevent').append('<div class="ol-map-name ol-unselectable"><span id="map-name-compare" class="ol-control"></span></div>'); @@ -786,3 +789,13 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.setMapName = function } $("#map-name-compare").html(currentMapName); } + +nsVmap.MapCompare.prototype.mapCompareController.prototype.displayMapProj = function () { + oVmap.log('nsVmap.nsMapManager.LayersTree.prototype.LayertreeController.prototype.displayMapProj'); + + if ($("#current-projection-compare").length == 0) { + $('#olMapCompare').children().children('.ol-overlaycontainer-stopevent').append('<div class="ol-current-projection ol-unselectable ol-current-projection-compare"><span id="current-projection-compare" class="ol-control"></span></div>'); + } + + $("#current-projection-compare").html(oVmap['oProjections'][oVmap.getMapCompare().getOLMap().getView().getProjection().getCode()]); +} -- GitLab