diff --git a/app/src/UI/Map2/helpers/recordset-layers.ts b/app/src/UI/Map2/helpers/recordset-layers.ts index aa683285e..f8dd9d1e5 100644 --- a/app/src/UI/Map2/helpers/recordset-layers.ts +++ b/app/src/UI/Map2/helpers/recordset-layers.ts @@ -115,17 +115,31 @@ export const createActivityLayer = (map: maplibregl.Map, layer: any, mode, API_B if (layer?.layerState?.colorScheme) { return [ 'match', - ['get', 'type'], - 'Biocontrol', - layer.layerState.colorScheme['Biocontrol'] || FALLBACK_COLOR, - 'FREP', - layer.layerState.colorScheme['FREP'] || FALLBACK_COLOR, - 'Monitoring', - layer.layerState.colorScheme['Monitoring'] || FALLBACK_COLOR, - 'Treatment', - layer.layerState.colorScheme['Treatment'] || FALLBACK_COLOR, - 'Observation', - layer.layerState.colorScheme['Observation'] || FALLBACK_COLOR, + ['get', 'activity_subtype'], + 'Activity_Biocontrol_Collection', + layer.layerState.colorScheme['Activity_Biocontrol_Collection'] || FALLBACK_COLOR, + 'Activity_Biocontrol_Release', + layer.layerState.colorScheme['Activity_Biocontrol_Release'] || FALLBACK_COLOR, + 'Activity_Monitoring_BiocontrolDispersal_TerrestrialPlant', + layer.layerState.colorScheme['Activity_Monitoring_BiocontrolDispersal_TerrestrialPlant'] || FALLBACK_COLOR, + 'Activity_Monitoring_BiocontrolRelease_TerrestrialPlant', + layer.layerState.colorScheme['Activity_Monitoring_BiocontrolRelease_TerrestrialPlant'] || FALLBACK_COLOR, + 'Activity_Monitoring_ChemicalTerrestrialAquaticPlant', + layer.layerState.colorScheme['Activity_Monitoring_ChemicalTerrestrialAquaticPlant'] || FALLBACK_COLOR, + 'Activity_Monitoring_MechanicalTerrestrialAquaticPlant', + layer.layerState.colorScheme['Activity_Monitoring_MechanicalTerrestrialAquaticPlant'] || FALLBACK_COLOR, + 'Activity_Observation_PlantAquatic', + layer.layerState.colorScheme['Activity_Observation_PlantAquatic'] || FALLBACK_COLOR, + 'Activity_Observation_PlantTerrestrial', + layer.layerState.colorScheme['Activity_Observation_PlantTerrestrial'] || FALLBACK_COLOR, + 'Activity_Treatment_ChemicalPlantAquatic', + layer.layerState.colorScheme['Activity_Treatment_ChemicalPlantAquatic'] || FALLBACK_COLOR, + 'Activity_Treatment_ChemicalPlantTerrestrial', + layer.layerState.colorScheme['Activity_Treatment_ChemicalPlantTerrestrial'] || FALLBACK_COLOR, + 'Activity_Treatment_MechanicalPlantAquatic', + layer.layerState.colorScheme['Activity_Treatment_MechanicalPlantAquatic'] || FALLBACK_COLOR, + 'Activity_Treatment_MechanicalPlantTerrestrial', + layer.layerState.colorScheme['Activity_Treatment_MechanicalPlantTerrestrial'] || FALLBACK_COLOR, layer.layerState.color || FALLBACK_COLOR ]; } else { diff --git a/app/src/state/sagas/userSettings.ts b/app/src/state/sagas/userSettings.ts index aebac3f5f..90dc4c8e2 100644 --- a/app/src/state/sagas/userSettings.ts +++ b/app/src/state/sagas/userSettings.ts @@ -92,11 +92,18 @@ function* handle_USER_SETTINGS_GET_INITIAL_STATE_REQUEST(action) { } ], colorScheme: { - Biocontrol: '#845ec2', - FREP: '#de852c', - Monitoring: '#2138e0', - Observation: '#399c3e', - Treatment: '#c6c617' + Activity_Biocontrol_Collection: '#845ec2', + Activity_Biocontrol_Release: '#845ec2', + Activity_Monitoring_BiocontrolDispersal_TerrestrialPlant: '#845ec2', + Activity_Monitoring_BiocontrolRelease_TerrestrialPlant: '#845ec2', + Activity_Monitoring_ChemicalTerrestrialAquaticPlant: '#2138e0', + Activity_Monitoring_MechanicalTerrestrialAquaticPlant: '#2138e0', + Activity_Observation_PlantAquatic: '#399c3e', + Activity_Observation_PlantTerrestrial: '#399c3e', + Activity_Treatment_ChemicalPlantAquatic: '#c6c617', + Activity_Treatment_ChemicalPlantTerrestrial: '#c6c617', + Activity_Treatment_MechanicalPlantAquatic: '#c6c617', + Activity_Treatment_MechanicalPlantTerrestrial: '#c6c617' }, cacheMetadata: { status: UserRecordCacheStatus.NOT_CACHED @@ -107,11 +114,18 @@ function* handle_USER_SETTINGS_GET_INITIAL_STATE_REQUEST(action) { recordSetType: RecordSetType.Activity, recordSetName: 'All InvasivesBC Activities', colorScheme: { - Biocontrol: '#845ec2', - FREP: '#de852c', - Monitoring: '#2138e0', - Observation: '#399c3e', - Treatment: '#c6c617' + Activity_Biocontrol_Collection: '#845ec2', + Activity_Biocontrol_Release: '#845ec2', + Activity_Monitoring_BiocontrolDispersal_TerrestrialPlant: '#845ec2', + Activity_Monitoring_BiocontrolRelease_TerrestrialPlant: '#845ec2', + Activity_Monitoring_ChemicalTerrestrialAquaticPlant: '#2138e0', + Activity_Monitoring_MechanicalTerrestrialAquaticPlant: '#2138e0', + Activity_Observation_PlantAquatic: '#399c3e', + Activity_Observation_PlantTerrestrial: '#399c3e', + Activity_Treatment_ChemicalPlantAquatic: '#c6c617', + Activity_Treatment_ChemicalPlantTerrestrial: '#c6c617', + Activity_Treatment_MechanicalPlantAquatic: '#c6c617', + Activity_Treatment_MechanicalPlantTerrestrial: '#c6c617' }, cacheMetadata: { status: UserRecordCacheStatus.NOT_ELIGIBLE