Skip to content

Commit

Permalink
Merge pull request #141 from RENCI/debby-style
Browse files Browse the repository at this point in the history
updated style for hurricane Debby
  • Loading branch information
PhillipsOwen authored Aug 5, 2024
2 parents fe9b350 + 9fe2f3e commit 1bbed05
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/components/legend/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ export const MapLegend = () => {
// may want to move this somewhere else later
// for the implementation of user designed styles
const layerStyles = {
'maxele63': 'maxele_style_v3ui',
//'maxele63': 'maxele_style_v3ui',
// added this temporarily for Debby
'maxele63': 'maxele_v3_short_legend_style',
'maxwvel63': 'maxwvel_style_v3ui',
'swan_HS_max63': 'swan_style_v3ui',
'maxinundepth63': 'maxele_style_v3ui',
'maxele_level_downscaled_epsg4326': 'maxele_style_v3ui',
// added this temporarily for Debby
'maxele_level_downscaled_epsg4326': 'maxele_v3_short_legend_style',
'hec_ras_water_surface': 'maxele_style_v3ui'
};

Expand Down
20 changes: 18 additions & 2 deletions src/components/map/default-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ export const DefaultLayers = () => {
transparent: true,
}), []);

// added this temporarily for Debby
const wmsDebbyLayerParams = useMemo(() => ({
format:"image/png",
transparent: true,
styles: "maxele_v3_short_style"
}), []);

return (
<>
{defaultModelLayers
Expand All @@ -192,13 +199,22 @@ export const DefaultLayers = () => {
);
} else {
return (
<WMSTileLayer
layer.layers.includes("maxele") ?
(<WMSTileLayer
key={`${index}-${layer.id}`}
url={gs_wms_url}
layers={layer.layers}
params={wmsDebbyLayerParams}
opacity={opacity}
/>)
:
(<WMSTileLayer
key={`${index}-${layer.id}`}
url={gs_wms_url}
layers={layer.layers}
params={wmsLayerParams}
opacity={opacity}
/>
/>)
);
}
})
Expand Down

0 comments on commit 1bbed05

Please sign in to comment.