set bounds once map is loaded
This commit is contained in:
parent
ecfa3143ef
commit
46bafa9fff
1 changed files with 8 additions and 4 deletions
|
@ -81,10 +81,14 @@ targetMapBounds.subscribe((bounds) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
get(map)?.fitBounds(bounds.bounds, {
|
map.subscribe((m) => {
|
||||||
padding: 80,
|
if (m) {
|
||||||
linear: true,
|
m.fitBounds(bounds.bounds, {
|
||||||
easing: () => 1
|
padding: 80,
|
||||||
|
linear: true,
|
||||||
|
easing: () => 1
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue