@opengeoweb/webmap 10.1.0 → 11.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 CHANGED
@@ -470,6 +470,7 @@ var WMEmptyLayerTitle = 'empty layer';
470
470
  var WMDateOutSideRange = 'outside range';
471
471
  var WMDateTooEarlyString = 'date too early';
472
472
  var WMDateTooLateString = 'date too late';
473
+ var WMDateUnit = 'ISO8601';
473
474
  var WMInvalidDateValues = new Set([WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString]);
474
475
  var WMSJSMAP_MINIMUM_MAP_WIDTH = 4;
475
476
  var WMSJSMAP_MINIMUM_MAP_HEIGHT = 4;
@@ -486,6 +487,206 @@ var EVENT_GETCAPABILITIES_START = 'onstartgetcapabilities';
486
487
  var EVENT_GETCAPABILITIES_READY = 'onreadygetcapabilities';
487
488
  var WMJSMAP_LONLAT_EPSGCODE = PROJECTION.EPSG_4326.value;
488
489
 
490
+ /* *
491
+ * Licensed under the Apache License, Version 2.0 (the "License");
492
+ * you may not use this file except in compliance with the License.
493
+ * You may obtain a copy of the License at
494
+ *
495
+ * http://www.apache.org/licenses/LICENSE-2.0
496
+ *
497
+ * Unless required by applicable law or agreed to in writing, software
498
+ * distributed under the License is distributed on an "AS IS" BASIS,
499
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
500
+ * See the License for the specific language governing permissions and
501
+ * limitations under the License.
502
+ *
503
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
504
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
505
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
506
+ * */
507
+ var generatedLayerIds = 0;
508
+ var generateLayerId = function generateLayerId() {
509
+ generatedLayerIds += 1;
510
+ return "layerid_" + generatedLayerIds;
511
+ };
512
+ var generatedMapIds = 0;
513
+ var generateMapId = function generateMapId() {
514
+ generatedMapIds += 1;
515
+ return "mapid_" + generatedMapIds;
516
+ };
517
+ var generatedTimesliderIds = 0;
518
+ var generateTimesliderId = function generateTimesliderId() {
519
+ generatedTimesliderIds += 1;
520
+ return "timesliderid_" + generatedTimesliderIds;
521
+ };
522
+ /**
523
+ * Map for registering wmlayers with their id's
524
+ */
525
+ var registeredWMLayersForReactLayerId = {};
526
+ /**
527
+ * Registers a WMJSLayer in a lookuptable with a layerId
528
+ * @param {WMLayer} wmLayer
529
+ * @param {string} layerId
530
+ */
531
+ var registerWMLayer = function registerWMLayer(wmLayer, layerId) {
532
+ registeredWMLayersForReactLayerId[layerId] = wmLayer;
533
+ };
534
+ /**
535
+ * Get the WMLayer from the lookuptable with layerId
536
+ * @param {string} layerId
537
+ */
538
+ var getWMLayerById = function getWMLayerById(layerId) {
539
+ return registeredWMLayersForReactLayerId[layerId];
540
+ };
541
+ var unRegisterWMJSLayer = function unRegisterWMJSLayer(layerId) {
542
+ var layer = registeredWMLayersForReactLayerId[layerId];
543
+ if (layer) {
544
+ delete registeredWMLayersForReactLayerId[layerId];
545
+ }
546
+ };
547
+ var unRegisterAllWMJSLayersAndMaps = function unRegisterAllWMJSLayersAndMaps() {
548
+ var allLayerIds = Object.keys(registeredWMLayersForReactLayerId);
549
+ allLayerIds.forEach(function (layerId) {
550
+ unRegisterWMJSLayer(layerId);
551
+ });
552
+ var allMapIds = Object.keys(registeredWMMapForReactMapId);
553
+ allMapIds.forEach(function (mapId) {
554
+ unRegisterWMJSMap(mapId);
555
+ });
556
+ };
557
+ /**
558
+ * Map for registering wmlayers with their id's
559
+ */
560
+ var registeredWMMapForReactMapId = {};
561
+ /**
562
+ * Registers a IWMJSMap in a lookuptable with a wmjsMapId
563
+ * @param {IWMJSMap} wmjsMap
564
+ * @param {string} wmjsMapId
565
+ */
566
+ var registerWMJSMap = function registerWMJSMap(wmjsMap, wmjsMapId) {
567
+ if (registeredWMMapForReactMapId[wmjsMapId]) {
568
+ console.warn("Map with id " + wmjsMapId + " already made");
569
+ }
570
+ registeredWMMapForReactMapId[wmjsMapId] = wmjsMap;
571
+ };
572
+ var unRegisterWMJSMap = function unRegisterWMJSMap(wmjsMapId) {
573
+ var wmjsMap = registeredWMMapForReactMapId[wmjsMapId];
574
+ if (wmjsMap) {
575
+ wmjsMap.getListener().suspendEvents();
576
+ try {
577
+ wmjsMap.stopAnimating && wmjsMap.stopAnimating();
578
+ } catch (e) {
579
+ console.warn(e);
580
+ }
581
+ Object.keys(registeredWMLayersForReactLayerId).forEach(function (layerId) {
582
+ var wmLayer = getWMLayerById(layerId);
583
+ if (wmLayer.parentMap === wmjsMap) {
584
+ unRegisterWMJSLayer(layerId);
585
+ }
586
+ });
587
+ wmjsMap.destroy();
588
+ delete registeredWMMapForReactMapId[wmjsMapId];
589
+ }
590
+ };
591
+ /**
592
+ * Get the wmjsMap from the lookuptable with wmjsMapId
593
+ * @param {string} wmjsMapId
594
+ */
595
+ var getWMJSMapById = function getWMJSMapById(wmjsMapId) {
596
+ return registeredWMMapForReactMapId[wmjsMapId];
597
+ };
598
+ /**
599
+ * Get all wmjsMap id's from the lookuptable with wmjsMapId
600
+ * @param {string} wmjsMapId
601
+ */
602
+ var getWMJSMapIds = function getWMJSMapIds() {
603
+ return Object.keys(registeredWMMapForReactMapId);
604
+ };
605
+ /**
606
+ * Returns the WMJSDimension object for given layerId and dimension name
607
+ * @param layerId The layerId
608
+ * @param dimensionName The dimension to lookup
609
+ */
610
+ var getWMJSDimensionForLayerAndDimension = function getWMJSDimensionForLayerAndDimension(layerId, dimensionName) {
611
+ var wmLayer = getWMLayerById(layerId);
612
+ if (!wmLayer || !dimensionName) {
613
+ return undefined;
614
+ }
615
+ var wmjsDimension = wmLayer.getDimension(dimensionName);
616
+ if (!wmjsDimension) {
617
+ return undefined;
618
+ }
619
+ return wmjsDimension;
620
+ };
621
+ /**
622
+ * Gets the WMJSTimeDimension for given activeLayerId and dimensions list
623
+ * @param layerId: The layer id to search the WMJSDimension for
624
+ * @return: The WMJSDimension if found, otherwise null
625
+ */
626
+ var getWMJSTimeDimensionForLayerId = function getWMJSTimeDimensionForLayerId(layerId) {
627
+ var wmLayer = getWMLayerById(layerId);
628
+ if (!wmLayer) {
629
+ return null;
630
+ }
631
+ return wmLayer.getDimension('time');
632
+ };
633
+ /**
634
+ * Clears the image store for all maps
635
+ */
636
+ var clearImageCacheForAllMaps = function clearImageCacheForAllMaps() {
637
+ getWMJSMapIds().forEach(function (id) {
638
+ var map = getWMJSMapById(id);
639
+ if (map && !map.isDestroyed) {
640
+ map.clearImageCache();
641
+ }
642
+ });
643
+ };
644
+ var roundWithTimeStep = function roundWithTimeStep(unixTime, timeStep, type) {
645
+ var adjustedTimeStep = timeStep * 60;
646
+ if (!type || type === 'round') {
647
+ return Math.round(unixTime / adjustedTimeStep) * adjustedTimeStep;
648
+ }
649
+ if (type === 'floor') {
650
+ return Math.floor(unixTime / adjustedTimeStep) * adjustedTimeStep;
651
+ }
652
+ if (type === 'ceil') {
653
+ return Math.ceil(unixTime / adjustedTimeStep) * adjustedTimeStep;
654
+ }
655
+ return undefined;
656
+ };
657
+ /* Adds DIM_ for certain dims */
658
+ var getCorrectWMSDimName = function getCorrectWMSDimName(origDimName) {
659
+ /* Adds DIM_ for dimensions other than height or time */
660
+ var upperCaseDimName = origDimName.toUpperCase();
661
+ if (upperCaseDimName === 'TIME') {
662
+ return upperCaseDimName;
663
+ }
664
+ if (upperCaseDimName === 'ELEVATION') {
665
+ return upperCaseDimName;
666
+ }
667
+ return "DIM_" + upperCaseDimName;
668
+ };
669
+
670
+ var utils = /*#__PURE__*/Object.freeze({
671
+ __proto__: null,
672
+ clearImageCacheForAllMaps: clearImageCacheForAllMaps,
673
+ generateLayerId: generateLayerId,
674
+ generateMapId: generateMapId,
675
+ generateTimesliderId: generateTimesliderId,
676
+ getCorrectWMSDimName: getCorrectWMSDimName,
677
+ getWMJSDimensionForLayerAndDimension: getWMJSDimensionForLayerAndDimension,
678
+ getWMJSMapById: getWMJSMapById,
679
+ getWMJSMapIds: getWMJSMapIds,
680
+ getWMJSTimeDimensionForLayerId: getWMJSTimeDimensionForLayerId,
681
+ getWMLayerById: getWMLayerById,
682
+ registerWMJSMap: registerWMJSMap,
683
+ registerWMLayer: registerWMLayer,
684
+ roundWithTimeStep: roundWithTimeStep,
685
+ unRegisterAllWMJSLayersAndMaps: unRegisterAllWMJSLayersAndMaps,
686
+ unRegisterWMJSLayer: unRegisterWMJSLayer,
687
+ unRegisterWMJSMap: unRegisterWMJSMap
688
+ });
689
+
489
690
  /* debug helper */
490
691
  var enableConsoleDebugging = false;
491
692
  var DebugType;
@@ -600,18 +801,6 @@ var URLEncode = function URLEncode(plaintext) {
600
801
  }
601
802
  return encoded;
602
803
  };
603
- /* Adds DIM_ for certain dims */
604
- var getCorrectWMSDimName = function getCorrectWMSDimName(origDimName) {
605
- /* Adds DIM_ for dimensions other than height or time */
606
- var upperCaseDimName = origDimName.toUpperCase();
607
- if (upperCaseDimName === 'TIME') {
608
- return upperCaseDimName;
609
- }
610
- if (upperCaseDimName === 'ELEVATION') {
611
- return upperCaseDimName;
612
- }
613
- return "DIM_" + upperCaseDimName;
614
- };
615
804
  /* Returns all dimensions with its current values as URL */
616
805
  var getMapDimURL = function getMapDimURL(layer, dimensionOverride) {
617
806
  var request = '';
@@ -880,6 +1069,9 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
880
1069
  crs: crs
881
1070
  };
882
1071
  };
1072
+ var getFirstPartOfDimensionValueSet = function getFirstPartOfDimensionValueSet(inputValue) {
1073
+ return (inputValue == null ? void 0 : inputValue.indexOf('/')) === -1 ? inputValue : inputValue.split('/')[0];
1074
+ };
883
1075
 
884
1076
  /**
885
1077
  * Returns the current time in ms
@@ -4045,6 +4237,9 @@ var WMJSDimension = /*#__PURE__*/function () {
4045
4237
  this.getValueForIndex = this.getValueForIndex.bind(this);
4046
4238
  this.get = this.get.bind(this);
4047
4239
  this.getFirstValue = this.getFirstValue.bind(this);
4240
+ this.getMiddleValue = this.getMiddleValue.bind(this);
4241
+ this.getValueForSpecialString = this.getValueForSpecialString.bind(this);
4242
+ this.getExactMatchingValue = this.getExactMatchingValue.bind(this);
4048
4243
  this.getLastValue = this.getLastValue.bind(this);
4049
4244
  this.getDimInterval = this.getDimInterval.bind(this);
4050
4245
  this.getIndexForValue = this.getIndexForValue.bind(this);
@@ -4062,6 +4257,13 @@ var WMJSDimension = /*#__PURE__*/function () {
4062
4257
  }
4063
4258
  if (isDefined(config.values)) {
4064
4259
  this.values = config.values;
4260
+ if (!this.units) {
4261
+ // If unit was not set, check if this is a ISO8601 period.
4262
+ var lastItem = this.values.split('/').at(-1);
4263
+ if (lastItem != null && lastItem.startsWith('P') && (lastItem == null ? void 0 : lastItem.indexOf('T')) !== -1) {
4264
+ this.units = WMDateUnit;
4265
+ }
4266
+ }
4065
4267
  }
4066
4268
  if (isDefined(config.currentValue)) {
4067
4269
  this.currentValue = config.currentValue;
@@ -4417,48 +4619,54 @@ var WMJSDimension = /*#__PURE__*/function () {
4417
4619
  var timeToFind = new Date(timeStamp).toISOString().substring(0, 19) + "Z";
4418
4620
  return this.getClosestValue(timeToFind);
4419
4621
  };
4420
- _proto.getClosestValue = function getClosestValue(inputValue, evenWhenOutsideRange) {
4421
- if (evenWhenOutsideRange === void 0) {
4422
- evenWhenOutsideRange = false;
4423
- }
4424
- this.initialize();
4425
- if (!this._initialized) {
4426
- return inputValue;
4427
- }
4428
- var newValue = (inputValue == null ? void 0 : inputValue.indexOf('/')) === -1 ? inputValue : inputValue.split('/')[0];
4429
- switch (newValue) {
4622
+ _proto.getValueForSpecialString = function getValueForSpecialString(inputValue) {
4623
+ // Check for special cases like: 'current', 'default, '', 'middle', 'earliest' and 'latest'
4624
+ switch (inputValue) {
4430
4625
  case 'current':
4431
4626
  case 'default':
4432
4627
  case '':
4433
4628
  return this.defaultValue;
4434
4629
  case 'middle':
4435
- {
4436
- var middleIndex = Math.ceil(this.size() / 2) - 1;
4437
- return this.getValueForIndex(middleIndex > 0 ? middleIndex : 0);
4438
- }
4630
+ return this.getMiddleValue();
4439
4631
  case 'earliest':
4632
+ case WMDateTooEarlyString:
4440
4633
  return this.getFirstValue();
4441
4634
  case 'latest':
4635
+ case WMDateTooLateString:
4442
4636
  return this.getLastValue();
4443
4637
  }
4444
- var value = WMDateOutSideRange;
4638
+ return inputValue;
4639
+ };
4640
+ _proto.getExactMatchingValue = function getExactMatchingValue(inputValue) {
4445
4641
  try {
4446
- value = this.getValueForIndex(this.getIndexForValue(newValue) || -1);
4642
+ var index = this.getIndexForValue(inputValue);
4643
+ return this.getValueForIndex(index);
4447
4644
  } catch (e) {
4448
4645
  if (typeof e.message === 'number') {
4449
4646
  if (e.message === '0') {
4450
- value = WMDateTooEarlyString;
4451
- } else {
4452
- value = WMDateTooLateString;
4647
+ return WMDateTooEarlyString;
4453
4648
  }
4649
+ return WMDateTooLateString;
4454
4650
  }
4455
4651
  }
4456
- if (evenWhenOutsideRange && value === WMDateTooLateString) {
4457
- value = this.getLastValue();
4458
- } else if (evenWhenOutsideRange && value === WMDateTooEarlyString) {
4459
- value = this.getValueForIndex(0);
4652
+ return WMDateOutSideRange;
4653
+ };
4654
+ _proto.getClosestValue = function getClosestValue(inputValue, evenWhenOutsideRange) {
4655
+ if (evenWhenOutsideRange === void 0) {
4656
+ evenWhenOutsideRange = false;
4657
+ }
4658
+ this.initialize();
4659
+ if (!this._initialized || inputValue === undefined || inputValue === null) {
4660
+ return inputValue;
4460
4661
  }
4461
- return value;
4662
+ // Just make sure to return the first part if accidently start/stop/res was given.
4663
+ var firstPartValue = getFirstPartOfDimensionValueSet(inputValue);
4664
+ // Handle 'current', 'default, '', 'middle', 'earliest' and 'latest'
4665
+ var newValue = this.getValueForSpecialString(firstPartValue);
4666
+ // Get the exact value as present in the dimension values
4667
+ var matchingValue = this.getExactMatchingValue(newValue);
4668
+ // Handle 'current', 'default, '', 'middle', 'earliest' and 'latest'
4669
+ return evenWhenOutsideRange ? this.getValueForSpecialString(matchingValue) : matchingValue;
4462
4670
  }
4463
4671
  /**
4464
4672
  * Get dimension value for specified index
@@ -4528,6 +4736,10 @@ var WMJSDimension = /*#__PURE__*/function () {
4528
4736
  */;
4529
4737
  _proto.getFirstValue = function getFirstValue() {
4530
4738
  return this.get(0);
4739
+ };
4740
+ _proto.getMiddleValue = function getMiddleValue() {
4741
+ var middleIndex = Math.ceil(this.size() / 2) - 1;
4742
+ return this.getValueForIndex(middleIndex > 0 ? middleIndex : 0);
4531
4743
  }
4532
4744
  /**
4533
4745
  * Returns the last dimension value
@@ -7404,7 +7616,8 @@ var consoleErrorMessages = {
7404
7616
  serviceHasError: '--- service has an error ---',
7405
7617
  serviceUrlEmpty: 'Service URL is empty',
7406
7618
  unableToConnectServer: 'Unable to connect to the service.',
7407
- wmsServiceExceptionCode: 'WMS Service exception with code'
7619
+ wmsServiceExceptionCode: 'WMS Service exception with code',
7620
+ layerNotFoundInService: 'WMS Layer was not found in service'
7408
7621
  };
7409
7622
 
7410
7623
  /* *
@@ -8410,7 +8623,9 @@ var WMLayer = /*#__PURE__*/function () {
8410
8623
  /** ***************** Go through geographicBoundingBox **************** */
8411
8624
  configureGeographicBoundingBox(jsonlayer, this);
8412
8625
  this.queryable = jsonlayer.queryable || false;
8413
- this.getmapURL = privateGetWMSServiceInfo(getCapabilitiesJson, this.service).getmapURL;
8626
+ var serviceInfo = privateGetWMSServiceInfo(getCapabilitiesJson, this.service);
8627
+ this.getmapURL = serviceInfo.getmapURL;
8628
+ this.version = serviceInfo.version || WMSVersion.version130;
8414
8629
  this.title = jsonlayer.title;
8415
8630
  if (jsonlayer.crs) {
8416
8631
  jsonlayer.crs.forEach(function (p) {
@@ -8428,6 +8643,9 @@ var WMLayer = /*#__PURE__*/function () {
8428
8643
  });
8429
8644
  }
8430
8645
  this.isConfigured = true;
8646
+ } else {
8647
+ this.hasError = true;
8648
+ this.lastError = consoleErrorMessages.layerNotFoundInService + " - " + this.name;
8431
8649
  }
8432
8650
  }
8433
8651
  /** A Promise to parse the layer, it will fetch the WMS GetCapabilities document, configure the layer and resolve to a WMLayer object
@@ -8529,8 +8747,6 @@ var WMLayer = /*#__PURE__*/function () {
8529
8747
  this.currentStyle = this.styles[0].name;
8530
8748
  this.legendGraphic = this.styles[0].legendURL;
8531
8749
  }
8532
- /* Check if this legenURL has already a Layer Property set. If so set the Layer to the name of this layer */
8533
- this.legendGraphic = getUriWithParam(this.legendGraphic);
8534
8750
  };
8535
8751
  _proto.getStyles = function getStyles() {
8536
8752
  if (this.styles) {
@@ -9731,6 +9947,25 @@ var radarGetCapabilities = {
9731
9947
  }
9732
9948
  };
9733
9949
 
9950
+ /* *
9951
+ * Licensed under the Apache License, Version 2.0 (the "License");
9952
+ * you may not use this file except in compliance with the License.
9953
+ * You may obtain a copy of the License at
9954
+ *
9955
+ * http://www.apache.org/licenses/LICENSE-2.0
9956
+ *
9957
+ * Unless required by applicable law or agreed to in writing, software
9958
+ * distributed under the License is distributed on an "AS IS" BASIS,
9959
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9960
+ * See the License for the specific language governing permissions and
9961
+ * limitations under the License.
9962
+ *
9963
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9964
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
9965
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9966
+ * */
9967
+ var WMS130GetCapabilitiesWithoutLegend = "<?xml version=\"1.0\"?>\n<WMS_Capabilities xmlns=\"http://www.opengis.net/wms\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"1.3.0\" updateSequence=\"1737582762\" xsi:schemaLocation=\"http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd\">\n <Service>\n <Name>WMS</Name>\n <Title>WMS Example</Title>\n <Abstract>Example abstract.</Abstract>\n <KeywordList/>\n <OnlineResource xlink:href=\"http://localhost:3000/wms?\" xlink:type=\"simple\"/>\n <Fees>none</Fees>\n <AccessConstraints>none</AccessConstraints>\n <LayerLimit>1</LayerLimit>\n <MaxWidth>8192</MaxWidth>\n <MaxHeight>8192</MaxHeight>\n </Service>\n <Capability>\n <Request>\n <GetCapabilities>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xlink:href=\"http://localhost:3000/wms?\" xlink:type=\"simple\"/>\n </Get>\n </HTTP>\n </DCPType>\n </GetCapabilities>\n <GetMap>\n <Format>image/png</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xlink:href=\"http://localhost:3000/wms?\" xlink:type=\"simple\"/>\n </Get>\n </HTTP>\n </DCPType>\n </GetMap>\n </Request>\n <Exception>\n <Format>XML</Format>\n </Exception>\n <Layer>\n <Title>example</Title>\n <CRS>EPSG:3857</CRS>\n <EX_GeographicBoundingBox>\n <westBoundLongitude>-180</westBoundLongitude>\n <eastBoundLongitude>180</eastBoundLongitude>\n <southBoundLatitude>-90</southBoundLatitude>\n <northBoundLatitude>90</northBoundLatitude>\n </EX_GeographicBoundingBox>\n <BoundingBox CRS=\"EPSG:3857\" minx=\"-20037508.34\" miny=\"-20048966.1\" maxx=\"20037508.34\" maxy=\"20048966.1\"/>\n <Layer>\n <Name>my_name</Name>\n <Title>My Title</Title>\n <Abstract>My Abstract</Abstract>\n <Dimension name=\"time\" units=\"ISO8601\">2025-01-22T00:00:00Z</Dimension>\n <Style>\n <Name>standard</Name>\n <Title>Standard</Title>\n <!-- LegendURL>\n <Format>image/png</Format>\n <OnlineResource xlink:href=\"http://localhost:3000/jada\" xlink:type=\"simple\"/>\n </LegendURL -->\n </Style>\n </Layer>\n </Layer>\n </Capability>\n</WMS_Capabilities>\n";
9968
+
9734
9969
  var MOCK_URL_WITH_CHILDREN = 'https://mockUrlWithChildren.nl';
9735
9970
  var MOCK_URL_NO_CHILDREN = 'https://mockUrlNoChildren.nl';
9736
9971
  var MOCK_URL_WITH_NO_TITLE = 'https://mockUrlWithNoTitle.nl';
@@ -9742,6 +9977,8 @@ var MOCK_URL_SLOW_FAILS = 'https://slowreject.nl';
9742
9977
  var MOCK_URL_DEFAULT = 'https://defaultservice.nl';
9743
9978
  var MOCK_URL_DEFAULT2 = 'https://defaultservice2.nl';
9744
9979
  var MOCK_URL_HTTP = 'http://wmsservice.nl';
9980
+ var MOCK_URL_HARMONIE = 'WMS130GetCapabilitiesHarmN25';
9981
+ var MOCK_URL_WMS130_NOLEGEND = 'MOCK_URL_WMS130_NOLEGEND';
9745
9982
  var mockLayersNoChildren = {
9746
9983
  leaf: false,
9747
9984
  name: null,
@@ -10100,7 +10337,7 @@ var mockGetCapabilitiesFetcher = /*#__PURE__*/function () {
10100
10337
  while (1) switch (_context2.prev = _context2.next) {
10101
10338
  case 0:
10102
10339
  _context2.t0 = serviceUrl;
10103
- _context2.next = _context2.t0 === MOCK_URL_NO_CHILDREN ? 3 : _context2.t0 === MOCK_URL_WITH_CHILDREN ? 4 : _context2.t0 === MOCK_URL_WITH_SUBCATEGORY ? 5 : _context2.t0 === MOCK_URL_DEFAULT ? 6 : _context2.t0 === MOCK_URL_DEFAULT2 ? 7 : _context2.t0 === MOCK_URL_WITH_NO_TITLE ? 8 : _context2.t0 === MOCK_URL_WITH_NO_TITLE_OR_NAME ? 9 : _context2.t0 === 'https://testservice' ? 10 : _context2.t0 === 'testservice' ? 11 : _context2.t0 === 'WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops' ? 12 : _context2.t0 === 'WMS130GetCapabilitiesRadarTestWithInheritLayerprops' ? 13 : _context2.t0 === 'WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops' ? 14 : _context2.t0 === 'WMS111GetCapabilitiesGeoServicesRADAR' ? 15 : _context2.t0 === 'WMSSmartMet' ? 16 : _context2.t0 === 'WMS130GetCapabilitiesHarmN25' ? 17 : _context2.t0 === MOCK_URL_INVALID ? 18 : 19;
10340
+ _context2.next = _context2.t0 === MOCK_URL_NO_CHILDREN ? 3 : _context2.t0 === MOCK_URL_WITH_CHILDREN ? 4 : _context2.t0 === 'https://geoservices.knmi.nl/wms?dataset=RADAR&' ? 4 : _context2.t0 === MOCK_URL_WITH_SUBCATEGORY ? 5 : _context2.t0 === MOCK_URL_DEFAULT ? 6 : _context2.t0 === MOCK_URL_DEFAULT2 ? 7 : _context2.t0 === MOCK_URL_WITH_NO_TITLE ? 8 : _context2.t0 === MOCK_URL_WITH_NO_TITLE_OR_NAME ? 9 : _context2.t0 === 'https://testservice' ? 10 : _context2.t0 === 'testservice' ? 11 : _context2.t0 === 'WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops' ? 12 : _context2.t0 === 'WMS130GetCapabilitiesRadarTestWithInheritLayerprops' ? 13 : _context2.t0 === 'WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops' ? 14 : _context2.t0 === 'WMS111GetCapabilitiesGeoServicesRADAR' ? 15 : _context2.t0 === 'WMSSmartMet' ? 16 : _context2.t0 === MOCK_URL_HARMONIE ? 17 : _context2.t0 === MOCK_URL_WMS130_NOLEGEND ? 18 : _context2.t0 === MOCK_URL_INVALID ? 19 : 20;
10104
10341
  break;
10105
10342
  case 3:
10106
10343
  return _context2.abrupt("return", mockGetCapNoChilds);
@@ -10133,10 +10370,12 @@ var mockGetCapabilitiesFetcher = /*#__PURE__*/function () {
10133
10370
  case 17:
10134
10371
  return _context2.abrupt("return", WMXMLStringToJson(WMS130GetCapabilitiesHarmN25));
10135
10372
  case 18:
10136
- throw new Error("Url 'https://notawmsservice.nl' is not a wms service.");
10373
+ return _context2.abrupt("return", WMXMLStringToJson(WMS130GetCapabilitiesWithoutLegend));
10137
10374
  case 19:
10138
- return _context2.abrupt("return", mockGetCap);
10375
+ throw new Error("Url 'https://notawmsservice.nl' is not a wms service.");
10139
10376
  case 20:
10377
+ return _context2.abrupt("return", mockGetCap);
10378
+ case 21:
10140
10379
  case "end":
10141
10380
  return _context2.stop();
10142
10381
  }
@@ -10151,6 +10390,7 @@ var getCapabilities = /*#__PURE__*/Object.freeze({
10151
10390
  __proto__: null,
10152
10391
  MOCK_URL_DEFAULT: MOCK_URL_DEFAULT,
10153
10392
  MOCK_URL_DEFAULT2: MOCK_URL_DEFAULT2,
10393
+ MOCK_URL_HARMONIE: MOCK_URL_HARMONIE,
10154
10394
  MOCK_URL_HTTP: MOCK_URL_HTTP,
10155
10395
  MOCK_URL_INVALID: MOCK_URL_INVALID,
10156
10396
  MOCK_URL_NO_CHILDREN: MOCK_URL_NO_CHILDREN,
@@ -10160,6 +10400,7 @@ var getCapabilities = /*#__PURE__*/Object.freeze({
10160
10400
  MOCK_URL_WITH_NO_TITLE: MOCK_URL_WITH_NO_TITLE,
10161
10401
  MOCK_URL_WITH_NO_TITLE_OR_NAME: MOCK_URL_WITH_NO_TITLE_OR_NAME,
10162
10402
  MOCK_URL_WITH_SUBCATEGORY: MOCK_URL_WITH_SUBCATEGORY,
10403
+ MOCK_URL_WMS130_NOLEGEND: MOCK_URL_WMS130_NOLEGEND,
10163
10404
  mockGetCapabilitiesFetcher: mockGetCapabilitiesFetcher,
10164
10405
  mockGetLayersFlattenedFromService: mockGetLayersFlattenedFromService,
10165
10406
  mockGetLayersFromService: mockGetLayersFromService,
@@ -10539,193 +10780,6 @@ var tilesettings = {
10539
10780
  }
10540
10781
  };
10541
10782
 
10542
- /* *
10543
- * Licensed under the Apache License, Version 2.0 (the "License");
10544
- * you may not use this file except in compliance with the License.
10545
- * You may obtain a copy of the License at
10546
- *
10547
- * http://www.apache.org/licenses/LICENSE-2.0
10548
- *
10549
- * Unless required by applicable law or agreed to in writing, software
10550
- * distributed under the License is distributed on an "AS IS" BASIS,
10551
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10552
- * See the License for the specific language governing permissions and
10553
- * limitations under the License.
10554
- *
10555
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10556
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
10557
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10558
- * */
10559
- var generatedLayerIds = 0;
10560
- var generateLayerId = function generateLayerId() {
10561
- generatedLayerIds += 1;
10562
- return "layerid_" + generatedLayerIds;
10563
- };
10564
- var generatedMapIds = 0;
10565
- var generateMapId = function generateMapId() {
10566
- generatedMapIds += 1;
10567
- return "mapid_" + generatedMapIds;
10568
- };
10569
- var generatedTimesliderIds = 0;
10570
- var generateTimesliderId = function generateTimesliderId() {
10571
- generatedTimesliderIds += 1;
10572
- return "timesliderid_" + generatedTimesliderIds;
10573
- };
10574
- /**
10575
- * Map for registering wmlayers with their id's
10576
- */
10577
- var registeredWMLayersForReactLayerId = {};
10578
- /**
10579
- * Registers a WMJSLayer in a lookuptable with a layerId
10580
- * @param {WMLayer} wmLayer
10581
- * @param {string} layerId
10582
- */
10583
- var registerWMLayer = function registerWMLayer(wmLayer, layerId) {
10584
- registeredWMLayersForReactLayerId[layerId] = wmLayer;
10585
- };
10586
- /**
10587
- * Get the WMLayer from the lookuptable with layerId
10588
- * @param {string} layerId
10589
- */
10590
- var getWMLayerById = function getWMLayerById(layerId) {
10591
- return registeredWMLayersForReactLayerId[layerId];
10592
- };
10593
- var unRegisterWMJSLayer = function unRegisterWMJSLayer(layerId) {
10594
- var layer = registeredWMLayersForReactLayerId[layerId];
10595
- if (layer) {
10596
- delete registeredWMLayersForReactLayerId[layerId];
10597
- }
10598
- };
10599
- var unRegisterAllWMJSLayersAndMaps = function unRegisterAllWMJSLayersAndMaps() {
10600
- var allLayerIds = Object.keys(registeredWMLayersForReactLayerId);
10601
- allLayerIds.forEach(function (layerId) {
10602
- unRegisterWMJSLayer(layerId);
10603
- });
10604
- var allMapIds = Object.keys(registeredWMMapForReactMapId);
10605
- allMapIds.forEach(function (mapId) {
10606
- unRegisterWMJSMap(mapId);
10607
- });
10608
- };
10609
- /**
10610
- * Map for registering wmlayers with their id's
10611
- */
10612
- var registeredWMMapForReactMapId = {};
10613
- /**
10614
- * Registers a IWMJSMap in a lookuptable with a wmjsMapId
10615
- * @param {IWMJSMap} wmjsMap
10616
- * @param {string} wmjsMapId
10617
- */
10618
- var registerWMJSMap = function registerWMJSMap(wmjsMap, wmjsMapId) {
10619
- if (registeredWMMapForReactMapId[wmjsMapId]) {
10620
- console.warn("Map with id " + wmjsMapId + " already made");
10621
- }
10622
- registeredWMMapForReactMapId[wmjsMapId] = wmjsMap;
10623
- };
10624
- var unRegisterWMJSMap = function unRegisterWMJSMap(wmjsMapId) {
10625
- var wmjsMap = registeredWMMapForReactMapId[wmjsMapId];
10626
- if (wmjsMap) {
10627
- wmjsMap.getListener().suspendEvents();
10628
- try {
10629
- wmjsMap.stopAnimating && wmjsMap.stopAnimating();
10630
- } catch (e) {
10631
- console.warn(e);
10632
- }
10633
- Object.keys(registeredWMLayersForReactLayerId).forEach(function (layerId) {
10634
- var wmLayer = getWMLayerById(layerId);
10635
- if (wmLayer.parentMap === wmjsMap) {
10636
- unRegisterWMJSLayer(layerId);
10637
- }
10638
- });
10639
- wmjsMap.destroy();
10640
- delete registeredWMMapForReactMapId[wmjsMapId];
10641
- }
10642
- };
10643
- /**
10644
- * Get the wmjsMap from the lookuptable with wmjsMapId
10645
- * @param {string} wmjsMapId
10646
- */
10647
- var getWMJSMapById = function getWMJSMapById(wmjsMapId) {
10648
- return registeredWMMapForReactMapId[wmjsMapId];
10649
- };
10650
- /**
10651
- * Get all wmjsMap id's from the lookuptable with wmjsMapId
10652
- * @param {string} wmjsMapId
10653
- */
10654
- var getWMJSMapIds = function getWMJSMapIds() {
10655
- return Object.keys(registeredWMMapForReactMapId);
10656
- };
10657
- /**
10658
- * Returns the WMJSDimension object for given layerId and dimension name
10659
- * @param layerId The layerId
10660
- * @param dimensionName The dimension to lookup
10661
- */
10662
- var getWMJSDimensionForLayerAndDimension = function getWMJSDimensionForLayerAndDimension(layerId, dimensionName) {
10663
- var wmLayer = getWMLayerById(layerId);
10664
- if (!wmLayer || !dimensionName) {
10665
- return undefined;
10666
- }
10667
- var wmjsDimension = wmLayer.getDimension(dimensionName);
10668
- if (!wmjsDimension) {
10669
- return undefined;
10670
- }
10671
- return wmjsDimension;
10672
- };
10673
- /**
10674
- * Gets the WMJSTimeDimension for given activeLayerId and dimensions list
10675
- * @param layerId: The layer id to search the WMJSDimension for
10676
- * @return: The WMJSDimension if found, otherwise null
10677
- */
10678
- var getWMJSTimeDimensionForLayerId = function getWMJSTimeDimensionForLayerId(layerId) {
10679
- var wmLayer = getWMLayerById(layerId);
10680
- if (!wmLayer) {
10681
- return null;
10682
- }
10683
- return wmLayer.getDimension('time');
10684
- };
10685
- /**
10686
- * Clears the image store for all maps
10687
- */
10688
- var clearImageCacheForAllMaps = function clearImageCacheForAllMaps() {
10689
- getWMJSMapIds().forEach(function (id) {
10690
- var map = getWMJSMapById(id);
10691
- if (map && !map.isDestroyed) {
10692
- map.clearImageCache();
10693
- }
10694
- });
10695
- };
10696
- var roundWithTimeStep = function roundWithTimeStep(unixTime, timeStep, type) {
10697
- var adjustedTimeStep = timeStep * 60;
10698
- if (!type || type === 'round') {
10699
- return Math.round(unixTime / adjustedTimeStep) * adjustedTimeStep;
10700
- }
10701
- if (type === 'floor') {
10702
- return Math.floor(unixTime / adjustedTimeStep) * adjustedTimeStep;
10703
- }
10704
- if (type === 'ceil') {
10705
- return Math.ceil(unixTime / adjustedTimeStep) * adjustedTimeStep;
10706
- }
10707
- return undefined;
10708
- };
10709
-
10710
- var utils = /*#__PURE__*/Object.freeze({
10711
- __proto__: null,
10712
- clearImageCacheForAllMaps: clearImageCacheForAllMaps,
10713
- generateLayerId: generateLayerId,
10714
- generateMapId: generateMapId,
10715
- generateTimesliderId: generateTimesliderId,
10716
- getWMJSDimensionForLayerAndDimension: getWMJSDimensionForLayerAndDimension,
10717
- getWMJSMapById: getWMJSMapById,
10718
- getWMJSMapIds: getWMJSMapIds,
10719
- getWMJSTimeDimensionForLayerId: getWMJSTimeDimensionForLayerId,
10720
- getWMLayerById: getWMLayerById,
10721
- registerWMJSMap: registerWMJSMap,
10722
- registerWMLayer: registerWMLayer,
10723
- roundWithTimeStep: roundWithTimeStep,
10724
- unRegisterAllWMJSLayersAndMaps: unRegisterAllWMJSLayersAndMaps,
10725
- unRegisterWMJSLayer: unRegisterWMJSLayer,
10726
- unRegisterWMJSMap: unRegisterWMJSMap
10727
- });
10728
-
10729
10783
  /* *
10730
10784
  * Licensed under the Apache License, Version 2.0 (the "License");
10731
10785
  * you may not use this file except in compliance with the License.
@@ -11166,4 +11220,4 @@ var privateWebMapUtils = {
11166
11220
  QUERYWMS_GETCAPABILITIES: QUERYWMS_GETCAPABILITIES
11167
11221
  };
11168
11222
 
11169
- export { DateInterval, DebugType, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WEBMAP_NAMESPACE, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMImage, WMImageEventType, WMImageStore, WMInvalidDateValues, WMJSDimension, WMJSMAP_LONLAT_EPSGCODE, WMJSMap, WMJScheckURL, WMLayer, WMListener, WMProj4Defs, WMProjection, WMSJSMAP_MINIMUM_MAP_HEIGHT, WMSJSMAP_MINIMUM_MAP_WIDTH, WMSVersion, WMXMLStringToJson, bgImageStoreLength, buildMapLayerDims, buildWMSGetMapRequest, clearImageCacheForAllMaps, debugLogger, detectLeftButton, detectRightButton, drawScaleBar, drawTextBG, generateLayerId, generateMapId, generateTimesliderId, getBBOXandProjString, getErrorsToDisplay, getGeoCoordFromLatLong, getGeoCoordFromPixelCoord, getLatLongFromPixelCoord, getLayerIndex, getLegendGraphicURLForLayer, getPixelCoordFromGeoCoord, getPixelCoordFromLatLong, getScaleBarProperties, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSMapIds, getWMJSTimeDimensionForLayerId, getWMLayerById, getWMSGetFeatureInfoRequestURL, getWMSRequests, getWMSServiceId, handleDateUtilsISOString, invalidateWMSGetCapabilities, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapImageStoreLength, mockGetCapabilities, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, privateWebMapUtils, queryWMSGetCapabilities, queryWMSLayer, queryWMSLayers, queryWMSLayersTree, queryWMSServiceInfo, registerWMJSMap, registerWMLayer, roundWithTimeStep, setWMSGetCapabilitiesFetcher, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, unRegisterWMJSMap, index as webmapTestSettings, webmapTranslations, utils as webmapUtils, wmServiceListener, wmsQueryClient };
11223
+ export { DateInterval, DebugType, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WEBMAP_NAMESPACE, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMDateUnit, WMEmptyLayerName, WMEmptyLayerTitle, WMImage, WMImageEventType, WMImageStore, WMInvalidDateValues, WMJSDimension, WMJSMAP_LONLAT_EPSGCODE, WMJSMap, WMJScheckURL, WMLayer, WMListener, WMProj4Defs, WMProjection, WMSJSMAP_MINIMUM_MAP_HEIGHT, WMSJSMAP_MINIMUM_MAP_WIDTH, WMSVersion, WMXMLStringToJson, bgImageStoreLength, buildMapLayerDims, buildWMSGetMapRequest, clearImageCacheForAllMaps, debugLogger, detectLeftButton, detectRightButton, drawScaleBar, drawTextBG, generateLayerId, generateMapId, generateTimesliderId, getBBOXandProjString, getCorrectWMSDimName, getErrorsToDisplay, getGeoCoordFromLatLong, getGeoCoordFromPixelCoord, getLatLongFromPixelCoord, getLayerIndex, getLegendGraphicURLForLayer, getPixelCoordFromGeoCoord, getPixelCoordFromLatLong, getScaleBarProperties, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSMapIds, getWMJSTimeDimensionForLayerId, getWMLayerById, getWMSGetFeatureInfoRequestURL, getWMSRequests, getWMSServiceId, handleDateUtilsISOString, invalidateWMSGetCapabilities, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapImageStoreLength, mockGetCapabilities, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, privateWebMapUtils, queryWMSGetCapabilities, queryWMSLayer, queryWMSLayers, queryWMSLayersTree, queryWMSServiceInfo, registerWMJSMap, registerWMLayer, roundWithTimeStep, setWMSGetCapabilitiesFetcher, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, unRegisterWMJSMap, index as webmapTestSettings, webmapTranslations, utils as webmapUtils, wmServiceListener, wmsQueryClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap",
3
- "version": "10.1.0",
3
+ "version": "11.0.0",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -3,6 +3,7 @@ export declare const WMEmptyLayerTitle = "empty layer";
3
3
  export declare const WMDateOutSideRange = "outside range";
4
4
  export declare const WMDateTooEarlyString = "date too early";
5
5
  export declare const WMDateTooLateString = "date too late";
6
+ export declare const WMDateUnit = "ISO8601";
6
7
  export declare const WMInvalidDateValues: Set<string>;
7
8
  export declare const WMSJSMAP_MINIMUM_MAP_WIDTH = 4;
8
9
  export declare const WMSJSMAP_MINIMUM_MAP_HEIGHT = 4;
@@ -70,6 +70,8 @@ export default class WMJSDimension implements Dimension {
70
70
  addTimeRangeDurationToValue(value: string): string;
71
71
  setTimeRangeDuration(duration: string): void;
72
72
  getClosestValueForTime(timeStamp: number): string;
73
+ getValueForSpecialString(inputValue: string): string;
74
+ getExactMatchingValue(inputValue: string): string;
73
75
  getClosestValue(inputValue: string, evenWhenOutsideRange?: boolean): string;
74
76
  /**
75
77
  * Get dimension value for specified index
@@ -88,6 +90,7 @@ export default class WMJSDimension implements Dimension {
88
90
  * Returns the first dimension value
89
91
  */
90
92
  getFirstValue(): string;
93
+ getMiddleValue(): string;
91
94
  /**
92
95
  * Returns the last dimension value
93
96
  */
@@ -37,7 +37,6 @@ export declare const getMouseXCoordinate: (event: MouseEvent) => number;
37
37
  export declare const getMouseYCoordinate: (event: MouseEvent) => number;
38
38
  export declare const URLDecode: (encodedURL: string) => string;
39
39
  export declare const URLEncode: (plaintext: string) => string;
40
- export declare const getCorrectWMSDimName: (origDimName: string) => string;
41
40
  export declare const getMapDimURL: (layer: WMLayer, dimensionOverride?: Dimension[]) => string;
42
41
  /**
43
42
  * Parses url and then it it allows for setting / changing key value pairs in that URL (From https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter)
@@ -84,3 +83,4 @@ export declare function sortArrayOfObjectsByKey<ArrayOfObjects>(array: ArrayOfOb
84
83
  * @returns
85
84
  */
86
85
  export declare const makeNodeLayerFromWMSGetCapabilityLayer: (layer: WMSLayerFromGetCapabilities, path?: string[], isleaf?: boolean, nestedLayerPath?: LayerProps[]) => LayerProps;
86
+ export declare const getFirstPartOfDimensionValueSet: (inputValue: string) => string;
@@ -0,0 +1 @@
1
+ export declare const WMS130GetCapabilitiesWithoutLegend = "<?xml version=\"1.0\"?>\n<WMS_Capabilities xmlns=\"http://www.opengis.net/wms\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"1.3.0\" updateSequence=\"1737582762\" xsi:schemaLocation=\"http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd\">\n <Service>\n <Name>WMS</Name>\n <Title>WMS Example</Title>\n <Abstract>Example abstract.</Abstract>\n <KeywordList/>\n <OnlineResource xlink:href=\"http://localhost:3000/wms?\" xlink:type=\"simple\"/>\n <Fees>none</Fees>\n <AccessConstraints>none</AccessConstraints>\n <LayerLimit>1</LayerLimit>\n <MaxWidth>8192</MaxWidth>\n <MaxHeight>8192</MaxHeight>\n </Service>\n <Capability>\n <Request>\n <GetCapabilities>\n <Format>text/xml</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xlink:href=\"http://localhost:3000/wms?\" xlink:type=\"simple\"/>\n </Get>\n </HTTP>\n </DCPType>\n </GetCapabilities>\n <GetMap>\n <Format>image/png</Format>\n <DCPType>\n <HTTP>\n <Get>\n <OnlineResource xlink:href=\"http://localhost:3000/wms?\" xlink:type=\"simple\"/>\n </Get>\n </HTTP>\n </DCPType>\n </GetMap>\n </Request>\n <Exception>\n <Format>XML</Format>\n </Exception>\n <Layer>\n <Title>example</Title>\n <CRS>EPSG:3857</CRS>\n <EX_GeographicBoundingBox>\n <westBoundLongitude>-180</westBoundLongitude>\n <eastBoundLongitude>180</eastBoundLongitude>\n <southBoundLatitude>-90</southBoundLatitude>\n <northBoundLatitude>90</northBoundLatitude>\n </EX_GeographicBoundingBox>\n <BoundingBox CRS=\"EPSG:3857\" minx=\"-20037508.34\" miny=\"-20048966.1\" maxx=\"20037508.34\" maxy=\"20048966.1\"/>\n <Layer>\n <Name>my_name</Name>\n <Title>My Title</Title>\n <Abstract>My Abstract</Abstract>\n <Dimension name=\"time\" units=\"ISO8601\">2025-01-22T00:00:00Z</Dimension>\n <Style>\n <Name>standard</Name>\n <Title>Standard</Title>\n <!-- LegendURL>\n <Format>image/png</Format>\n <OnlineResource xlink:href=\"http://localhost:3000/jada\" xlink:type=\"simple\"/>\n </LegendURL -->\n </Style>\n </Layer>\n </Layer>\n </Capability>\n</WMS_Capabilities>\n";
@@ -12,6 +12,8 @@ export declare const mockGetCapabilities: {
12
12
  MOCK_URL_DEFAULT: "https://defaultservice.nl";
13
13
  MOCK_URL_DEFAULT2: "https://defaultservice2.nl";
14
14
  MOCK_URL_HTTP: "http://wmsservice.nl";
15
+ MOCK_URL_HARMONIE: "WMS130GetCapabilitiesHarmN25";
16
+ MOCK_URL_WMS130_NOLEGEND: "MOCK_URL_WMS130_NOLEGEND";
15
17
  mockLayersNoChildren: {
16
18
  leaf: boolean;
17
19
  name: null;
@@ -10,6 +10,8 @@ export declare const MOCK_URL_SLOW_FAILS = "https://slowreject.nl";
10
10
  export declare const MOCK_URL_DEFAULT = "https://defaultservice.nl";
11
11
  export declare const MOCK_URL_DEFAULT2 = "https://defaultservice2.nl";
12
12
  export declare const MOCK_URL_HTTP = "http://wmsservice.nl";
13
+ export declare const MOCK_URL_HARMONIE = "WMS130GetCapabilitiesHarmN25";
14
+ export declare const MOCK_URL_WMS130_NOLEGEND = "MOCK_URL_WMS130_NOLEGEND";
13
15
  export declare const mockLayersNoChildren: {
14
16
  leaf: boolean;
15
17
  name: null;
@@ -8,4 +8,5 @@ export declare const consoleErrorMessages: {
8
8
  serviceUrlEmpty: string;
9
9
  unableToConnectServer: string;
10
10
  wmsServiceExceptionCode: string;
11
+ layerNotFoundInService: string;
11
12
  };
@@ -49,3 +49,4 @@ export declare const getWMJSTimeDimensionForLayerId: (layerId: string) => WMJSDi
49
49
  */
50
50
  export declare const clearImageCacheForAllMaps: () => void;
51
51
  export declare const roundWithTimeStep: (unixTime: number, timeStep: number, type?: string) => number;
52
+ export declare const getCorrectWMSDimName: (origDimName: string) => string;