Skip to content

Commit

Permalink
sf floodmap
Browse files Browse the repository at this point in the history
  • Loading branch information
indraneel committed Oct 16, 2023
1 parent c59bbf9 commit 7477188
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/src/components/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ const AVAILABLE_LAYERS: Record<string, Layer> = {
hideToggle: false,
city: Cities.Pittsburgh,
},
'8': {
id: 8,
layerName: 'SF Current FEMA Flood Layer',
layerURL: 'mapbox://indraneel-tsdataclinic.3c847icg',
isVisible: false,
sourceLayer: 'sf_processed_fema-125s1o',
hideToggle: false,
city: Cities.SanFrancisco,
},
};


Expand Down
29 changes: 29 additions & 0 deletions app/src/utils/sourceLayerConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,35 @@ export function useSourceLayerConfigs(
markers: [],
},
],
'SF Current FEMA Flood Layer': [
{
sourceId: 'sf_processed_fema-125s1o',
layerId: 'sf_processed_fema-125s1o',
layerType: 'fill',
layoutProperties: [],
paintProperties: [
{ name: 'fill-opacity', value: 0.65 },
{
name: 'fill-color',
value: [
/*
"FLOODWAY"
"AREA OF MINIMAL FLOOD HAZARD"
"0.2 PCT ANNUAL CHANCE FLOOD HAZARD"
"AREA WITH REDUCED FLOOD RISK DUE TO LEVEE"
*/
'case',
['==', ['get', 'ZONE_SUBTY'], '0.2 PCT ANNUAL CHANCE FLOOD HAZARD'],
`#ff8e52`,
['==', ['get', 'ZONE_SUBTY'], 'AREA OF MINIMAL FLOOD HAZARD'],
`#ffc7a9`,
`transparent`
],
},
],
markers: [],
},
],
};
return output;
}, [filters, selectedProperties]);
Expand Down

0 comments on commit 7477188

Please sign in to comment.