RiddleData!

This commit is contained in:
LionTion committed 2026-10-11 17:15:59 +02:00
1 parent a77077b1ba
commit 0596d353bb
7 files changed
+216 -165

No files matched your search

+6 -6
View File
@@ -6,10 +6,10 @@ import 'maplibre-gl/dist/maplibre-gl.css';
import styles from '@/css/MapView.module.css';
export interface PlaceMarker {
id: string;
id: number;
lat: number;
lng: number;
title: string;
title?: string;
description?: string;
}
@@ -46,7 +46,7 @@ export default function MapView({
}: MapViewProps) {
const mapContainerRef = useRef<HTMLDivElement>(null);
const mapRef = useRef<maplibregl.Map | null>(null);
const activeMarkersRef = useRef<Map<string, maplibregl.Marker>>(new Map());
const activeMarkersRef = useRef<Map<number, maplibregl.Marker>>(new Map());
const [ mapReady, setMapReady ] = useState(false);
const [isCaching, setIsCaching] = useState(false);
@@ -109,9 +109,9 @@ export default function MapView({
setMapReady(true);
navigator.geolocation.getCurrentPosition((pos) => {
map.setCenter([pos.coords.longitude, pos.coords.latitude]);
geolocate.trigger();
//geolocate.trigger();
}, () => {
geolocate.trigger();
//geolocate.trigger();
});
});
@@ -131,7 +131,7 @@ export default function MapView({
const currentMarkers = activeMarkersRef.current;
const incomingMarkerIds = new Set(markers.map((m) => m.id));
console.log(incomingMarkerIds);
//console.log(incomingMarkerIds);
currentMarkers.forEach((markerInstance, id) => {
if (!incomingMarkerIds.has(id)) {