Finish importer, add applicable import layers to every theme by default

This commit is contained in:
Pieter Vander Vennet 2022-01-21 01:57:16 +01:00
parent 3402ac0954
commit ca1490902c
41 changed files with 1559 additions and 898 deletions

View file

@ -28,7 +28,7 @@ export default class MinimapImplementation extends BaseUIElement implements Mini
private readonly _addLayerControl: boolean;
private readonly _options: MinimapOptions;
private constructor(options: MinimapOptions) {
private constructor(options?: MinimapOptions) {
super()
options = options ?? {}
this.leafletMap = options.leafletMap ?? new UIEventSource<Map>(undefined)
@ -290,12 +290,6 @@ export default class MinimapImplementation extends BaseUIElement implements Mini
map.setView([loc.lat, loc.lon], loc.zoom)
})
location.map(loc => loc.zoom)
.addCallback(zoom => {
if (Math.abs(map.getZoom() - zoom) > 0.1) {
map.setZoom(zoom, {});
}
})
if (self.bounds !== undefined) {
self.bounds.setData(BBox.fromLeafletBounds(map.getBounds()))