title: Having trouble with leaflet removeLayer
body: <p>I'm new to javascript and trying to make a map with leaflet. My goal is to have a drop down box with layers that you can select. If you select a layer, that one should appear, and the existing layer on the map should disappear. I'm able to get the new layer to appear, but it never disappears when another is selected. They just pile on top of one another.</p>
  
  <p>I've tried various iterations of using "onchange" (both calling just from javascript, and calling a js function from the <code>&lt;select&gt;</code> element. Below is the demo code I'm working with.</p>
  
  <pre><code>&lt;select id='map-ui' onchange="toggle_layer();"&gt;
      &lt;option&gt;Please choose a layer&lt;/option&gt;
      &lt;option value="examples.bike-lanes"&gt;bike lanes&lt;/option&gt;
      &lt;option value="examples.bike-locations"&gt;bike stations&lt;/option&gt;
  &lt;/select&gt;
  &lt;div id='map'&gt;&lt;/div&gt;
  &lt;script&gt;
  var map = L.map('map').setView([38.902, -77.001], 13);
  
  var base_map = 'examples.map-zgrqqx0w'
  map.addLayer(L.mapbox.tileLayer(base_map));
  
  var mapUI = document.getElementById("map-ui");
  var shown_layer;
  
  function toggle_layer(){
      var selectedValue = mapUI.options[mapUI.selectedIndex].value;
      if (shown_layer != selectedValue){
          map.removeLayer(L.mapbox.tileLayer(shown_layer));
      };
      map.addLayer(L.mapbox.tileLayer(selectedValue));
      shown_layer = selectedValue;
  };
  &lt;/script&gt;
  </code></pre>