diff --git a/lib/deprecated.js b/lib/deprecated.js index 33be206fd9..8d906459a9 100644 --- a/lib/deprecated.js +++ b/lib/deprecated.js @@ -941,75 +941,6 @@ if (!String.prototype.camelize) { }; } -if (!String.prototype.startsWith) { - /** - * APIMethod: String.startsWith - * *Deprecated*. Whether or not a string starts with another string. - * - * Parameters: - * sStart - {String} The string we're testing for. - * - * Returns: - * {Boolean} Whether or not this string starts with the string passed in. - */ - String.prototype.startsWith = function(sStart) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.startsWith'})); - return OpenLayers.String.startsWith(this, sStart); - }; -} - -if (!String.prototype.contains) { - /** - * APIMethod: String.contains - * *Deprecated*. Whether or not a string contains another string. - * - * Parameters: - * str - {String} The string that we're testing for. - * - * Returns: - * {Boolean} Whether or not this string contains with the string passed in. - */ - String.prototype.contains = function(str) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.contains'})); - return OpenLayers.String.contains(this, str); - }; -} - -if (!String.prototype.trim) { - /** - * APIMethod: String.trim - * *Deprecated*. Removes leading and trailing whitespace characters from a string. - * - * Returns: - * {String} A trimmed version of the string - all leading and - * trailing spaces removed - */ - String.prototype.trim = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.trim'})); - return OpenLayers.String.trim(this); - }; -} - -if (!String.prototype.camelize) { - /** - * APIMethod: String.camelize - * *Deprecated*. Camel-case a hyphenated string. - * Ex. "chicken-head" becomes "chickenHead", and - * "-chicken-head" becomes "ChickenHead". - * - * Returns: - * {String} The string, camelized - */ - String.prototype.camelize = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.camelize'})); - return OpenLayers.String.camelize(this); - }; -} - if (!Function.prototype.bind) { /** * APIMethod: Function.bind diff --git a/notes/2.12.md b/notes/2.12.md index e4c004d9fd..97111ed53e 100644 --- a/notes/2.12.md +++ b/notes/2.12.md @@ -50,3 +50,49 @@ The base `OpenLayers.Geometry` class no longer depends on `OpenLayers.Format.WKT Without the WKT format included (by default), the `OpenLayers.Geometry::toString` method now returns "[object Object]." Previously, it returned the Well-Known Text representation of the geometry. To maintain the previous behavior, include the OpenLayers/Format/WKT.js file in your build. +## Deprecated Components + +A number of constructors have been marked as deprecated for multiple releases in the 2.x series. For the 2.12 release this deprecated functionality has been moved to a separate deprecated.js file. If you use any of the constructors or methods below, you will have to explicitly include the deprecated.js file in your build (or add it in a separate `