Skip to content

Commit

Permalink
Fixed check to make sure a layer has time data before generating its …
Browse files Browse the repository at this point in the history
…Dimension element in WMTS GetCapabilities
  • Loading branch information
Matthew Graber committed May 23, 2024
1 parent 4052d28 commit 3300d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/gc_service/gc_service.lua
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ local function makeGCLayer(filename, tmsDefs, tmsLimitsDefs, dateList, epsgCode,

-- Build the <Dimension> element for time (if necessary)
-- Note that we omit this if for some reason we don't have dates from the date service.
if not static and dateInfo then
if not static and dateInfo and periods and defaultDate and #periods > 0 then
local dimensionNode = xml.elem("Dimension", {
xml.new("ows:Identifier"):text("Time"),
xml.new("ows:UOM"):text("ISO8601"),
Expand Down

0 comments on commit 3300d90

Please sign in to comment.