Leaflet.Clipper
Allows Union, Difference, Xor, and Intersection operations on two polygons. This is a Leaflet wrapper around JSClipper.
Install
You'll need:
leaflet
:>=1.1.0
clipper-lib
:^6.2.1
leaflet-clipper
:^1.1.0
That's this library.
Need to run with an older version? Let me know, there was a breaking change regarding Mixin.Events. Easy to modify.
Demo
Usage
var map = ...var layer = ... var drawState = map featureGroup: layer selectedPathOptions: color: '#FF3399' ;drawState;drawState;
TODO
- bower
- Leaflet.draw integration
- Leaflet.Editable integration
- Extend functionality to circles