This commit is contained in:
Maximilian Harz 2025-05-22 20:11:26 +02:00
parent 5e622c448d
commit ff18ad3292
2 changed files with 13 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import { useContext, useMemo, useState } from 'react'
import { Marker, Tooltip } from 'react-leaflet'
import { useAppState } from '#components/AppShell/hooks/useAppState'
import {
useFilterTags,
useIsLayerVisible,
@ -33,6 +34,8 @@ export const PopupView = ({ children }: { children?: React.ReactNode }) => {
const filterTags = useFilterTags()
const appState = useAppState()
const items = useItems()
const getItemTags = useGetItemTags()
@ -149,7 +152,13 @@ export const PopupView = ({ children }: { children?: React.ReactNode }) => {
selectPosition && setMarkerClicked(item)
},
}}
icon={MarkerIconFactory(markerShape, color1, color2, item.markerIcon ?? markerIcon)}
icon={MarkerIconFactory(
markerShape,
color1,
color2,
item.markerIcon ?? markerIcon,
appState.assetsApi.url,
)}
position={[latitude, longitude]}
>
<ItemViewPopup

View File

@ -1,12 +1,14 @@
import { createContext } from 'react'
import type { MarkerIcon } from '#types/MarkerIcon'
interface LayerContextType {
name: string
markerDefaultColor: string
markerDefaultColor2: string
markerShape: string
markerIcon: string
menuText: string
markerIcon?: MarkerIcon
}
const LayerContext = createContext<LayerContextType>({
@ -14,7 +16,6 @@ const LayerContext = createContext<LayerContextType>({
markerDefaultColor: '',
markerDefaultColor2: '',
markerShape: '',
markerIcon: '',
menuText: '',
})