|
|
@@ -11,7 +11,7 @@ export interface MapBounds {
|
|
|
}
|
|
|
|
|
|
export interface MarkerOptions {
|
|
|
- type?: 'place' | 'studio' | 'visitor'
|
|
|
+ type?: 'place' | 'studio' | 'visitor' | 'location'
|
|
|
title?: string
|
|
|
onClick?: () => void
|
|
|
ghost?: boolean
|
|
|
@@ -115,9 +115,10 @@ export function createLeafletMapProvider(): MapProvider {
|
|
|
if (!map) return
|
|
|
const ghost = options?.ghost
|
|
|
const type = options?.type || 'place'
|
|
|
- const size = type === 'visitor' ? 12 : 32
|
|
|
+ const size = type === 'visitor' || type === 'location' ? 12 : 32
|
|
|
const icon = createIcon(type, size, ghost)
|
|
|
- const marker = L.marker([lat, lng], { icon, interactive: !ghost }).addTo(map)
|
|
|
+ const interactive = !ghost && type !== 'location'
|
|
|
+ const marker = L.marker([lat, lng], { icon, interactive }).addTo(map)
|
|
|
|
|
|
if (options?.title && !ghost) {
|
|
|
marker.bindTooltip(options.title, { direction: 'top' })
|