diff --git a/src/components/ui/MapModal.module.css b/src/components/ui/MapModal.module.css index f826deb..fbaf6b2 100644 --- a/src/components/ui/MapModal.module.css +++ b/src/components/ui/MapModal.module.css @@ -76,4 +76,25 @@ border-radius: 4px; cursor: pointer; } - \ No newline at end of file + + .mapLinks { + margin-top: 10px; + gap: 2px; + } + + .mapLinks a { + display: inline-block; + color: #007aff; + text-align: center; + border-radius: 4px; + font-weight: 500; + } + + .mapLinks a:hover { + text-decoration: underline; + } + .mapLinks .icon { + margin-right: 8px; + display: inline-flex; + align-items: center; + } \ No newline at end of file diff --git a/src/components/ui/MapModal.tsx b/src/components/ui/MapModal.tsx index 920becf..0361081 100644 --- a/src/components/ui/MapModal.tsx +++ b/src/components/ui/MapModal.tsx @@ -42,13 +42,13 @@ const MapModal: React.FC = ({ mapRef.current = new mapboxgl.Map({ container: mapContainerRef.current, style: 'mapbox://styles/mapbox/streets-v11', - center: [center[1],center[0]], + center: [center[1], center[0]], zoom: zoom, }); // Add the marker to the specified location new mapboxgl.Marker() - .setLngLat([markerLocation[1],markerLocation[0]]) + .setLngLat([markerLocation[1], markerLocation[0]]) .addTo(mapRef.current); return () => mapRef.current?.remove(); @@ -57,6 +57,10 @@ const MapModal: React.FC = ({ if (!isOpen) return null; + // URLs for Google Maps and Apple Maps + const googleMapsUrl = `https://www.google.com/maps?q=${center[0]},${center[1]}`; + const appleMapsUrl = `https://maps.apple.com/?ll=${center[0]},${center[1]}`; + return (
e.stopPropagation()}> @@ -66,11 +70,42 @@ const MapModal: React.FC = ({

{info.title}

{subTitle}

-

Address

+

Address

{info.address}

-

- {`Image`} + Image +
+