From b57475551ce64f3f668cf51812b55e9558e8135f Mon Sep 17 00:00:00 2001 From: maxencejouannet Date: Wed, 11 Jun 2025 11:05:34 +0200 Subject: [PATCH] add pin for quete page --- .../components/leaflet-map/leaflet-map.component.ts | 13 ++++++++++++- src/app/model/Pin.ts | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/components/leaflet-map/leaflet-map.component.ts b/src/app/components/leaflet-map/leaflet-map.component.ts index 573d3ee..312b6e1 100644 --- a/src/app/components/leaflet-map/leaflet-map.component.ts +++ b/src/app/components/leaflet-map/leaflet-map.component.ts @@ -257,6 +257,16 @@ export class LeafletMapComponent implements OnInit { `); + const poiPin = this.createDivIcon(` + + + + `); + const filteredPins = this.allPins.filter((pin) => { const pinCountry = this.pinCountries[pin.id]; const matchesCountry = this.selectedCountry @@ -273,8 +283,9 @@ export class LeafletMapComponent implements OnInit { }); filteredPins.forEach((pin) => { + const markerIcon = pin.is_poi ? poiPin : visitedIcon; const marker = L.marker(pin.location as [number, number], { - icon: visitedIcon, + icon: markerIcon, }); marker.on('popupclose', () => { diff --git a/src/app/model/Pin.ts b/src/app/model/Pin.ts index 579e9bd..d3e3ba3 100644 --- a/src/app/model/Pin.ts +++ b/src/app/model/Pin.ts @@ -5,6 +5,7 @@ export interface Pin { title: string; files: string[]; description: string; + is_poi: boolean; user_id: string; date?: string; }