"use client" import { useRef } from 'react'; import MapGL, { Marker, MapRef } from 'react-map-gl/maplibre'; import maplibregl from 'maplibre-gl'; import 'maplibre-gl/dist/maplibre-gl.css'; const KARLSRUHE: { longitude: number, latitude: number } = { longitude: 8.4037, latitude: 49.0069 }; export default function Map() { const mapRef = useRef(null); const onMapLoad = () => { mapRef.current?.flyTo({ center: [KARLSRUHE.longitude, KARLSRUHE.latitude], zoom: 10, speed: 0.5, curve: 1, essential: true }); }; return (
OpenStreetMap, © CARTO', }, }, layers: [ { id: "carto-dark-layer", type: "raster", source: "carto-dark", minzoom: 0, maxzoom: 22, }, ], }} attributionControl={false} >
); }