openlayers_example_ctools_plugin_api

  1. openlayers
    1. DRUPAL-7--2
Versions
DRUPAL-7--2 openlayers_example_ctools_plugin_api($module, $api)

CTools Registration Hook

IMPORTANT:

In order to support styles, presets, and layers in an external module, one must notify the CTools module that that module provides implementations of the hooks for styles, presets, and/or layers.

This function is just an example implementation of hook_ctools_plugin_api() and should be alter according to your module's name.

Parameters

$module Name of a module that supports CTools exportables.

$api Name of the kind of exportable supported.

Return value

If $module is 'openlayers', and $api is a type of exportable that your module provides, and you are using Openlayers 2.x, then return array with the following values:

  • version => 1

Code

docs/openlayers.api.php, line 98

<?php
function openlayers_example_ctools_plugin_api($module, $api) {
  if ($module == "openlayers") {
    switch ($api) {
      case 'openlayers_presets':
        return array('version' => 1);

      case 'openlayers_layers':
        return array('version' => 1);

      case 'openlayers_styles':
        return array('version' => 1);

    }
  }
}
?>