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.