diff --git a/plugins/behaviors/openlayers_behavior_layerswitcher.inc b/plugins/behaviors/openlayers_behavior_layerswitcher.inc
index 2815fec..3e18a9e 100644
--- a/plugins/behaviors/openlayers_behavior_layerswitcher.inc
+++ b/plugins/behaviors/openlayers_behavior_layerswitcher.inc
@@ -19,6 +19,7 @@ class openlayers_behavior_layerswitcher extends openlayers_behavior {
       'roundedCorner' => TRUE,
       'roundedCornerColor' => '#222222',
       'maximizeDefault' => FALSE,
+      'div' => FALSE,
     );
   }
 
@@ -59,6 +60,12 @@ class openlayers_behavior_layerswitcher extends openlayers_behavior {
         '#description' => t('Turn on to have the Layer Switcher open by default.'),
         '#default_value' => isset($defaults['maximizeDefault']) ? $defaults['maximizeDefault'] : FALSE,
       ),
+      'div' => array(
+        '#type' => 'textfield',
+        '#title' => t('DIV element for LayerSwitcher'),
+        '#description' => t('To create the LayerSwitcher outside of the map, pass the Id of a html div'),
+        '#default_value' => isset($defaults['div']) ? $defaults['div'] : FALSE,
+      ),
     );
   }
 
diff --git a/plugins/behaviors/openlayers_behavior_layerswitcher.js b/plugins/behaviors/openlayers_behavior_layerswitcher.js
index 992ca93..43019d0 100644
--- a/plugins/behaviors/openlayers_behavior_layerswitcher.js
+++ b/plugins/behaviors/openlayers_behavior_layerswitcher.js
@@ -8,6 +8,15 @@
  */
 Drupal.openlayers.addBehavior('openlayers_behavior_layerswitcher', function (data, options) {
   options.ascending = !! options.ascending;
+  if (options.div) {
+    options['div'] = OpenLayers.Util.getElement(options['div']);
+  }
+  else {
+    // make sure div is set to null so openlayers knows to generate its own id
+    if (typeof options.div !== "undefined") {
+      delete options.div;
+    }
+  }
   Drupal.openlayers.addControl(data.openlayers, 'LayerSwitcher', options);
 
   // Maximize if needed.
