anchor.diff:  
       layer.setVisibility(true);
       activeLayer = layer;
  -    console.log('activeLayer', activeLayer);
   
     });
  +
   
   })();
   
  
positive.code: 
    <% @doc.layers.each do |layer| %>
      <% clean_layer = /\:(.*)/.match(layer.text)[1].to_s %>
  
      var <%= clean_layer %> = new OpenLayers.Layer.WMS(
        "<%= clean_layer %>",  "<%= SiteConfig.geoserver_url + '/wms' %>",
        { layers: "<%= layer.text %>", transparent: true, format: 'image/gif' },
        { isBaseLayer: false }
      );
  
      map.addLayer(<%= clean_layer %>);
    <% end %>
  
    map.zoomToExtent(bounds);
    console.log('map', map.maxExtent);
    console.log('bounds', bounds);
  
    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);
  
negative.code:   <h1><%= @doc.title %></h1>
  
    <select id="layer-switcher">
      <% @doc.layers.each_with_index do |layer| %>
        <%# TODO: extract to method %>
      <% clean_layer = /\:(.*)/.match(layer.text)[1].to_s %>
      <option value="<%= clean_layer %>" ><%= clean_layer %></option>
      <% end %>
    </select>
  
    <div id="item_map"></div>
  