title: leaflet invert when there are multiple polygons
body: <p>I'm using this library to invert leaflet layers.</p>
  <p><a href="https://github.com/ebrelsford/Leaflet.snogylop" rel="nofollow noreferrer">https://github.com/ebrelsford/Leaflet.snogylop</a></p>
  <p>This works perfectly when there is only one polygon. But when are there are multiple polygons, the invert applies for each and every polygon so it overlaps resulting invert feature applies on top of each polygon. Like the image attached below.</p>
  <p><a href="https://i.stack.imgur.com/wRBvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wRBvQ.png" alt="enter image description here" /></a></p>
  <p>When trying on a single polygon it works perfectly.<a href="https://i.stack.imgur.com/AjSaA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AjSaA.png" alt="enter image description here" /></a></p>
  <p>How can i fix this issue when multiple polygons are there.</p>
  <pre><code>function handleJson(data) {
    var selectedArea = L.geoJson(data, {
      invert: true,
      worldLatLngs: [
        L.latLng([90, 360]),
        L.latLng([90, -180]),
        L.latLng([-90, -180]),
        L.latLng([-90, 360])
    ]
    });
    selectedArea.addTo(lmap);
    lmap.fitBounds(selectedArea.getBounds());
  }
  </code></pre>
  <p>PS:</p>
  <p><a href="https://i.stack.imgur.com/s4iXm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s4iXm.png" alt="enter image description here" /></a></p>
  <p><strong>poly.toGeoJSON()</strong></p>
  <pre><code>{&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},&quot;geometry&quot;:{&quot;type&quot;:&quot;MultiPolygon&quot;,&quot;coordinates&quot;:[[[[null,null],[null,null]]],[[[null,null],[null,null]]],[[[null,null],[null,null]]],[[[null,null],[null,null]]],[[[null,null],[null,null]]],[[[null,null],[null,null]]],[[[null,null],[null,null]]]]}}
  </code></pre>
  <p><strong>multipolyCoords</strong></p>
  <pre><code>[[[[{&quot;lat&quot;:35.41263883,&quot;lng&quot;:63.02502113},{&quot;lat&quot;:35.41251986,&quot;lng&quot;:63.02571771},{&quot;lat&quot;:35.41329411,&quot;lng&quot;:63.02584793},{&quot;lat&quot;:35.41378402,&quot;lng&quot;:63.02643689},{&quot;lat&quot;:35.41402821,&quot;lng&quot;:63.02723164},{&quot;lat&quot;:35.41342648,&quot;lng&quot;:63.02885513},{&quot;lat&quot;:35.41342962,&quot;lng&quot;:63.02891854},{&quot;lat&quot;:35.4100508,&quot;lng&quot;:63.02941312},
  .....................
  ]]]],&quot;_initHooksCalled&quot;:true
  </code></pre>