Performance: add map.resize() at appropriate time for initial map load

This commit is contained in:
Pieter Vander Vennet 2023-12-12 13:53:49 +01:00
parent 7947fc3fbc
commit f8349cb2b9
2 changed files with 6 additions and 12 deletions

View file

@ -98,7 +98,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
maplibreMap.addCallbackAndRunD((map) => {
map.on("load", () => {
map.resize()
self.MoveMapToCurrentLoc(self.location.data)
self.SetZoom(self.zoom.data)
self.setMaxBounds(self.maxbounds.data)
@ -111,7 +110,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
self.setBackground()
this.updateStores(true)
})
map.resize()
self.MoveMapToCurrentLoc(self.location.data)
self.SetZoom(self.zoom.data)
self.setMaxBounds(self.maxbounds.data)
@ -293,7 +291,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
}
map.triggerRepaint()
await promise
map.resize()
}
private async drawElement(