A recent blog post by OpenGeo provides one explanation of why the OpenLayers community is working towards OpenLayers 3. On behalf of the OpenLayers development team, we’d like to give a few more details.
OpenLayers 2.0 was released six years ago, and the library has been under continuous development since. It is solid, flexible, and easy to extend. The most recent OpenLayers 2 releases leverage some of the latest browser advances like touch events, CSS transitions, and offline caching. OpenLayers 2 is widely used and provides the features people need for their web mapping applications. Leaflet is another very popular library. Its first version (0.1) was released a year and a half ago. It provides an easy-to-use API, supports mobile and has leveraged CSS 3 from day one.
The point is that these libraries work well for people, and cover their current needs. So why are we doing OpenLayers 3? What are our motivations? Where does OpenLayers 3 fit exactly?
First of all, there are things that we don’t like about OpenLayers 2 — things we want to see fixed in the next major OpenLayers version. One example is the base layer/overlay dichotomy. It is often a challenge to know how and where to set resolutions, maxExtent, etc. for the map. Projection handling between map and layers and the interplay between projection and properties like maxExtent and center are complicated at best. Even power users may be confused at times.
So it’s no surprise that we want to fix these design and API flaws with OpenLayers 3. But we actually want a lot more than that. We’re looking at new functionality, new platforms, and new technologies. In particular, we’re targeting 3D, at least some form of 3D. For example, we’d like to support displaying terrain and building elevations with oblique views. That by no way means we’re forgetting about “simple” 2D use cases, nor are we dropping support for less capable browsers. OpenLayers 3 needs to be a high-performance, easy-to-use toolkit that works in as many browsers as possible, gracefully degrading when necessary.
WebGL is the emerging standard for 3D in the browser. So OpenLayers 3 will leverage WebGL from the very start of its development — it already does actually. We’ve started developing a map renderer abstraction, allowing different map renderer implementations. Currently there are two map renderers: a traditional DOM renderer and a WebGL renderer. A canvas 2D map renderer is planned. Taking advantage of WebGL we want to support very large vector layers, client-side re-projection of vector and raster data, 2D tilted/rotated views, and 3D terrain in local projections.
We also aim to integrate with virtual globes like Cesium. Implementing a virtual globe is currently out of OpenLayers 3′s scope, while providing useful integration with Cesium definitely is within scope. We believe that 2D and 3D worlds should converge, with seamless transitions between them.
It’s also possible that there will be integration points between OpenLayers 3 and Leaflet. For example, OpenLayers 3 packages could be built for reading and writing of vector formats, and these packages could be adapted as Leaflet plugins. It could even be that OpenLayers 3 packages would provide an OGC compatibility layer for Leaflet – providing OGC protocol or format support for people who already use Leaflet and want broader interoperability (or vice versa).
It may be obvious that OpenLayers 3 isn’t going to be a micro-framework. Instead, OpenLayers 3 will be a large collection of modules with automated tests and continuous integration ensuring that they always work well together. We think this brings huge benefits to application developers, particularly for the maintenance of long-lived, large-scale projects: being able to update a single, tested, integrated library is much easier than tracking several different plug-ins from different sources and having to deal with dependency management and integration problems manually.
We hope this post makes it clear what we have in mind, and why we’re working towards OpenLayers 3 and making it very different from OpenLayers 2.