From 52ae60015bf7009d16898d9f3195d58ca0dc2f07 Mon Sep 17 00:00:00 2001 From: Luke Blaney Date: Sat, 2 Aug 2025 18:09:23 +0100 Subject: [PATCH 1/2] Use wrapped version of `LPolyline` which includes handling of lines which pass the antimeridian Installs module `vue-leaflet-antimeridian` and uses its version of LPolyline, instead of the native leaflet version. Fixes https://github.com/owntracks/frontend/issues/157 --- package-lock.json | 15 +++++++++++++++ package.json | 1 + src/views/Map.vue | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 81551cd..ef11bba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "vue-feather-icons": "^5.1.0", "vue-i18n": "^8.28.2", "vue-js-modal": "^2.0.1", + "vue-leaflet-antimeridian": "^1.0.0", "vue-mq": "^1.0.1", "vue-outside-events": "^1.1.3", "vue-router": "^3.6.5", @@ -2719,6 +2720,11 @@ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, + "node_modules/Leaflet.Antimeridian": { + "name": "leaflet.antimeridian", + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/briannaAndCo/Leaflet.Antimeridian.git#7986dc5b68836630611c15dcbd8c8c48409d5798" + }, "node_modules/leaflet.heat": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/leaflet.heat/-/leaflet.heat-0.2.0.tgz", @@ -4544,6 +4550,15 @@ "vue": "^2.6.11" } }, + "node_modules/vue-leaflet-antimeridian": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vue-leaflet-antimeridian/-/vue-leaflet-antimeridian-1.0.0.tgz", + "integrity": "sha512-lnvXzMPlFhZubT6cMwi4GEPBhGYtwQrbR3LP5bSyUI9hVBTN3vlJFTqhEPmyQSBpqAjI7W4zZt/aJpn+VzZuNQ==", + "dependencies": { + "Leaflet.Antimeridian": "github:briannaAndCo/Leaflet.Antimeridian", + "vue2-leaflet": "^2.7.1" + } + }, "node_modules/vue-mq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vue-mq/-/vue-mq-1.0.1.tgz", diff --git a/package.json b/package.json index 9f3e677..d1ae05c 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "vue-feather-icons": "^5.1.0", "vue-i18n": "^8.28.2", "vue-js-modal": "^2.0.1", + "vue-leaflet-antimeridian": "^1.0.0", "vue-mq": "^1.0.1", "vue-outside-events": "^1.1.3", "vue-router": "^3.6.5", diff --git a/src/views/Map.vue b/src/views/Map.vue index 63d60eb..0efa935 100644 --- a/src/views/Map.vue +++ b/src/views/Map.vue @@ -141,9 +141,9 @@ import { LMarker, LCircleMarker, LCircle, - LPolyline, LTooltip, } from "vue2-leaflet"; +import { LPolyline } from "vue-leaflet-antimeridian"; import "leaflet/dist/leaflet.css"; import * as types from "@/store/mutation-types"; import LCustomMarker from "@/components/LCustomMarker"; From 3a90de9bc4f439f6ee98af96d00b7de37cefc3d0 Mon Sep 17 00:00:00 2001 From: Luke Blaney Date: Sat, 2 Aug 2025 19:31:31 +0100 Subject: [PATCH 2/2] use newer version of vue-leaflet-antimeridian which declares its dependencies differently, to avoid Docker build issues --- package-lock.json | 16 +++++----------- package.json | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef11bba..f8f294b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "vue-feather-icons": "^5.1.0", "vue-i18n": "^8.28.2", "vue-js-modal": "^2.0.1", - "vue-leaflet-antimeridian": "^1.0.0", + "vue-leaflet-antimeridian": "^1.0.1", "vue-mq": "^1.0.1", "vue-outside-events": "^1.1.3", "vue-router": "^3.6.5", @@ -2720,11 +2720,6 @@ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, - "node_modules/Leaflet.Antimeridian": { - "name": "leaflet.antimeridian", - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/briannaAndCo/Leaflet.Antimeridian.git#7986dc5b68836630611c15dcbd8c8c48409d5798" - }, "node_modules/leaflet.heat": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/leaflet.heat/-/leaflet.heat-0.2.0.tgz", @@ -4551,11 +4546,10 @@ } }, "node_modules/vue-leaflet-antimeridian": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vue-leaflet-antimeridian/-/vue-leaflet-antimeridian-1.0.0.tgz", - "integrity": "sha512-lnvXzMPlFhZubT6cMwi4GEPBhGYtwQrbR3LP5bSyUI9hVBTN3vlJFTqhEPmyQSBpqAjI7W4zZt/aJpn+VzZuNQ==", - "dependencies": { - "Leaflet.Antimeridian": "github:briannaAndCo/Leaflet.Antimeridian", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vue-leaflet-antimeridian/-/vue-leaflet-antimeridian-1.0.1.tgz", + "integrity": "sha512-2mhyi0QMafDGynayfuK3miTZCHi0ENXKetYc/qcwFR6Ly9Ar+C0yMEZGU+tpsgyC+NjY9bU+F8XYoIULSa1KWg==", + "peerDependencies": { "vue2-leaflet": "^2.7.1" } }, diff --git a/package.json b/package.json index d1ae05c..68ff8f5 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "vue-feather-icons": "^5.1.0", "vue-i18n": "^8.28.2", "vue-js-modal": "^2.0.1", - "vue-leaflet-antimeridian": "^1.0.0", + "vue-leaflet-antimeridian": "^1.0.1", "vue-mq": "^1.0.1", "vue-outside-events": "^1.1.3", "vue-router": "^3.6.5",