[Commits] r392 - sandbox/opengeo/geoexplorer/lib/GeoExt/data

commits at geoext.org commits at geoext.org
Wed Apr 15 09:03:04 CEST 2009


Author: tschaub
Date: 2009-04-15 09:03:04 +0200 (Wed, 15 Apr 2009)
New Revision: 392

Modified:
   sandbox/opengeo/geoexplorer/lib/GeoExt/data/ScaleStore.js
Log:
Only grab scales from map if map has at least one layer.

Modified: sandbox/opengeo/geoexplorer/lib/GeoExt/data/ScaleStore.js
===================================================================
--- sandbox/opengeo/geoexplorer/lib/GeoExt/data/ScaleStore.js	2009-04-15 06:59:58 UTC (rev 391)
+++ sandbox/opengeo/geoexplorer/lib/GeoExt/data/ScaleStore.js	2009-04-15 07:03:04 UTC (rev 392)
@@ -24,7 +24,9 @@
         ])});
         GeoExt.data.ScaleStore.superclass.constructor.call(this, config);
         this.map.events.register('changebaselayer', this, this.populateFromMap);
-        this.populateFromMap();
+        if(this.map.layers && this.map.layers.length > 0) {
+            this.populateFromMap();
+        }
     },
 
     populateFromMap: function() {



More information about the Commits mailing list