diff --git a/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/js/openlayers_behavior_layerswitcher.js b/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/js/openlayers_behavior_layerswitcher.js index edcc857..99dddd9 100644 --- a/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/js/openlayers_behavior_layerswitcher.js +++ b/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/js/openlayers_behavior_layerswitcher.js @@ -18,6 +18,10 @@ Drupal.behaviors.openlayers_behavior_layerswitcher = function(context) { 'roundedCornerColor' : data.map.behaviors['openlayers_behavior_layerswitcher'].roundedCornerColor, }); data.openlayers.addControl(control); + if (!data.map.behaviors['openlayers_behavior_layerswitcher'].hideLayerSwitchter){ + var ls = data.openlayers.getControlsByClass('OpenLayers.Control.LayerSwitcher')[0]; + ls.maximizeControl(); + } control.activate(); } } diff --git a/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/openlayers_behavior_layerswitcher.inc b/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/openlayers_behavior_layerswitcher.inc index 469cc7c..042cf6e 100644 --- a/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/openlayers_behavior_layerswitcher.inc +++ b/drupal/sites/all/modules/contrib/openlayers/includes/behaviors/openlayers_behavior_layerswitcher.inc @@ -18,6 +18,7 @@ class openlayers_behavior_layerswitcher extends openlayers_behavior { 'ascending' => TRUE, 'roundedCorner' => TRUE, 'roundedCornerColor' => 'darkblue', + 'hideLayerSwitchter' => TRUE, ); } @@ -45,6 +46,12 @@ class openlayers_behavior_layerswitcher extends openlayers_behavior { '#description' => t('The color of the rounded corners, only applies if roundedCorner is true.'), '#default_value' => isset($defaults['roundedCornerColor']) ? $defaults['roundedCornerColor'] : 'darkblue' , ), + 'hideLayerSwitchter' => array( + '#type' => 'checkbox', + '#title' => t('Hide layer switcher'), + '#description' => t('Hide layer switcher, defaults to hidden.'), + '#default_value' => isset($defaults['hideLayerSwitchter']) ? $defaults['hideLayerSwitchter'] : TRUE , + ), ); }