Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Openlayers 3: features
- Openlayers
- 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.
- Layers
- 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.
- Sources
- 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.
- Styles
- 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
- Projections support lacks in Openlayers 3.x. It is fully supported on the previous 2.x version which is now deprecated.
- Interactions
- Provides user map interactions. See API documentation.
- Controls
- Provides map controls and widgets. See API documentation.
- Components
- 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 3: dependencies and requirements
- Drupal Core >= 7.40 (especially for this: https://www.drupal.org/node/2299747)
- PHP: version 5.3.10 or greater
- Libraries API (>= 2.1)
- Libraries CDN API to use a CDN version of the JS library or the download it manually. You can also use the command '
drush dl-openlayers
' to automatically download and install it in your Drupal installation. - Registry Autoload
- CTools
- Service Container (>= 7.x-1.0-beta5) (NB. No longer required from 7.x-3.2 onwards)
- Jquery Update (you need jQuery >= 1.10)
- Geocoder (for Openlayers Geofield)
Openlayers 3: History
- See the brief history of Openlayers 3.x on this thread: https://groups.drupal.org/node/440733
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:
- drush rr (from Registry Rebuild)
- drush cc all
- drush updb
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.
Openlayers 3: Related modules
- Views Geojson
- Libraries CDN API: To support CDN loading of the Openlayers Library. You do not need to install it locally if you use this module.
- Openlayers Filters allows you to display Openlayers maps in your content using a token.
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)
- 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
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 ;-)
Credits
- 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.
.
Project information
- 3,497 sites report using this module
- Created by bdragon on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
7.x-3.3
released 14 March 2023
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
Development version: 7.x-3.x-dev updated 13 Mar 2024 at 22:54 UTC
7.x-2.0-beta11
released 17 October 2014
Works with Drupal: 7.x
Development version: 7.x-2.x-dev updated 10 Mar 2017 at 12:48 UTC