From 6c71a67a7473ee30c424ac63b4d2b27c38007d5e Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 22 Jul 2025 17:04:21 +0300 Subject: Add map --- src/components/widgets/Map.astro | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/components/widgets/Map.astro (limited to 'src/components') diff --git a/src/components/widgets/Map.astro b/src/components/widgets/Map.astro new file mode 100644 index 0000000..dae8253 --- /dev/null +++ b/src/components/widgets/Map.astro @@ -0,0 +1,60 @@ +--- +import type { Map as Props } from '~/types'; +import Headline from '~/components/ui/Headline.astro'; +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; + +const { + title = '', + subtitle = '', + tagline = '', + location = '', + height = 400, + lat = 53.1234, + lon = 18.0123, + + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props; + +// Use provided coordinates or default to Bydgoszcz, Miedzyń +const coordinates = { + lat: lat, + lon: lon +}; + +// Create map URL with proper coordinates +const mapUrl = `https://www.openstreetmap.org/export/embed.html?bbox=${coordinates.lon-0.01},${coordinates.lat-0.01},${coordinates.lon+0.01},${coordinates.lat+0.01}&layer=mapnik&marker=${coordinates.lat},${coordinates.lon}`; +--- + + + + + + \ No newline at end of file -- cgit v1.2.3