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

commits at geoext.org commits at geoext.org
Fri Apr 17 02:24:03 CEST 2009


Author: tschaub
Date: 2009-04-17 02:24:02 +0200 (Fri, 17 Apr 2009)
New Revision: 408

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
   apps/opengeo/geoexplorer/trunk/lib/Viewer.js
Log:
Allow app to be configured with a proxy.

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-17 00:02:56 UTC (rev 407)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-17 00:24:02 UTC (rev 408)
@@ -100,6 +100,9 @@
                 SERVICE: "WMS",
                 REQUEST: "GetCapabilities"
             }));
+        if(this.proxy) {
+            url = this.proxy + encodeURIComponent(url);
+        }
         
         this.capabilities = new GeoExt.data.WMSCapabilitiesStore({url: url});
     },

Modified: apps/opengeo/geoexplorer/trunk/lib/Viewer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/Viewer.js	2009-04-17 00:02:56 UTC (rev 407)
+++ apps/opengeo/geoexplorer/trunk/lib/Viewer.js	2009-04-17 00:24:02 UTC (rev 408)
@@ -34,6 +34,11 @@
             "ready"
         );
         
+        // pass on any proxy config to OpenLayers
+        if(this.proxy) {
+            OpenLayers.ProxyHost = this.proxy;
+        }
+        
         this.load();
         
     },



More information about the Commits mailing list