Skip to content

Commit

Permalink
Correctly display SHS marker on maps (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmohns authored Nov 20, 2024
1 parent 17de2e7 commit f9c4e4d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/mixins/mapSharing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/modules/Client/Client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 7 additions & 2 deletions src/frontend/src/modules/Map/MiniGridMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ export default {
icon: deviceMarkerIcon,
})
deviceMarker.bindTooltip(
"<strong>Device:</strong> " + markingInfo.serialNumber,
"<strong>Device:</strong> " +
markingInfo.serialNumber +
"<br>" +
"<strong>Type:</strong> " +
markingInfo.deviceType,
{ sticky: true, offset: [10, 10] },
)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f9c4e4d

Please sign in to comment.