From f9c4e4d13cb094d590e547c4108da6f490f60956 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Wed, 20 Nov 2024 12:55:59 +0100 Subject: [PATCH] Correctly display SHS marker on maps (#367) --- src/frontend/src/mixins/mapSharing.js | 2 +- src/frontend/src/modules/Client/Client.vue | 2 +- src/frontend/src/modules/Map/MiniGridMap.vue | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/mixins/mapSharing.js b/src/frontend/src/mixins/mapSharing.js index bfd28d70b..b1a325072 100644 --- a/src/frontend/src/mixins/mapSharing.js +++ b/src/frontend/src/mixins/mapSharing.js @@ -123,7 +123,7 @@ export const sharedMap = { } this.markersLayer = new L.markerClusterGroup({ chunkedLoading: true, - spiderfyOnMaxZoom: false, + spiderfyOnMaxZoom: true, }) const drawControl = new L.Control.Draw(drawingOptions) this.map.addLayer(drawingOptions.edit.featureGroup) diff --git a/src/frontend/src/modules/Client/Client.vue b/src/frontend/src/modules/Client/Client.vue index 0f2f56428..686d25deb 100644 --- a/src/frontend/src/modules/Client/Client.vue +++ b/src/frontend/src/modules/Client/Client.vue @@ -146,7 +146,7 @@ export default { case "e_bike": markerType = MARKER_TYPE.E_BIKE break - case "shs": + case "solar_home_system": markerType = MARKER_TYPE.SHS break default: diff --git a/src/frontend/src/modules/Map/MiniGridMap.vue b/src/frontend/src/modules/Map/MiniGridMap.vue index 51a7bdfe3..efddbc38a 100644 --- a/src/frontend/src/modules/Map/MiniGridMap.vue +++ b/src/frontend/src/modules/Map/MiniGridMap.vue @@ -247,7 +247,11 @@ export default { icon: deviceMarkerIcon, }) deviceMarker.bindTooltip( - "Device: " + markingInfo.serialNumber, + "Device: " + + markingInfo.serialNumber + + "
" + + "Type: " + + markingInfo.deviceType, { sticky: true, offset: [10, 10] }, ) @@ -343,12 +347,13 @@ export default { } const lat = parseFloat(points[0]) const lon = parseFloat(points[1]) + let markerType = "" switch (device.device_type) { case "e_bike": markerType = MARKER_TYPE.E_BIKE break - case "shs": + case "solar_home_system": markerType = MARKER_TYPE.SHS break default: