From c05cb51f5df9aac9059b32d63fea8f78cee21720 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Fri, 30 Dec 2016 15:53:14 +0100 Subject: [PATCH] map field name refactoried to indicate no direct access --- frontend-js/src/main/js/map/AbstractCustomMap.js | 6 +++--- frontend-js/src/main/js/map/Submap.js | 2 +- frontend-js/src/main/js/map/TouchMap.js | 4 ++-- frontend-js/src/main/js/map/overlay/OverlayCollection.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend-js/src/main/js/map/AbstractCustomMap.js b/frontend-js/src/main/js/map/AbstractCustomMap.js index a2c94acfbb..a2016e0ffe 100644 --- a/frontend-js/src/main/js/map/AbstractCustomMap.js +++ b/frontend-js/src/main/js/map/AbstractCustomMap.js @@ -411,7 +411,7 @@ AbstractCustomMap.prototype.turnOnDrawing = function() { zIndex : 1 } }); - this._drawingManager.setMap(this.map); + this._drawingManager.setMap(this.getGoogleMap()); this._drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON); google.maps.event.addListener(this._drawingManager, 'overlaycomplete', function(e) { @@ -940,7 +940,7 @@ AbstractCustomMap.prototype.getSelectedLayoutOverlays = function() { * @returns google.maps.map object used to representing data */ AbstractCustomMap.prototype.getGoogleMap = function() { - return this.map; + return this._map; }; /** @@ -948,7 +948,7 @@ AbstractCustomMap.prototype.getGoogleMap = function() { * */ AbstractCustomMap.prototype.setGoogleMap = function(gmap) { - this.map = gmap; + this._map = gmap; }; AbstractCustomMap.prototype.isMarkerOptimization = function() { diff --git a/frontend-js/src/main/js/map/Submap.js b/frontend-js/src/main/js/map/Submap.js index 1eba3748a4..13d0bb0e27 100644 --- a/frontend-js/src/main/js/map/Submap.js +++ b/frontend-js/src/main/js/map/Submap.js @@ -75,7 +75,7 @@ Submap.prototype.init = function(htmlTag, jsVar) { var mapOptions = this.creatMapOptions(this.configuration.MAPS.length); - this.map = new google.maps.Map(controlDiv, mapOptions); + this.setGoogleMap(new google.maps.Map(controlDiv, mapOptions)); if (this.isCustomTouchInterface()) { this._touchInterface = new TouchMap(this); } diff --git a/frontend-js/src/main/js/map/TouchMap.js b/frontend-js/src/main/js/map/TouchMap.js index f12035f14d..a48dea7b77 100644 --- a/frontend-js/src/main/js/map/TouchMap.js +++ b/frontend-js/src/main/js/map/TouchMap.js @@ -374,11 +374,11 @@ TouchMap.prototype.ongoingTouchIndexById = function(idToFind) { TouchMap.prototype.setMap = function(map) { - this.map = map; + this._map = map; }; TouchMap.prototype.getMap = function() { - return this.map; + return this._map; }; module.exports = TouchMap; diff --git a/frontend-js/src/main/js/map/overlay/OverlayCollection.js b/frontend-js/src/main/js/map/overlay/OverlayCollection.js index b390e3524e..1c2c1b0bc9 100644 --- a/frontend-js/src/main/js/map/overlay/OverlayCollection.js +++ b/frontend-js/src/main/js/map/overlay/OverlayCollection.js @@ -209,11 +209,11 @@ OverlayCollection.prototype._getDetailArrayByIdentifiedElement = function(elemen }; OverlayCollection.prototype.setMap = function(map) { - this.map = map; + this._map = map; }; OverlayCollection.prototype.getMap = function() { - return this.map; + return this._map; }; module.exports = OverlayCollection; -- GitLab