[fusion-commits] r2619 - trunk/layers/MapGuide
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Oct 22 01:12:45 PDT 2012
Author: liuar
Date: 2012-10-22 01:12:44 -0700 (Mon, 22 Oct 2012)
New Revision: 2619
Modified:
trunk/layers/MapGuide/MapGuide.js
Log:
Submit on behalf of Spark Liu on ticket #545: We'll first check if the loaded map is the one shown in main map.
Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2012-10-19 06:12:09 UTC (rev 2618)
+++ trunk/layers/MapGuide/MapGuide.js 2012-10-22 08:12:44 UTC (rev 2619)
@@ -244,8 +244,22 @@
this._sResourceId = o.mapId;
this._sMapname = o.mapName;
this._sMapTitle = o.mapTitle;
- this.mapWidget.setMetersPerUnit(o.metersPerUnit);
- this.mapWidget.setBackgroundColor(o.backgroundColor);
+
+ // Fix defect that background color in overview map will affect background color in main map.
+ // We'll first check if the loaded map is the one shown in main map.
+ var currentMaps = this.mapWidget.mapGroup.maps;
+ var isInMapWidget = false;
+ for(var index = 0, len = currentMaps.length; index < len; index++) {
+ var mapInMaps = currentMaps[index];
+ if(mapInMaps.resourceId == this._sResourceId) {
+ isInMapWidget = this;
+ break;
+ }
+ }
+ if(isInMapWidget) {
+ this.mapWidget.setMetersPerUnit(o.metersPerUnit);
+ this.mapWidget.setBackgroundColor(o.backgroundColor);
+ }
var version = o.siteVersion;
var bits = version.split('.');
More information about the fusion-commits
mailing list