nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit d81572464c24eaf9e9b451b881e1114d1be3684a
parent 4b8aa9e23b908492101864bf4efcfbac0f46a49e
Author: Sergey Orlov <wladimirych@gmail.com>
Date:   Fri, 22 Jan 2021 09:37:39 +0100

TileLayer.cuntline: do not try to draw tile when layer is removed from map

Diffstat:
Msrc/lib/leaflet.layer.TileLayer.cutline/index.js | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/lib/leaflet.layer.TileLayer.cutline/index.js b/src/lib/leaflet.layer.TileLayer.cutline/index.js @@ -51,6 +51,9 @@ function isPointInsidePolygon(polygon, latLng) { L.TileLayer.include({ _drawTileClippedByCutline: function (coords, srcImg, destCanvas, done) { + if (!this._map) { + return; + } const width = srcImg.naturalWidth; const height = srcImg.naturalHeight; destCanvas.width = width;