|
|
@@ -31,11 +31,15 @@ function createIcon(type: string, size: number, ghost?: boolean): L.DivIcon {
|
|
|
: MARKER_COLORS[type] || '#3b82f6'
|
|
|
|
|
|
if (type === 'location') {
|
|
|
+ const locStyle = ghost
|
|
|
+ ? `width:30px;height:30px;background:radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0) 70%);border-radius:50%;box-shadow:0 0 20px rgba(255, 215, 0, 0.4);pointer-events:none`
|
|
|
+ : `width:12px;height:12px;background:#3b82f6;border-radius:50%;border:3px solid white;box-shadow:0 0 0 4px rgba(59,130,246,0.3)`
|
|
|
+ const size = ghost ? 30 : 20
|
|
|
return L.divIcon({
|
|
|
className: '',
|
|
|
- iconSize: [20, 20],
|
|
|
- iconAnchor: [10, 10],
|
|
|
- html: `<div style="width:12px;height:12px;background:#3b82f6;border-radius:50%;border:3px solid white;box-shadow:0 0 0 4px rgba(59,130,246,0.3)"></div>`,
|
|
|
+ iconSize: [size, size],
|
|
|
+ iconAnchor: [size / 2, size / 2],
|
|
|
+ html: `<div style="${locStyle}"></div>`,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -117,7 +121,7 @@ export function createLeafletMapProvider(): MapProvider {
|
|
|
const type = options?.type || 'place'
|
|
|
const size = type === 'visitor' || type === 'location' ? 12 : 32
|
|
|
const icon = createIcon(type, size, ghost)
|
|
|
- const interactive = !ghost && type !== 'location'
|
|
|
+ const interactive = !ghost
|
|
|
const marker = L.marker([lat, lng], { icon, interactive }).addTo(map)
|
|
|
|
|
|
if (options?.title && !ghost) {
|