This commit is contained in:
dancingCycle 2022-09-14 15:33:48 +02:00
parent 6e78f00b87
commit 4d89166ae8
1 changed files with 12 additions and 1 deletions

View File

@ -1,9 +1,20 @@
import React from 'react';
import { MapContainer, TileLayer, useMap } from 'react-leaflet'
import { MapContainer, TileLayer, useMap, Marker, Popup } from 'react-leaflet'
const Map = () => {
return (
<>
<h2>Map</h2>
<MapContainer center={[51.505, -0.09]} zoom={13} scrollWheelZoom={false}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<Marker position={[51.505, -0.09]}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</MapContainer>
</>
);
}