New Features

  • We have improved mobile support, with a focus on touch devices.
    • The map can now be dragged and zoomed via touch events.
    • Features can be drawn, selected, modified, and dragged via touch events.
    • For that we have extended existing handlers and controls to support touch events, and have added new touch-specific handlers and controls (Handler.Pinch, Control.PinchZoom, Control.TouchNavigation) to the library.
    • Additional examples demonstrate how to integrate OpenLayers with libraries like Sencha Touch and jQuery Mobile
    • Additional controls for HTML5 features like Geolocation
    • Testing of OpenLayers behavior on a number of clients, large and small.
  • The development script loader (lib/OpenLayers.js) is now fully compatible with FireFox 4
  • Lots of performance improvements, focused on improving the user experience when dragging the map. The main changes:
    • We now defer tile loading and give priority to user interaction with the map. #2998
    • We overhauled the moveTo code path to avoid pixel to map units conversions while dragging the map. Because we cannot drag the GMaps v3 API in pixel space without triggering pan animation in GMaps, this improvement is only effective for maps that don't include OpenLayers.Layer.Google v3 layers. #3062
    • To reduce the overhead of creating objects we have greatly optimized our Class implementation. #2899
    • Reduced bandwidth in default operation: with changes to some of our objects, we have changed the default amount of data to load a minimal 512px by 512px map of OpenStreetMap by almost 80%. In addition, OpenLayers now has support for the Closure Javascript compiler to further reduce the size of OpenLayers builds.
  • Pan while drawing. We have modified the drawing handlers to allow panning the map while drawing features on the map. #3052
  • OpenLayers includes a new protocol implementing the JSONP technique to avoid the Same Origin Policy constraint of Ajax. #2956
  • New OpenLayers.Layer.Bing for direct tile access to Bing Maps. It is recommended to use this new layer now instead of OpenLayers.Layer.VirtualEarth. #2975
  • We've introduced "Kinetic Dragging" so the map can continue moving after the mouse is released. #2999
  • The Canvas renderer now supports hit detection - allowing for point, line, and polygon drawing and editing on devices that don't support SVG/VML. #3207
  • The new CQL format allows serializing and deserializing of filters using OGC Common Query Language. #2522

Overall, OpenLayers 2.11 offers greatly improved performance for all users. It offers broad mobile support, based in large part on sponsorship from a number of organizations during a code sprint in Switzerland (, and as a side effect of this work, many components related to mobile support have been extended. This release promotes a major step forward for OpenLayers on mobile devices.

Behavior Changes from past releases


#3435: getDataExtent now returns null instead of new OpenLayers.Bounds(null, null, null, null) if there are no features with a geometry.

#2888: Vector layers no longer have the isVector property set. So code relying on isVector to test if a layer is a vector layer should be changed to using layer instanceof OpenLayers.Layer.Vector.

#2802: New SVG2 renderer. By default, OpenLayers still uses the SVG renderer, but the new one has several advantages:

  • Features are not re-rendered on zoom level changes, which improves performance.
  • During panning, features that pan in from the edges will immediately be visible.


  • If you have many features outside the visible map viewport, the initial rendering pass will take longer than with the old SVG renderer, because all features are rendered.
  • The new renderer will not work well in old browsers (e.g. Firefox 2.x).

To configure applications to use the new renderer, add the following code before creating any vector layers:

OpenLayers.Layer.Vector.prototype.renderers = ["SVG2", "VML", "Canvas"];

We would appreciate test feedback, to make sure that there are no remaining issues so we can make this new renderer the default in the 2.12 release.

#3440: OpenLayers.Date namespace was moved from BaseTypes.js to BaseTypes/Date.js. If you use these functions with the build system, don't forget to add the file in the requires list.


#3261: The EXCEPTIONS parameter is no longer included in WMS GetMap requests. This means the server default will apply. According to the spec, exceptions will be returned as XML docs (application/vnd.ogc.se_xml). Previously, WMS layers were configured by default to request exceptions in-image (application/vnd.ogc.se_inimage).


#1633: AnchoredBubble and Marker are no longer automatically included in the build. If you use the createPopup function you must add OpenLayers/Popup/AnchoredBubble.js to the build configuration file. If you use the createMarker function you must add OpenLayers/Marker.js.

#3437: The non API OpenLayers.Util.getTagText, OpenLayers.Util.getNodes and OpenLayers.Util._getNodes function are no longer available.

#3443: OpenLayers.loadURL is now deprecated; please use the OpenLayers.Request.GET instead.

#3111: OpenLayers.Layer.Grid (and therefore OpenLayers.Layer.WMS, etc): default buffer is now 0 (instead of 2) to reduce unnecessary tile loading. To get the old behavior back, simply add {buffer: 2} to your layer options.

Last modified 5 years ago Last modified on May 25, 2012 5:04:41 AM