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 7de5fd5566f8efed205aaf03ca4c2783e1b05652..8fe1d59030260107747379a12f61b466731e50ef 100644 --- a/src/module_vmap/module/javascript/app/vmap/map/mapcompare.js +++ b/src/module_vmap/module/javascript/app/vmap/map/mapcompare.js @@ -14,6 +14,9 @@ goog.require('ol.Map'); goog.require('ol.View'); goog.require('MapJSON'); goog.require('ol.Overlay'); +goog.require('ol.source.Vector'); +goog.require('ol.layer.Vector'); +goog.require('goog.async.AnimationDelay'); /** * @classdesc @@ -56,6 +59,35 @@ nsVmap.MapCompare = function () { }); this.oOpenLayersMap_.getViewport().setAttribute('id', 'map1Compare'); + /** + * Contient les évènements ajoutés sur la carte par la méthode addEventOnMap ou setEventOnMap + * @type {array} + * @private + */ + this.vmapEvents_ = []; + + /** + * Contient les évènements ajoutés sur la carte par la méthode addDrawInteraction ou setDrawInteraction + * @type {array} + * @private + */ + this.vmapInteractions_ = []; + + /** + * Contient les tooltips ajoutés par addTooltip + * @type {array} + * @private + */ + this.vmapOverlays_ = []; + + /** + * Initialisé dans le controlleur + * @type {nsVmap.Map.MapTooltip} + * @private + */ + this.vmapTooltip_ = {}; + // Ajoute les couches à reprojeter en cas de changement de carte dans layersToTransform_ + this.layersToTransform_ = []; } /** @@ -79,6 +111,270 @@ nsVmap.MapCompare.prototype.setOpenLayersView = function (view) { this.oOpenLayersMap_.setView(this.olView_); }; +/** + * Use this function to add a new vector layer + * @param {object} opt_options + * @param {object} opt_options.style + * @param {object} opt_options.extent + * @param {object} opt_options.minResolution + * @param {object} opt_options.maxResolution + * @param {object} opt_options.opacity + * @param {object} opt_options.properties + * @param {object} opt_options.visible + * @param {object} opt_options.zIndex + * @returns {undefined} + */ +nsVmap.MapCompare.prototype.addVectorLayer = function (opt_options) { + oVmap.log('nsVmap.MapCompare.prototype.addVectorLayer'); + + var vectorLayer = new ol.layer.Vector({ + map: this.oOpenLayersMap_, + source: new ol.source.Vector({ + useSpatialIndex: false + }), + updateWhileAnimating: true, + updateWhileInteracting: true + }); + + if (goog.isDef(opt_options)) { + if (goog.isDef(opt_options.style)) + vectorLayer.setStyle(opt_options.style); + + if (goog.isDef(opt_options.extent)) + vectorLayer.setExtent(opt_options.extent); + + if (goog.isDef(opt_options.minResolution)) + vectorLayer.setMinResolution(opt_options.minResolution); + + if (goog.isDef(opt_options.maxResolution)) + vectorLayer.setMaxResolution(opt_options.maxResolution); + + if (goog.isDef(opt_options.opacity)) + vectorLayer.setOpacity(opt_options.opacity); + + if (goog.isDef(opt_options.properties)) + vectorLayer.setProperties(opt_options.properties); + + if (goog.isDef(opt_options.visible)) + vectorLayer.setVisible(opt_options.visible); + + if (goog.isDef(opt_options.zIndex)) + vectorLayer.setZIndex(opt_options.zIndex); + } + + // Ajoute la couche à layersToTransform_ pour que les features soient reprojetés en cas de changement de projection + this.layersToTransform_.push(vectorLayer); + + return vectorLayer; +}; + +/** + * Remove events and interactions and then add a interaction + * @param {ol.interaction.Interaction} interaction + * @param {string|undefined} currentAction name of the current action + * @returns {ol.interaction.Interaction} + */ +nsVmap.MapCompare.prototype.setInteraction = function (interaction, currentAction) { + oVmap.log('nsVmap.MapCompare.prototype.setInteraction'); + // Supprime les anciens évènements et interractions + this.removeActionsOnMap(); + // Ajoute la nouvelle interaction + this.addInteraction(interaction); + // Définit l'action en cours + if (goog.isDef(currentAction)) + this.setCurrentAction(currentAction); + return interaction; +}; + +/** + * Add a interaction + * @param {ol.interaction.Interaction} interaction + * @param {string|undefined} currentAction name of the current action + * @returns {ol.interaction.Interaction} + */ +nsVmap.MapCompare.prototype.addInteraction = function (interaction, currentAction) { + oVmap.log('nsVmap.MapCompare.prototype.addInteraction'); + // Ajout de l'interaction + this.oOpenLayersMap_.addInteraction(interaction); + // Stocke l'interaction + this.vmapInteractions_.push(interaction); + // Définit l'action en cours + if (goog.isDef(currentAction)) + this.setCurrentAction(currentAction); + return interaction; +}; + +/** + * currentAction setter + * @param {string} currentAction + * @export + */ +nsVmap.MapCompare.prototype.setCurrentAction = function (currentAction) { + var scope = angular.element($("#map1Compare")).scope(); + scope.$evalAsync(function (scope) { + scope['ctrl']['currentAction'] = currentAction; + }); +}; + +/** + * Remove the mapTooltip and the actions added by addEventOnMap, setEventOnMap, addDrawInteraction or setDrawInteraction + * @returns {undefined} + * @export + */ +nsVmap.MapCompare.prototype.removeActionsAndTooltips = function () { + this.removeActionsOnMap(); + //this.getMapTooltip().hide(); + for (var i = 0; i < this.vmapOverlays_.length; i++) { + this.vmapOverlays_[i].getElement().style.display = "none"; + } +}; + +/** + * Remove the events and draw interactions added by addEventOnMap, setEventOnMap, addDrawInteraction or setDrawInteraction + * @returns {undefined} + * @export + */ +nsVmap.MapCompare.prototype.removeActionsOnMap = function () { + oVmap.log('nsVmap.Map.prototype.removeActionsOnMap'); + // Supprime les évènements + for (var i = 0; i < this.vmapEvents_.length; i++) { + ol.Observable.unByKey(this.vmapEvents_[i]); + } + + // Supprime les interractions + for (var i = 0; i < this.vmapInteractions_.length; i++) { + + // Supprime les features occasionelles + if (goog.isDef(this.vmapInteractions_[i].getFeatures)) + this.vmapInteractions_[i].getFeatures().clear(); + this.oOpenLayersMap_.removeInteraction(this.vmapInteractions_[i]); + } + + // Définit l'action en cours + this.setCurrentAction(''); +}; + +/** + * Set a event on the map and remove the others. + * @param {string|Array.<string>} type The event type or array of event types. + * @param {function(?): ?} listener The listener function. + * @param {Object=} opt_this The object to use as `this` in `listener`. + * @param {string|undefined} currentAction name of the current action + * @return {goog.events.Key} Unique key for the listener. + * @export + */ +nsVmap.MapCompare.prototype.setEventOnMap = function (type, listener, opt_this, currentAction) { + oVmap.log('nsVmap.Map.prototype.setEventOnMap'); + if (!goog.isDef(type)) { + console.error('setEventOnMap: type not defined'); + return 0; + } + + if (!goog.isDef(listener)) { + console.error('setEventOnMap: listener not defined'); + return 0; + } + + opt_this = goog.isDef(opt_this) ? opt_this : ''; + // Supprime les anciens évènements et interractions + this.removeActionsOnMap(); + // Ajoute le nouvel évènement + var event = this.addEventOnMap(type, listener, opt_this); + // Définit l'action en cours + if (goog.isDef(currentAction)) + this.setCurrentAction(currentAction); + return event; +}; + +/** + * Add a certain type of event on the map. + * @param {string|Array.<string>} type The event type or array of event types. + * @param {function(?): ?} listener The listener function. + * @param {Object=} opt_this The object to use as `this` in `listener`. + * @param {string|undefined} currentAction name of the current action + * @return {goog.events.Key} Unique key for the listener. + * @export + */ +nsVmap.MapCompare.prototype.addEventOnMap = function (type, listener, opt_this, currentAction) { + + if (!goog.isDef(type)) { + console.error('setEventOnMap: type not defined'); + return 0; + } + + if (!goog.isDef(listener)) { + console.error('setEventOnMap: listener not defined'); + return 0; + } + + opt_this = goog.isDef(opt_this) ? opt_this : ''; + // Active l'évènement + var event = this.oOpenLayersMap_.on(type, listener, opt_this); + // Stocke l'évènement + this.vmapEvents_.push(event); + // Définit l'action en cours + if (goog.isDef(currentAction)) + this.setCurrentAction(currentAction); + return event; +}; + +/** + * Get the current scale + * @param {object} opt_options + * @param {boolean|undefined} opt_options.pretty true for pretty format (ex: 1:25,000) + * @returns {Number|String} + * @export + */ +nsVmap.MapCompare.prototype.getScale = function (opt_options) { + oVmap.log('nsVmap.MapCompare.prototype.getScale'); + + opt_options = goog.isDef(opt_options) ? opt_options : {}; + opt_options['pretty'] = goog.isDef(opt_options['pretty']) ? opt_options['pretty'] : false; + + var wgs84Sphere_ = new ol.Sphere(6378137); + var projection = this.oOpenLayersMap_.getView().getProjection(); + + var map = oVmap.getMapCompare().getOLMap(); + + // récupère les coordonnées d'une ligue de 1cm (avec le zoom en cours) + var line = map.getView().calculateExtent([37.795275591, 0]); + var c1 = ol.proj.transform([line[0], line[1]], projection, 'EPSG:4326'); + var c2 = ol.proj.transform([line[2], line[3]], projection, 'EPSG:4326'); + + // Récuère la longueur sur la carte de la ligne de 1cm + var length = wgs84Sphere_.haversineDistance(c1, c2); + + // donc 1m sur la carte correspond à (length mètres dans la réalité x 100) + var scale = length * 100; + + // Rend l'échelle sous format (1:25,000) + if (opt_options['pretty'] === true) { + scale = this.getPrettyScale(scale); + } + + return scale; +}; + +/** + * Get the scale like (1:25,000) + * @param {number} scale + * @returns {String} scale (pretty) + */ +nsVmap.MapCompare.prototype.getPrettyScale = function (scale) { + + // Rend l'échelle sous format (1:25,000) + scale = String(Math.round(scale)); + var j = 1; + for (var i = scale.length - 1; i > 0; i--) { + if (j % 3 === 0) + scale = scale.slice(0, i) + ',' + scale.slice(i + Math.abs(0)); + j++; + } + scale = '1:' + scale; + + return scale; +}; + /** * App-specific directive wrapping the ngeo map directive. The directive's * controller has a property "map" including a reference to the OpenLayers @@ -92,7 +388,8 @@ nsVmap.MapCompare.prototype.mapCompareDirective = function () { return { restrict: 'E', scope: { - 'map': '=appMap' + 'map': '=appMap', + 'currentAction': '=appAction' }, controller: 'AppMapCompareController', controllerAs: 'ctrl', diff --git a/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js b/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js index 3cea89fc41c0f359801f8d7c80bf059a08126283..13114d60d7874701fa6fc84a16d079e020ee1634 100644 --- a/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js +++ b/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js @@ -1307,11 +1307,17 @@ nsVmap.nsMapManager.MapManager.prototype.getCompareLayersTree = function () { * @returns {String} * @export */ -nsVmap.nsMapManager.MapManager.prototype.getJSONLayersTree = function () { +nsVmap.nsMapManager.MapManager.prototype.getJSONLayersTree = function ($bCompareLayersTree) { // recupère une copie de l'arbre des couches var oLayersTree = jQuery.extend(true, {}, oVmap.getMapManager().getLayersTree()); var oMap = oVmap.getMap().getOLMap(); + + if($bCompareLayersTree){ + oLayersTree = jQuery.extend(true, {}, oVmap.getMapManager().getCompareLayersTree()); + oMap = oVmap.getMapCompare().getOLMap(); + } + var aDiscardedAttributes = [ 'olLayer', '$$hashKey', diff --git a/src/module_vmap/module/javascript/app/vmap/tools/print.js b/src/module_vmap/module/javascript/app/vmap/tools/print.js index 8c779787a04216d8ac5ca2ec60d40e2b2bd29a12..db3e75f1a7e3d91e8ba8fc07515162e68733a743 100644 --- a/src/module_vmap/module/javascript/app/vmap/tools/print.js +++ b/src/module_vmap/module/javascript/app/vmap/tools/print.js @@ -103,6 +103,9 @@ nsVmap.nsToolsManager.Print.prototype.printController = function ($timeout, $com */ $scope['modelIndex'] = 0; + $scope["managePrintZoneInProgress"] = false; + $scope["manageComparePrintZoneInProgress"] = false; + /** * @public */ @@ -173,7 +176,12 @@ nsVmap.nsToolsManager.Print.prototype.printController = function ($timeout, $com * The print box object * @private */ - this.printBox_ = new nsVmap.nsToolsManager.PrintBox(); + this.printBox_ = new nsVmap.nsToolsManager.PrintBox({'map_object':oVmap.getMap()}); + /** + * The print box object + * @private + */ + this.printBoxCompare_ = new nsVmap.nsToolsManager.PrintBox({'map_object':oVmap.getMapCompare()}); // mise à jour de l'échelle dans le forulaire d'impression lors d'un mouvement sur la carte this.listenScaleChanges(); @@ -197,6 +205,9 @@ nsVmap.nsToolsManager.Print.prototype.printController = function ($timeout, $com oVmap['scope'].$on('toggleOutTools', function () { if (!$('#print-select-btn').hasClass('active')) { this_.printBox_.hide(); + this_.printBoxCompare_.hide(); + $scope["managePrintZoneInProgress"] = false; + $scope["manageComparePrintZoneInProgress"] = false; } }); }; @@ -364,6 +375,20 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.loadModelParmas2 this.printBox_.setSize(this.printedMapSize_); this.printBox_.show(); + if(this.$scope_.$root["compare_enabled"]){ + this.setPrintedMapSize(this.template_,"#map1Compare","#map_image_compare"); + + // Pré-rempli le champ "Résolution" + this['resolutionCompare'] = this.resizeCoeff_; + + // Ajuste l'échelle avec le niveau de détail + this['currentScaleCompare'] = oVmap.getMapCompare().getPrettyScale(oVmap.getMapCompare().getScale() / this.resizeCoeff_); + + // Dessine un carré d'impression à chaque mouvement de la carte + this.printBoxCompare_.setSize(this.printedMapSize_); + this.printBoxCompare_.show(); + } + }; /** @@ -401,10 +426,13 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.setTemplate = fu * Set this.printedMapSize_ and this.resizeCoeff_ * @param {object} template */ -nsVmap.nsToolsManager.Print.prototype.printController.prototype.setPrintedMapSize = function (template) { +nsVmap.nsToolsManager.Print.prototype.printController.prototype.setPrintedMapSize = function (template, sElementMapId, sPrintId) { oVmap.log('nsVmap.nsToolsManager.Print.printController.setPrintedMapSize'); - var imageDiv = $(template).find('#map_image'); + sPrintId = (goog.isDefAndNotNull(sPrintId)) ? sPrintId : '#map_image'; + sElementMapId = (goog.isDefAndNotNull(sElementMapId)) ? sElementMapId : '#map1'; + + var imageDiv = $(template).find(sPrintId); // Vérifie la présence de '#map_image' if (!goog.isDef(imageDiv.get(0))) { @@ -426,7 +454,7 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.setPrintedMapSiz this.resizeCoeff_ = 1; var tmpWidth = angular.copy(mapWidth); var tmpHeight = angular.copy(mapHeight); - while (mapWidth > ($('#map1').width()) || mapHeight > ($('#map1').height())) { + while (mapWidth > ($(sElementMapId).width()) || mapHeight > ($(sElementMapId).height())) { this.resizeCoeff_++; mapWidth = tmpWidth / this.resizeCoeff_; mapHeight = tmpHeight / this.resizeCoeff_; @@ -469,13 +497,34 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.changeScale = fu nsVmap.nsToolsManager.Print.prototype.printController.prototype.managePrintZone = function () { oVmap.log('nsVmap.nsToolsManager.Print.prototype.printController.prototype.managePrintZone'); - if (this['currentAction'] === 'print-modifyPrintZone') { - this.printBox_.unmanagePrintBox(); + if (this['currentAction'] === 'print-modifyPrintZone' && this.$scope_["managePrintZoneInProgress"]) { + this.printBox_.unmanagePrintBoxAndLock(); + this.printBox_.unlistenMapMovements(); + this.$scope_["managePrintZoneInProgress"] = false; } else { + this.$scope_["managePrintZoneInProgress"] = true; this.printBox_.managePrintBox('print-modifyPrintZone'); } }; +/** + * Detach the printZone from the view and allow to translate it + * @export + */ +nsVmap.nsToolsManager.Print.prototype.printController.prototype.manageComparePrintZone = function () { + oVmap.log('nsVmap.nsToolsManager.Print.prototype.printController.prototype.manageComparePrintZone'); + + if (this['currentAction'] === 'print-modifyPrintZone' && this.$scope_["manageComparePrintZoneInProgress"]) { + this.printBoxCompare_.unmanagePrintBoxAndLock(); + this.printBoxCompare_.unlistenMapMovements(); + this.$scope_["manageComparePrintZoneInProgress"] = false; + } else { + //this.printBox_.unmanagePrintBox(); + this.$scope_["manageComparePrintZoneInProgress"] = true; + this.printBoxCompare_.managePrintBox('print-modifyPrintZone'); + } +}; + /** * Prepare the print params and launch it * @returns {undefined} @@ -504,15 +553,27 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.prepareAndLaunch var aPopupOverlayFeatures = oVmap.getMap().getPopupOverlayFeatures().getArray(); var aSelectionOverlayFeatures = oVmap.getMap().getSelectionOverlayFeatures().getArray(); - // Lance l'impression - var returnPrint = this.print({ + var oPrintOptions = { scope: scope, extent: extent, templateId: templateId, printStyleId: this.$scope_['selectedPrintstyleId'], resolutionCoeff: this['dpi'], features: goog.array.concat(aLocationOverlayFeatures, aPopupOverlayFeatures, aSelectionOverlayFeatures) - }); + }; + + // récupération des infos pour la carte de comparaison si le mode comparaison est actif + if(this.$scope_.$root["compare_enabled"]){ + // Enregistre l'échelle actuelle + this.currentScaleCompare_ = oVmap.getMapCompare().getScale({ + 'pretty': true + }); + oPrintOptions['extentCompare'] = this.printBoxCompare_.getExtent(); + //oPrintOptions['mapIdCompare'] = this.printBoxCompare_.getExtent(); + } + + // Lance l'impression + var returnPrint = this.print(oPrintOptions); if (returnPrint === 1) { // Ferme l'outil d'impression @@ -618,9 +679,10 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.print = function template.innerHTML = response['data']['data'][0]['definition']; var mapImageSize = this_.getTemplateTargetSize(template, '#map_image'); + var mapImageSizeCompare = this_.getTemplateTargetSize(template, '#map_image_compare'); var overviewSize = this_.getTemplateTargetSize(template, '#map_overview'); - var mapsJson = this_.getMapsJsonDef({ + var oJsonDefOptions = { mapId: opt_options.mapId, resolutionCoeff: opt_options.resolutionCoeff, extent: opt_options.extent, @@ -628,7 +690,15 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.print = function featuresZoom: opt_options.featuresZoom, mapImageSize: mapImageSize, overviewSize: overviewSize - }) + } + + if(goog.isDefAndNotNull(opt_options.extentCompare)){ + oJsonDefOptions["extentCompare"] = opt_options.extentCompare; + oJsonDefOptions["mapIdCompare"] = opt_options.mapIdCompare; + oJsonDefOptions["mapImageSizeCompare"] = mapImageSizeCompare; + } + + var mapsJson = this_.getMapsJsonDef(oJsonDefOptions); // Récupère les infos de l'utilisateur this_.getUserInfos_().then(function (oUserInfos) { @@ -707,11 +777,18 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.getMapsJsonDef = // mapId/mapJson var sMapId; var sMapJSON; + var sMapIdCompare; + var sMapJSONCompare; if (goog.isDefAndNotNull(opt_options.mapId)) { sMapId = opt_options.mapId; } else { sMapJSON = oVmap.getMapManager().getJSONLayersTree(); } + if (goog.isDefAndNotNull(opt_options.mapIdCompare)) { + sMapIdCompare = opt_options.mapIdCompare; + } else if (this.$scope_.$root["compare_enabled"]) { + sMapJSONCompare = oVmap.getMapManager().getJSONLayersTree(true); + } // Extent var aExtent = goog.isDefAndNotNull(opt_options.extent) ? opt_options.extent : []; @@ -723,13 +800,16 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.getMapsJsonDef = aExtent[3] + (aExtent[3] - aExtent[1]) ]; var sOverviewExtent = ''; + var sCompareExtent = ''; for (var i = 0; i < aExtent.length; i++) { if (i > 0) { sExtent += '|'; sOverviewExtent += '|'; + sCompareExtent += (goog.isDefAndNotNull(opt_options.extentCompare)) ? '|' : ''; } sExtent += aExtent[i]; sOverviewExtent += aOverviewExtent[i]; + sCompareExtent += (goog.isDefAndNotNull(opt_options.extentCompare)) ? opt_options.extentCompare[i] : ''; } // Features @@ -771,6 +851,15 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.getMapsJsonDef = 'features_zoom': 400 }; } + if (goog.isDefAndNotNull(opt_options.mapImageSizeCompare) && this.$scope_.$root["compare_enabled"]) { + var oCompareDef = { + 'map_id': sMapIdCompare, + 'map_json': sMapJSONCompare, + 'image_size': (opt_options.mapImageSizeCompare[0] * resolutionCoeff) + '|' + (opt_options.mapImageSizeCompare[1] * resolutionCoeff), + 'resolution_coeff': resolutionCoeff, + 'extent': sCompareExtent + }; + } var oMapsJson = []; if (goog.isDefAndNotNull(oMapDef)) { @@ -786,6 +875,13 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.getMapsJsonDef = }); } + if (goog.isDefAndNotNull(oCompareDef)) { + oMapsJson.push({ + 'target': '#map_image_compare', + 'map_definition': oCompareDef + }); + } + var mapsJson = JSON.stringify(oMapsJson); return mapsJson; diff --git a/src/module_vmap/module/template/tools/print.html b/src/module_vmap/module/template/tools/print.html index 0a1fd62b4dcf92147ce7b543f37d661637c5f70c..aa75c7eb76de4c00e6605cdb0445fb390ca7bd80 100644 --- a/src/module_vmap/module/template/tools/print.html +++ b/src/module_vmap/module/template/tools/print.html @@ -53,10 +53,18 @@ </select> <button type="button" + title="Modification de la zone d'impression sur la carte" class="btn btn-info btn-sm" style="margin-top: 10px" - ng-class="{'active': ctrl.currentAction === 'print-modifyPrintZone'}" + ng-class="{'active': managePrintZoneInProgress, 'disabled': manageComparePrintZoneInProgress}" ng-click="ctrl.managePrintZone()"><span class="glyphicon glyphicon-move"></span></button> + <button type="button" + title="Modification de la zone d'impression sur la carte de comparaison" + ng-show="$root.compare_enabled" + class="btn btn-info btn-sm" + style="margin-top: 10px" + ng-class="{'active': manageComparePrintZoneInProgress, 'disabled': managePrintZoneInProgress}" + ng-click="ctrl.manageComparePrintZone()"><span class="glyphicon glyphicon-move"></span></button> <button type="submit" class="btn btn-info btn-sm" diff --git a/src/module_vmap/module/template/vmap.html b/src/module_vmap/module/template/vmap.html index b70694d2cec01fcd48c9dc3c6cb3a26d0af8a283..0b1b12f973b55e61a0408e13faf08923522ef702 100755 --- a/src/module_vmap/module/template/vmap.html +++ b/src/module_vmap/module/template/vmap.html @@ -58,7 +58,7 @@ <!-- Carte Compare --> <div ng-show="compare_enabled" id="map-container-compare" ng-class="{'open' : ctrl.bottom_open,'half' : compare_enabled, 'right-module-bar-present' : bLoadVmapModule, 'left-map-manager-open' : vmapCtrl.left_open, 'right-module-manager-open' : vmapCtrl.right_open}"> - <app-map-compare app-map="vmapCtrl.mapCompare" style="display:block; width:100%; height:100%;"></app-map-compare> + <app-map-compare app-map="vmapCtrl.mapCompare" app-action="vmapCtrl.currentAction" style="display:block; width:100%; height:100%;"></app-map-compare> </div> <!-- Bandeau de selection -->