diff --git a/frontend/public/six_to_twelve.png b/frontend/public/six_to_twelve.png new file mode 100644 index 0000000..dde4aa9 Binary files /dev/null and b/frontend/public/six_to_twelve.png differ diff --git a/frontend/public/three_to_six.png b/frontend/public/three_to_six.png new file mode 100644 index 0000000..38d54b7 Binary files /dev/null and b/frontend/public/three_to_six.png differ diff --git a/frontend/public/three_to_twelve.png b/frontend/public/three_to_twelve.png new file mode 100644 index 0000000..338908f Binary files /dev/null and b/frontend/public/three_to_twelve.png differ diff --git a/frontend/public/user_location.png b/frontend/public/user_location.png new file mode 100644 index 0000000..3425268 Binary files /dev/null and b/frontend/public/user_location.png differ diff --git a/frontend/public/zero_to_three.png b/frontend/public/zero_to_three.png new file mode 100644 index 0000000..cb8d82e Binary files /dev/null and b/frontend/public/zero_to_three.png differ diff --git a/frontend/src/Components/Common/Map.jsx b/frontend/src/Components/Common/Map.jsx index 90ed5ef..c484a92 100644 --- a/frontend/src/Components/Common/Map.jsx +++ b/frontend/src/Components/Common/Map.jsx @@ -4,10 +4,10 @@ import { Link } from 'react-router-dom'; import '../../static/stylesheets/map.css'; import { ReactComponent as Terrain } from "../../static/icons/layers_8.svg"; import { ReactComponent as Location } from "../../static/icons/location.svg"; +import { ReactComponent as Legend } from "../../static/icons/legend.svg"; const libraries = ['places']; -const plovdiv = { lat: 42.1354, lng: 24.7453 }; export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => { const [marker, setMarker] = useState(null); @@ -20,6 +20,7 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => { const [directionsResponse, setDirectionsResponse] = useState(null); const [requestDirections, setRequestDirections] = useState(true); const [zoomLevel, setZoomLevel] = useState(17); + const [showLegend, setShowLegend] = useState(false); const infoBoxRef = useRef(); const onMapLoad = (map) => { @@ -111,6 +112,10 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => { } }; + const handleLegendHover = () => { + setShowLegend(true); + } + const setTitle = () => { const infoWindowElement = document.querySelector('.gm-style-iw-ch'); if (infoWindowElement) { @@ -261,8 +266,34 @@ export const Map = ({ onCoordinatesChange, currentPlaygroundCords }) => { directions: directionsResponse, suppressMarkers: true }} />} + {showLegend && +
Легенда
+Моята локация
+За деца от 0 до 3 години
+За деца от 3 до 6 години
+За деца от 3 до 12 години
+За деца от 6 до 12 години
+