added a form element and a map

This commit is contained in:
Quentin Roussel
2024-03-23 18:24:18 +01:00
parent 46c6ce7af2
commit b274bd4ad5
10 changed files with 108 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
'use client';
import React from 'react'
import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet'
import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css'
import "leaflet-defaulticon-compatibility";
import "leaflet/dist/leaflet.css";
export default function LiveMap({...props}) {
const position = [51.505, -0.09]
return (
<MapContainer {...props} center={position} zoom={13} scrollWheelZoom={true}>
<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={position}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</MapContainer>
)
}