You are here

function openlayers_plus_behavior_blockswitcher::render in OpenLayers Plus 7

Same name and namespace in other branches
  1. 7.3 behaviors/openlayers_plus_behavior_blockswitcher.inc \openlayers_plus_behavior_blockswitcher::render()
  2. 7.2 behaviors/openlayers_plus_behavior_blockswitcher.inc \openlayers_plus_behavior_blockswitcher::render()

Render.

Overrides openlayers_behavior::render

File

behaviors/openlayers_plus_behavior_blockswitcher.inc, line 56

Class

openlayers_plus_behavior_blockswitcher

Code

function render(&$map) {
  drupal_add_js(drupal_get_path('module', 'openlayers_plus') . '/behaviors/openlayers_plus_behavior_blockswitcher.js');
  if ($this->options['enabled']) {
    $block = module_invoke('openlayers_plus', 'block_view', 'blockswitcher');
    $this->options['block'] = drupal_render($block);
  }
  return $this->options;
}