diff --git a/examples/KMLParser.html b/examples/KMLParser.html index 645be9b0c6..a6ec027f02 100644 --- a/examples/KMLParser.html +++ b/examples/KMLParser.html @@ -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 + }); } diff --git a/examples/WMSDescribeLayerParser.html b/examples/WMSDescribeLayerParser.html index f7ed546ac6..0e62465e85 100644 --- a/examples/WMSDescribeLayerParser.html +++ b/examples/WMSDescribeLayerParser.html @@ -9,7 +9,7 @@ diff --git a/examples/sld.js b/examples/sld.js index 21cb295a5d..888a9c6d27 100644 --- a/examples/sld.js +++ b/examples/sld.js @@ -12,10 +12,13 @@ function init() { )); 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(); diff --git a/examples/xml.html b/examples/xml.html index 48d347a3fd..696229bde7 100644 --- a/examples/xml.html +++ b/examples/xml.html @@ -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) { diff --git a/lib/OpenLayers/Ajax.js b/lib/OpenLayers/Ajax.js index 34e683a587..92235025ae 100644 --- a/lib/OpenLayers/Ajax.js +++ b/lib/OpenLayers/Ajax.js @@ -46,8 +46,8 @@ OpenLayers.nullHandler = function(request) { /** * APIFunction: OpenLayers.loadURL - * Background load a document. For more flexibility in using XMLHttpRequest, - * see the methods. + * Background load a document. + * *Deprecated*. Use method instead. * * Parameters: * uri - {String} URI of source doc