The Drupal Openlayers Module

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

The OpenLayers core code stores map's object configurations: maps, layers, styles, sources, controls, interactions and components. It combines them to create maps using the OpenLayers JavaScript library on any Drupal site.
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.
OpenLayers Field
Provide a new field type 'Openlayers' that allows you to display a map in a content type. Only for display, not for input, for that, use Openlayers geofield.
It also includes a field formatter for Addressfield and textfield (core).
OpenLayers Content Types
Provide integration with Panels
OpenLayers Quicktabs
Provide integration with Quicktabs
OpenLayers Boxes
Provide integration with Boxes

Openlayers 3: dependencies and requirements

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.


How to report bugs

  1. 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.
  2. Use the search function if you don't find anything.
  3. Use the search function again.
  4. 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.

Active maintainers


  • 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:

Related Modules (Openlayers 3.x)

Related Modules (Openlayers 2.x)



Project Information