[fusion-commits] r2621 - sandbox/adsk/2.4j/layers/MapGuide
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Oct 22 01:14:33 PDT 2012
Author: liuar
Date: 2012-10-22 01:14:33 -0700 (Mon, 22 Oct 2012)
New Revision: 2621
Modified:
sandbox/adsk/2.4j/layers/MapGuide/MapGuide.js
Log:
Integrate 2619
Modified: sandbox/adsk/2.4j/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/2.4j/layers/MapGuide/MapGuide.js 2012-10-22 08:13:19 UTC (rev 2620)
+++ sandbox/adsk/2.4j/layers/MapGuide/MapGuide.js 2012-10-22 08:14:33 UTC (rev 2621)
@@ -246,8 +246,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