[Commits] r887 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Thu May 28 22:17:52 CEST 2009
Author: dwins
Date: 2009-05-28 22:17:52 +0200 (Thu, 28 May 2009)
New Revision: 887
Modified:
apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
Fix a bug with baselayer ordering in exported maps
Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-05-28 19:40:38 UTC (rev 886)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-05-28 20:17:52 UTC (rev 887)
@@ -395,7 +395,6 @@
conf.isBaseLayer: false);
// set any other layer configuration
-
records.push(record);
}
}
@@ -963,8 +962,11 @@
//Layers configuration
config.map.layers = [];
+ // If there is a visible baselayer, it needs to be added last to avoid
+ // issues with deferred rendering.
+ var activeBaseMap = null;
+
this.layers.each(function(layerRecord){
-
var c = {
name: (layerRecord.get("layer").params &&
layerRecord.get("layer").params.LAYERS) ||
@@ -973,9 +975,14 @@
isBaseLayer: layerRecord.get("layer").isBaseLayer
};
- config.map.layers.push(c);
+ if (!activeBaseMap && c.visibility && c.isBaseLayer)
+ activeBaseMap = c;
+ else
+ config.map.layers.push(c);
});
+ if (activeBaseMap) config.map.layers.push(activeBaseMap);
+
return config;
},
More information about the Commits
mailing list