[fusion-commits] r2620 - sandbox/adsk/2.3r/layers/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Oct 22 01:13:20 PDT 2012


Author: liuar
Date: 2012-10-22 01:13:19 -0700 (Mon, 22 Oct 2012)
New Revision: 2620

Modified:
   sandbox/adsk/2.3r/layers/MapGuide/MapGuide.js
Log:
Integrate 2619

Modified: sandbox/adsk/2.3r/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/2.3r/layers/MapGuide/MapGuide.js	2012-10-22 08:12:44 UTC (rev 2619)
+++ sandbox/adsk/2.3r/layers/MapGuide/MapGuide.js	2012-10-22 08:13:19 UTC (rev 2620)
@@ -223,8 +223,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