From ad2c7f3a462c45ea6208ba03351219f9c77ec305 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 24 Jun 2021 13:52:43 +0200 Subject: [PATCH] Formatting --- Logic/Actors/AvailableBaseLayers.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Logic/Actors/AvailableBaseLayers.ts b/Logic/Actors/AvailableBaseLayers.ts index 1a025d5a0..2fd679571 100644 --- a/Logic/Actors/AvailableBaseLayers.ts +++ b/Logic/Actors/AvailableBaseLayers.ts @@ -14,19 +14,18 @@ import {Utils} from "../../Utils"; export default class AvailableBaseLayers { - public static osmCarto: BaseLayer = + public static osmCarto: BaseLayer = { id: "osm", - name: "OpenStreetMap", + name: "OpenStreetMap", layer: () => AvailableBaseLayers.CreateBackgroundLayer("osm", "OpenStreetMap", - "https://tile.openstreetmap.org/{z}/{x}/{y}.png", "OpenStreetMap", "https://openStreetMap.org/copyright", - 19, - false, false), + "https://tile.openstreetmap.org/{z}/{x}/{y}.png", "OpenStreetMap", "https://openStreetMap.org/copyright", + 19, + false, false), feature: null, max_zoom: 19, min_zoom: 0 - } - + } public static layerOverview = AvailableBaseLayers.LoadRasterIndex().concat(AvailableBaseLayers.LoadProviderIndex()); @@ -37,11 +36,11 @@ export default class AvailableBaseLayers { this.availableEditorLayers = location.map( (currentLocation) => { - - if(currentLocation === undefined){ + + if (currentLocation === undefined) { return AvailableBaseLayers.layerOverview; } - + const currentLayers = self.availableEditorLayers?.data; const newLayers = AvailableBaseLayers.AvailableLayersAt(currentLocation?.lon, currentLocation?.lat); @@ -61,7 +60,6 @@ export default class AvailableBaseLayers { }); - } private static AvailableLayersAt(lon: number, lat: number): BaseLayer[] { @@ -69,7 +67,7 @@ export default class AvailableBaseLayers { const globalLayers = []; for (const layerOverviewItem of AvailableBaseLayers.layerOverview) { const layer = layerOverviewItem; - + if (layer.feature?.geometry === undefined || layer.feature?.geometry === null) { globalLayers.push(layer); continue; @@ -151,10 +149,10 @@ export default class AvailableBaseLayers { private static LoadProviderIndex(): BaseLayer[] { // @ts-ignore X; // Import X to make sure the namespace is not optimized away - function l(id: string, name: string) : BaseLayer{ + function l(id: string, name: string): BaseLayer { try { const layer: any = () => L.tileLayer.provider(id, undefined); - const baseLayer : BaseLayer = { + const baseLayer: BaseLayer = { feature: null, id: id, name: name,