diff --git a/apps/fishing-map/features/map/map.slice.ts b/apps/fishing-map/features/map/map.slice.ts index 1f0c0836a2..69ddd31cac 100644 --- a/apps/fishing-map/features/map/map.slice.ts +++ b/apps/fishing-map/features/map/map.slice.ts @@ -475,10 +475,21 @@ export const fetchClusterEventThunk = createAsyncThunk( const vesselInfoIds = vesselInfo.selfReportedInfo?.map((s) => s.id) return vesselInfoIds.includes(interaction.id) }) + const infoDataset = selectDatasetById(vesselInfo?.dataset as string)(state) + const trackFromRelatedDataset = infoDataset || vesselInfo?.dataset + const trackDatasetId = getRelatedDatasetByType( + trackFromRelatedDataset, + DatasetTypes.Tracks, + { fullDatasetAllowed: !guestUser } + )?.id + const trackDataset = selectDatasetById(trackDatasetId as string)(state) + return { id: interaction.id, ...vesselInfo, dataset: infoDatasets[0] as any, + infoDataset, + trackDataset, events: interaction.events, } as ExtendedFeatureVessel } diff --git a/apps/fishing-map/features/vessel/VesselPin.tsx b/apps/fishing-map/features/vessel/VesselPin.tsx index 61fc573f4b..d11f439e94 100644 --- a/apps/fishing-map/features/vessel/VesselPin.tsx +++ b/apps/fishing-map/features/vessel/VesselPin.tsx @@ -68,7 +68,10 @@ function VesselPin({ const dispatch = useAppDispatch() const { upsertDataviewInstance, deleteDataviewInstance } = useDataviewInstancesConnect() const vesselsInWorkspace = useSelector(selectTrackDataviews) - const infoDatasetId = vessel?.dataset || vesselToResolve?.datasetId || '' + const infoDatasetId = + typeof vessel?.dataset === 'string' + ? vessel?.dataset + : (vessel?.dataset as any)?.id || vesselToResolve?.datasetId || '' const infoDataset = useSelector(selectDatasetById(infoDatasetId)) const vesselInWorkspace = getVesselInWorkspace( vesselsInWorkspace, diff --git a/libs/deck-layers/src/layers/fourwings/clusters/FourwingsClustersLayer.ts b/libs/deck-layers/src/layers/fourwings/clusters/FourwingsClustersLayer.ts index 2f3d1d0be6..0a9b806af0 100644 --- a/libs/deck-layers/src/layers/fourwings/clusters/FourwingsClustersLayer.ts +++ b/libs/deck-layers/src/layers/fourwings/clusters/FourwingsClustersLayer.ts @@ -158,6 +158,7 @@ export class FourwingsClustersLayer extends CompositeLayer< subcategory: this.props.subcategory, startTime: this.props.startTime, endTime: this.props.endTime, + eventType: this.props.eventType, uniqueFeatureInteraction: true, expansionZoom, }