Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pages/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -126,6 +126,7 @@ export const MapPage = (): JSX.Element => {
// }}

// @ts-ignore

attributionControl={false}
renderWorldCopies={false}
maxPitch={0}
Expand All @@ -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}
Expand Down
Loading