[Commits] r297 - apps/opengeo/geoexplorer/trunk/lib

commits at geoext.org commits at geoext.org
Mon Mar 30 23:47:24 CEST 2009


Author: sbenthall
Date: 2009-03-30 23:47:24 +0200 (Mon, 30 Mar 2009)
New Revision: 297

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
new layers added to map are transparent pngs now


Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-03-30 21:46:55 UTC (rev 296)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-03-30 21:47:24 UTC (rev 297)
@@ -155,6 +155,19 @@
     initMap: function() {
         // TODO: check this.initialConfig.map for any map options
         this.map = new OpenLayers.Map();
+
+        //TODO: make this more configurable
+        this.map.events.on({
+            "preaddlayer" : function(evt){
+                if(evt.layer.mergeNewParams){
+                    evt.layer.mergeNewParams({
+                        transparent: true,
+                        format: "image/png"
+                    })
+                }
+            },
+            scope : this
+        });
     },
     
     /**



More information about the Commits mailing list