Skip to content

Commit 79f2807

Browse files
AliyanHprushforth
authored andcommitted
make zoomTo work for unchecked layer
1 parent f2fd5ca commit 79f2807

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)