[fusion-commits] r2739 - in trunk: layers/MapGuide lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Jun 25 20:00:38 PDT 2013


Author: jng
Date: 2013-06-25 20:00:37 -0700 (Tue, 25 Jun 2013)
New Revision: 2739

Modified:
   trunk/layers/MapGuide/MapGuide.js
   trunk/lib/Map.js
Log:
Fix base map inconsistency with initial visibility and checkbox check state.

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2013-06-26 02:51:33 UTC (rev 2738)
+++ trunk/layers/MapGuide/MapGuide.js	2013-06-26 03:00:37 UTC (rev 2739)
@@ -618,19 +618,6 @@
                 this.oLayerOL2.setVisibility(true);
             }
         }
-
-        //Fix Defect: the Base Layer Group should be invisiable when the "initially visiable in map" is set to false
-        var i = 0;
-        var j = 0;
-        for(i = 0;i < this.layerRoot.groups.length; i++){  
-            if(this.layerRoot.groups[i].isBaseMapGroup && !this.layerRoot.groups[i].initiallyVisible){
-                for(j = 0; j<this.oLayersOLTile.length; j++) {
-                    if(this.oLayersOLTile[j].params.basemaplayergroupname === this.layerRoot.groups[i].name) {
-                        this.oLayersOLTile[j].setVisibility(false);
-                    }
-                }    
-            }   
-        }
     },
     /**
      * Callback function from a LoadMap.php request

Modified: trunk/lib/Map.js
===================================================================
--- trunk/lib/Map.js	2013-06-26 02:51:33 UTC (rev 2738)
+++ trunk/lib/Map.js	2013-06-26 03:00:37 UTC (rev 2739)
@@ -507,8 +507,6 @@
                 this.oMapOL.addLayer(this.aMaps[i].oLayerOL);
             }
 
-            this._fixBaseLayerGroupVisibility();
-            
             //HACK: Force alwaysInRange = true if more than one Map Definition was found in the MapGroup
             //
             //I suspect the underlying problem is the variations in coordinate system name and/or WKT of the
@@ -524,6 +522,9 @@
                     }
                 }
             }
+            
+            //Need to do this after setting alwaysInRange = true as we require the original visibility settings to be respected
+            this._fixBaseLayerGroupVisibility();
         }
 
         // Take advantage of new client-zoom capabilities introduced in OpenLayers 2.12



More information about the fusion-commits mailing list