28 lines
731 B
JavaScript
28 lines
731 B
JavaScript
import {MapContainer, Marker, Popup, TileLayer} from 'react-leaflet'
|
|
|
|
import './App.css';
|
|
|
|
function Map() {
|
|
return (
|
|
<MapContainer center={[51.505, -0.09]} zoom={13} scrollWheelZoom={false} style={{height: "600px"}}>
|
|
<TileLayer
|
|
attribution='© <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>
|
|
)
|
|
}
|
|
|
|
function App() {
|
|
return <>
|
|
<Map></Map>
|
|
</>
|
|
}
|
|
|
|
export default App;
|