diff --git a/frontend/src/components/Map/components/ViewPointHD/AnnotationItem.tsx b/frontend/src/components/Map/components/ViewPointHD/AnnotationItem.tsx index 5120f7ff9..a5dd51af8 100644 --- a/frontend/src/components/Map/components/ViewPointHD/AnnotationItem.tsx +++ b/frontend/src/components/Map/components/ViewPointHD/AnnotationItem.tsx @@ -6,6 +6,7 @@ import { Circle, CircleMarker, Marker, Polygon, Polyline, Tooltip, useMap } from import Image from 'next/image'; import { TrekMarker } from 'components/Map/Markers/TrekMarker'; import { optimizeAndDefineColor } from 'stylesheet'; +import { cn } from 'services/utils/cn'; type Props = { geometry: Geometry; @@ -39,12 +40,12 @@ const MetaData = ({ properties }: { properties: GeoJsonProperties }) => { return ( - + {Boolean(properties.category?.label) && ( - <> + {properties.category.label} - + )} {properties.name} @@ -70,6 +71,8 @@ export const AnnotationItem = ({ geometry, properties, id }: Props) => { ); } + const annotationType = properties?.category?.id as string; + if (geometry.type === 'Point' || geometry.type === 'MultiPoint') { const coordinatesAsMultiPoint = geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates; @@ -93,7 +96,10 @@ export const AnnotationItem = ({ geometry, properties, id }: Props) => { } return ( { return ( [lng, lat])} > @@ -140,7 +149,14 @@ export const AnnotationItem = ({ geometry, properties, id }: Props) => { const radius = Math.sqrt(Math.pow(diagonal, 2) / 2); return ( - + ); @@ -152,7 +168,10 @@ export const AnnotationItem = ({ geometry, properties, id }: Props) => { {coordinatesAsMultiPolygon.map((group, index) => ( line.map<[number, number]>(([lat, lng]) => [lng, lat]))} >