@opengeoweb/webmap 11.0.0 → 12.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
@@ -479,7 +479,7 @@ var WMSVersion = {
479
479
  version111: '1.1.1',
480
480
  version130: '1.3.0'
481
481
  };
482
- 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']];
482
+ 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']];
483
483
  var mapImageStoreLength = 1000;
484
484
  var bgImageStoreLength = 360;
485
485
  var legendImageStoreLength = 500;
@@ -803,15 +803,14 @@ var URLEncode = function URLEncode(plaintext) {
803
803
  };
804
804
  /* Returns all dimensions with its current values as URL */
805
805
  var getMapDimURL = function getMapDimURL(layer, dimensionOverride) {
806
- var request = '';
806
+ var request = new URLSearchParams();
807
807
  layer.dimensions.forEach(function (layerDimension) {
808
808
  var overrideDim = dimensionOverride && dimensionOverride.find(function (d) {
809
809
  return d.name === layerDimension.name;
810
810
  });
811
811
  var dimension = layerDimension;
812
812
  var currentValue = overrideDim && dimension.getClosestValue(overrideDim.currentValue, true) || dimension.currentValue;
813
- request += "&" + getCorrectWMSDimName(dimension.name);
814
- request += "=" + URLEncode(currentValue);
813
+ request.append(getCorrectWMSDimName(dimension.name), currentValue);
815
814
  if (currentValue === WMDateOutSideRange || currentValue === WMDateTooEarlyString || currentValue === WMDateTooLateString) {
816
815
  throw new Error(WMDateOutSideRange);
817
816
  }
@@ -2246,7 +2245,7 @@ var getLegendGraphicURLForLayer = function getLegendGraphicURLForLayer(layer, wi
2246
2245
  }
2247
2246
  try {
2248
2247
  if (layer.legendIsDimensionDependent === true) {
2249
- legendURL += getMapDimURL(layer) + "&";
2248
+ legendURL += getMapDimURL(layer).toString() + "&";
2250
2249
  }
2251
2250
  if (layer.sldURL) {
2252
2251
  legendURL += "&SLD=" + URLEncode(layer.sldURL);
@@ -2504,6 +2503,7 @@ var WMBBOX = /*#__PURE__*/function () {
2504
2503
  this.setBBOX = this.setBBOX.bind(this);
2505
2504
  this.equals = this.equals.bind(this);
2506
2505
  this.toString = this.toString.bind(this);
2506
+ this.getExtent = this.getExtent.bind(this);
2507
2507
  this.setBBOX(left, bottom, right, top);
2508
2508
  }
2509
2509
  /**
@@ -2539,22 +2539,22 @@ var WMBBOX = /*#__PURE__*/function () {
2539
2539
  /* Otherwise it can be a bbox object or a string in the form "left,bottom,right,top" */
2540
2540
  if (typeof left === 'object') {
2541
2541
  /* A bbox object is given, so it is not a string */
2542
- var a = left;
2543
- this.left = a.left;
2544
- this.bottom = a.bottom;
2545
- this.right = a.right;
2546
- this.top = a.top;
2542
+ var bboxObject = left;
2543
+ this.left = bboxObject.left;
2544
+ this.bottom = bboxObject.bottom;
2545
+ this.right = bboxObject.right;
2546
+ this.top = bboxObject.top;
2547
2547
  } else {
2548
2548
  /* A string like "-180,-90,180,90" is given */
2549
2549
  try {
2550
- var _a = left.split(',');
2551
- if (_a.length !== 4) {
2550
+ var bboxArray = left.split(',');
2551
+ if (bboxArray.length !== 4) {
2552
2552
  return;
2553
2553
  }
2554
- this.left = parseFloat(_a[0]);
2555
- this.bottom = parseFloat(_a[1]);
2556
- this.right = parseFloat(_a[2]);
2557
- this.top = parseFloat(_a[3]);
2554
+ this.left = parseFloat(bboxArray[0]);
2555
+ this.bottom = parseFloat(bboxArray[1]);
2556
+ this.right = parseFloat(bboxArray[2]);
2557
+ this.top = parseFloat(bboxArray[3]);
2558
2558
  } catch (e) {
2559
2559
  return;
2560
2560
  }
@@ -2586,6 +2586,9 @@ var WMBBOX = /*#__PURE__*/function () {
2586
2586
  _proto.toString = function toString() {
2587
2587
  return this.left + "," + this.bottom + "," + this.right + "," + this.top;
2588
2588
  };
2589
+ _proto.getExtent = function getExtent() {
2590
+ return [this.left, this.bottom, this.right, this.top];
2591
+ };
2589
2592
  return WMBBOX;
2590
2593
  }();
2591
2594
 
@@ -3289,7 +3292,7 @@ var buildWMSGetMapRequest = function buildWMSGetMapRequest(layer, projection, di
3289
3292
  }
3290
3293
  // Handle dimensions
3291
3294
  try {
3292
- request += getMapDimURL(layer, dimensionOverride);
3295
+ request += getMapDimURL(layer, dimensionOverride).toString();
3293
3296
  } catch (e) {
3294
3297
  return undefined;
3295
3298
  }
@@ -3396,7 +3399,7 @@ var getWMSGetFeatureInfoRequestURL = function getWMSGetFeatureInfoRequestURL(lay
3396
3399
  request += "&INFO_FORMAT=" + format;
3397
3400
  request += '&STYLES=';
3398
3401
  try {
3399
- request += "&" + getMapDimURL(layer);
3402
+ request += "&" + getMapDimURL(layer).toString();
3400
3403
  } catch (e) {
3401
3404
  return undefined;
3402
3405
  }
@@ -6709,10 +6712,16 @@ var WMJSMap = /*#__PURE__*/function () {
6709
6712
  _context.next = 10;
6710
6713
  return layer.parseLayer();
6711
6714
  case 10:
6715
+ if (!this.isDestroyed) {
6716
+ _context.next = 12;
6717
+ break;
6718
+ }
6719
+ throw new Error('Map is destroyed');
6720
+ case 12:
6712
6721
  this.configureMapDimensions(layer);
6713
6722
  this._wmEventListener.triggerEvent('onlayeradd');
6714
6723
  return _context.abrupt("return", this);
6715
- case 13:
6724
+ case 15:
6716
6725
  case "end":
6717
6726
  return _context.stop();
6718
6727
  }
@@ -7852,7 +7861,7 @@ var privateCheckException = function privateCheckException(jsonData) {
7852
7861
  return undefined;
7853
7862
  };
7854
7863
  var privateWmsGetRootLayerFromGetCapabilities = function privateWmsGetRootLayerFromGetCapabilities(jsonData) {
7855
- return privateWmsGetCapabilityElement(jsonData).Layer;
7864
+ return privateWmsGetCapabilityElement(jsonData);
7856
7865
  };
7857
7866
  var privateCheckVersion111 = function privateCheckVersion111(jsonData) {
7858
7867
  try {
@@ -8375,6 +8384,7 @@ var queryWMSLayer = /*#__PURE__*/function () {
8375
8384
  var WMLayer = /*#__PURE__*/function () {
8376
8385
  function WMLayer(options) {
8377
8386
  var _this = this;
8387
+ this.olSource = null; // Reference to olSource. Need to check if animation can go forward.
8378
8388
  this.init = this.init.bind(this);
8379
8389
  this.getLayerName = this.getLayerName.bind(this);
8380
8390
  this.toggleAutoUpdate = this.toggleAutoUpdate.bind(this);
@@ -8496,7 +8506,7 @@ var WMLayer = /*#__PURE__*/function () {
8496
8506
  this.hasError = false;
8497
8507
  this.legendIsDimensionDependent = true;
8498
8508
  this.wms130bboxcompatibilitymode = false;
8499
- this.version = WMSVersion.version111;
8509
+ this.version = WMSVersion.version130;
8500
8510
  this.path = '';
8501
8511
  this.type = 'wms';
8502
8512
  this.wmsextensions = {
@@ -8628,15 +8638,15 @@ var WMLayer = /*#__PURE__*/function () {
8628
8638
  this.version = serviceInfo.version || WMSVersion.version130;
8629
8639
  this.title = jsonlayer.title;
8630
8640
  if (jsonlayer.crs) {
8631
- jsonlayer.crs.forEach(function (p) {
8641
+ jsonlayer.crs.forEach(function (projection) {
8632
8642
  var wmProjection = new WMProjection();
8633
- wmProjection.srs = p.name || '';
8634
- if (p.bbox) {
8643
+ wmProjection.srs = projection.name || '';
8644
+ if (projection.bbox) {
8635
8645
  var swapBBOX = _this4.version === WMSVersion.version130 && wmProjection.srs === PROJECTION.EPSG_4326.value && _this4.wms130bboxcompatibilitymode === false;
8636
8646
  if (swapBBOX) {
8637
- wmProjection.bbox.setBBOX(p.bbox.bottom, p.bbox.left, p.bbox.top, p.bbox.right);
8647
+ wmProjection.bbox.setBBOX(projection.bbox.bottom, projection.bbox.left, projection.bbox.top, projection.bbox.right);
8638
8648
  } else {
8639
- wmProjection.bbox.setBBOX(p.bbox.left, p.bbox.bottom, p.bbox.right, p.bbox.top);
8649
+ wmProjection.bbox.setBBOX(projection.bbox.left, projection.bbox.bottom, projection.bbox.right, projection.bbox.top);
8640
8650
  }
8641
8651
  }
8642
8652
  _this4.projectionProperties.push(wmProjection);
@@ -8664,28 +8674,28 @@ var WMLayer = /*#__PURE__*/function () {
8664
8674
  forceReload = false;
8665
8675
  }
8666
8676
  this.hasError = false;
8667
- _context.prev = 2;
8677
+ this.lastError = '';
8678
+ _context.prev = 3;
8668
8679
  if (!forceReload) {
8669
- _context.next = 7;
8680
+ _context.next = 8;
8670
8681
  break;
8671
8682
  }
8672
8683
  // eslint-disable-next-line no-console
8673
8684
  console.log('invalidateWMSGetCapabilities');
8674
- _context.next = 7;
8685
+ _context.next = 8;
8675
8686
  return invalidateWMSGetCapabilities(this.service);
8676
- case 7:
8677
- _context.next = 9;
8687
+ case 8:
8688
+ _context.next = 10;
8678
8689
  return queryWMSGetCapabilities(this.service);
8679
- case 9:
8690
+ case 10:
8680
8691
  getCapabilities = _context.sent;
8681
8692
  this._setWMSGetCapabilities(getCapabilities);
8682
8693
  return _context.abrupt("return", this);
8683
- case 14:
8684
- _context.prev = 14;
8685
- _context.t0 = _context["catch"](2);
8694
+ case 15:
8695
+ _context.prev = 15;
8696
+ _context.t0 = _context["catch"](3);
8686
8697
  this.hasError = true;
8687
- message = consoleErrorMessages.noCapabilityElementFound + "[in " + this.service + "] with message [" + _context.t0.message + "]";
8688
- this.lastError = message;
8698
+ message = !this.lastError.length ? consoleErrorMessages.noCapabilityElementFound + "[in " + this.service + "] with message [" + _context.t0.message + "]" : this.lastError;
8689
8699
  this.title = consoleErrorMessages.serviceHasError;
8690
8700
  if (isDefined(this._options.failure)) {
8691
8701
  this._options.failure(this, message);
@@ -8695,7 +8705,7 @@ var WMLayer = /*#__PURE__*/function () {
8695
8705
  case "end":
8696
8706
  return _context.stop();
8697
8707
  }
8698
- }, _callee, this, [[2, 14]]);
8708
+ }, _callee, this, [[3, 15]]);
8699
8709
  }));
8700
8710
  function parseLayer(_x) {
8701
8711
  return _parseLayer.apply(this, arguments);
@@ -8763,21 +8773,21 @@ var WMLayer = /*#__PURE__*/function () {
8763
8773
  if (isDefined(this.styles) === false) {
8764
8774
  return undefined;
8765
8775
  }
8766
- for (var j = 0; j < this.styles.length; j += 1) {
8767
- if (this.styles[j].name === styleName) {
8776
+ for (var styleIt = 0; styleIt < this.styles.length; styleIt += 1) {
8777
+ if (this.styles[styleIt].name === styleName) {
8768
8778
  if (nextPrev === -1) {
8769
- j -= 1;
8779
+ styleIt -= 1;
8770
8780
  }
8771
8781
  if (nextPrev === 1) {
8772
- j += 1;
8782
+ styleIt += 1;
8773
8783
  }
8774
- if (j < 0) {
8775
- j = this.styles.length - 1;
8784
+ if (styleIt < 0) {
8785
+ styleIt = this.styles.length - 1;
8776
8786
  }
8777
- if (j > this.styles.length - 1) {
8778
- j = 0;
8787
+ if (styleIt > this.styles.length - 1) {
8788
+ styleIt = 0;
8779
8789
  }
8780
- return this.styles[j];
8790
+ return this.styles[styleIt];
8781
8791
  }
8782
8792
  }
8783
8793
  return undefined;
@@ -10599,23 +10609,6 @@ var tilesettings = {
10599
10609
  maxLevel: 16,
10600
10610
  tileServerType: 'arcgisonline',
10601
10611
  copyRight: 'Basemap copyright: 2013 ESRI, DeLorme, NAVTEQ'
10602
- },
10603
- 'EPSG:28992': {
10604
- home: 'https://services.arcgisonline.com/arcgis/rest/services/Basiskaarten/Canvas/MapServer/tile/',
10605
- minLevel: 1,
10606
- maxLevel: 12,
10607
- origX: -285401.92,
10608
- origY: 903401.92,
10609
- resolution: 3440.64,
10610
- tileServerType: 'arcgisonline',
10611
- copyRight: 'Basiskaart bronnen: ESRI Nederland, ESRI, Kadaster, CBS en Rijkswaterstaat'
10612
- },
10613
- 'EPSG:3067': {
10614
- home: '',
10615
- minLevel: -1,
10616
- maxLevel: -1,
10617
- tileServerType: 'arcgisonline',
10618
- copyRight: ''
10619
10612
  }
10620
10613
  },
10621
10614
  arcGisTopo: {
@@ -10626,16 +10619,6 @@ var tilesettings = {
10626
10619
  maxLevel: 19,
10627
10620
  tileServerType: 'arcgisonline',
10628
10621
  copyRight: 'Basemap sources: ESRI, DeLorme, NAVTEQ, TomTom, Intermap, increment P Corp., GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, ESRI Japan, METI, ESRI China (Hong Kong), and the GIS User Community'
10629
- },
10630
- 'EPSG:28992': {
10631
- home: 'https://services.arcgisonline.com/arcgis/rest/services/Basiskaarten/Topo/MapServer/tile/',
10632
- minLevel: 1,
10633
- maxLevel: 12,
10634
- origX: -285401.92,
10635
- origY: 903401.92,
10636
- resolution: 3440.64,
10637
- tileServerType: 'arcgisonline',
10638
- copyRight: 'Basiskaart bronnen: ESRI Nederland, ESRI, Kadaster, CBS, Min VROM, Rijkswaterstaat en gemeenten: Rotterdam, Breda, Tilburg'
10639
10622
  }
10640
10623
  },
10641
10624
  arcGisOceanBaseMap: {
@@ -10677,16 +10660,6 @@ var tilesettings = {
10677
10660
  maxLevel: 16,
10678
10661
  tileServerType: 'osm',
10679
10662
  copyRight: 'OpenStreetMap - contributors'
10680
- },
10681
- 'EPSG:28992': {
10682
- home: 'https://services.arcgisonline.com/ArcGIS/rest/services/Basiskaarten/PDOK_BRT/MapServer/tile/',
10683
- minLevel: 1,
10684
- maxLevel: 12,
10685
- origX: -285401.92,
10686
- origY: 903401.92,
10687
- resolution: 3440.64,
10688
- tileServerType: 'arcgisonline',
10689
- copyRight: 'Basiskaart bronnen: PDOK, Kadaster, OpenStreetMap'
10690
10663
  }
10691
10664
  },
10692
10665
  NaturalEarth2: {
@@ -11220,4 +11193,4 @@ var privateWebMapUtils = {
11220
11193
  QUERYWMS_GETCAPABILITIES: QUERYWMS_GETCAPABILITIES
11221
11194
  };
11222
11195
 
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 };
11196
+ 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, getMapDimURL, 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": "11.0.0",
3
+ "version": "12.0.0",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,13 +8,29 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/shared": "*",
11
+ "@emotion/react": "11.14.0",
12
+ "@emotion/styled": "11.14.0",
13
+ "@mui/material": "6.4.1",
14
+ "@mui/system": "6.4.6",
15
+ "@mui/x-date-pickers": "7.27.1",
16
+ "@reduxjs/toolkit": "1.9.7",
17
+ "@sentry/react": "8.54.0",
18
+ "@storybook/react": "8.4.2",
12
19
  "@tanstack/query-core": "^5.61.5",
13
- "proj4": "^2.9.2",
20
+ "@testing-library/react": "16.0.1",
21
+ "@testing-library/user-event": "14.5.2",
22
+ "axios": "1.8.1",
23
+ "date-fns": "4.1.0",
24
+ "i18next": "^23.11.5",
25
+ "immer": "10.1.1",
26
+ "jest-date-mock": "1.0.10",
14
27
  "lodash": "^4.17.21",
15
- "i18next": "^23.11.5"
28
+ "proj4": "^2.9.2",
29
+ "re-resizable": "6.11.2",
30
+ "react": "18.3.1",
31
+ "react-draggable": "4.4.6",
32
+ "react-i18next": "15.1.1"
16
33
  },
17
- "peerDependencies": {},
18
34
  "module": "./index.esm.js",
19
35
  "type": "module",
20
36
  "main": "./index.esm.js",
@@ -28,4 +28,5 @@ export default class WMBBOX implements Bbox {
28
28
  * Returns the current BBOX as a string, useful for generating WMS requests.
29
29
  */
30
30
  toString(): string;
31
+ getExtent(): [number, number, number, number];
31
32
  }
@@ -37,7 +37,7 @@ 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 getMapDimURL: (layer: WMLayer, dimensionOverride?: Dimension[]) => string;
40
+ export declare const getMapDimURL: (layer: WMLayer, dimensionOverride?: Dimension[]) => URLSearchParams;
41
41
  /**
42
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)
43
43
  * @param baseUrl
@@ -56,6 +56,7 @@ export default class WMLayer {
56
56
  geographicBoundingBox?: GeographicBoundingBox;
57
57
  geojson?: GeoJSON.FeatureCollection;
58
58
  currentRequestedGetMapURL?: string;
59
+ olSource: object | null;
59
60
  init(): void;
60
61
  constructor(options?: LayerOptions);
61
62
  getLayerName(): string;
@@ -1,5 +1,5 @@
1
1
  import type IWMJSMap from './IWMJSMap';
2
- import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType, getUriWithParam } from './WMJSTools';
2
+ import { isDefined, WMJScheckURL, URLDecode, URLEncode, toArray, debugLogger, DebugType, getUriWithParam, getMapDimURL } from './WMJSTools';
3
3
  import { parseISO8601DateToDate, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration } from './WMTime';
4
4
  import WMImage from './WMImage';
5
5
  import { getLegendGraphicURLForLayer, legendImageStore } from './WMLegend';
@@ -17,7 +17,7 @@ export { default as WMBBOX } from './WMBBOX';
17
17
  export type { Bbox } from './WMBBOX';
18
18
  export type { WMProjectionWH } from './WMProjection';
19
19
  export { WMProjection };
20
- export { IWMJSMap, WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, getUriWithParam, WMListener, WMXMLStringToJson, };
20
+ export { IWMJSMap, WMJSMap, DateInterval, parseISO8601IntervalToDateInterval, ParseISOTimeRangeDuration, isDefined, WMJScheckURL, URLEncode, URLDecode, parseISO8601DateToDate, toArray, getLegendGraphicURLForLayer, legendImageStore, WMImage, debugLogger, DebugType, WMImageEventType, getUriWithParam, getMapDimURL, WMListener, WMXMLStringToJson, };
21
21
  export * from './types';
22
22
  export * from './WMTimeTypes';
23
23
  export * from './WMConstants';
@@ -1,41 +1,18 @@
1
1
  declare const _default: {
2
2
  name: null;
3
- title: string;
4
3
  leaf: boolean;
5
4
  path: never[];
6
5
  keywords: never[];
7
- abstract: undefined;
8
- styles: {
9
- title: string;
10
- name: string;
11
- legendURL: string;
12
- abstract: string;
13
- }[];
14
- dimensions: {
15
- name: string;
16
- units: string;
17
- currentValue: string;
18
- values: string;
19
- unitSymbol: undefined;
20
- }[];
21
- geographicBoundingBox: undefined;
6
+ styles: never[];
7
+ dimensions: never[];
22
8
  queryable: boolean;
23
- crs: {
24
- name: string;
25
- bbox: {
26
- left: number;
27
- right: number;
28
- bottom: number;
29
- top: number;
30
- };
31
- }[];
9
+ crs: never[];
32
10
  children: {
33
- name: string;
11
+ name: null;
34
12
  title: string;
35
13
  leaf: boolean;
36
14
  path: string[];
37
15
  keywords: never[];
38
- abstract: undefined;
39
16
  styles: {
40
17
  title: string;
41
18
  name: string;
@@ -47,14 +24,7 @@ declare const _default: {
47
24
  units: string;
48
25
  currentValue: string;
49
26
  values: string;
50
- unitSymbol: undefined;
51
27
  }[];
52
- geographicBoundingBox: {
53
- east: string;
54
- west: string;
55
- north: string;
56
- south: string;
57
- };
58
28
  queryable: boolean;
59
29
  crs: {
60
30
  name: string;
@@ -65,7 +35,42 @@ declare const _default: {
65
35
  top: number;
66
36
  };
67
37
  }[];
68
- children: never[];
38
+ children: {
39
+ name: string;
40
+ title: string;
41
+ leaf: boolean;
42
+ path: string[];
43
+ keywords: never[];
44
+ styles: {
45
+ title: string;
46
+ name: string;
47
+ legendURL: string;
48
+ abstract: string;
49
+ }[];
50
+ dimensions: {
51
+ name: string;
52
+ units: string;
53
+ currentValue: string;
54
+ values: string;
55
+ }[];
56
+ geographicBoundingBox: {
57
+ east: string;
58
+ west: string;
59
+ north: string;
60
+ south: string;
61
+ };
62
+ queryable: boolean;
63
+ crs: {
64
+ name: string;
65
+ bbox: {
66
+ left: number;
67
+ right: number;
68
+ bottom: number;
69
+ top: number;
70
+ };
71
+ }[];
72
+ children: never[];
73
+ }[];
69
74
  }[];
70
75
  };
71
76
  export default _default;