Skip to content

Commit

Permalink
Merge pull request #356 from danditomaso/add_attribution_control_to_map
Browse files Browse the repository at this point in the history
feat: Add AttributionControl to Map to comply with OSM license requirements
  • Loading branch information
fifieldt authored Dec 29, 2024
2 parents fc24a38 + 856556c commit 1087c68
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 1087c68

Please sign in to comment.