leaflet-geotiff
leaflet-geotiff copied to clipboard
getting "too many webgl contexts" warnings
Not sure how to solve this.
I currently have tiled geotiffs that I would like to plot on the map. There are between 20-90 tiles depending on various scenarios.
After plotting about 10-12 tiles, every subsequent call throws "too many webgl contexts" warning on all browsers.
Also noticed that the calls made to the plotty library are different in draw and reset functions. One passes useWebGL: false and the other doesn't.
This seems to be a common problem with WebGL contexts not being cleaned up by the GC. A simple fix might be to put useWebGL: false
after line 175 in _preLoadColorScale
.
clampHigh: this.options.clampHigh,
useWebGL: false
});
Can you please see if this works for you?
I plan to do a new version soon which uses WebGL properly as plotty gets quite slow for large files if WebGL is not used.
I'm getting this warning, how can I solve?