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
This commit is contained in:
bartvde
2010-03-19 07:54:11 +00:00
parent dc5fa3c612
commit 3e5bd85849

View File

@@ -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();
},