Welcome back
diff --git a/src/UI/Map/MapLibreAdaptor.ts b/src/UI/Map/MapLibreAdaptor.ts
index 644309b6e..062d30654 100644
--- a/src/UI/Map/MapLibreAdaptor.ts
+++ b/src/UI/Map/MapLibreAdaptor.ts
@@ -178,7 +178,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
this.setMinzoom(this.minzoom.data)
this.setMaxzoom(this.maxzoom.data)
this.setBounds(this.bounds.data)
- this.SetRotation(this.rotation.data)
+ this.setRotation(this.rotation.data)
this.setScale(this.showScale.data)
this.updateStores(true)
}
@@ -252,7 +252,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
})
this.zoom.addCallbackAndRunD((z) => this.SetZoom(z))
this.maxbounds.addCallbackAndRun((bbox) => this.setMaxBounds(bbox))
- this.rotation.addCallbackAndRunD((bearing) => this.SetRotation(bearing))
+ this.rotation.addCallbackAndRunD((bearing) => this.setRotation(bearing))
this.allowMoving.addCallbackAndRun((allowMoving) => {
this.setAllowMoving(allowMoving)
this.pingKeycodeEvent(allowMoving ? "unlocked" : "locked")
@@ -554,12 +554,12 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
}
}
- private SetRotation(bearing: number): void {
+ private setRotation(bearing: number): void {
const map = this._maplibreMap.data
if (!map || bearing === undefined) {
return
}
- map.rotateTo(bearing, { duration: 0 })
+ map.rotateTo(bearing, { duration: 500 })
}
private MoveMapToCurrentLoc(loc: { lat: number; lon: number }): void {
diff --git a/src/UI/ThemeViewGUI.svelte b/src/UI/ThemeViewGUI.svelte
index a8ddbc6a3..4d38f8fb0 100644
--- a/src/UI/ThemeViewGUI.svelte
+++ b/src/UI/ThemeViewGUI.svelte
@@ -30,7 +30,6 @@
import VisualFeedbackPanel from "./BigComponents/VisualFeedbackPanel.svelte"
import { Orientation } from "../Sensors/Orientation"
import GeolocationIndicator from "./BigComponents/GeolocationIndicator.svelte"
- import Compass_arrow from "../assets/svg/Compass_arrow.svelte"
import ReverseGeocoding from "./BigComponents/ReverseGeocoding.svelte"
import { BBox } from "../Logic/BBox"
import ExtraLinkButton from "./BigComponents/ExtraLinkButton.svelte"
@@ -55,6 +54,7 @@
import WelcomeBack from "./BigComponents/WelcomeBack.svelte"
import InsetSpacer from "./Base/InsetSpacer.svelte"
import { AndroidPolyfill } from "../Logic/Web/AndroidPolyfill"
+ import CompassWidget from "./BigComponents/CompassWidget.svelte"
export let state: WithSearchState
new TitleHandler(state.selectedElement, state)
@@ -64,8 +64,6 @@
let theme = state.theme
let maplibremap: UIEventSource
= state.map
let selectedElement: UIEventSource = new UIEventSource(undefined)
- let compass = Orientation.singleton.alpha
- let compassLoaded = Orientation.singleton.gotMeasurement
let addNewFeatureMode = state.userRelatedState.addNewFeatureMode
let gpsAvailable = state.geolocation.geolocationState.gpsAvailable
let gpsButtonAriaLabel = state.geolocation.geolocationState.gpsStateExplanation
@@ -314,14 +312,6 @@
- {#if $compassLoaded}
-
-
-
- {/if}