OpenLayers OpenLayers

OpenLayers 2.5 Release Notes

As of 2.5-RC1, the OpenLayers 2.5 release closes 160 outstanding tickets, 50% more than any OpenLayers release to date. Included in this release is the addition of 3 major format classes, significantly improved feature digitization/editing tools, support for treating commercial datasources as projected for better overlaying with other data, the ability to have tiles wrap around the date line, and additional layer classes. More new features and fixes are listed below.

Changes to existing applications from previous versions:

  • Bounding Boxes in WMS requests were, in previous versions of OpenLayers, incorrectly encoded. The default now is to not encode bounding box values. If you wish to maintain the behavior from 2.4, you should set the 'encodeBBOX' option on your layer to 'true'.
  • The 'reproject' option on WMS layers caused a number of problems by being turned on by default. As a result, this has been turned off by default. If you are using WMS layers over Google layers, you can re-enable the 'reproject' option by setting the option on the layer to true.

Deprecated Code

  • Untiled layers are now deprecated. Instead, you should create a standard layer and set the singleTile option to true.
  • The functions attached to default prototypes like Function and String have been deprecated. They are now in the OpenLayers namespace: for example, function.bind has been moved to OpenLayers.Function.bind(functionname, object). Affected are:
    • String.startsWith
    • String.contains
    • String.trim
    • String.camelize
    • Number.limitSigDigs
    • Function.bind
    • Function.bindAsEventListener
  • The getGridBounds function on Grid layers has been deprecated. Instead, use getTilesBounds.
  • OpenLayers.Util.clearArray has been deprecated. Use array.length = 0 instead.
  • OpenLayers.Util.getArgs has been deprecated. Use OpenLayers.Util.getParameters instead.

New Features:

  • Date Line Wrapping: Tiles wrap around the earth (#487)
  • Formats:
  • Feature Creation:
    • Control to Drag Features (#638)
    • Control to Modify Features (#941)
    • RegularPolygon drawing/creation Support (#828)
  • SphericalMercator support on commercial layers (#686)
  • Control for displaying attribution/copyright information (#103, #966)
  • Read-only TileCache layer against web-accessible caches (#627)
  • Ability to restrict the draggable extent to the world (#340)
  • Addition of new 'debug mode', where OpenLayers reports errors to a developer console (#507)
  • Add "visibilitychanged" event to Layer (#878)
  • external graphic as style for vector points, with opacity and offset support (#736, #873, #893)
  • loadstart/loadend on remote access layers (#808)

Improvements:

  • Merge Tiled and Untiled support into Grid.js.
  • Add ability to get Tile Bounds based on a viewport pixel (#482)
  • Don't silently catch XMLHttpRequest exceptions (#534)
  • WMS layers automatically default to png or gif based images for transparent layers (#650)
  • Support for putting the LayerSwitcher outside the map div (#674)
  • Add mergeNewParams function on WFS Layer (#699)
  • Support for adding different linecap styles (#700)
  • Support for synchronous OpenLayers.Ajax requests (#702)
  • Allow Custom Icon support for GeoRSS layer (#705)
  • Cross-browser GeoRSS serializer support (#756)
  • Make WMS/WFS BBOX not encode ',' by default (#762)