The Drupal Openlayers Module

Openlayers 3: features

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 create styles. Then, styles are applied on layers. Styles can be added through the UI or through submodules. See API documentation.
Projections support lacks in Openlayers 3.x. It is fully supported on the previous 2.x version which is now deprecated.
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 and/or its objects after it has been created.

Openlayers 3: 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 an input widget for a field but also as a output formatter through an Openlayers map.
Openlayers Library
Provide multiple custom objects. This is the place to start if you want to learn how to extend Openlayers and add your own custom components.
Openlayers Examples
Provide multiple map and object configuration only. This module contains multiple maps.
Openlayers Block
Provide a new map option that provides a map in a Drupal block. Each map can have its own block.
Openlayers Contextual Links
Provide contextual links to a map so you can edit a map 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) that will convert any text input into a location and also a formatter that will convert any uploaded files like GPX, KML or GeoJSON into an Openlayers map.
Openlayers Content Types
Provide integration with Panels.
Openlayers Quicktabs
Provide integration with Quicktabs.
Openlayers Boxes
Provide integration with Boxes.
Openlayers Cesium
Provides Control and Component to transform your 2D map into a 3D globe thanks to the CesiumJS library and Openlayers Cesium JS. This is under heavy development.

Openlayers 3: dependencies and requirements

Openlayers 3: History

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.

Openlayers 3: Upgrading steps from 2.x

There are no upgrade path from 2.x to 3.x. This is not due to the module, this is due to huge change in the Openlayers JS library itself.

Anyhow, when upgrading from a version to another, here are the steps with drush once the new code has been installed:

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.

Openlayers 3: Related modules

Openlayers 2 (deprecated)

The old branch 2.x is minimally maintained, mostly by contributed patches and/or obvious bugs.

Openlayers 2: dependencies and requirements (Deprecated)

Openlayers 2: Related modules (Deprecated)

Active maintainers

  • 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 ;-)


Project information