The Openlayers has been rewritten and the new version is now 3.x. The old branch 2.x is minimally maintained, mostly by contributed patches and/or obvious bugs. The module page is now up to date for 3.x. We are still looking for people to help with code and documentation, feel free to contact us through the issue queue !
Openlayers 3: features & submodules
- A layer is a visual representation of data from a source. OpenLayers supports a wide range of map types and new types can easily be added through the UI or via submodules. See API documentation.
- Openlayers sources belongs to layers and they are representing the layer's data. These are available for free and commercial map tile services like OpenStreetMap or Bing, for OGC sources like WMS or WMTS, and for vector data in formats like GeoJSON or KML. See API documentation.
- Openlayers let you add style to any layers. Styles can be added through the UI or through submodules. Right now we are supporting very basic styles and the UI doesn't exist yet to customize them. See API documentation.
- Projections support lacks in Openlayers 3.x for now but is fully supported on the previous 2.x version.
- Provides user map interactions. See API documentation.
- Provides map controls and widgets. See API documentation.
- This custom object doesn't belong to the Openlayers library, it's just an hybrid component added to the module to let user interact with the map after it has been created.
Openlayers 3: bundled submodules
- OpenLayers UI
- Provides the user interface to edit each map objects and options.
- OpenLayers Views
- Provide the Views integration.
- OpenLayers Geofield
- Provide Geofield integration so a map can be used as a widget for a field.
- OpenLayers Examples
- Provide multiple map examples and functionnalities. This is the place to start if you want to add custom components.
- OpenLayers Block
- Provide a new map option that let you render a map in a Drupal block.
- OpenLayers Contextual Links
- Provide contextual links to a map so you can edit map objects very quickly.
- OpenLayers Services
- Provide a new map options that allows you to embed any map into a web page, Drupal or something else, via an iframe. This is a kind of way to use Drupal as a mapserver for any site.
It also includes a field formatter for Addressfield and textfield (core).
Openlayers 3: dependencies and requirements
- PHP: version 5.3.10 or greater
- Libraries (>= 2.1)
- Registry Autoload
- Service Container (>= 7.x-1.0-beta4)
- Jquery Update
- The Openlayers 3 library. You can use the command '
drush dl-openlayers' to automatically download and install it in your Drupal installation.
- Geocoder (for openlayers_field)
Openlayers 2: dependencies and requirements
Openlayers 3: development
While you can always submit your patches on the issue queue, most of the development will be done on Github from now. Pull requests are the most easy way to get your changes in Openlayers.
- See the brief history of Openlayers 3.x on this thread: https://groups.drupal.org/node/440733
How to report bugs
- Browse the issue queue to check if the bug hasn't been already reported. There's a great tutorial on how to use it here.
- Use the search function if you don't find anything.
- Use the search function again.
- Create an issue on the issue queue or on Github (preferred way) following the those recommandations
Please, keep in mind that the more work we have in the issue queue, the lesser time we have to work on this module, so, to be clear, before posting an issue, use the search functionality. Fixing bugs is notably more efficient if you provide steps to reproduce the bug.
- Pol Dellaiera: consultant, passionate guy, I love mapping stuff. I need to learn new stuff everyday !
- Peter Philipp: Peter, if you read this, please send me a small introduction paragraph ;-)
- Augustus Kling: PostgreSQL and web GIS developer. Amongst other projects collaboratively develops OpenLayers Editor and the Cartaro distribution.
- 01/06/2015: Openlayers 2.x is no more developped. Patches are still applied if needed. The differences between OL2 and OL3 (lib and module) prevent us to provide an upgrade path, so, expect bugs if you upgrade from OL2 to OL3.
- 14/01/2015: OpenLayers 7.x-3.x is now in development, please use it, test it, give feedback and if you want, contribute. See this page for a more complete roadmap.
Upgrading steps for 3.x
Openlayers 3.x is under heavy development. A lot of things has changed internally in between each beta versions. We are still trying to find an optimal way to organize classes so the module is easily extendable by everyone.
Anyhow, when upgrading from a version to another, here are the steps with drush once the new code has been installed:
- drush rr (from Registry Rebuild)
- drush cc all
- drush updb
Related Modules (Openlayers 3.x)
Related Modules (Openlayers 2.x)
- Address Field: Holds internationally compatible postal addresses based on xNAL. Compatible with Geocoder.
- Cartaro: Distribution providing all the tools and components to build a strong geo/mapping platform.
- Geofield - D7 storage of geospatial data, use version 7.x-2.x.
- Geocoder - Geocode almost anything into coordinates, useful for proximity searches.
- Domain Bonus Integration - Provides integration with the Domain Access module and the different keys for different layers
- OpenLayers Plus (2.x) - Adds a number of nice improvements to the module, and used in Managing News.
- Geofile allows you to display files such as KML or GPX using Openlayers.
- OpenLayers Blocks provides exportable Openlayers blocks.
- OpenLayers External Block Switcher provides Drupal's layerswitchers blocks per map, generated using the Form API.
- OpenLayers Feature Popups a popup behavior really promising and easy to customize.
- OpenLayers Filters allows you to display Openlayers maps inline.
- OpenLayers Heatmaps provides a Heatmap on vector layers.
- OpenLayers Icons Styles provides a set of styles and the ability to have styles automatically created from files in the libraries folder. Combine with Map Icons to have an amazing set of styles.
- OpenLayers Open Weather Map provides Open Weather Maps layers.
- OpenLayers Taxonomy provides a layer per taxonomy terms.
- Image URL Formatter: You need this module if you plan to display markers with custom image.
- Image Width & Height Formatter: You need this module if you plan to resize the markers according to their real size on the map.
- entity API: If you want to have a rendered entity in the content of a popup, you need this module to provide the views field.
- Views Geojson
- Book: Mapping with Drupal
- This module has taken some great ideas from modules such as GMap, ImageCache, Views, and Mapstraction.
- The developers and patch-providers have worked very hard to make this module what it is.
- Some sponsorship provided by Trasys, Trellon, Geomemes, EchoDitto, and Development Seed.
- Drupal OpenLayers monster logo by Saman Bemel Benrud.