From f9e3dd50e45a4e838313f4c14f928c7a62b3bed1 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 26 Apr 2026 14:03:05 -0500 Subject: [PATCH] fix(rover-locations): use circleMarker; default marker icons aren't bundled --- assets/js/location_map_hook.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/assets/js/location_map_hook.ts b/assets/js/location_map_hook.ts index 1cf6bb0a..e5e28266 100644 --- a/assets/js/location_map_hook.ts +++ b/assets/js/location_map_hook.ts @@ -2,7 +2,7 @@ import type { ViewHook } from "phoenix_live_view" interface LocationMapHook extends ViewHook { map: L.Map - marker: L.Marker + marker: L.CircleMarker visibilityHandler: (() => void) | null } @@ -38,7 +38,14 @@ export const LocationMap: Partial = { { position: "topright", collapsed: false } ).addTo(map) - this.marker = L.marker([lat, lon]).addTo(map) + this.marker = L.circleMarker([lat, lon], { + radius: 8, + color: "#ffffff", + weight: 2, + fillColor: "#ef4444", + fillOpacity: 0.95, + pane: "markerPane" + }).addTo(map) this.marker.bindPopup(`${lat.toFixed(6)}, ${lon.toFixed(6)}`) // LiveView reconnect / tab visibility — Leaflet needs invalidateSize.