1
0
forked from MTSR/mapserver

Fix flickering when updatig new tile (attempt 2) (#387)

This commit is contained in:
1F616EMO~nya 2024-06-16 14:59:55 +08:00 committed by GitHub
parent 47f1446ec1
commit ff1b0dc47a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,10 @@ export default L.TileLayer.extend({
tile.id = this.getImageId(coords.x, coords.y, coords.z);
// trigger callbacks
tile.onload = () => done(null, tile);
tile.onload = () => {
tile.onload = undefined;
done(null, tile);
};
tile.onerror = e => done(e, tile);
return tile;