title: Clear all polylines from leaflet map
body: <p>I am struggling to clear all polylines from my map, i only clear the newest.</p>
  
  <pre><code>var polylines;
  
  // add map polylines
  function addPolyline(polyArray, colour) {
      polylines = L.polyline(polyArray, {color: colour});
      polylines.addTo(map);
  }
  
  // clear polylines   
  function clearPolylines() {
      map.removeLayer(polylines);
  }
  </code></pre>
  
  <p>where addPolylines is called multiple times and clear Polylines is called once. How can i clear all polylines on the map?</p>