diff --git a/frontend/src/assets/img/DarkWood.jpg b/frontend/src/assets/img/DarkWood.jpg deleted file mode 100644 index d3b6c8e..0000000 Binary files a/frontend/src/assets/img/DarkWood.jpg and /dev/null differ diff --git a/frontend/src/assets/img/LOTRIcon.png b/frontend/src/assets/img/LOTRIcon.png deleted file mode 100644 index 56a3b05..0000000 Binary files a/frontend/src/assets/img/LOTRIcon.png and /dev/null differ diff --git a/frontend/src/assets/img/Landing_Page.png b/frontend/src/assets/img/Landing_Page.png deleted file mode 100644 index 3d7d7f7..0000000 Binary files a/frontend/src/assets/img/Landing_Page.png and /dev/null differ diff --git a/frontend/src/assets/img/Landing_Page.webp b/frontend/src/assets/img/Landing_Page.webp new file mode 100644 index 0000000..cbb618a Binary files /dev/null and b/frontend/src/assets/img/Landing_Page.webp differ diff --git a/frontend/src/assets/img/MiddleEarthBlanco.webp b/frontend/src/assets/img/MiddleEarthBlanco.webp new file mode 100644 index 0000000..bc452bc Binary files /dev/null and b/frontend/src/assets/img/MiddleEarthBlanco.webp differ diff --git a/frontend/src/assets/img/map_pin.svg b/frontend/src/assets/img/map_pin.svg deleted file mode 100644 index 6e9e8bd..0000000 --- a/frontend/src/assets/img/map_pin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/src/assets/img/parchment.jpg b/frontend/src/assets/img/parchment.jpg deleted file mode 100644 index 9747517..0000000 Binary files a/frontend/src/assets/img/parchment.jpg and /dev/null differ diff --git a/frontend/src/assets/img/pushpin.png b/frontend/src/assets/img/pushpin.png index 89a132f..91e0f9f 100644 Binary files a/frontend/src/assets/img/pushpin.png and b/frontend/src/assets/img/pushpin.png differ diff --git a/frontend/src/assets/less/App.less b/frontend/src/assets/less/App.less index 0c4f920..b3dd12d 100644 --- a/frontend/src/assets/less/App.less +++ b/frontend/src/assets/less/App.less @@ -73,7 +73,7 @@ body { } #mapBackground { - background-image: url('../img/Landing_Page.png'); + background-image: url('../img/Landing_Page.webp'); background-size: cover; background-repeat: no-repeat; background-position: center center; @@ -120,6 +120,7 @@ body { .leaflet-marker-icon:hover { filter: brightness(1.5); filter: saturate(1.5); + filter: drop-shadow(5px 5px 5px #000000); } .ant-menu.ant-menu-dark { diff --git a/frontend/src/components/pages/Map.tsx b/frontend/src/components/pages/Map.tsx index d7652ae..e40461e 100644 --- a/frontend/src/components/pages/Map.tsx +++ b/frontend/src/components/pages/Map.tsx @@ -1,5 +1,5 @@ import { ImageOverlay, MapContainer, Marker, Popup } from 'react-leaflet'; -import L, { CRS, LatLngBounds, LatLngBoundsExpression } from 'leaflet'; +import L, { CRS, LatLng, LatLngBounds, LatLngBoundsExpression } from 'leaflet'; import { useCallback, useState } from 'react'; import './../../assets/less/App.less'; import LiteYouTubeEmbed from 'react-lite-youtube-embed'; @@ -14,19 +14,8 @@ import { getMapMarkers, getXyCoords, log, } from '../../lib/utils'; import { MapLocation } from '../../lib/interfaces'; const mapBounds: LatLngBoundsExpression = new LatLngBounds([0, 0], [MAP_Y, MAP_X]); - -// Function to update marker position -const updateMarkerPosition = ( - mapMarkers: MapLocation[], - markerToUpdate: MapLocation, - newPosition: L.LatLngExpression -): MapLocation[] => { - return mapMarkers.map(marker => - marker === markerToUpdate - ? { ...marker, location: newPosition } - : marker - ); -}; +const mapCenter: LatLng = new LatLng(1953,4930); +const defaultZoom = 0.1; export const LOTRMap = (props: any) => { const [mapIsLoaded, setMapIsLoaded] = useState(false); @@ -43,6 +32,19 @@ export const LOTRMap = (props: any) => { MAP_URL = NEW_MAP_URL; } + // Function to update marker position + const updateMarkerPosition = ( + markers: MapLocation[], + markerToUpdate: MapLocation, + newPosition: L.LatLngExpression + ): MapLocation[] => { + return markers.map(marker => + marker === markerToUpdate + ? { ...marker, location: newPosition } + : marker + ); + }; + const exportMapMarkers = () => { const jsonOutput = { locations: mapMarkers @@ -135,23 +137,24 @@ export const LOTRMap = (props: any) => { />