The docs are missing to describe how to register the openlayers hooks like hook_openlayers_styles() or hook_openlayers_presets().

Simply adding those hooks to a module won't work until you haven't registered them to ctools using:

hook_ctools_plugin_api($module,$api) {
  if($module == 'openlayers') {
    switch($api) {
     case 'openlayers_styles':
       return array('version' => 1);
     case 'openlayers_presets':
       return array('version' => 1);
    }
  }
}

Comments

tmcw’s picture

You're right, that's a blind spot of the documentation and should be added.

tmcw’s picture

Status: Active » Fixed
zzolo’s picture

@tmcw thanks for doing this. I have updated this a little. We should not be documenting hook_ctools_plugin_api().

I don't think what I did is the best, but for the situation I think it is. Ideally, we could depend on another module to provide the same sort of documentation and saying @see hook_ctools_plugin_api() would work, but we can't. So, what I did was created a openlayers_example_ctools_plugin_api() function to document and used @see to reference that. I also fixed a couple other doc points, including this handbook page:
http://drupal.org/node/620602

http://drupal.org/cvs?commit=370348

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.