Beta 2 Is Here
OpenLayers 3 has been a long time in the making. With the library stabilizing and becoming more feature complete, we’re excited that our efforts are finally coming to fruition. Today we’re cutting a Beta 2 release as another milestone toward the 3.0 final. There are a ton of new features to check out in the release. Here are a couple that I think are particularly cool.
The vector layer example above shows a rotated map centered on Italy. Drawing vector and raster data in OpenLayers 3 is handled by one of several renderers. For example, rendering might be done in WebGL, with the Canvas 2d context, or using traditional DOM element composition depending on device capabilities. This vector layer is using the Canvas renderer. When the map is panned, zoomed, or rotated, instead of simply applying a transform to the Canvas element, the map is re-rendered with each transition, so things like label rotation, icon rotation, and stroke width can remain fixed during the transitions. Batches of drawing instructions are cached and replayed during transitions to achieve higher performance while rendering.
Using Canvas and WebGL instead of SVG makes it possible to render and interact with very large numbers of vector features without the extra overhead of creating a DOM element for each feature.
Rendering with Canvas allows you to leverage other basic image manipulation techniques. The layer spy example demonstrates creating a “spyglass” to view imagery from one layer superimposed on another while moving your pointer around the map.
This example takes advantage of “precompose” and “postcompose” rendering events. Listeners for these events get access to the Canvas rendering context and perform any manipulation that the Canvas API allows. The layer swipe example is another using this technique to provide a basic swipe control for viewing changes in vector or raster data. Stay tuned for a very cool heatmap layer that builds on the same rendering event technique.
The Road to 3.0 Final
There are a few areas of the OpenLayers 3 API that we’re still working to stabilize. Beyond that we have documentation work to do to let everyone know how to use all these great features. Notably we need to make it easy to generate small builds of the library. With Closure Compiler in advanced mode, very compact profiles of the library can be built with just the functionality you need. We’re currently working on easing the build configuration and putting together a hosted build tool. More details on this coming soon.
We’re planning on one more beta release with new features that are nearing completion. After stabilizing the remaining bits of the API we’ll get into a release candidate cycle. In the meantime, try out the Beta 2 release and let us know what you think!