anchor.diff:        new OpenLayers.Control.Attribution(),
         new OpenLayers.Control.Navigation(),
         new OpenLayers.Control.PanZoomBar(),
  -      //new OpenLayers.Control.LayerSwitcher(
  -      //  {
  -      //    'div': OpenLayers.Util.getElement('layerswitcher')
  -      //  }
  -      //),
         new OpenLayers.Control.ScaleLine(),
         new OpenLayers.Control.MousePosition()
       ]
  -   });
  +  });
   
     <% @doc.layers.each do |layer| %>
       <% clean_layer = /\:(.*)/.match(layer.text)[1].to_s %>
  
positive.code: 
  <% content_for :jsfooter do %>
    <%# TODO: refactor in to partial %>
   <script>
  
  (function() {
    "use strict";
  //todo make this modular
    OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
    OpenLayers.Util.onImageLoadErrorColor = "transparent";
    OpenLayers.ImgPath = "http://js.mapbox.com/theme/dark/";
  
negative.code: 
    var activeLayer = null;
  
  
    $('#layer-switcher').change(function() {
      var layer = map.getLayersByName(this.value)[0];
  
      console.log('layer', map.getLayersByName(this.value));
  
      if(activeLayer != null) {
        activeLayer.setVisibility(false);
      }
  
      layer.setVisibility(true);
      activeLayer = layer;
      console.log('activeLayer', activeLayer);
  
    });
  
  })();
  
  </script>
  
  
  