Skip to content

Commit

Permalink
Add fallback for OPACITIES
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Feb 12, 2025
1 parent c54c1c5 commit 3ac64b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/map/layers/WMSLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function wmsToOpenlayersOptions(options) {

export function getClientSideOpacity(queryParameters) {
// If WMS parameters contain only one opacity value, set opacity client side (as some WMS servers don't support opacity)
const opacities = queryParameters.OPACITIES.split(",");
const opacities = (queryParameters.OPACITIES ?? "255").split(",");
if (opacities.length === 1) {
queryParameters.OPACITIES = "255";
return parseInt(opacities[0], 10) / 255;
Expand Down

0 comments on commit 3ac64b2

Please sign in to comment.