Leaflet.EdgeBuffer
Leaflet.EdgeBuffer copied to clipboard
can this be made to work for geojson
my overlay is a geojson acting as a fog of war, so when I pan/drag the map it shows the boundary where no geojson is loaded exposing my map before I am ready, I would like to know If I could get this buffering to happen with my geojson too. thanks to you for contributing to the leaflet community! Greatly appreciated!
I used the following to set padding
on the renderer which seems to have such an effect for GeoJSON
var paddedRenderer = L.svg({ padding: 0.8 });
var geo = L.geoJSON(states,{style:mapstyle, renderer: paddedRenderer});
See https://gis.stackexchange.com/questions/296982/leaflet-geojson-map-buffering for some more discussion, there is some potential performance impact as more data is rendered.