diff --git a/lib/OpenLayers/Projection.js b/lib/OpenLayers/Projection.js index 8c1f6a6a66..f4b02d0749 100644 --- a/lib/OpenLayers/Projection.js +++ b/lib/OpenLayers/Projection.js @@ -9,10 +9,21 @@ */ /** - * Class: OpenLayers.Projection - * Class for coordinate transforms between coordinate systems. - * Depends on the proj4js library. If proj4js is not available, - * then this is just an empty stub. + * Namespace: OpenLayers.Projection + * Methods for coordinate transforms between coordinate systems. By default, + * OpenLayers ships with the ability to transform coordinates between + * geographic (EPSG:4326) and web or spherical mercator (EPSG:900913 et al.) + * coordinate reference systems. See the method for details + * on usage. + * + * Additional transforms may be added by using the + * library. If the proj4js library is included, the method + * will work between any two coordinate reference systems with proj4js + * definitions. + * + * If the proj4js library is not included, or if you wish to allow transforms + * between arbitrary coordinate reference systems, use the + * method to register a custom transform method. */ OpenLayers.Projection = OpenLayers.Class({ diff --git a/notes/2.12.md b/notes/2.12.md index 7013846924..3626cc7b59 100644 --- a/notes/2.12.md +++ b/notes/2.12.md @@ -54,6 +54,12 @@ Without the WKT format included (by default), the `OpenLayers.Geometry::toString `Layer.OSM` is now defined in its own script file, namely `OpenLayers/Layer/OSM.js`. So people using `Layer.OSM` should now include `OpenLayers/Layer/OSM.js`, as opposed to `OpenLayers/Layer/XYZ.js`, in their OpenLayers builds. (See https://github.com/openlayers/openlayers/issues/138) +## Projection & SphericalMercator + +In previous releases, coordinate transforms between EPSG:4326 and EPSG:900913 were defined in the SphericalMercator.js script. In 2.12, these default transforms are included in the Projection.js script. The Projection.js script is included as a dependency in builds with any layer types, so no special build configuration is necessary to get the web mercator transforms. + +If you were previously using the `OpenLayers.Layer.SphericalMercator.forwardMercator` or `inverseMercator` methods, you may have to explicitly include the SphericalMercator.js script in your build. The Google layer is the only layer that depends on the SphericalMercator mixin. If you are not using the Google layer but want to use the SphericalMercator methods listed above, you have to explicitly include the SphericalMercator.js script in your build. + ## QueryStringFilter `OpenLayers.Protocol.HTTP` no longer requires `OpenLayers.Format.QueryStringFilter`. It you need this, make sure it is included in your build config file.