diff --git a/src/app/regionen/[regionSlug]/_components/Map/Map.tsx b/src/app/regionen/[regionSlug]/_components/Map/Map.tsx
index bf313c355..f0a0445fa 100644
--- a/src/app/regionen/[regionSlug]/_components/Map/Map.tsx
+++ b/src/app/regionen/[regionSlug]/_components/Map/Map.tsx
@@ -135,6 +135,7 @@ export const Map: React.FC = () => {
style={{ width: '100%', height: '100%' }}
mapStyle={process.env.NEXT_PUBLIC_APP_ORIGIN + '/api/map/style'}
interactiveLayerIds={interactiveLayerIds}
+ // reuseMaps={true}
// onMouseMove={}
// onLoad={handleInspect}
cursor={cursorStyle}
diff --git a/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/LayerVerificationStatus.tsx b/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/LayerVerificationStatus.tsx
deleted file mode 100644
index 62b943c1d..000000000
--- a/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/LayerVerificationStatus.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import React from 'react'
-import { Layer, LayerProps } from 'react-map-gl/maplibre'
-import { useMapStateInteraction } from '../../../_hooks/mapStateInteraction/useMapStateInteraction'
-
-let errorLogged = false
-
-export const LayerVerificationStatus = (parentLayerProps: LayerProps) => {
- const { localUpdates } = useMapStateInteraction()
-
- const props = {
- ...parentLayerProps,
- paint: structuredClone(parentLayerProps.paint),
- }
-
- let colorApproved: string, colorRejected: string, colorNull: string
- try {
- const [_0, _1, _a, _2, _r, _n] = props.paint!['line-color']
- colorApproved = _a || 'hsl(107, 88%, 57%)'
- colorRejected = _r || 'hsl(0, 100%, 41%)'
- colorNull = _n || '#fa7fe2'
- } catch (e) {
- if (!errorLogged) {
- console.error(e)
- errorLogged = true
- }
- return
- }
-
- const currentValues = new Map()
-
- localUpdates.forEach(({ osm_id, verified }) => currentValues.set(osm_id, verified === 'approved'))
-
- const cond: any[] = (props.paint!['line-color'] = ['case'])
- currentValues.forEach((approved, osmId) => {
- cond.push(['==', ['get', 'osm_id'], osmId], approved ? colorApproved : colorRejected)
- })
-
- cond.push(
- ['==', ['get', 'verified'], 'approved'],
- colorApproved,
- ['==', ['get', 'verified'], 'rejected'],
- colorRejected,
- colorNull,
- )
-
- return
-}
diff --git a/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/SourcesAndLayers.tsx b/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/SourcesAndLayers.tsx
index 2fa98f816..ed4a8e1b7 100644
--- a/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/SourcesAndLayers.tsx
+++ b/src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/SourcesAndLayers.tsx
@@ -1,6 +1,6 @@
import { FilterSpecification } from 'maplibre-gl'
import React from 'react'
-import { Layer, LayerProps, Source } from 'react-map-gl/maplibre'
+import { Layer, Source } from 'react-map-gl/maplibre'
import { useMapDebugState } from 'src/app/regionen/[regionSlug]/_hooks/mapStateInteraction/useMapDebugState'
import { useBackgroundParam } from 'src/app/regionen/[regionSlug]/_hooks/useQueryState/useBackgroundParam'
import { useCategoriesConfig } from 'src/app/regionen/[regionSlug]/_hooks/useQueryState/useCategoriesConfig/useCategoriesConfig'
@@ -12,7 +12,6 @@ import {
} from '../../utils/createKeyUtils/createKeyUtils'
import { layerVisibility } from '../utils/layerVisibility'
import { LayerHighlight } from './LayerHighlight'
-import { LayerVerificationStatus } from './LayerVerificationStatus'
import { beforeId } from './utils/beforeId'
import { wrapFilterWithAll } from './utils/filterUtils/wrapFilterWithAll'
@@ -103,19 +102,9 @@ export const SourcesAndLayers = () => {
...(layer.maxzoom ? { maxzoom: layer.maxzoom } : {}),
}
- // The verification style layer in Mapbox Studio has to include this string
- const isVerificationStatusLayer = layer.id.search('verification-status') != -1
-
return (
- {isVerificationStatusLayer ? (
-
- ) : (
-
- )}
+
} & Pick) {
+ const { mainMap } = useMap()
const user = useCurrentUser()
const regionSlug = useRegionSlug()
const [createBikelaneVerificationMutation] = useMutation(createBikelaneVerification)
// Reminder: We cannot use useForm() here. Instead we need to use useFormContext() from a child component of