diff --git a/src/src/app/components/trip/trip.component.ts b/src/src/app/components/trip/trip.component.ts index f144546..c613394 100644 --- a/src/src/app/components/trip/trip.component.ts +++ b/src/src/app/components/trip/trip.component.ts @@ -500,6 +500,7 @@ export class TripComponent implements AfterViewInit { text: this.selectedItem?.text || "", lat: lat, lng: lng, + time: this.selectedItem?.time || "", }; this.tripMapTemporaryMarker = tripDayMarker(item).addTo(this.map!); this.map?.fitBounds([[lat, lng]], { padding: [60, 60] }); @@ -563,6 +564,7 @@ export class TripComponent implements AfterViewInit { text: item.text, isPlace: !!item.place, idx: idx, + time: item.time, }; if (item.lat && item.lng) @@ -684,6 +686,7 @@ export class TripComponent implements AfterViewInit { lat: item.lat, lng: item.lng, isPlace: !!item.place, + time: item.time, }; if (item.place && item.place) return { @@ -691,6 +694,7 @@ export class TripComponent implements AfterViewInit { lat: item.place.lat, lng: item.place.lng, isPlace: true, + time: item.time, }; return undefined; }) diff --git a/src/src/app/shared/map.ts b/src/src/app/shared/map.ts index 27caecf..295eccf 100644 --- a/src/src/app/shared/map.ts +++ b/src/src/app/shared/map.ts @@ -72,6 +72,7 @@ export function tripDayMarker(item: { text: string; lat: number; lng: number; + time?: string; }): L.Marker { const marker = new L.Marker([item.lat!, item.lng], { icon: L.divIcon({ @@ -83,7 +84,7 @@ export function tripDayMarker(item: { const touchDevice = "ontouchstart" in window; if (!touchDevice) { marker.bindTooltip( - `
${item.text}
`, + `
${item.time}
${item.text}
`, { direction: "right", offset: [10, 0],