digidem / leaflet-side-by-side

A Leaflet control to add a split screen to compare two map overlays
http://lab.digital-democracy.org/leaflet-side-by-side/
MIT License
346 stars 108 forks source link

Support clip when there are more than one layer #5

Closed wmaiouiru closed 6 years ago

wmaiouiru commented 8 years ago

When there are more than one layers in the initialization, only the last layer is clipped. L.control.sideBySide(left_layers, right_layers).addTo(this.map);

Modified _updateClip method to support his.

Charmatzis commented 7 years ago

@wmaiouiru I tried you PR, but it has some problems... the move even doesn't seem to fire up after swiping the bar. Are you sure about this PR?

wmaiouiru commented 6 years ago

I will need to look at this again when I get a chance. Sorry for the trouble.