Leaflet / Leaflet.TileLayer.NoGap

Experiment trying to get rid of the 1px gap between tiles
Other
38 stars 14 forks source link

Crash when trying to load broken tiles from WMS #6

Closed IvanSanchez closed 4 years ago

IvanSanchez commented 4 years ago

As mentioned in https://stackoverflow.com/questions/60115544/how-to-set-style-to-a-wms-layer-from-geoserver :

But when I add styles : 'darkbackground' to the code, like this [...] I get an error saying: L.TileLayer.NoGap.js:224 Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.

I'll venture to guess that the WMS is returning error on some tiles (i.e. not a image/png or an imag/jpg document back, but a bunch of XML containing an error message)

Fil commented 4 years ago

I've been using Leaflet.TileLayer.NoGap with no problem for 4 years! and noticed the problem only very recently. Might this be related to a recent change in a browser (Chrome?).

(In my use case I'm loading from a static images directory)