Skip to content

Commit

Permalink
new marker added
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNasayo committed Oct 30, 2024
1 parent 3461861 commit d91cb41
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
Binary file added src/src/assets/img/blackMarker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/src/assets/img/whiteMarker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/src/components/legend/Legend.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
.legend > div {
cursor: pointer;
}
.iconBlack {
width: 32px;
height: 32px;
}
2 changes: 2 additions & 0 deletions src/src/components/legend/Legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import yellowImg from "../../assets/img/yellowMarker.png";
import brownImg from "../../assets/img/brownMarker.png";
import redImg from "../../assets/img/redMarker.png";
import grayImg from "../../assets/img/grayMarker.png";
import blackIcon from "../../assets/img/blackMarker.png";
import { useTranslation } from "react-i18next";

function Legend({ setFilter, filter }) {
Expand Down Expand Up @@ -57,6 +58,7 @@ function Legend({ setFilter, filter }) {
<img src={grayImg} alt="" className="me-1" />
<p className="m-0">{t("monitoring.seasonally")}</p>
</div>

</div>
);
}
Expand Down
10 changes: 6 additions & 4 deletions src/src/pages/monitoring/Monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function Visualization() {
iconUrl: require(`../../assets/img/redMarker.png`),
iconSize: [32, 32],
});
const blackIcon = new L.Icon({
iconUrl: require(`../../assets/img/blackMarker.png`),
iconSize: [50, 50],
});
const grayIcon = new L.Icon({
iconUrl: require(`../../assets/img/grayMarker.png`),
iconSize: [32, 32],
Expand Down Expand Up @@ -160,12 +164,10 @@ function Visualization() {
}, [filter, waterpoints]);
const popupData = (wp) => {
if (wp.name === "Kitala") {
if (!filter.gray) {
return null;
}


return (
<Marker position={[wp.lat, wp.lon]} icon={grayIcon} key={wp.id}>
<Marker position={[wp.lat, wp.lon]} icon={blackIcon} key={wp.id}>
<Popup closeButton={false} className="popup" maxWidth={200}>
<div className="text-center">
<WpLabel waterpoint={wp} />
Expand Down

0 comments on commit d91cb41

Please sign in to comment.