Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend - Cleanup map #230

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/src/components/DataView/DataView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ function DataView() {
<Fragment>
<div className="dataview-header-container">
<b className="dataview-header-title">
<MapPin size={20} /> Nuremberg
<MapPin size={20} />
{currentMapCache.loadedCoordinates.lat.toFixed(6)},{" "}
{currentMapCache.loadedCoordinates.lng.toFixed(6)}
</b>
<Box id="filter-panel" style={{ maxWidth: "18rem", width: "100%" }}>
<TextField
Expand Down
30 changes: 4 additions & 26 deletions frontend/src/components/MapView/MapOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
//import { useState } from "react";
//import { Stack } from "@phosphor-icons/react";
//import { useState } from "react";
import { ArrowsClockwise } from "@phosphor-icons/react";
import { StackSimple } from "@phosphor-icons/react";
import "./MapOptions.css";
import { Tooltip } from "@mui/material";
//import SearchPopUp from "../PopUp/SearchPopUp";
import SearchBar from "../PopUp/SearchBar";

interface MapOptionsProps {
toggleShowSatellite: () => void;
}

const MapOptions: React.FC<MapOptionsProps> = ({ toggleShowSatellite }) => {
// Stores the state of if the search popup is open
//const [ifOpenedDialog, setIfOpenedDialog] = useState(false);
// const toggleIfOpenedDialog = () => {
// setIfOpenedDialog(!ifOpenedDialog);
// };

return (
<div className="map-options-container">
<div className="search-bar">
<SearchBar/>
<SearchBar />
</div>
{/* <Tooltip arrow title="Search for an address" placement="right">
<div className="search-map-icon-container leaflet-bar leaflet-control leaflet-control-custom">
<MagnifyingGlass
className="search-map-icon"
onClick={toggleIfOpenedDialog}
/>
</div>
</Tooltip> */}
<Tooltip arrow title="Switch layers" placement="right">
<div className="layers-map-icon-container leaflet-touch leaflet-bar leaflet-control leaflet-control-custom">
<ArrowsClockwise
/** ArrowsClockwise requested from po. stack only if we have more than 2 backgrounds */ className="layers-map-icon"
<StackSimple
className="layers-map-icon"
onClick={toggleShowSatellite}
/>
</div>
</Tooltip>
{/* <SearchPopUp
onToggleIfOpenedDialog={toggleIfOpenedDialog}
ifOpenedDialog={ifOpenedDialog}
/> */}
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MapView/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const MapView: React.FC<MapViewProps> = ({ datasetId }) => {
)}
{tabProps && tabProps.dataset.type === MarkersTypes.Markers && (
<ZoomWarningLabel
label="Zoom in to see marker"
label="Zoom in to see the markers"
minZoom={minZoomForLabel}
/>
)}
Expand Down
Loading