changeset 5729:6e4d9b56fa56

Merged
author Sascha Wilde <wilde@sha-bang.de>
date Thu, 15 Feb 2024 16:24:19 +0100
parents 1c33e87e280d (current diff) b1a10654bf0f (diff)
children a88d9f588aec
files
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/Map.vue	Wed Jan 17 18:55:23 2024 +0100
+++ b/client/src/components/map/Map.vue	Thu Feb 15 16:24:19 2024 +0100
@@ -62,6 +62,7 @@
 import { pane } from "@/lib/mixins";
 import { layerFactory } from "@/components/layers/layers";
 import { ImageWMS as ImageSource } from "ol/source";
+import { ScaleLine } from "ol/control.js";
 import { styles } from "@/components/layers/styles";
 import "ol/ol.css";
 
@@ -331,7 +332,7 @@
       this.map = new Map({
         layers: this.layers.config,
         target: "map-" + this.paneId,
-        controls: [],
+        controls: [new ScaleLine()],
         view:
           this.syncedMaps.includes(this.paneId) || this.paneId === "main"
             ? this.syncedView
@@ -515,3 +516,14 @@
   }
 };
 </script>
+
+<style>
+.ol-scale-line {
+  background: rgba(0, 0, 0, 0.45);
+  border-radius: 4px;
+  bottom: 8px;
+  left: 8px;
+  padding: 2px;
+  position: absolute;
+}
+</style>