File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import L from "leaflet" ;
2+ import { WaterServer } from "./assets" ;
23
34export interface MarkerData {
45 position : [ number , number ] ;
@@ -32,6 +33,13 @@ export const orangeIcon = L.icon({
3233 iconAnchor : [ 12.5 , 41 ] ,
3334} ) ;
3435
36+ export const waterServerIcon = L . icon ( {
37+ iconUrl : WaterServer ,
38+ iconSize : [ 28 , 28 ] ,
39+ iconAnchor : [ 14 , 28 ] ,
40+ popupAnchor : [ 0 , - 28 ] ,
41+ } ) ;
42+
3543export const vendingMachineMarkers : MarkerData [ ] = [
3644 { position : [ 1097 , 1504 ] } ,
3745 { position : [ 1096 , 1625 ] } ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { useGeolocation } from "../geolocation";
1717import {
1818 buildingPolygons ,
1919 waterServerMarkers ,
20+ waterServerIcon ,
2021 vendingMachineMarkers ,
2122 orangeIcon ,
2223} from "../markers" ;
@@ -303,7 +304,11 @@ export function MapPage() {
303304
304305 { wsMarkersVisible &&
305306 waterServerMarkers . map ( ( marker , idx ) => (
306- < Marker key = { `ws-${ idx } ` } position = { marker . position } >
307+ < Marker
308+ key = { `ws-${ idx } ` }
309+ position = { marker . position }
310+ icon = { waterServerIcon }
311+ >
307312 { marker . popup && < Popup > { marker . popup } </ Popup > }
308313 </ Marker >
309314 ) ) }
You can’t perform that action at this time.
0 commit comments