[OpenLayers-Commits] r12206 - in trunk/openlayers: examples lib/OpenLayers

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Aug 3 11:55:16 EDT 2011


Author: fredj
Date: 2011-08-03 08:55:14 -0700 (Wed, 03 Aug 2011)
New Revision: 12206

Modified:
   trunk/openlayers/examples/KMLParser.html
   trunk/openlayers/examples/WMSDescribeLayerParser.html
   trunk/openlayers/examples/sld.js
   trunk/openlayers/examples/xml.html
   trunk/openlayers/lib/OpenLayers/Ajax.js
Log:
mark the OpenLayers.loadURL method as deprecated (replaced by OpenLayers.Request.GET). r=erilem,rdewit,ahocevar (closes #3443)

Modified: trunk/openlayers/examples/KMLParser.html
===================================================================
--- trunk/openlayers/examples/KMLParser.html	2011-08-03 15:47:06 UTC (rev 12205)
+++ trunk/openlayers/examples/KMLParser.html	2011-08-03 15:55:14 UTC (rev 12206)
@@ -28,7 +28,10 @@
           document.getElementById('output').innerHTML = html;
         }
         function load() {
-            OpenLayers.loadURL("kml/lines.kml", "", null, parseData);
+            OpenLayers.Request.GET({
+                url: "kml/lines.kml",
+                success: parseData
+            });
         }
     </script>
   </head>

Modified: trunk/openlayers/examples/WMSDescribeLayerParser.html
===================================================================
--- trunk/openlayers/examples/WMSDescribeLayerParser.html	2011-08-03 15:47:06 UTC (rev 12205)
+++ trunk/openlayers/examples/WMSDescribeLayerParser.html	2011-08-03 15:55:14 UTC (rev 12206)
@@ -9,7 +9,7 @@
     <script src="../lib/OpenLayers.js"></script>
     <script type="text/javascript">
         function parseData(req) {
-          format =  new OpenLayers.Format.WMSDescribeLayer();
+          format = new OpenLayers.Format.WMSDescribeLayer();
           html = "<br>"
           resp = format.read(req.responseText);
           for(var i = 0; i < resp.length; i++) {
@@ -22,7 +22,10 @@
           document.getElementById('output').innerHTML = html;
         }
         function load() {
-            OpenLayers.loadURL("xml/wmsdescribelayer.xml", "", null, parseData);
+            OpenLayers.Request.GET({
+                url: "xml/wmsdescribelayer.xml",
+                success: parseData
+            });
         }
     </script>
   </head>

Modified: trunk/openlayers/examples/sld.js
===================================================================
--- trunk/openlayers/examples/sld.js	2011-08-03 15:47:06 UTC (rev 12205)
+++ trunk/openlayers/examples/sld.js	2011-08-03 15:55:14 UTC (rev 12206)
@@ -12,10 +12,13 @@
     ));
     map.addControl(new OpenLayers.Control.LayerSwitcher());
 
-    OpenLayers.loadURL("tasmania/sld-tasmania.xml", null, null, complete);
+    OpenLayers.Request.GET({
+        url: "tasmania/sld-tasmania.xml",
+        success: complete
+    });
 }
 
-// handler for the loadURL function in the init method
+// handler for the OpenLayers.Request.GET function in the init method
 function complete(req) {
     sld = format.read(req.responseXML || req.responseText);
     buildStyleChooser();

Modified: trunk/openlayers/examples/xml.html
===================================================================
--- trunk/openlayers/examples/xml.html	2011-08-03 15:47:06 UTC (rev 12205)
+++ trunk/openlayers/examples/xml.html	2011-08-03 15:55:14 UTC (rev 12206)
@@ -39,8 +39,11 @@
         var doc = null;
 
         function init() {
-            var url = "xml/features.xml";
-            OpenLayers.loadURL(url, null, null, loadSuccess, loadFailure);
+            OpenLayers.Request.GET({
+                url: "xml/features.xml",
+                success: loadSuccess,
+                failure: loadFailure
+            });
         }
 
         function loadSuccess(request) {

Modified: trunk/openlayers/lib/OpenLayers/Ajax.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Ajax.js	2011-08-03 15:47:06 UTC (rev 12205)
+++ trunk/openlayers/lib/OpenLayers/Ajax.js	2011-08-03 15:55:14 UTC (rev 12206)
@@ -46,8 +46,8 @@
 
 /** 
  * APIFunction: OpenLayers.loadURL
- * Background load a document.  For more flexibility in using XMLHttpRequest,
- *     see the <OpenLayers.Request> methods.
+ * Background load a document.
+ * *Deprecated*.  Use <OpenLayers.Request.GET> method instead.
  *
  * Parameters:
  * uri - {String} URI of source doc



More information about the Commits mailing list