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

bug(WMS): error with empty style in HRDEM layers #2111

Merged
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
12 changes: 12 additions & 0 deletions packages/geoview-core/public/templates/layers/wms.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ <h4 id="HLYR1">1. Many WMS Layers (the map displays the different phases of the
'layerName': { 'en': 'Test Spatiotemporel' }
}
]
},
{
'geoviewLayerId': 'HRDEM-dsm-hillshade',
'geoviewLayerName': { 'en': 'DSM Hillshade' },
'metadataAccessPath': { 'en': 'https://datacube.services.geo.ca/ows/elevation' },
'geoviewLayerType': 'ogcWms',
'listOfLayerEntryConfig': [
{
'layerId': 'dsm-hillshade',
'layerName': { 'en': 'DSM-Hillshade' }
}
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export class WMS extends AbstractGeoViewRaster {

if (Array.isArray(layerConfig.source?.style)) {
this.WMSStyles = layerConfig.source.style;
} else if ((layerCapabilities.Style.length as number) > 1) {
} else if (layerCapabilities.Style && (layerCapabilities.Style.length as number) > 1) {
this.WMSStyles = [];
for (let i = 0; i < (layerCapabilities.Style.length as number); i++) {
this.WMSStyles.push(layerCapabilities.Style[i].Name as string);
Expand Down
Loading