heigeo / leaflet.wms

A Leaflet plugin for working with Web Map services, providing: single-tile/untiled/nontiled layers, shared WMS sources, and GetFeatureInfo-powered identify.
http://heigeo.github.io/leaflet.wms/
MIT License
245 stars 135 forks source link

option to buffer Overlay image #35

Open sheppard opened 8 years ago

sheppard commented 8 years ago

In L.WMS.Overlay, it would be useful to be able to specify a geographic (or pixel) buffer around the WMS request to avoid any edge artifacts and provide a nicer panning experience. The image requested would thus be larger than the viewport size - potentially much larger if a geographic buffer is used. This is roughly analogous to (but not quite the same as) the keepBuffer option in L.GridLayer and L.TileLayer.WMS.

This could be implemented in conjunction with #11.

mdartic commented 7 years ago

An idea would be to add another option in L.WMS.Overlay, and we could use it when getting the bounds of the map.

http://stackoverflow.com/questions/34137648/leaflet-bounds-with-padding explain it.

The method pad is in my opinion the solution ?