@opengeoweb/webmap 14.5.1 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +137 -32
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/lib/components/WMConstants.d.ts +11 -0
- package/src/lib/components/WMJSDimension.d.ts +4 -0
- package/src/lib/components/WMJSDimensionModes.d.ts +15 -0
- package/src/lib/components/WMJSDimensionModes.spec.d.ts +1 -0
- package/src/lib/components/WMLayer.d.ts +2 -0
- package/src/lib/components/WMLayerTypes.d.ts +3 -1
- package/src/lib/components/index.d.ts +2 -1
- package/src/lib/utils/getCapabilities/utils.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -490,7 +490,7 @@ var WMSVersion = {
|
|
|
490
490
|
version111: '1.1.1',
|
|
491
491
|
version130: '1.3.0'
|
|
492
492
|
};
|
|
493
|
-
var WMProj4Defs = [[PROJECTION.EPSG_4326.value, '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees'], [PROJECTION.EPSG_4269.value, '+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees'], [PROJECTION.EPSG_3575.value, '+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'], [PROJECTION.EPSG_3785.value, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'], [PROJECTION.EPSG_3857.value, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'], [PROJECTION.EPSG_3411.value, '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs'], [PROJECTION.EPSG_3412.value, '+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs'], [PROJECTION.EPSG_28992.value, '+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs <>'], [PROJECTION.EPSG_32661.value, '+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'], [PROJECTION.EPSG_102100.value, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'], [PROJECTION.EPSG_3067.value, '+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs'], [PROJECTION.EPSG_54030.value, '+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs']];
|
|
493
|
+
var WMProj4Defs = [[PROJECTION.EPSG_4326.value, '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees'], [PROJECTION.EPSG_4269.value, '+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees'], [PROJECTION.EPSG_3575.value, '+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'], [PROJECTION.EPSG_3785.value, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'], [PROJECTION.EPSG_3857.value, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'], [PROJECTION.EPSG_3411.value, '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs'], [PROJECTION.EPSG_3412.value, '+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs'], [PROJECTION.EPSG_28992.value, '+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs <>'], [PROJECTION.EPSG_5041.value, '+proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs +type=crs'], [PROJECTION.EPSG_32661.value, '+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'], [PROJECTION.EPSG_102100.value, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'], [PROJECTION.EPSG_3067.value, '+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs'], [PROJECTION.EPSG_54030.value, '+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs']];
|
|
494
494
|
var mapImageStoreLength = 1000;
|
|
495
495
|
var bgImageStoreLength = 360;
|
|
496
496
|
var legendImageStoreLength = 500;
|
|
@@ -1587,6 +1587,70 @@ var queryWMSKeys = [QUERYWMS_GETCAPABILITIES, QUERYWMS_LAYERSTREE, QUERYWMS_SERV
|
|
|
1587
1587
|
* */
|
|
1588
1588
|
var WMS111GetCapabilitiesGeoServicesRADAR = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE WMT_MS_Capabilities SYSTEM \"http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd\" [\n <!ELEMENT VendorSpecificCapabilities EMPTY>\n]>\n<!-- end of DOCTYPE declaration -->\n<WMT_MS_Capabilities version=\"1.1.1\">\n <Service>\n <Name>OGC:WMS</Name>\n <Title>RADAR</Title>\n <Abstract>This service demonstrates how the ADAGUC server can be used to create OGC services.</Abstract>\n <ServerInfo>ADAGUCServer version 2.5.8, of Apr 13 2021 07:55:43</ServerInfo>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n <ContactInformation />\n </Service>\n <Capability>\n <Request>\n <GetCapabilities>\n <Format>application/vnd.ogc.wms_xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetCapabilities>\n <GetMap>\n <Format>image/png</Format>\n <Format>image/gif</Format>\n <Format>image/png32</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetMap>\n <GetFeatureInfo>\n <Format>text/plain</Format>\n <Format>text/html</Format>\n <Format>text/xml</Format>\n <Format>application/vnd.ogc.gml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetFeatureInfo>\n <DescribeLayer>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </DescribeLayer>\n <GetLegendGraphic>\n <Format>image/png</Format>\n <Format>image/gif</Format>\n <Format>image/png32</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetLegendGraphic>\n <GetStyles>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&\" />\n </Get>\n </HTTP>\n </DCPType>\n </GetStyles>\n </Request>\n <Exception>\n <Format>application/vnd.ogc.se_xml</Format>\n <Format>application/vnd.ogc.se_inimage</Format>\n <Format>application/vnd.ogc.se_blank</Format>\n </Exception>\n <VendorSpecificCapabilities />\n <UserDefinedSymbolization SupportSLD=\"1\" UserLayer=\"0\" UserStyle=\"1\" RemoteWFS=\"0\" />\n <Layer>\n <Title>WMS of RADAR</Title>\n <SRS>EPSG:3411</SRS>\n <SRS>EPSG:3412</SRS>\n <SRS>EPSG:3575</SRS>\n <SRS>EPSG:3857</SRS>\n <SRS>EPSG:4258</SRS>\n <SRS>EPSG:4326</SRS>\n <SRS>CRS:84</SRS>\n <SRS>EPSG:25831</SRS>\n <SRS>EPSG:25832</SRS>\n <SRS>EPSG:28992</SRS>\n <SRS>EPSG:7399</SRS>\n <SRS>EPSG:50001</SRS>\n <SRS>EPSG:54030</SRS>\n <SRS>EPSG:32661</SRS>\n <SRS>EPSG:40000</SRS>\n <SRS>EPSG:900913</SRS>\n <SRS>PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0</SRS>\n <Layer queryable=\"1\" opaque=\"1\" cascaded=\"0\">\n <Name>RAD_NL25_PCP_CM</Name>\n <Title>Precipitation Radar NL</Title>\n <Abstract>Radar NL</Abstract>\n <KeywordList>\n <Keyword>Radar</Keyword>\n </KeywordList>\n <SRS>EPSG:3411</SRS>\n <BoundingBox SRS=\"EPSG:3411\" minx=\"2682754.743620\" miny=\"-3245034.014141\" maxx=\"3759536.917562\" maxy=\"-2168251.989038\" />\n <SRS>EPSG:3412</SRS>\n <BoundingBox SRS=\"EPSG:3412\" minx=\"0.000000\" miny=\"32318824.826266\" maxx=\"7413041.166015\" maxy=\"40075258.815074\" />\n <SRS>EPSG:3575</SRS>\n <BoundingBox SRS=\"EPSG:3575\" minx=\"-770622.801471\" miny=\"-4485814.811314\" maxx=\"56845.766135\" maxy=\"-3684039.443620\" />\n <SRS>EPSG:3857</SRS>\n <BoundingBox SRS=\"EPSG:3857\" minx=\"0.000000\" miny=\"6257115.219364\" maxx=\"1208534.698398\" maxy=\"7553161.958695\" />\n <SRS>EPSG:4258</SRS>\n <BoundingBox SRS=\"EPSG:4258\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>EPSG:4326</SRS>\n <BoundingBox SRS=\"EPSG:4326\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>CRS:84</SRS>\n <BoundingBox SRS=\"CRS:84\" minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <SRS>EPSG:25831</SRS>\n <BoundingBox SRS=\"EPSG:25831\" minx=\"282182.345905\" miny=\"5433247.394267\" maxx=\"997135.658653\" maxy=\"6207204.592736\" />\n <SRS>EPSG:25832</SRS>\n <BoundingBox SRS=\"EPSG:25832\" minx=\"-153083.019482\" miny=\"5415817.312927\" maxx=\"617595.626092\" maxy=\"6239769.309937\" />\n <SRS>EPSG:28992</SRS>\n <BoundingBox SRS=\"EPSG:28992\" minx=\"-236275.338083\" miny=\"106727.731651\" maxx=\"501527.918656\" maxy=\"900797.079725\" />\n <SRS>EPSG:7399</SRS>\n <BoundingBox SRS=\"EPSG:7399\" minx=\"0.000000\" miny=\"5757301.056717\" maxx=\"763611.971696\" maxy=\"6483919.801602\" />\n <SRS>EPSG:50001</SRS>\n <BoundingBox SRS=\"EPSG:50001\" minx=\"-2000000.000000\" miny=\"-2000000.000000\" maxx=\"10000000.000000\" maxy=\"8500000.000000\" />\n <SRS>EPSG:54030</SRS>\n <BoundingBox SRS=\"EPSG:54030\" minx=\"0.000000\" miny=\"5211855.054125\" maxx=\"853649.695106\" maxy=\"5936394.291427\" />\n <SRS>EPSG:32661</SRS>\n <BoundingBox SRS=\"EPSG:32661\" minx=\"2000000.000000\" miny=\"-2703305.597319\" maxx=\"2745713.040381\" maxy=\"-1888346.216710\" />\n <SRS>EPSG:40000</SRS>\n <BoundingBox SRS=\"EPSG:40000\" minx=\"0.000000\" miny=\"-4731695.771951\" maxx=\"750214.326339\" maxy=\"-3911817.119426\" />\n <SRS>EPSG:900913</SRS>\n <BoundingBox SRS=\"EPSG:900913\" minx=\"0.000000\" miny=\"6257115.219364\" maxx=\"1208534.698398\" maxy=\"7553161.958695\" />\n <SRS>PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0</SRS>\n <BoundingBox SRS=\"PROJ4:%2Bproj%3Dstere%20%2Blat_0%3D90%20%2Blon_0%3D0%20%2Blat_ts%3D60%20%2Ba%3D6378%2E14%20%2Bb%3D6356%2E75%20%2Bx_0%3D0%20y_0%3D0\" minx=\"0.000000\" miny=\"-3649.999338\" maxx=\"700.002420\" maxy=\"-4415.002986\" />\n <LatLonBoundingBox minx=\"0.000000\" miny=\"48.895303\" maxx=\"10.856452\" maxy=\"55.973600\" />\n <Dimension name=\"time\" units=\"ISO8601\" />\n <Extent name=\"time\" default=\"2021-05-17T00:00:00Z\" multipleValues=\"1\" nearestValue=\"0\">2021-03-31T09:25:00Z/2021-05-18T07:45:00Z/PT5M</Extent>\n <Style>\n <Name>radar/nearest</Name>\n <Title>radar/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=radar/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-rainbow/nearest</Name>\n <Title>precip-rainbow/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-rainbow/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-gray/nearest</Name>\n <Title>precip-gray/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-gray/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-blue/nearest</Name>\n <Title>precip-blue/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-blue/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-blue-transparent/nearest</Name>\n <Title>precip-blue-transparent/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-blue-transparent/nearest\" />\n </LegendURL>\n </Style>\n <Style>\n <Name>precip-with-range/nearest</Name>\n <Title>precip-with-range/nearest</Title>\n <LegendURL width=\"300\" height=\"400\">\n <Format>image/png</Format>\n <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"https://geoservices.knmi.nl/wms?DATASET=RADAR&SERVICE=WMS&&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=RAD_NL25_PCP_CM&format=image/png&STYLE=precip-with-range/nearest\" />\n </LegendURL>\n </Style>\n <ScaleHint min=\"0\" max=\"10000\" />\n </Layer>\n </Layer>\n </Capability>\n</WMT_MS_Capabilities>";
|
|
1589
1589
|
|
|
1590
|
+
/* *
|
|
1591
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1592
|
+
* you may not use this file except in compliance with the License.
|
|
1593
|
+
* You may obtain a copy of the License at
|
|
1594
|
+
*
|
|
1595
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1596
|
+
*
|
|
1597
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1598
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1599
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1600
|
+
* See the License for the specific language governing permissions and
|
|
1601
|
+
* limitations under the License.
|
|
1602
|
+
*
|
|
1603
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1604
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
1605
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
1606
|
+
* */
|
|
1607
|
+
/**
|
|
1608
|
+
* Determine if the time values have a special sequencing for certain services.
|
|
1609
|
+
* Please check https://gitlab.com/opengeoweb/geoweb-assets/-/issues/4311 for details.
|
|
1610
|
+
* @param layer
|
|
1611
|
+
* @returns
|
|
1612
|
+
*/
|
|
1613
|
+
var wmDetermineDimensionMode = function wmDetermineDimensionMode(layer, refTimeDimensionModes) {
|
|
1614
|
+
return refTimeDimensionModes == null ? void 0 : refTimeDimensionModes.find(function (timeMode) {
|
|
1615
|
+
if (layer.service && layer.name && new RegExp(timeMode.servicematch, 'i').test(layer == null ? void 0 : layer.service) && new RegExp(timeMode.layermatch, 'i').test(layer == null ? void 0 : layer.name)) {
|
|
1616
|
+
return timeMode;
|
|
1617
|
+
}
|
|
1618
|
+
return undefined;
|
|
1619
|
+
});
|
|
1620
|
+
};
|
|
1621
|
+
/**
|
|
1622
|
+
* Based on https://gitlab.com/opengeoweb/geoweb-assets/-/issues/4311
|
|
1623
|
+
* @param wmDimension
|
|
1624
|
+
* @param referenceTimeValueToSet
|
|
1625
|
+
*/
|
|
1626
|
+
var wmDimensionHandleCustomTimeFunction = function wmDimensionHandleCustomTimeFunction(wmDimension, referenceTimeValueToSet) {
|
|
1627
|
+
var _wmDimension$refTimeD;
|
|
1628
|
+
if (!wmDimension.refTimeDimensionMode) {
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1631
|
+
var newStartValueTime = new Date(referenceTimeValueToSet);
|
|
1632
|
+
var referenceTimeKey = newStartValueTime.getUTCHours() * 60 + newStartValueTime.getUTCMinutes();
|
|
1633
|
+
var ruleSet = (_wmDimension$refTimeD = wmDimension.refTimeDimensionMode) == null ? void 0 : _wmDimension$refTimeD.ruleset;
|
|
1634
|
+
var validRule = ruleSet == null ? void 0 : ruleSet.find(function (rule) {
|
|
1635
|
+
return rule.moduloHH.find(function (smoduloHH) {
|
|
1636
|
+
var mod = smoduloHH * 60;
|
|
1637
|
+
return referenceTimeKey % (60 * 24) === mod;
|
|
1638
|
+
}) !== undefined;
|
|
1639
|
+
});
|
|
1640
|
+
var relSteps = (validRule == null ? void 0 : validRule.relativeSteps) || [];
|
|
1641
|
+
var newValues = relSteps.map(function (relativeSecond) {
|
|
1642
|
+
return dateUtils.add(new Date(newStartValueTime.getTime()), {
|
|
1643
|
+
seconds: relativeSecond
|
|
1644
|
+
});
|
|
1645
|
+
});
|
|
1646
|
+
var newValues1 = [];
|
|
1647
|
+
newValues.forEach(function (dt) {
|
|
1648
|
+
return newValues1.push(dt.toISOString().replace('.000Z', 'Z'));
|
|
1649
|
+
});
|
|
1650
|
+
wmDimension.reInitializeValues(newValues1.join(','), true);
|
|
1651
|
+
wmDimension.setClosestValue();
|
|
1652
|
+
};
|
|
1653
|
+
|
|
1590
1654
|
/* *
|
|
1591
1655
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1592
1656
|
* you may not use this file except in compliance with the License.
|
|
@@ -2664,6 +2728,7 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2664
2728
|
this.unitSymbol = undefined; // Unit symbol, eg: hPa
|
|
2665
2729
|
this.linked = true;
|
|
2666
2730
|
this.synced = false;
|
|
2731
|
+
this.refTimeDimensionMode = undefined;
|
|
2667
2732
|
this._initialized = false;
|
|
2668
2733
|
this._timeRangeDurationDate = null; // Used for timerange (start/stop/res)
|
|
2669
2734
|
this._allDates = []; // Used for individual timevalues
|
|
@@ -2693,17 +2758,18 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2693
2758
|
this.getIndexForValue = this.getIndexForValue.bind(this);
|
|
2694
2759
|
this.size = this.size.bind(this);
|
|
2695
2760
|
this.clone = this.clone.bind(this);
|
|
2696
|
-
|
|
2697
|
-
|
|
2761
|
+
this.setTimeValuesForReferenceTimeStandardMode = this.setTimeValuesForReferenceTimeStandardMode.bind(this);
|
|
2762
|
+
if (config) {
|
|
2763
|
+
if (config.name) {
|
|
2698
2764
|
this.name = config.name.toLowerCase();
|
|
2699
2765
|
}
|
|
2700
|
-
if (
|
|
2766
|
+
if (config.units) {
|
|
2701
2767
|
this.units = config.units;
|
|
2702
2768
|
}
|
|
2703
|
-
if (
|
|
2769
|
+
if (config.unitSymbol) {
|
|
2704
2770
|
this.unitSymbol = config.unitSymbol;
|
|
2705
2771
|
}
|
|
2706
|
-
if (
|
|
2772
|
+
if (config.values) {
|
|
2707
2773
|
this.values = config.values;
|
|
2708
2774
|
if (!this.units) {
|
|
2709
2775
|
// If unit was not set, check if this is a ISO8601 period.
|
|
@@ -2713,18 +2779,15 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2713
2779
|
}
|
|
2714
2780
|
}
|
|
2715
2781
|
}
|
|
2716
|
-
if (
|
|
2782
|
+
if (config.currentValue) {
|
|
2717
2783
|
this.currentValue = config.currentValue;
|
|
2718
2784
|
}
|
|
2719
|
-
if (
|
|
2785
|
+
if (config.defaultValue) {
|
|
2720
2786
|
this.defaultValue = config.defaultValue;
|
|
2721
2787
|
}
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
if (isDefined(config.synced)) {
|
|
2726
|
-
this.synced = config.synced;
|
|
2727
|
-
}
|
|
2788
|
+
this.linked = config.linked !== false;
|
|
2789
|
+
this.synced = config.synced === true;
|
|
2790
|
+
this.refTimeDimensionMode = config.refTimeDimensionMode;
|
|
2728
2791
|
}
|
|
2729
2792
|
}
|
|
2730
2793
|
var _proto = WMJSDimension.prototype;
|
|
@@ -2738,16 +2801,7 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2738
2801
|
}
|
|
2739
2802
|
return vals;
|
|
2740
2803
|
};
|
|
2741
|
-
_proto.
|
|
2742
|
-
if (!this._initialized) {
|
|
2743
|
-
this.initialize();
|
|
2744
|
-
}
|
|
2745
|
-
if (!referenceTimeValueToSet) {
|
|
2746
|
-
this.reInitializeValues(this.values);
|
|
2747
|
-
this.setClosestValue(null);
|
|
2748
|
-
debugLogger(DebugType.Warning);
|
|
2749
|
-
return;
|
|
2750
|
-
}
|
|
2804
|
+
_proto.setTimeValuesForReferenceTimeStandardMode = function setTimeValuesForReferenceTimeStandardMode(referenceTimeValueToSet, referenceTimeDim) {
|
|
2751
2805
|
/*
|
|
2752
2806
|
* Calculate the model run length,
|
|
2753
2807
|
* this can be done by looking at the difference between
|
|
@@ -2796,6 +2850,22 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2796
2850
|
this.setClosestValue();
|
|
2797
2851
|
}
|
|
2798
2852
|
};
|
|
2853
|
+
_proto.setTimeValuesForReferenceTime = function setTimeValuesForReferenceTime(referenceTimeValueToSet, referenceTimeDim) {
|
|
2854
|
+
if (!this._initialized) {
|
|
2855
|
+
this.initialize();
|
|
2856
|
+
}
|
|
2857
|
+
if (!referenceTimeValueToSet) {
|
|
2858
|
+
this.reInitializeValues(this.values);
|
|
2859
|
+
this.setClosestValue(null);
|
|
2860
|
+
debugLogger(DebugType.Warning);
|
|
2861
|
+
return;
|
|
2862
|
+
}
|
|
2863
|
+
if (this.refTimeDimensionMode !== undefined) {
|
|
2864
|
+
wmDimensionHandleCustomTimeFunction(this, referenceTimeValueToSet);
|
|
2865
|
+
} else {
|
|
2866
|
+
this.setTimeValuesForReferenceTimeStandardMode(referenceTimeValueToSet, referenceTimeDim);
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2799
2869
|
_proto.reInitializeValues = function reInitializeValues(values, forceReferenceTimeValue) {
|
|
2800
2870
|
if (forceReferenceTimeValue === void 0) {
|
|
2801
2871
|
forceReferenceTimeValue = false;
|
|
@@ -2818,7 +2888,7 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2818
2888
|
if (forceothervalues) {
|
|
2819
2889
|
ogcdimvalues = forceothervalues;
|
|
2820
2890
|
}
|
|
2821
|
-
if (!
|
|
2891
|
+
if (!ogcdimvalues) {
|
|
2822
2892
|
return;
|
|
2823
2893
|
}
|
|
2824
2894
|
this._allValues = [];
|
|
@@ -2891,7 +2961,7 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2891
2961
|
}
|
|
2892
2962
|
}
|
|
2893
2963
|
/* If no default value is given, take the last / most recent one */
|
|
2894
|
-
if (!
|
|
2964
|
+
if (!this.defaultValue) {
|
|
2895
2965
|
this.defaultValue = this.getLastValue();
|
|
2896
2966
|
}
|
|
2897
2967
|
/* Check if the string 'current' is given, and find the closest value inside the dimension */
|
|
@@ -2933,7 +3003,7 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
2933
3003
|
this.initialize();
|
|
2934
3004
|
}
|
|
2935
3005
|
var value = this.defaultValue;
|
|
2936
|
-
if (
|
|
3006
|
+
if (this.currentValue) {
|
|
2937
3007
|
value = this.currentValue;
|
|
2938
3008
|
}
|
|
2939
3009
|
value = this.addTimeRangeDurationToValue(value);
|
|
@@ -3312,6 +3382,7 @@ var WMJSDimension = /*#__PURE__*/function () {
|
|
|
3312
3382
|
dim.defaultValue = this.defaultValue;
|
|
3313
3383
|
dim.linked = this.linked;
|
|
3314
3384
|
dim.synced = this.synced;
|
|
3385
|
+
dim.refTimeDimensionMode = this.refTimeDimensionMode;
|
|
3315
3386
|
return dim;
|
|
3316
3387
|
};
|
|
3317
3388
|
return WMJSDimension;
|
|
@@ -3355,7 +3426,8 @@ var addDimsForLayer = function addDimsForLayer(layerProps, layer, layerDimNamesT
|
|
|
3355
3426
|
currentValue: layerDim["default"],
|
|
3356
3427
|
defaultValue: layerDim["default"],
|
|
3357
3428
|
linked: layerDim.linkDimensionToMap,
|
|
3358
|
-
unitSymbol: layerDim.unitSymbol
|
|
3429
|
+
unitSymbol: layerDim.unitSymbol,
|
|
3430
|
+
refTimeDimensionMode: layer.refTimeDimensionMode
|
|
3359
3431
|
});
|
|
3360
3432
|
layer.dimensions.push(dimension);
|
|
3361
3433
|
} else {
|
|
@@ -3796,7 +3868,10 @@ var privateCheckVersion = function privateCheckVersion(jsonData) {
|
|
|
3796
3868
|
* @returns LayerTree
|
|
3797
3869
|
*/
|
|
3798
3870
|
var privateWmsGetLayerTree = function privateWmsGetLayerTree(jsonData) {
|
|
3799
|
-
privateCheckVersion(jsonData);
|
|
3871
|
+
var version = privateCheckVersion(jsonData);
|
|
3872
|
+
if (!version) {
|
|
3873
|
+
return null;
|
|
3874
|
+
}
|
|
3800
3875
|
var rootLayer = privateWmsGetCapabilityElement(jsonData).Layer;
|
|
3801
3876
|
return privateWmsBuildLayerTreeFromNestedWMSLayer(rootLayer);
|
|
3802
3877
|
};
|
|
@@ -4618,6 +4693,7 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
4618
4693
|
function WMLayer(options) {
|
|
4619
4694
|
var _this = this;
|
|
4620
4695
|
this.olSource = null; // Reference to olSource. Need to check if animation can go forward.
|
|
4696
|
+
this.refTimeDimensionMode = undefined;
|
|
4621
4697
|
this.init = this.init.bind(this);
|
|
4622
4698
|
this.getLayerName = this.getLayerName.bind(this);
|
|
4623
4699
|
this.toggleAutoUpdate = this.toggleAutoUpdate.bind(this);
|
|
@@ -4696,9 +4772,14 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
4696
4772
|
if (options.transparent === false) {
|
|
4697
4773
|
this.transparent = false;
|
|
4698
4774
|
}
|
|
4775
|
+
if (options.refTimeDimensionMode) {
|
|
4776
|
+
this.refTimeDimensionMode = options.refTimeDimensionMode;
|
|
4777
|
+
}
|
|
4699
4778
|
if ((_options$dimensions = options.dimensions) != null && _options$dimensions.length) {
|
|
4700
4779
|
options.dimensions.forEach(function (dimension) {
|
|
4701
|
-
_this.dimensions.push(new WMJSDimension(dimension
|
|
4780
|
+
_this.dimensions.push(new WMJSDimension(Object.assign({}, dimension, {
|
|
4781
|
+
refTimeDimensionMode: _this.refTimeDimensionMode
|
|
4782
|
+
})));
|
|
4702
4783
|
});
|
|
4703
4784
|
}
|
|
4704
4785
|
if (isDefined(options.onReady)) {
|
|
@@ -4945,6 +5026,7 @@ var WMLayer = /*#__PURE__*/function () {
|
|
|
4945
5026
|
newLayer.dimensions.length = 0;
|
|
4946
5027
|
newLayer.name = this.name;
|
|
4947
5028
|
newLayer.layerType = this.layerType;
|
|
5029
|
+
newLayer.refTimeDimensionMode = this.refTimeDimensionMode;
|
|
4948
5030
|
this.dimensions.forEach(function (dim) {
|
|
4949
5031
|
newLayer.dimensions.push(dim.clone());
|
|
4950
5032
|
});
|
|
@@ -6394,6 +6476,9 @@ var mockServiceFromStore = {
|
|
|
6394
6476
|
};
|
|
6395
6477
|
var mockGetCapNoChilds = {
|
|
6396
6478
|
WMS_Capabilities: {
|
|
6479
|
+
attr: {
|
|
6480
|
+
version: WMSVersion.version130
|
|
6481
|
+
},
|
|
6397
6482
|
Service: {
|
|
6398
6483
|
Title: {
|
|
6399
6484
|
value: 'ti'
|
|
@@ -6409,6 +6494,9 @@ var mockGetCapNoChilds = {
|
|
|
6409
6494
|
};
|
|
6410
6495
|
var mockGetCapWithSubcategory = {
|
|
6411
6496
|
WMS_Capabilities: {
|
|
6497
|
+
attr: {
|
|
6498
|
+
version: WMSVersion.version130
|
|
6499
|
+
},
|
|
6412
6500
|
Service: {
|
|
6413
6501
|
Title: {
|
|
6414
6502
|
value: mockServiceFromStore.title
|
|
@@ -6457,6 +6545,9 @@ var mockGetCapWithSubcategory = {
|
|
|
6457
6545
|
};
|
|
6458
6546
|
var mockGetCapLayersDefault = {
|
|
6459
6547
|
WMS_Capabilities: {
|
|
6548
|
+
attr: {
|
|
6549
|
+
version: WMSVersion.version130
|
|
6550
|
+
},
|
|
6460
6551
|
Service: {
|
|
6461
6552
|
Title: {
|
|
6462
6553
|
value: mockServiceFromStore.title
|
|
@@ -6476,6 +6567,9 @@ var mockGetCapLayersDefault = {
|
|
|
6476
6567
|
};
|
|
6477
6568
|
var mockGetCapLayersDefault2 = {
|
|
6478
6569
|
WMS_Capabilities: {
|
|
6570
|
+
attr: {
|
|
6571
|
+
version: WMSVersion.version130
|
|
6572
|
+
},
|
|
6479
6573
|
Service: {
|
|
6480
6574
|
Title: {
|
|
6481
6575
|
value: mockServiceFromStore.title
|
|
@@ -6495,6 +6589,9 @@ var mockGetCapLayersDefault2 = {
|
|
|
6495
6589
|
};
|
|
6496
6590
|
var mockGetCapLayersNoTitle = {
|
|
6497
6591
|
WMS_Capabilities: {
|
|
6592
|
+
attr: {
|
|
6593
|
+
version: WMSVersion.version130
|
|
6594
|
+
},
|
|
6498
6595
|
Service: {
|
|
6499
6596
|
Title: {
|
|
6500
6597
|
value: mockServiceFromStore.title
|
|
@@ -6514,6 +6611,9 @@ var mockGetCapLayersNoTitle = {
|
|
|
6514
6611
|
};
|
|
6515
6612
|
var mockGetCapLayersNoTitleOrName = {
|
|
6516
6613
|
WMS_Capabilities: {
|
|
6614
|
+
attr: {
|
|
6615
|
+
version: WMSVersion.version130
|
|
6616
|
+
},
|
|
6517
6617
|
Service: {
|
|
6518
6618
|
Title: {
|
|
6519
6619
|
value: mockServiceFromStore.title
|
|
@@ -6522,11 +6622,16 @@ var mockGetCapLayersNoTitleOrName = {
|
|
|
6522
6622
|
value: mockServiceFromStore["abstract"]
|
|
6523
6623
|
}
|
|
6524
6624
|
},
|
|
6525
|
-
Capability: {
|
|
6625
|
+
Capability: {
|
|
6626
|
+
Layer: {}
|
|
6627
|
+
}
|
|
6526
6628
|
}
|
|
6527
6629
|
};
|
|
6528
6630
|
var mockGetCap = {
|
|
6529
6631
|
WMS_Capabilities: {
|
|
6632
|
+
attr: {
|
|
6633
|
+
version: WMSVersion.version130
|
|
6634
|
+
},
|
|
6530
6635
|
Service: {
|
|
6531
6636
|
Title: {
|
|
6532
6637
|
value: mockServiceFromStore.title
|
|
@@ -7530,4 +7635,4 @@ var privateWebMapUtils = {
|
|
|
7530
7635
|
QUERYWMS_GETCAPABILITIES: QUERYWMS_GETCAPABILITIES
|
|
7531
7636
|
};
|
|
7532
7637
|
|
|
7533
|
-
export { DateInterval, DebugType, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, LayerType, ParseISOTimeRangeDuration, WEBMAP_NAMESPACE, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMDateUnit, WMEmptyLayerName, WMEmptyLayerTitle, WMImage, WMImageEventType, WMImageStore, WMImageStoreLoadType, WMInvalidDateValues, WMJSDimension, WMJSMAP_LONLAT_EPSGCODE, WMLayer, WMListener, WMProj4Defs, WMProjection, WMSVersion, WMXMLStringToJson, bgImageStoreLength, debugLogger, fakeWMTSLayerApiHandlers, generateLayerId, generateMapId, generateTimesliderId, getCorrectWMSDimName, getLegendGraphicURLForLayer, getMapDimURL, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSTimeDimensionForLayerId, getWMLayerById, getWMSServiceId, handleDateUtilsISOString, invalidateWMSGetCapabilities, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapImageStoreLength, mockGetCapabilities, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, privateWebMapUtils, queryWMSGetCapabilities, queryWMSLayer, queryWMSLayers, queryWMSLayersTree, queryWMSServiceInfo, registerWMLayer, roundWithTimeStep, setWMSGetCapabilitiesFetcher, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, index as webmapTestSettings, webmapTranslations, utils as webmapUtils, wmServiceListener, wmsQueryClient, wmtsResponseGetCapabilities, wmtsResponseLayerList };
|
|
7638
|
+
export { DateInterval, DebugType, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, LayerType, ParseISOTimeRangeDuration, WEBMAP_NAMESPACE, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMDateUnit, WMEmptyLayerName, WMEmptyLayerTitle, WMImage, WMImageEventType, WMImageStore, WMImageStoreLoadType, WMInvalidDateValues, WMJSDimension, WMJSMAP_LONLAT_EPSGCODE, WMLayer, WMListener, WMProj4Defs, WMProjection, WMSVersion, WMXMLStringToJson, bgImageStoreLength, debugLogger, fakeWMTSLayerApiHandlers, generateLayerId, generateMapId, generateTimesliderId, getCorrectWMSDimName, getLegendGraphicURLForLayer, getMapDimURL, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSTimeDimensionForLayerId, getWMLayerById, getWMSServiceId, handleDateUtilsISOString, invalidateWMSGetCapabilities, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapImageStoreLength, mockGetCapabilities, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, privateWebMapUtils, queryWMSGetCapabilities, queryWMSLayer, queryWMSLayers, queryWMSLayersTree, queryWMSServiceInfo, registerWMLayer, roundWithTimeStep, setWMSGetCapabilitiesFetcher, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, index as webmapTestSettings, webmapTranslations, utils as webmapUtils, wmDetermineDimensionMode, wmServiceListener, wmsQueryClient, wmtsResponseGetCapabilities, wmtsResponseLayerList };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "GeoWeb webmap library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "
|
|
11
|
+
"@opengeoweb/shared": "15.0.0",
|
|
12
12
|
"@tanstack/query-core": "^5.69.2",
|
|
13
13
|
"lodash": "^4.17.21",
|
|
14
14
|
"i18next": "^25.0.1",
|
package/src/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { mockGetCapabilities };
|
|
|
7
7
|
declare const privateWebMapUtils: {
|
|
8
8
|
privateWmsGetCapabilities: (serviceUrl: string, headers?: import("./lib").Header[], forceReload?: boolean) => Promise<import("./lib").WMSGetCapabilities>;
|
|
9
9
|
privateGetWMSServiceInfo: (getCapabilitiesJson: import("./lib").WMSGetCapabilities, serviceUrl: string) => import("./lib").WMSServiceInfo;
|
|
10
|
-
privateWmsGetLayerTree: (jsonData: import("./lib").OGCWMSWMTSGetCapabilities) => import("./lib").LayerTree;
|
|
10
|
+
privateWmsGetLayerTree: (jsonData: import("./lib").OGCWMSWMTSGetCapabilities) => import("./lib").LayerTree | null;
|
|
11
11
|
privateWmsFlattenLayerTree: (layerTree: import("./lib").LayerTree) => import("./lib").LayerProps[];
|
|
12
12
|
privateWmtsGetCapabilities: (serviceUrl: string, headers?: import("./lib").Header[], forceReload?: boolean) => Promise<string>;
|
|
13
13
|
QUERYWMS_GETCAPABILITIES: string;
|
|
@@ -18,3 +18,14 @@ export declare const EVENT_GETCAPABILITIES_START = "onstartgetcapabilities";
|
|
|
18
18
|
export declare const EVENT_GETCAPABILITIES_READY = "onreadygetcapabilities";
|
|
19
19
|
export declare const WMJSMAP_LONLAT_EPSGCODE: "EPSG:4326";
|
|
20
20
|
export declare const isProjectionSupported: (srs: string, proj4Defintions?: string[][]) => boolean;
|
|
21
|
+
export interface RefTimeDimensionMode {
|
|
22
|
+
id: string;
|
|
23
|
+
servicematch: string;
|
|
24
|
+
layermatch: string;
|
|
25
|
+
ruleset: {
|
|
26
|
+
id: string;
|
|
27
|
+
moduloHH: number[];
|
|
28
|
+
relativeSteps: number[];
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
export type RefTimeDimensionModes = RefTimeDimensionMode[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Dimension, TimeInterval } from './types';
|
|
2
|
+
import type { RefTimeDimensionMode } from './WMConstants';
|
|
2
3
|
import { ParseISOTimeRangeDuration } from './WMTime';
|
|
3
4
|
import type { CustomDate } from './WMTimeTypes';
|
|
4
5
|
/**
|
|
@@ -16,6 +17,7 @@ interface WMJSDimensionConfig {
|
|
|
16
17
|
linked?: boolean;
|
|
17
18
|
unitSymbol?: string;
|
|
18
19
|
synced?: boolean;
|
|
20
|
+
refTimeDimensionMode?: RefTimeDimensionMode;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* WMJSDimension Class
|
|
@@ -33,6 +35,7 @@ export default class WMJSDimension implements Dimension {
|
|
|
33
35
|
synced: boolean;
|
|
34
36
|
used?: boolean;
|
|
35
37
|
values?: string;
|
|
38
|
+
refTimeDimensionMode?: RefTimeDimensionMode;
|
|
36
39
|
private timeRangeDuration?;
|
|
37
40
|
private _initialized;
|
|
38
41
|
private _timeRangeDurationDate;
|
|
@@ -45,6 +48,7 @@ export default class WMJSDimension implements Dimension {
|
|
|
45
48
|
private calculatedTimeInterval;
|
|
46
49
|
constructor(config?: WMJSDimensionConfig);
|
|
47
50
|
generateAllValues(): string[];
|
|
51
|
+
setTimeValuesForReferenceTimeStandardMode(referenceTimeValueToSet: string, referenceTimeDim: WMJSDimension): void;
|
|
48
52
|
setTimeValuesForReferenceTime(referenceTimeValueToSet: string, referenceTimeDim: WMJSDimension): void;
|
|
49
53
|
reInitializeValues(values: string, forceReferenceTimeValue?: boolean): void;
|
|
50
54
|
initialize(forceothervalues?: string | undefined, forceReferenceTimeValue?: boolean): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LayerOptions, RefTimeDimensionMode, RefTimeDimensionModes } from '.';
|
|
2
|
+
import type WMJSDimension from './WMJSDimension';
|
|
3
|
+
/**
|
|
4
|
+
* Determine if the time values have a special sequencing for certain services.
|
|
5
|
+
* Please check https://gitlab.com/opengeoweb/geoweb-assets/-/issues/4311 for details.
|
|
6
|
+
* @param layer
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const wmDetermineDimensionMode: (layer: LayerOptions, refTimeDimensionModes?: RefTimeDimensionModes) => RefTimeDimensionMode | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Based on https://gitlab.com/opengeoweb/geoweb-assets/-/issues/4311
|
|
12
|
+
* @param wmDimension
|
|
13
|
+
* @param referenceTimeValueToSet
|
|
14
|
+
*/
|
|
15
|
+
export declare const wmDimensionHandleCustomTimeFunction: (wmDimension: WMJSDimension, referenceTimeValueToSet: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Style, GeographicBoundingBox, OGCWMSWMTSGetCapabilities } from './types';
|
|
2
|
+
import type { RefTimeDimensionMode } from './WMConstants';
|
|
2
3
|
import WMJSDimension from './WMJSDimension';
|
|
3
4
|
import type { LayerOptions } from './WMLayerTypes';
|
|
4
5
|
import { LayerType } from './WMLayerTypes';
|
|
@@ -54,6 +55,7 @@ export default class WMLayer {
|
|
|
54
55
|
geojson?: GeoJSON.FeatureCollection;
|
|
55
56
|
currentRequestedGetMapURL?: string;
|
|
56
57
|
olSource: object | null;
|
|
58
|
+
refTimeDimensionMode: RefTimeDimensionMode | undefined;
|
|
57
59
|
init(): void;
|
|
58
60
|
constructor(options?: LayerOptions);
|
|
59
61
|
getLayerName(): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FeatureCollection } from 'geojson';
|
|
2
2
|
import type { TileServerSettings } from '../utils';
|
|
3
3
|
import type { Dimension } from './types';
|
|
4
|
+
import type { RefTimeDimensionMode } from './WMConstants';
|
|
4
5
|
import type WMLayer from './WMLayer';
|
|
5
6
|
export declare enum LayerType {
|
|
6
7
|
mapLayer = "mapLayer",
|
|
@@ -19,7 +20,7 @@ export interface EDRFeatureLayerOptions {
|
|
|
19
20
|
parameterNames: string[];
|
|
20
21
|
}
|
|
21
22
|
export interface LayerFoundation extends TiledLayerFoundation {
|
|
22
|
-
acceptanceTimeInMinutes?: number;
|
|
23
|
+
acceptanceTimeInMinutes?: number | null;
|
|
23
24
|
dimensions?: Dimension[];
|
|
24
25
|
enabled?: boolean;
|
|
25
26
|
format?: string;
|
|
@@ -52,6 +53,7 @@ export interface LayerOptions extends LayerFoundation {
|
|
|
52
53
|
onLayerError?: (layer: WMLayer, error: Error) => void;
|
|
53
54
|
onLayerReady?: (layer: WMLayer) => void;
|
|
54
55
|
geojson?: GeoJSON.FeatureCollection;
|
|
56
|
+
refTimeDimensionMode?: RefTimeDimensionMode;
|
|
55
57
|
}
|
|
56
58
|
export interface WMSLayerDimInfo {
|
|
57
59
|
name: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WMImageStoreLoadType } from './LoadDurationCounter';
|
|
2
2
|
import WMImage from './WMImage';
|
|
3
3
|
import { WMImageEventType } from './WMImageStore';
|
|
4
|
+
import { wmDetermineDimensionMode } from './WMJSDimensionModes';
|
|
4
5
|
import { isDefined, toArray, debugLogger, DebugType, getUriWithParam, getMapDimURL } from './WMJSTools';
|
|
5
6
|
import { LayerType } from './WMLayerTypes';
|
|
6
7
|
import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
|
|
@@ -16,7 +17,7 @@ export { default as WMBBOX } from './WMBBOX';
|
|
|
16
17
|
export type { Bbox } from './WMBBOX';
|
|
17
18
|
export type { WMProjectionWH } from './WMProjection';
|
|
18
19
|
export { WMProjection };
|
|
19
|
-
export { DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, getUriWithParam, getMapDimURL, WMListener, WMXMLStringToJson, WMImageStoreLoadType, };
|
|
20
|
+
export { DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, getUriWithParam, getMapDimURL, WMListener, WMXMLStringToJson, WMImageStoreLoadType, wmDetermineDimensionMode, };
|
|
20
21
|
export type * from './types';
|
|
21
22
|
export type * from './WMTimeTypes';
|
|
22
23
|
export * from './WMConstants';
|
|
@@ -24,7 +24,7 @@ export declare const privateCheckVersion: (jsonData: WMSGetCapabilities) => stri
|
|
|
24
24
|
* @param jsonData WMSGetCapabilities
|
|
25
25
|
* @returns LayerTree
|
|
26
26
|
*/
|
|
27
|
-
export declare const privateWmsGetLayerTree: (jsonData: OGCWMSWMTSGetCapabilities) => LayerTree;
|
|
27
|
+
export declare const privateWmsGetLayerTree: (jsonData: OGCWMSWMTSGetCapabilities) => LayerTree | null;
|
|
28
28
|
/**
|
|
29
29
|
* Builds a standardized LayerTree object based on WMSLayerFromGetCapabilities object.
|
|
30
30
|
* @param wmsLayer The WMSLayerFromGetCapabilities object
|