diff --git a/public/js/map/RealtimeTileLayer.js b/public/js/map/RealtimeTileLayer.js index e5c99bd..4912eaf 100644 --- a/public/js/map/RealtimeTileLayer.js +++ b/public/js/map/RealtimeTileLayer.js @@ -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;