diff --git a/assets/svg/compass.svg,compass_back.svg,compass_needle.svg.license b/assets/svg/compass.svg,compass_back.svg,compass_needle.svg.license new file mode 100644 index 000000000..22b8ca7a5 --- /dev/null +++ b/assets/svg/compass.svg,compass_back.svg,compass_needle.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: +SPDX-License-Identifier: LicenseRef-TRIVIAL \ No newline at end of file diff --git a/assets/svg/compass_back.svg b/assets/svg/compass_back.svg new file mode 100644 index 000000000..e596da518 --- /dev/null +++ b/assets/svg/compass_back.svg @@ -0,0 +1,47 @@ + + + + + + + + diff --git a/assets/svg/compass_back.svg.license b/assets/svg/compass_back.svg.license new file mode 100644 index 000000000..22b8ca7a5 --- /dev/null +++ b/assets/svg/compass_back.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: +SPDX-License-Identifier: LicenseRef-TRIVIAL \ No newline at end of file diff --git a/assets/svg/compass_needle.svg b/assets/svg/compass_needle.svg new file mode 100644 index 000000000..eb79c6e28 --- /dev/null +++ b/assets/svg/compass_needle.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + diff --git a/assets/svg/compass_needle.svg.license b/assets/svg/compass_needle.svg.license new file mode 100644 index 000000000..22b8ca7a5 --- /dev/null +++ b/assets/svg/compass_needle.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: +SPDX-License-Identifier: LicenseRef-TRIVIAL \ No newline at end of file diff --git a/assets/svg/license_info.json b/assets/svg/license_info.json index 9ecb69183..46a338688 100644 --- a/assets/svg/license_info.json +++ b/assets/svg/license_info.json @@ -164,6 +164,18 @@ ], "sources": [] }, + { + "path": "compass_back.svg", + "license": "TRIVIAL", + "authors": [], + "sources": [] + }, + { + "path": "compass_needle.svg", + "license": "TRIVIAL", + "authors": [], + "sources": [] + }, { "path": "confirm.svg", "license": "CC0-1.0", @@ -638,6 +650,14 @@ "https://nlnet.nl/logo/" ] }, + { + "path": "north_arrow.svg", + "license": "CC0-1.0", + "authors": [ + "Pieter Vander Vennet" + ], + "sources": [] + }, { "path": "not_found.svg", "license": "CC-BY-4.0", diff --git a/assets/svg/north_arrow.svg b/assets/svg/north_arrow.svg new file mode 100644 index 000000000..20e124970 --- /dev/null +++ b/assets/svg/north_arrow.svg @@ -0,0 +1,51 @@ + + + + + + + + + diff --git a/assets/svg/north_arrow.svg.license b/assets/svg/north_arrow.svg.license new file mode 100644 index 000000000..ed0288300 --- /dev/null +++ b/assets/svg/north_arrow.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Pieter Vander Vennet +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index 6d641cbe3..1c9a4b189 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -3163,6 +3163,10 @@ input[type="range"].range-lg::-moz-range-thumb { border-style: dashed; } +.border-dotted { + border-style: dotted; +} + .border-none { border-style: none; } @@ -8344,10 +8348,6 @@ svg.apply-fill path { order: 9999; } - .sm\:m-1 { - margin: 0.25rem; - } - .sm\:m-2 { margin: 0.5rem; } diff --git a/src/UI/BigComponents/CompassWidget.svelte b/src/UI/BigComponents/CompassWidget.svelte new file mode 100644 index 000000000..a615d7156 --- /dev/null +++ b/src/UI/BigComponents/CompassWidget.svelte @@ -0,0 +1,57 @@ + + diff --git a/src/UI/BigComponents/GpsElementHelper.svelte b/src/UI/BigComponents/GpsElementHelper.svelte index 9d1a718ed..f331a6cb3 100644 --- a/src/UI/BigComponents/GpsElementHelper.svelte +++ b/src/UI/BigComponents/GpsElementHelper.svelte @@ -12,7 +12,7 @@ export let state: ThemeViewState let gpsState = state.geolocationState export let mapIsDragged: Store - let open = true + let open = false function showFor(timeoutSeconds: number = 3) { open = true diff --git a/src/UI/BigComponents/WelcomeBack.svelte b/src/UI/BigComponents/WelcomeBack.svelte index a6dd4d0df..4a4d419fd 100644 --- a/src/UI/BigComponents/WelcomeBack.svelte +++ b/src/UI/BigComponents/WelcomeBack.svelte @@ -28,7 +28,7 @@ {#if $username !== undefined}
{#if $userdetails.img} - avatar + avatar {/if}
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}
@@ -430,6 +420,7 @@ {/if} + diff --git a/src/assets/svg/Compass_back.svelte b/src/assets/svg/Compass_back.svelte new file mode 100644 index 000000000..26700e588 --- /dev/null +++ b/src/assets/svg/Compass_back.svelte @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/src/assets/svg/Compass_needle.svelte b/src/assets/svg/Compass_needle.svelte new file mode 100644 index 000000000..32edda3d9 --- /dev/null +++ b/src/assets/svg/Compass_needle.svelte @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/src/assets/svg/North_arrow.svelte b/src/assets/svg/North_arrow.svelte new file mode 100644 index 000000000..7a6ee4266 --- /dev/null +++ b/src/assets/svg/North_arrow.svelte @@ -0,0 +1,4 @@ + + \ No newline at end of file