Is there a way in Leaflet or a Leaflet plugin that lets you mask an ImageLayer from a GeoJSON layer? I know that a backend can mask the images for you then return the masked image to Leaflet but I am hoping there might be a way? Maybe clear the opacity of the image if its outside the bounds of the GeoJSON layer? I just have to check before I develop the backend to this instead.
-
1No such Leaflet plugin for image layer, only for tile layer: github.com/aparshin/leaflet-boundary-canvas. Also there are no simple hook in Leaflet to do it yourselves easily. In OpenLayers it's piece of cake: openlayers.org/en/latest/examples/layer-clipping-vector.html– TomazicMFeb 26 at 14:18
-
I see. Thank you @TomazicM.– NikkoFeb 26 at 14:47
Add a comment
|