Skip to content
Snippets Groups Projects
Commit 42ca573b authored by Armand Bahi's avatar Armand Bahi
Browse files

Ajout du nom de la carte en comparaison

parent 50654dc8
No related branches found
No related tags found
No related merge requests found
......@@ -519,8 +519,10 @@ nsVmap.MapCompare.prototype.mapCompareController = function ($scope, $window, $e
'size': this_.map.getSize(),
'tileSize': tileSize
});
// Définit la vue de la carte
this_.addView(olView_);
// Définit les couches de la carte
for (var i = 0; i < olLayers_.length; i++) {
this_.addLayer(olLayers_[i]);
......@@ -533,6 +535,9 @@ nsVmap.MapCompare.prototype.mapCompareController = function ($scope, $window, $e
setTimeout(function () {
this_.updateCompareScaleMap();
});
// Affiche le nom de la carte
this_.setMapName();
})
/**
......@@ -765,3 +770,19 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.addView = function (o
});
}
};
nsVmap.MapCompare.prototype.mapCompareController.prototype.setMapName = function () {
oVmap.log('nsVmap.nsMapManager.LayersTree.prototype.LayertreeController.prototype.setMapName');
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>');
}
var vMapCatalog = oVmap.getMapManager().getMapCatalog();
for (var i = 0; i < vMapCatalog['maps'].length; i++) {
if (vMapCatalog['maps'][i]['compare'] === true) {
var currentMapName = vMapCatalog['maps'][i]['name'];
}
}
$("#map-name-compare").html(currentMapName);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment