Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
123 lines (87 sloc) 3.51 KB


collective.geo.openlayers enables Openlayers machinery into Plone.

This package registers two javascript files into Plone javascript registry:

  1. OpenLayers.js
  2. proj4js-compressed.js

Found a bug? Please, use the issue tracker.


for previous Plone versions use collective.geo.openlayers < 4.x


This addon can be installed has any other addons, please follow official documentation.


Version 3.0

If you are upgrading from an older version to 3.0, you may need to run upgrade steps. To do this, follow these steps:

  1. Browse to portal_setup in the ZMI of your site
  2. Click onto the Upgrades tab
  3. Select collective.geo.openlayers:default from the drop-down list and click Choose Profile
  4. Observe any available upgrades and click the Upgrade button if any are present.

Integration example

You can include openlayers in a Plone browser page in this way (for further information about openlayers see other openlayers examples):

<html xmlns=""
    <metal:block metal:fill-slot="javascript_head_slot">
      <script type="text/javascript">
          (function ($) {
            var map;
            $(window).load(function() {
              map = new OpenLayers.Map('map',{
                theme: null
              map.addLayer(new OpenLayers.Layer.OSM("OpenStreetMap"));
              map.setCenter(new OpenLayers.LonLat(7, 45).transform(
                  new OpenLayers.Projection("EPSG:4326"),
              ), 5);

        // -->
    <metal:content fill-slot="content-core">
        <metal:content define-macro="content-core">
          <div id="map" class="olMap widget-cgmap">
            <!-- openlayers map -->

Updating this package

When a new version of OpenLayers is released, the javascript on this package can be updated by using the Makefile in the root directory. Commands available:

  • build - it builds a new version of OpenLayer javascript.
  • copysrc - it copies all necessary files in plone resources directory.
  • dist - it is the default command, it executes all previous commands.


See the complete list of contributors on Github:

Something went wrong with that request. Please try again.