feat: Add AttributionControl to Map to comply with OSM license requirements

This commit is contained in:
Dan Ditomaso
2024-12-28 20:21:40 -05:00
parent fc24a389c0
commit 856556c12b
+5 -1
View File
@@ -16,7 +16,7 @@ import {
ZoomOutIcon,
} from "lucide-react";
import { useCallback, useEffect, useState } from "react";
import { Marker, useMap } from "react-map-gl";
import { AttributionControl, Marker, useMap } from "react-map-gl";
import MapGl from "react-map-gl/maplibre";
export const MapPage = (): JSX.Element => {
@@ -126,6 +126,7 @@ export const MapPage = (): JSX.Element => {
// }}
// @ts-ignore
attributionControl={false}
renderWorldCopies={false}
maxPitch={0}
@@ -142,6 +143,9 @@ export const MapPage = (): JSX.Element => {
longitude: 0,
}}
>
<AttributionControl
style={{ background: darkMode ? "#ffffff" : "", color: darkMode ? "black" : "" }}
/>
{waypoints.map((wp) => (
<Marker
key={wp.id}