The following outlines any changes that are happening in upgrading from the OpenLayers module 6.x-2.x to 7.x-2.x.

Removal of Openlayers CCK module

The OpenLayers CCK module that was originally included in the 6.x versions is no longer in this project. This decision was made because the focus of this module is about display and not about input or storage, and the maintainers felt that someone else could handle this better, anyway. Please consider using the Geofield module for storing geographical data.
You may try the OpenLayers CCK Migrate Module to upgrade your CCK data to the new Geofield.

Removal of Openlayers Filter module

The Openlayers Filter module has been taken out of the 7x versions. The main reason for this was that it did not appear to be widely used and was something that needed to be maintained and could be maintained in another contributed project.

Rename Presets to Maps

This is an important UI change and should breakdown some barriers to understanding how to use the module. This is a cosmetic change and an API change. There is currently some backwards compatibility for a short time, but this will not remain into future versions, so it is important that Features and modules that utilize maps get updated.

Features/Export Changes

This change affects Features, or if you have exported your maps in code. Currently, the backwards compatibility will recognize the presets in your Features and provide them in the OpenLayers interface, thus keeping your maps working. BUT, your Features will no longer recognize the presets. To fix this, you will have to manually rebuild or edit your Features that contain map/presets.

  1. Clone the appropriate maps in the UI. This will force the deprecated preset maps into the database.
  2. Rebuild your Feature in the interface.
  3. Overwrite your Feature in the filesystem.

Hook Changes

The main OpenLayers preset hook has changes. Currently the backwards compatibility will recognize these and provide them as maps, but this is temporary and your code should be updated.


/**
 * Implements hook_ctools_plugin_api().
 */
function yourmodule_ctools_plugin_api($module, $api) {
  if ($module == "openlayers") {
    switch ($api) {
      case 'openlayers_maps':
        return array('version' => 1);
    }
  }
}

/**
 * Implements hook_openlayers_maps().
 */
function yourmodule_openlayers_maps() {
  // Your maps
}

API Changes

These functions will still work, but need to be updated eventually.

function openlayers_build_preset($map = array())                        { return openlayers_build_map($map); }
function openlayers_preset_load($name = '', $reset = FALSE)             { return openlayers_map_load($name, $reset); }
function openlayers_render_preset_data($map = array(), $map_name = '')  { return openlayers_render_map_data($map, $map_name); }
function openlayers_render_preset($map = '')                            { return openlayers_render_map($map); }
function openlayers_presets($reset = FALSE)                             { return openlayers_maps($reset); }
function openlayers_preset_save($map)                                   { return openlayers_map_save($map); }
function openlayers_preset_delete($map)                                 { return openlayers_map_delete($map); }
function openlayers_preset_options($reset = FALSE)                      { return openlayers_map_options($reset); }
function openlayers_error_check_preset($map, $log_errors = TRUE)        { return openlayers_error_check_map($map, $log_errors); }