[OpenLayers-Commits] r12069 - in sandbox/bartvde/exception/openlayers: . lib/OpenLayers/Format/WMSCapabilities lib/OpenLayers/Layer tests/Format/WMSCapabilities

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Tue Jun 7 17:41:08 EDT 2011


Author: bartvde
Date: 2011-06-07 14:41:07 -0700 (Tue, 07 Jun 2011)
New Revision: 12069

Modified:
   sandbox/bartvde/exception/openlayers/
   sandbox/bartvde/exception/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js
   sandbox/bartvde/exception/openlayers/lib/OpenLayers/Layer/GoogleNG.js
   sandbox/bartvde/exception/openlayers/tests/Format/WMSCapabilities/v1_1_1.html
Log:
merge sandbox with trunk


Property changes on: sandbox/bartvde/exception/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:12057-12068

Modified: sandbox/bartvde/exception/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js
===================================================================
--- sandbox/bartvde/exception/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js	2011-06-07 21:38:34 UTC (rev 12068)
+++ sandbox/bartvde/exception/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js	2011-06-07 21:41:07 UTC (rev 12069)
@@ -311,15 +311,22 @@
             "Get": function(node, obj) {
                 obj.get = {};
                 this.readChildNodes(node, obj.get);
+                // backwards compatibility
+                if (!obj.href) {
+                    obj.href = obj.get.href;
+                }
             },
             "Post": function(node, obj) {
                 obj.post = {};
                 this.readChildNodes(node, obj.post);
+                // backwards compatibility
+                if (!obj.href) {
+                    obj.href = obj.get.href;
+                }
             },
             "GetMap": function(node, obj) {
                 obj.getmap = {formats: []};
                 this.readChildNodes(node, obj.getmap);
-                obj.getmap.href = obj.getmap.get.href || obj.getmap.post.href; // backwards compatibility
             },
             "GetFeatureInfo": function(node, obj) {
                 obj.getfeatureinfo = {formats: []};

Modified: sandbox/bartvde/exception/openlayers/lib/OpenLayers/Layer/GoogleNG.js
===================================================================
--- sandbox/bartvde/exception/openlayers/lib/OpenLayers/Layer/GoogleNG.js	2011-06-07 21:38:34 UTC (rev 12068)
+++ sandbox/bartvde/exception/openlayers/lib/OpenLayers/Layer/GoogleNG.js	2011-06-07 21:41:07 UTC (rev 12069)
@@ -5,6 +5,7 @@
 
 /**
  * @requires OpenLayers/Layer/XYZ.js
+ * @requires OpenLayers/Tile/Google.js
  */
 
 /** 

Modified: sandbox/bartvde/exception/openlayers/tests/Format/WMSCapabilities/v1_1_1.html
===================================================================
--- sandbox/bartvde/exception/openlayers/tests/Format/WMSCapabilities/v1_1_1.html	2011-06-07 21:38:34 UTC (rev 12068)
+++ sandbox/bartvde/exception/openlayers/tests/Format/WMSCapabilities/v1_1_1.html	2011-06-07 21:41:07 UTC (rev 12069)
@@ -14,7 +14,7 @@
     
     function test_read(t) {
         
-        t.plan(17);
+        t.plan(23);
 
         var xml = document.getElementById("gssample").firstChild.nodeValue;
         var doc = new OpenLayers.Format.XML().read(xml);
@@ -41,7 +41,41 @@
             undefined,
             "getmap.post not available"
         );
+
+        var describelayer = capability.request.describelayer;
+        t.eq(
+            describelayer.href,
+            "http://publicus.opengeo.org:80/geoserver/wms?SERVICE=WMS&",
+            "describelayer href parsed"
+        );
+        t.eq(
+            describelayer.get.href,
+            describelayer.href,
+            "describelayer.get.href parsed"
+        );
+        t.eq(
+            describelayer.post,
+            undefined,
+            "describelayer.post not available"
+        );
         
+        var getfeatureinfo = capability.request.getfeatureinfo;
+        t.eq(
+            getfeatureinfo.href,
+            "http://publicus.opengeo.org:80/geoserver/wms?SERVICE=WMS&",
+            "getfeatureinfo href parsed"
+        );
+        t.eq(
+            getfeatureinfo.get.href,
+            getfeatureinfo.href,
+            "getmap.get.href parsed"
+        );
+        t.eq(
+            getfeatureinfo.post.href,
+            "http://publicus.opengeo.org:80/geoserver/wms?SERVICE=WMS&",
+            "getfeatureinfo.post set correctly"
+        );
+        
         t.ok(capability.layers, "layers parsed");
         t.eq(capability.layers.length, 22, "correct number of layers parsed");
         



More information about the Commits mailing list