Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated style for hurricane Debby #141

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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