OpenLayers 2.6 Release Notes

As of 2.6-RC1, the OpenLayers 2.6 release closes 282 outstanding tickets, 75% more than any OpenLayers release to date. Included in this release are new navigation history and scale line controls, three new formats, client-side reprojection support, localization support, animated panning, and improved popup windows. More new features and fixes are listed below.

New features

  • Integration of the CloudAmber "Google Like" popups for advanced visual display of information in popups
    • Resulting improvements throughout all popup code, including autosizing popups to the content they contain.
  • Improved panning of commercial layers like Google Maps and Yahoo! Maps
  • Animated panning of the map, using OpenLayers.Tween support
  • Layer Image transitions, for keeping images visible when zooming to allow smoother transitions
  • Client side reprojection support using built in transformations for spherical mercator, or the proj4js library for other projections.
    • Support for reprojecting vector data layers
    • Support for reprojecting user-facing controls like mouseposition
    • Support for programatically reprojecting points and geometries
  • Improved OpenLayers Styling, including:
    • OpenLayers.Style, OpenLayers.StyleMap, OpenLayers.Rule support for improved feature-attribute based styling
    • SLD read/write support
  • Support for reading and writing multiple versions of WMC.
  • Improved KML support, including KML styling support.
  • Improved GeoRSS Format support, including GeoRSS GML read support.
  • New ScaleLine Control for displaying visual scale
  • New NavigationHistory control for map history navigation
  • Localization/Better Internationalization support
  • Layer support for MapGuide Open Source
  • A number of new / improved handlers to make handling user interactions easier
    • Handler.Hover
    • Handler.Click


Changes to existing applications from previous versions

The following behaviors have changed in a way that may affect applications. If you are using previous versions of OpenLayers, you are encouraged to read these sections carefully so as to understand how these issues may affect your application.

  • The style of a selected feature, in the past, was treated as an explicit setting of all the properties of the style of the feature. In OpenLayers 2.6, the 'select' style is instead an *extension* of the existing style. This means that if you have a feature which is styled with an externalGraphic, and you select it, you will still see an externalGraphic unless you explicitly mark that property as an empty string, for example. This allows for features to change only some properties when selected: if you have a set of features with varying pointRadius style attributes, you can set your select style to 'strokeColor': 'red', and the feature will keep its current size, and only change stroke style.
  • The style property of a feature in the past to the default style if it had no style property when it was added to the layer. In 2.6, this has changed; if you wish to extend the in the preFeatureInsert method or something similar, you must first create a property, like: = OpenLayers.Util.extend({},['default']);
  • The GeoRSS and Text layer data loading has been refactored slightly. Instead of loading data on instantiation, this load now happens the first time that the layer is visible and moved (via the moveTo command). If you'd like to mimic the old behavior, you can call layer.loadRSS() or layer.loadText() immediately after creating the layer. However, it would be better to tie your functionality to a loadend event from the layer: this way, you can be notified when the data is actually loaded, since it happens asynchronously. In either case, in order to take advantage of reprojection support, you will need to first ensure that a map is set on the layer by adding the layer to a map.
  • The fallThrough property on the map was set to 'false' by default before OpenLayers 2.6. This means that it will stop events from passing through the map: this also prevents browser default behaviors like the ability to have a 'title' set when you hover over an image, or stops global mousemove handlers which are used for dragging elements over an OpenLayers map. In 2.6, this behavior has changed. We are unable to find any use case that will be negatively affected by this change, but if you are using OpenLayers in a situation where you depend on events being stopped by the map, you should set the fallThrough property to 'false' in your map creation options.
  • ProxyHost is now respected with regard to the Ajax.Request class. If your ProxyHost starts with "http", and you were adding it to the front of your Ajax.Request manually at the application level, it will now be added twice. It is recommended that you simply change your proxyhost to be a relative URL; this will prevent the behavior described from occurring.
  • If you have changed the graphic in the img/close.gif location, you will need to include a custom style in your webpage pointing to that file: see examples/custom-style.html for more information. An example CSS rule is:
    .olPopupCloseBox {
      background-image: url("/my/openlayers/img/close.png");
Last modified 9 years ago Last modified on Apr 1, 2008 7:18:05 AM