From 3e5bd85849a21f5934654f4f404de584614dd637 Mon Sep 17 00:00:00 2001 From: bartvde Date: Fri, 19 Mar 2010 07:54:11 +0000 Subject: [PATCH] Spelling of API methods getURL and setUrl of imagelayers is inconsistent and confusing, p=marcjansen, r=me (closes #2354) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10112 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Image.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/OpenLayers/Layer/Image.js b/lib/OpenLayers/Layer/Image.js index 2ba2a7a8fa..d576f2268c 100644 --- a/lib/OpenLayers/Layer/Image.js +++ b/lib/OpenLayers/Layer/Image.js @@ -227,11 +227,29 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { /** * APIMethod: setUrl + * *Deprecated*. Please use the method setURL() instead. * * Parameters: * newUrl - {String} */ setUrl: function(newUrl) { + var msg = "The method 'setUrl' of OpenLayers.Layer.Image-layers is " + + "deprecated as of OpenLayers 2.9 and should not be used anymore. " + + "Use the method 'setURL' (notice the different spelling) instead. " + + "The old method 'setUrl' may be removed from future releases without " + + "further notice."; + OpenLayers.Console.warn(msg); + this.setURL(newUrl); + }, + + /** + * APIMethod: setURL + * Sets the URL of the image and draws the tile. + * + * Parameters: + * newUrl - {String} + */ + setURL: function(newUrl) { this.url = newUrl; this.tile.draw(); },