File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ interface MapProps {
20
20
center ?: number [ ]
21
21
}
22
22
23
+ const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" ;
24
+ const attribution = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' ;
25
+
23
26
const Map : React . FC < MapProps > = ( { center } ) => {
24
27
return (
25
28
< MapContainer
@@ -29,8 +32,8 @@ const Map: React.FC<MapProps> = ({ center }) => {
29
32
className = "h-[35vh] rounded-lg"
30
33
>
31
34
< TileLayer
32
- attribution = '© <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 }
34
37
/>
35
38
{ center && (
36
39
< Marker position = { center as L . LatLngExpression } />
You can’t perform that action at this time.
0 commit comments