mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
More general handling of zoom levels
This commit is contained in:
@@ -283,21 +283,11 @@ export class Map extends L.Map {
|
||||
const layerData = this.#mapLayers[layerName];
|
||||
if (layerData instanceof Array) {
|
||||
let layers = layerData.map((layer: any) => {
|
||||
var options: L.TileLayerOptions = {
|
||||
attribution: layer.attribution,
|
||||
minZoom: layer.minZoom,
|
||||
maxZoom: layer.maxZoom
|
||||
};
|
||||
return new L.TileLayer(layer.urlTemplate, options);
|
||||
return new L.TileLayer(layer.urlTemplate, layer);
|
||||
})
|
||||
this.#layer = new L.LayerGroup(layers);
|
||||
} else {
|
||||
var options: L.TileLayerOptions = {
|
||||
attribution: layerData.attribution,
|
||||
minZoom: layerData.minZoom,
|
||||
maxZoom: layerData.maxZoom
|
||||
};
|
||||
this.#layer = new L.TileLayer(layerData.urlTemplate, options);
|
||||
this.#layer = new L.TileLayer(layerData.urlTemplate, layerData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user