Skip to content

Commit fb05f69

Browse files
AliyanHprushforth
authored andcommitted
make zoomTo work for unchecked layer
1 parent 2564f7f commit fb05f69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ export class MapLayer extends HTMLElement {
429429
}
430430
zoomTo() {
431431
if (!this.extent) return;
432-
let map = this._layer._map,
432+
let map = this.parentElement._map,
433433
tL = this.extent.topLeft.pcrs,
434434
bR = this.extent.bottomRight.pcrs,
435435
layerBounds = L.bounds(

0 commit comments

Comments
 (0)