Skip to content

Commit 45a7203

Browse files
feat: simplify map attribution
1 parent d3a4206 commit 45a7203

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/components/Map.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ interface MapProps {
2020
center?: number[]
2121
}
2222

23+
const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
24+
const attribution = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
25+
2326
const Map: React.FC<MapProps> = ({ center }) => {
2427
return (
2528
<MapContainer
@@ -29,8 +32,8 @@ const Map: React.FC<MapProps> = ({ center }) => {
2932
className="h-[35vh] rounded-lg"
3033
>
3134
<TileLayer
32-
attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
33-
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
35+
url={url}
36+
attribution={attribution}
3437
/>
3538
{center && (
3639
<Marker position={center as L.LatLngExpression} />

0 commit comments

Comments
 (0)