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

commits at geoext.org commits at geoext.org
Thu May 28 20:19:33 CEST 2009


Author: sbenthall
Date: 2009-05-28 20:19:33 +0200 (Thu, 28 May 2009)
New Revision: 883

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
Log:
adding layers from capabilities as overlays by default, base layers by option


Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-05-28 17:58:10 UTC (rev 882)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-05-28 18:19:33 UTC (rev 883)
@@ -86,7 +86,7 @@
      * 
      * Adds a layer to the <GeoExt.MapPanel> of this instance.
      */    
-    addLayers : function(){
+    addLayers : function(base){
 
         var sm = this.getSelectionModel();
 
@@ -97,6 +97,9 @@
         
         var record, layer;
         for(var i = 0; i < records.length; i++){
+            // ??? When this happens, the layer needs to be cloned.
+            // I believe that current in GeoExt trunk, a copy is a shallow
+            // copy.
             record = records[i].copy(++Ext.data.Record.AUTO_ID);
             /*
              * TODO: deal with srs and maxExtent
@@ -113,6 +116,8 @@
             } else {
                 layer.maxExtent = layer.restrictedExtent;
             } 
+
+            layer.setIsBaseLayer(!!base);
             this.mapPanel.layers.add(record);
         }
 



More information about the Commits mailing list