[Commits] r1203 - in apps/opengeo/geoexplorer/trunk/src: html script/app

commits at geoext.org commits at geoext.org
Thu Jul 2 07:21:57 CEST 2009


Author: tschaub
Date: 2009-07-02 07:21:57 +0200 (Thu, 02 Jul 2009)
New Revision: 1203

Modified:
   apps/opengeo/geoexplorer/trunk/src/html/embed.html
   apps/opengeo/geoexplorer/trunk/src/html/index.html
   apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
Log:
Change ows to wms, and don't allow drops on the tree root.

Modified: apps/opengeo/geoexplorer/trunk/src/html/embed.html
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/html/embed.html	2009-07-02 05:04:15 UTC (rev 1202)
+++ apps/opengeo/geoexplorer/trunk/src/html/embed.html	2009-07-02 05:21:57 UTC (rev 1203)
@@ -37,17 +37,17 @@
                         "based maps.",
                     contact: "For more information, contact <a href='http://opengeo.org'>OpenGeo</a>."
                 },
-                ows: {
+                wms: {
                     "demo": "http://demo.opengeo.org/geoserver/ows"
                 },
                 map: {
                     layers: [{
                         name: "openstreetmap",
-                        ows: "demo",
+                        wms: "demo",
                         group: "background"
                     },{
                         name: "topp:states",
-                        ows: "demo"
+                        wms: "demo"
                     }],
                     center: [-96.7, 37.6],
                     zoom: 4

Modified: apps/opengeo/geoexplorer/trunk/src/html/index.html
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/html/index.html	2009-07-02 05:04:15 UTC (rev 1202)
+++ apps/opengeo/geoexplorer/trunk/src/html/index.html	2009-07-02 05:21:57 UTC (rev 1203)
@@ -40,18 +40,18 @@
                         "in any web page.",
                     contact: "For more information, contact <a href='http://opengeo.org'>OpenGeo</a>."
                 },
-                ows: {
+                wms: {
                     "demo": "http://demo.opengeo.org/geoserver/ows/"
                 },
                 map: {
                     layers: [{
                         name: "topp:bluemarble",
                         title: "Global Imagery",
-                        ows: "demo",
+                        wms: "demo",
                         group: "background"
                     }, {
                         name: "topp:states",
-                        ows: "demo",
+                        wms: "demo",
                         visibility: true
                     }],
                     center: [-96.7, 37.6],

Modified: apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js	2009-07-02 05:04:15 UTC (rev 1202)
+++ apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js	2009-07-02 05:21:57 UTC (rev 1203)
@@ -17,7 +17,7 @@
  *
  *     Valid config properties:
  *     map - {Object} Map configuration object.
- *     ows - {String} OWS URL
+ *     wms - {Object} An object with properties whose values are WMS endpoint URLs
  *     alignToGrid - {boolean} if true, align tile requests to the grid 
  *         enforced by tile caches such as GeoWebCache or Tilecache
  *
@@ -131,13 +131,13 @@
             }
         ];
         
-        for (var id in this.ows) {
-            // Load capabilities for each ows passed through the configuration.
+        for (var id in this.wms) {
+            // Load capabilities for each wms passed through the configuration.
             dispatchQueue.push(
                 (function(id) {
                     // Create a new scope for 'id'.
                     return function(done){
-                        this.addSource(this.ows[id], id, done, done);
+                        this.addSource(this.wms[id], id, done, done);
                     }; 
                 })(id));
         }
@@ -222,7 +222,7 @@
                 success(record);
             },
             failure: function(){
-                OpenLayers.Console.error("Couldn't get capabilities document for ows '" + id + "'.");
+                OpenLayers.Console.error("Couldn't get capabilities document for wms '" + id + "'.");
                 fail();
             },
             scope: this
@@ -351,7 +351,8 @@
         var treeRoot = new Ext.tree.TreeNode({
             text: "Layers",
             expanded: true,
-            isTarget: false
+            isTarget: false,
+            allowDrop: false
         });
         treeRoot.appendChild(new GeoExplorer.GroupContainer({
             text: "Overlays",
@@ -587,7 +588,7 @@
             
             for(var i = 0; i < mapConfig.layers.length; ++i) {
                 var conf = mapConfig.layers[i];
-                var index = this.layerSources.find("identifier", conf.ows);
+                var index = this.layerSources.find("identifier", conf.wms);
                 
                 if (index == -1) {
                     continue;
@@ -1326,7 +1327,7 @@
 
         var center = this.map.getCenter();        
         var config = {
-            ows: {},
+            wms: {},
             map: {
                 center: [center.lon, center.lat],
                 zoom: this.map.zoom,
@@ -1349,14 +1350,14 @@
                     return;
                 }
                 // add source
-                config.ows[source.get("identifier")] = source.get("url");
+                config.wms[source.get("identifier")] = source.get("url");
                 
                 config.map.layers.push({
                     name: layerRecord.get("name"),
                     title: layerRecord.get("title"),
                     visibility: layer.getVisibility(),
                     group: layerRecord.get("group"),
-                    ows: source.get("identifier")
+                    wms: source.get("identifier")
                 });
             }
         }, this);



More information about the Commits mailing list