forked from MapComplete/MapComplete
Fix: attempts to stabilize
This commit is contained in:
parent
686ad70511
commit
ae84207555
4 changed files with 31 additions and 24 deletions
|
@ -590,7 +590,11 @@ export default class ShowDataLayer {
|
|||
}
|
||||
const bbox = BBox.bboxAroundAll(features.map(BBox.get))
|
||||
window.requestAnimationFrame(() => {
|
||||
map.resize()
|
||||
try {
|
||||
map.resize()
|
||||
} catch (e) {
|
||||
console.error("Could not resize the map in preparation of zoomToCurrentFeatures; the error is:", e)
|
||||
}
|
||||
map.fitBounds(bbox.toLngLat(), {
|
||||
padding: { top: 10, bottom: 10, left: 10, right: 10 },
|
||||
animate: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue