mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 02:10:18 +01:00
24 lines
900 B
JavaScript
24 lines
900 B
JavaScript
'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='© <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>
|
|
)
|
|
}
|