diff --git a/front/src/components/Leaflet.astro b/front/src/components/Leaflet.astro new file mode 100644 index 0000000..fb05b8a --- /dev/null +++ b/front/src/components/Leaflet.astro @@ -0,0 +1,55 @@ +--- +import type { string } from 'astro/zod' +import type { Marker } from 'leaflet' + +export interface Props { + latitude: number + longitude: number + zoom: number + /** the DOM ID of a
element */ + container: string + /** https://leafletjs.com/reference.html#tilelayer */ + tileLayer: string + /** Most tile servers require attribution. */ + attribution: string + containerstyle?: string +} + +const { latitude, longitude, zoom, container, tileLayer, attribution, containerstyle = "height: 61.8vh", class } = Astro.props +--- + + + +
+ + \ No newline at end of file diff --git a/front/src/layouts/Layout.astro b/front/src/layouts/Layout.astro index 7b552be..8ccef1b 100644 --- a/front/src/layouts/Layout.astro +++ b/front/src/layouts/Layout.astro @@ -20,32 +20,3 @@ const { title } = Astro.props; - diff --git a/front/src/pages/maps.astro b/front/src/pages/maps.astro index 1675880..095bae5 100644 --- a/front/src/pages/maps.astro +++ b/front/src/pages/maps.astro @@ -1,17 +1,32 @@ --- +import Leaflet from 'components/Leaflet.astro'; import Layout from 'layouts/Layout.astro'; -import { Marker, Popup } from 'leaflet'; -import { MapContainer } from 'react-leaflet' +// import { Marker, Popup } from 'leaflet'; +// import type { only } from 'node:test'; +// import { MapContainer, TileLayer } from 'react-leaflet' --- - - - + + +