mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-18 17:02:29 +00:00
set bounds once map is loaded
This commit is contained in:
1 parent
ecfa3143ef
commit
46bafa9fff
1 file changed
+8
-4
@@ -81,10 +81,14 @@ targetMapBounds.subscribe((bounds) => {
|
||||
return;
|
||||
}
|
||||
|
||||
get(map)?.fitBounds(bounds.bounds, {
|
||||
padding: 80,
|
||||
linear: true,
|
||||
easing: () => 1
|
||||
map.subscribe((m) => {
|
||||
if (m) {
|
||||
m.fitBounds(bounds.bounds, {
|
||||
padding: 80,
|
||||
linear: true,
|
||||
easing: () => 1
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user