anchor.diff:    <h1><%= @doc.title %></h1>
   
     <select id="layer-switcher">
  -    <% @doc.layers.each do |layer| %>
  +    <% @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 %>
  +    <option value="<%= clean_layer %>" ><%= clean_layer %></option>
  +    <% end %>
     </select>
   
     <div id="item_map"></div>
  
positive.code: 
      layer.setVisibility(true);
      activeLayer = layer;
      console.log('activeLayer', activeLayer);
  
    });
  
  })();
  
  
negative.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, visibility: false }
      );
  
      map.addLayer(<%= clean_layer %>);
    <% end %>
  
    map.zoomToExtent(bounds);
  
    // fix this
    var first =$("#layer-switcher option:first").val();
    var activeLayer = map.getLayersByName(first)[0];
    activeLayer.setVisibility(true);
  
    $('#layer-switcher').change(function() {
      var layer = map.getLayersByName(this.value)[0];
  
      if(activeLayer != null) {
        activeLayer.setVisibility(false);
  