|
|
@@ -27,30 +27,31 @@ const MARKER_COLORS: Record<string, string> = {
|
|
|
|
|
|
function createIcon(type: string, size: number, ghost?: boolean): L.DivIcon {
|
|
|
const color = ghost
|
|
|
- ? 'radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0) 70%)'
|
|
|
+ ? 'radial-gradient(circle, rgba(255, 229, 0, 0.8) 0%, rgba(255, 229, 0, 0.2) 50%, rgba(255, 229, 0, 0) 70%)'
|
|
|
: 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:20px;height:20px;background:radial-gradient(circle, rgba(255, 229, 0, 0.8) 0%, rgba(255, 229, 0, 0.2) 50%, rgba(255, 229, 0, 0) 70%);border-radius:50%`
|
|
|
: `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
|
|
|
+ const s = ghost ? 20 : 20
|
|
|
return L.divIcon({
|
|
|
className: '',
|
|
|
- iconSize: [size, size],
|
|
|
- iconAnchor: [size / 2, size / 2],
|
|
|
+ iconSize: [s, s],
|
|
|
+ iconAnchor: [s / 2, s / 2],
|
|
|
html: `<div style="${locStyle}"></div>`,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ const ghostSize = 20
|
|
|
const style = ghost
|
|
|
- ? `width:${size * 2.5}px;height:${size * 2.5}px;background:${color};border-radius:50%;box-shadow:0 0 20px rgba(255, 215, 0, 0.4);pointer-events:none`
|
|
|
+ ? `width:${ghostSize}px;height:${ghostSize}px;background:${color};border-radius:50%`
|
|
|
: `width:${size}px;height:${size}px;background:${color};border-radius:50%;border:${size > 20 ? '3px' : '2px'} solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3)`
|
|
|
|
|
|
return L.divIcon({
|
|
|
className: '',
|
|
|
- iconSize: ghost ? [size * 2.5, size * 2.5] : [size, size],
|
|
|
- iconAnchor: ghost ? [size * 2.5 / 2, size * 2.5 / 2] : [size / 2, size / 2],
|
|
|
+ iconSize: ghost ? [ghostSize, ghostSize] : [size, size],
|
|
|
+ iconAnchor: ghost ? [ghostSize / 2, ghostSize / 2] : [size / 2, size / 2],
|
|
|
html: `<div style="${style}"></div>`,
|
|
|
})
|
|
|
}
|