mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
set bounds once map is loaded
This commit is contained in:
@@ -81,11 +81,15 @@ targetMapBounds.subscribe((bounds) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
get(map)?.fitBounds(bounds.bounds, {
|
map.subscribe((m) => {
|
||||||
|
if (m) {
|
||||||
|
m.fitBounds(bounds.bounds, {
|
||||||
padding: 80,
|
padding: 80,
|
||||||
linear: true,
|
linear: true,
|
||||||
easing: () => 1
|
easing: () => 1
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user