OpenLayers External Block Switcher

Component ID

1982426

Component name

OpenLayers External Block Switcher

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

3154

Component created

Component changed

Component body

Overview

This module provides a behavior for maps in OpenLayers.

Once enabled, it provides a new Drupal block with a list of layers and overlays that you can enable or disable, just like in the screenshot.

The form included in the block is not generated in Javascript just like in OpenLayers Plus, it's generated by the Drupal's form API, and so, you can alter it easily.

This module also works if you have multiple maps and layerswitcher blocks enabled on a single page.

Requirements

This module works for OpenLayers version greater or equal to 7.x-2.0-beta3.

API


  $config = array(
    'map_name' => 'default',
    'baselayers_element_type' => 'select' // select or radios
  );

  $form = drupal_get_form('olebs_blockswitcher_form', $config);

Tips

Combined with the Chosen module, it's great, check out the last screenshot !