forked from MapComplete/MapComplete
Fix: build; subtle bug
This commit is contained in:
parent
d0e0abdece
commit
5644c7a8b8
2 changed files with 6 additions and 1 deletions
|
@ -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";
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue