From 4887acb91705a9559017bbfee30e98ac3fbaeb4d Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sat, 25 Jun 2022 13:15:37 +0100 Subject: [PATCH] Migrate ZoomControl to vue --- src/components/Map.vue | 2 +- src/components/MapUI.vue | 3 + src/components/map/control/ZoomControl.vue | 88 ++++++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 src/components/map/control/ZoomControl.vue diff --git a/src/components/Map.vue b/src/components/Map.vue index 6c4e81c..3cebb39 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -216,7 +216,7 @@ export default defineComponent({ center: new LatLng(0, 0), fadeAnimation: false, zoomAnimation: true, - zoomControl: true, + zoomControl: false, preferCanvas: true, attributionControl: false, crs: CRS.Simple, diff --git a/src/components/MapUI.vue b/src/components/MapUI.vue index c9c21a8..245f4a7 100644 --- a/src/components/MapUI.vue +++ b/src/components/MapUI.vue @@ -23,6 +23,7 @@
+
@@ -59,6 +60,7 @@ import MapContextMenu from "@/components/map/MapContextMenu.vue"; import LoginControl from "@/components/map/control/LoginControl.vue"; import LiveAtlasLeafletMap from "@/leaflet/LiveAtlasLeafletMap"; import LoadingControl from "@/components/map/control/LoadingControl.vue"; +import ZoomControl from "@/components/map/control/ZoomControl.vue"; export default defineComponent({ props: { @@ -69,6 +71,7 @@ export default defineComponent({ }, components: { + ZoomControl, LoadingControl, LogoControl, CoordinatesControl, diff --git a/src/components/map/control/ZoomControl.vue b/src/components/map/control/ZoomControl.vue new file mode 100644 index 0000000..9b6d5a4 --- /dev/null +++ b/src/components/map/control/ZoomControl.vue @@ -0,0 +1,88 @@ + + + + + + +