After installation of the module I got the following messages:
There's a problem in the definition of the behavior openlayers_plus_behavior_blockswitcher. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_blocktoggle. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_themeregion. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_legend. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_permalink. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_scalepoints. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_tooltips. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_tooltips_field. The behavior will be disabled.
There's a problem in the definition of the behavior openlayers_plus_behavior_popup. The behavior will be disabled.
I searched in openlayer module and I found a module function check: function openlayers_behavior_definition_check($definition)
The reason is the mandatory field 'type'.
You can solve the problem in the function openlayers_plus_openlayers_behaviors() on line 82 in openlayers_plus.module add the 'type' field for each behavior.
Example for the first behavior.
Old version:
'openlayers_plus_behavior_blockswitcher' => array(
'title' => t('OL+: Blockswitcher'),
'description' => t('A clone of LayerSwitcher, with better themability and positioning via the Drupal block system.'),
'behavior' => array(
'path' => drupal_get_path('module', 'openlayers_plus') . '/behaviors',
'file' => 'openlayers_plus_behavior_blockswitcher.inc',
'class' => 'openlayers_plus_behavior_blockswitcher',
'parent' => 'openlayers_behavior',
),
),
New version:
'openlayers_plus_behavior_blockswitcher' => array(
'title' => t('OL+: Blockswitcher'),
'description' => t('A clone of LayerSwitcher, with better themability and positioning via the Drupal block system.'),
'type' => 'layer',
'behavior' => array(
'path' => drupal_get_path('module', 'openlayers_plus') . '/behaviors',
'file' => 'openlayers_plus_behavior_blockswitcher.inc',
'class' => 'openlayers_plus_behavior_blockswitcher',
'parent' => 'openlayers_behavior',
),
),
Now you will view the behavior in the 'behaviors'-tab in map-edit screen.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1909440-2-types-and-bit-of-cleanup.diff | 6.12 KB | rob c |
Comments
Comment #1
leveller commentedI concur that this is a problem if you're using the latest dev version of OpenLayers. I fixed this by adding:
'type' => 'behaviors',
rather than 'type' => 'layer',
Feel free to correct me if this is wrong. Also, I'm not sure that the path belongs in the behavior array; the following extract from openlayers.module would suggest not:
Comment #2
rob c commentedCan change the name later, not sure.
Comment #3
davidserene commentedThis has been fixed in the latest version of openlayers_plus, please clone from git to get an installation without this error.
Comment #3.0
davidserene commentedupdate