diff --git a/UI/InputElement/Helpers/LocationInput.svelte b/UI/InputElement/Helpers/LocationInput.svelte index 15be7edd8d..92abb1da68 100644 --- a/UI/InputElement/Helpers/LocationInput.svelte +++ b/UI/InputElement/Helpers/LocationInput.svelte @@ -7,7 +7,7 @@ import DragInvitation from "../../Base/DragInvitation.svelte"; import {GeoOperations} from "../../../Logic/GeoOperations"; import ShowDataLayer from "../../Map/ShowDataLayer"; - import * as boundsdisplay from "../../../assets/generated/layers/range.json" + import * as boundsdisplay from "../../../assets/layers/range/range.json" import StaticFeatureSource from "../../../Logic/FeatureSource/Sources/StaticFeatureSource"; import * as turf from "@turf/turf" import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"; diff --git a/UI/Map/MapLibreAdaptor.ts b/UI/Map/MapLibreAdaptor.ts index bea888f4e2..094931a642 100644 --- a/UI/Map/MapLibreAdaptor.ts +++ b/UI/Map/MapLibreAdaptor.ts @@ -50,6 +50,11 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { this._maplibreMap = maplibreMap this.location = state?.location ?? new UIEventSource({lon: 0, lat: 0}) + if(this.location.data){ + // The MapLibre adaptor updates the element in the location and then pings them + // Often, code setting this up doesn't expect the object they pass in to be changed, so we create a copy + this.location.setData({...this.location.data}) + } this.zoom = state?.zoom ?? new UIEventSource(1) this.minzoom = state?.minzoom ?? new UIEventSource(0) this.maxzoom = state?.maxzoom ?? new UIEventSource(24)