title: How to clear leaflet map of all markers and layers before adding new ones?
body: <p>I have the fallowing code:</p>
  
  <pre><code>map: function (events) {
      var arrayOfLatLngs = [];
      var _this = this;
  
      // setup a marker group
      var markers = L.markerClusterGroup();
  
      events.forEach(function (event) {
          // setup the bounds
          arrayOfLatLngs.push(event.location);
  
          // create the marker
          var marker = L.marker([event.location.lat, event.location.lng]);
  
          marker.bindPopup(View(event));
  
          // add marker
          markers.addLayer(marker);
      });
  
      // add the group to the map
      // for more see https://github.com/Leaflet/Leaflet.markercluster
      this.map.addLayer(markers);
  
      var bounds = new L.LatLngBounds(arrayOfLatLngs);
      this.map.fitBounds(bounds);
      this.map.invalidateSize();
  }
  </code></pre>
  
  <p>I initially call this function and it will add all <code>events</code> to the map with markers and clusters.</p>
  
  <p>at some lather point i pass in some other events, the map will zoom in to the new events but the old ones are still on the map.</p>
  
  <p>I've tried <code>this.map.removeLayer(markers);</code> and some other stuff, but I can't get the old markers to disappear</p>
  
  <p>Any ideas?</p>