Merge pull request #356 from danditomaso/add_attribution_control_to_map
feat: Add AttributionControl to Map to comply with OSM license requirements
This commit is contained in:
+5
-1
@@ -16,7 +16,7 @@ import {
|
|||||||
ZoomOutIcon,
|
ZoomOutIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { useCallback, useEffect, useState } from "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";
|
import MapGl from "react-map-gl/maplibre";
|
||||||
|
|
||||||
export const MapPage = (): JSX.Element => {
|
export const MapPage = (): JSX.Element => {
|
||||||
@@ -126,6 +126,7 @@ export const MapPage = (): JSX.Element => {
|
|||||||
// }}
|
// }}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
attributionControl={false}
|
attributionControl={false}
|
||||||
renderWorldCopies={false}
|
renderWorldCopies={false}
|
||||||
maxPitch={0}
|
maxPitch={0}
|
||||||
@@ -142,6 +143,9 @@ export const MapPage = (): JSX.Element => {
|
|||||||
longitude: 0,
|
longitude: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<AttributionControl
|
||||||
|
style={{ background: darkMode ? "#ffffff" : "", color: darkMode ? "black" : "" }}
|
||||||
|
/>
|
||||||
{waypoints.map((wp) => (
|
{waypoints.map((wp) => (
|
||||||
<Marker
|
<Marker
|
||||||
key={wp.id}
|
key={wp.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user