Skip to content

Commit

Permalink
dont use single date for wms as it is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
guss84 committed Apr 17, 2024
1 parent df1d47c commit c25a766
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/layer/wms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ export function wmsWmtMsGetMapUrl(
.utc(params.toTime)
.format('YYYY-MM-DDTHH:mm:ss') + 'Z'}`;
}
// only toTime available
// Only toTime available. Requesting a single value for TIME parameter is deprecated
if (params.fromTime === null && params.toTime !== null) {
queryParams.time = moment.utc(params.toTime).format('YYYY-MM-DD');
queryParams.time = `${moment.utc(params.toTime).format('YYYY-MM-DD')}/${moment
.utc(params.toTime)
.format('YYYY-MM-DD')}`;
}

if (params.width && params.height) {
Expand Down

0 comments on commit c25a766

Please sign in to comment.