OpenLayers supports a wide range of different map sources, making it a popular way to combine a wide range of different data types into one map.
The OpenLayers package, documentation, and examples be found at the official OpenLayers site. OpenLayers was originally created by MetaCarta, but in November 2007 it became a project of the Open Source Geospatial Foundation. It is distributed under a modified BSD license.
As the name suggests, the real strength of OpenLayers is its capability of creating a map from a range of different data layers of differing types. Supported data sources include:
- Web Map Service (WMS)
- Web Feature Service (WFS)
- Web Map Coverage (WMC)
- Virtual Earth
- Yahoo! Maps
- MapGuide Open Source
- World Wind Servers
- Well Known Text (WKT)
Documentation mainly takes the form of class descriptions. However, the OpenLayers site has an extensive list of examples that can be cribbed from. These will get you working, give you a good idea of capabilities, and also demonstrate how particular features are used. In common with most if not all popular open source projects, the site hosts an active and helpful user community.
Here is a basic multi-layered example taken from the OpenLayers website:
This simple example adds three raster (WMS) layers to the OpenLayers map. Two of these are defined as opaque base layers, and the third is a transparent (ie. overlay) layer. The layer-selection control on the finished map allows the user to switch between the two base layers, and to switch the transparent layer on or off. The working example can be found here.
An alternative OpenLayers map was also created that used Virtual Earth for the base map. This has since been replaced with a native Virtual Earth map which used tile data created with MapCruncher.
The latest version of OpenLayers is v2.7, but the release of v2.8 is imminent. Users of Virtual Earth will need to use v2.7 (or later) because previous versions only supported withdrawn versions of Virtual Earth. Some features do not currently work in Internet Explorer 8, so IE7 compatibility mode may be required. This is scheduled to be fixed in v2.9.
Overall, OpenLayers is an excellent choice if you wish to build an AJAX map application using your own data servers, or if you need to combine data in a range of different formats or from a range of different sources.