mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
set bounds once map is loaded
This commit is contained in:
@@ -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