title: Leaflet clear geojson layer (polyline)
body: <p>I am a creating a polyline using a geojson. The format of my geojson is as below:</p>
  
  <pre><code>var myLines = [{
      "type": "LineString",
      "coordinates": [[-75, 21.9], [-75.4, 22.7], [-76.5, 23.4]]
      }, {
      "type": "LineString",
       "coordinates": [[-105, 40], [-110, 45], [-115, 55]]
  }];
  
          L.geoJson(myLines).addTo(map);
  </code></pre>
  
  <p>I have a clear polyline function as below:</p>
  
  <pre><code>function clear_polyline(){
  $.each(myLines, function(ind,poly){
  map.removeLayer(poly);
  });
  }
  </code></pre>
  
  <p>This function does not clear the layer nor does it throw any error.
  How do I clear a polyline in leaflet?</p>