1
|
// Wrapper around leaflet -> https://react-leaflet.js.org/docs/start-setup/
|
2
|
import { MapContainer, Marker, Popup, SVGOverlay, TileLayer } from 'react-leaflet'
|
3
|
import MapBoxExample from './MapBoxExample'
|
4
|
|
5
|
const LeafletExample = () => {
|
6
|
|
7
|
return (
|
8
|
<>
|
9
|
<h1>Leaflet Example</h1>
|
10
|
<MapContainer style={ { height: 450 } } center={ [51.505, -0.09] } zoom={ 13 }>
|
11
|
<TileLayer
|
12
|
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
13
|
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
14
|
/>
|
15
|
<Marker position={ [51.505, -0.09] }>
|
16
|
<Popup>
|
17
|
<MapBoxExample />
|
18
|
</Popup>
|
19
|
</Marker>
|
20
|
</MapContainer>
|
21
|
</>
|
22
|
)
|
23
|
}
|
24
|
|
25
|
export default LeafletExample
|