[Commits] r889 - apps/opengeo/geoexplorer/trunk/lib/GeoExplorer

commits at geoext.org commits at geoext.org
Thu May 28 22:47:33 CEST 2009


Author: sbenthall
Date: 2009-05-28 22:47:33 +0200 (Thu, 28 May 2009)
New Revision: 889

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
Log:
when base layers are added, one of them will be made the visible base of the map


Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-05-28 20:18:53 UTC (rev 888)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-05-28 20:47:33 UTC (rev 889)
@@ -119,6 +119,12 @@
 
             layer.setIsBaseLayer(!!base);
             this.mapPanel.layers.add(record);
+            
+            if(base){
+                this.mapPanel.map.setBaseLayer(layer);
+                //this is a hack around OpenLayers #2111
+                layer.events.triggerEvent("visibilitychanged");
+            }
         }
 
     }



More information about the Commits mailing list