diff --git a/Logic/Actors/BackgroundLayerResetter.ts b/Logic/Actors/BackgroundLayerResetter.ts index 30a0fbc16..3fe254208 100644 --- a/Logic/Actors/BackgroundLayerResetter.ts +++ b/Logic/Actors/BackgroundLayerResetter.ts @@ -39,6 +39,9 @@ export default class BackgroundLayerResetter { availableLayers, currentBgPolygon?.properties?.category ) + if(!availableInSameCat){ + return + } console.log("Selecting a different layer:", availableInSameCat.properties.id) currentBackgroundLayer.setData(availableInSameCat) }) diff --git a/Models/RasterLayers.ts b/Models/RasterLayers.ts index 57e527497..5435c3779 100644 --- a/Models/RasterLayers.ts +++ b/Models/RasterLayers.ts @@ -1,10 +1,10 @@ -import { Feature, Polygon } from "geojson" +import {Feature, Polygon} from "geojson" import * as editorlayerindex from "../assets/editor-layer-index.json" import * as globallayers from "../assets/global-raster-layers.json" -import { BBox } from "../Logic/BBox" -import { Store, Stores } from "../Logic/UIEventSource" -import { GeoOperations } from "../Logic/GeoOperations" -import { RasterLayerProperties } from "./RasterLayerProperties" +import {BBox} from "../Logic/BBox" +import {Store, Stores} from "../Logic/UIEventSource" +import {GeoOperations} from "../Logic/GeoOperations" +import {RasterLayerProperties} from "./RasterLayerProperties" export class AvailableRasterLayers { public static EditorLayerIndex: (Feature & @@ -39,9 +39,15 @@ export class AvailableRasterLayers { public static readonly maplibre: RasterLayerPolygon = { type: "Feature", - properties: { - name: "MapLibre", + properties: { + name: "MapTiler", url: null, + category: "osmbasedmap", + id: "maptiler", + attribution: { + text: "Maptiler", + url: "https://www.maptiler.com/copyright/" + } }, geometry: BBox.global.asGeometry(), } diff --git a/UI/ThemeViewGUI.svelte b/UI/ThemeViewGUI.svelte index cbbf0be6f..1b7eae156 100644 --- a/UI/ThemeViewGUI.svelte +++ b/UI/ThemeViewGUI.svelte @@ -1,5 +1,5 @@ @@ -144,7 +150,7 @@ { state.guistate.themeViewTab.setData("copyright"); state.guistate.themeIsOpened.setData(true)}}> - © OpenStreetMap | {$rasterLayer.properties.name} + © OpenStreetMap | {rasterLayerName}