title: Multiple on-the-fly filtering on leaflet layer
body: <p>I would like to filter the markers on my (geojson) layer according to two features: year and type of event. I'm happy for the year to be taken care of by <code>layerGroup</code>. I would, nevertheless, be able to click on a checkbox and update dynamically the markers by filtering them according to <code>feature.properties.eventType</code> too, <em>in addition</em> to the year displayed, something like</p>
  
  <pre><code>  &lt;input type="checkbox" id="all" name="all" value="all"&gt;
        &lt;label for="all"&gt;All&lt;/label&gt;
        &lt;input type="checkbox" id="funfair" name="funfair" value="newsletter"&gt;
        &lt;label for="funfair"&gt;Funfair&lt;/label&gt;
        &lt;input type="checkbox" id="trade" name="trade" value="trade"&gt;
        &lt;label for="trade"&gt;Trade&lt;/label&gt;
        &lt;input type="checkbox" id="exhibition" name="exhibition" value="exhibition"&gt;
        &lt;label for="exhibition"&gt;Paid exhibition&lt;/label&gt;
  </code></pre>
  
  <p>etc... which would trigger a</p>
  
  <pre><code>filter: function(feature, layer) {
                 return feature.properties.eventType == value-of-checkbox;
             }
  </code></pre>
  
  <p>I have five types of eventType. So, for instance, if 1890 is checked, the map is showing all 1890 events, no matter what kind of event it is (because by default it would show all events). If the user checks the 'funfair' and the 'trade' checkbox, though, I want the map to show only the 1890 events of the funfair and trade kind, and not other kind of events.</p>
  
  <p>This is my complete script, which so far is working fine with filtering by year.</p>
  
  <pre><code>var oldmap = L.tileLayer('address', {
          maxZoom: 12
  }),
  
      modernmap = L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
  
      maxZoom: 12,
      id: 'mapbox.streets',
      accessToken: 'mytoken'
  });
  
  var map = L.map('map', {
          center: [40.1857864,-4.5536861],
          zoom: 7,
          layers: [oldmap, modernmap]
          });
  
  var baseMaps = {
      "Old map": oldmap,
      "Modern map": modernmap
  };
          var jsontest = {"type": "FeatureCollection",
          "features": [
          {
           "type": "Feature",
           "geometry": {
              "type": "Point",
              "coordinates":  [ -16.5471268,28.4136726 ]
           },
           "properties": {
           "Name":"Point1",
           "year":'1892',
           "eventType":"funfair",
           "notes":""
           }
          },
          {
           "type": "Feature",
           "geometry": {
              "type": "Point",
              "coordinates":  [ 2.1753895,41.3767925 ]
           },
           "properties": {
           "Name":"Point2",
           "year":'1890',
           "eventType":"trade demonstration",
           "notes":""
           }
          }
          ]};
  
          var mapLayerGroupsYear = [];
      function onEachFeature(feature, layer) {
  
          var year = mapLayerGroupsYear[feature.properties.year];
          if (year === undefined) {
              year = new L.layerGroup();
  
              //add the layer to the map
              year.addTo(map);
  
              //store layer
              mapLayerGroupsYear[feature.properties.year] = year;
          }
  
              //add the feature to the layer
              year.addLayer(layer);
  
      }
      var myLayer = L.geoJSON(jsontest, {
        onEachFeature: onEachFeature
  
      L.control.layers(baseMaps, mapLayerGroupsYear).addTo(map);
  </code></pre>
  
  <p>I am a beginner with leaflet so please forgive the dumb question, in case it is.</p>