@opengeoweb/webmap 4.16.0 → 4.17.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.
Files changed (3) hide show
  1. package/index.esm.js +154 -40
  2. package/index.umd.js +154 -40
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -926,7 +926,10 @@ var WMImage = /*#__PURE__*/function () {
926
926
  });
927
927
  })["catch"](function () {
928
928
  debug(DebugType.Error, "Unable to fetch image ".concat(url, " with headers [").concat(JSON.stringify(headers), "]"));
929
- if (url.startsWith('http://')) debug(DebugType.Error);
929
+
930
+ if (url.startsWith('http://')) {
931
+ debug(DebugType.Error);
932
+ }
930
933
 
931
934
  _this2._loadEvent(true);
932
935
  });
@@ -2326,7 +2329,10 @@ var WMTileRenderer = /*#__PURE__*/function () {
2326
2329
  var level = Math.trunc(levelF + 0.5);
2327
2330
 
2328
2331
  var getAttribution = function getAttribution(textileLayer) {
2329
- if (!textileLayer || !srs || !tileLayer[srs] || !tileLayer[srs].copyRight) return null;
2332
+ if (!textileLayer || !srs || !tileLayer[srs] || !tileLayer[srs].copyRight) {
2333
+ return null;
2334
+ }
2335
+
2330
2336
  return tileLayer[srs].copyRight;
2331
2337
  };
2332
2338
 
@@ -2749,12 +2755,29 @@ var parseISO8601DateToDate = function parseISO8601DateToDate(unvalidatedIsotime)
2749
2755
  if (!dateInterval) return;
2750
2756
 
2751
2757
  if (dateInterval.isRegularInterval === false) {
2752
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year);
2753
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() + dateInterval.month);
2754
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() + dateInterval.day);
2755
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() + dateInterval.hour);
2756
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute);
2757
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second);
2758
+ if (dateInterval.year !== 0) {
2759
+ date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year);
2760
+ }
2761
+
2762
+ if (dateInterval.month !== 0) {
2763
+ date.setUTCMonth(date.getUTCMonth() + dateInterval.month);
2764
+ }
2765
+
2766
+ if (dateInterval.day !== 0) {
2767
+ date.setUTCDate(date.getUTCDate() + dateInterval.day);
2768
+ }
2769
+
2770
+ if (dateInterval.hour !== 0) {
2771
+ date.setUTCHours(date.getUTCHours() + dateInterval.hour);
2772
+ }
2773
+
2774
+ if (dateInterval.minute !== 0) {
2775
+ date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute);
2776
+ }
2777
+
2778
+ if (dateInterval.second !== 0) {
2779
+ date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second);
2780
+ }
2758
2781
  } else {
2759
2782
  date.setTime(date.getTime() + dateInterval.getTime());
2760
2783
  }
@@ -2764,12 +2787,29 @@ var parseISO8601DateToDate = function parseISO8601DateToDate(unvalidatedIsotime)
2764
2787
  if (!dateInterval) return;
2765
2788
 
2766
2789
  if (dateInterval.isRegularInterval === false) {
2767
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year);
2768
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() - dateInterval.month);
2769
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() - dateInterval.day);
2770
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() - dateInterval.hour);
2771
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute);
2772
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second);
2790
+ if (dateInterval.year !== 0) {
2791
+ date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year);
2792
+ }
2793
+
2794
+ if (dateInterval.month !== 0) {
2795
+ date.setUTCMonth(date.getUTCMonth() - dateInterval.month);
2796
+ }
2797
+
2798
+ if (dateInterval.day !== 0) {
2799
+ date.setUTCDate(date.getUTCDate() - dateInterval.day);
2800
+ }
2801
+
2802
+ if (dateInterval.hour !== 0) {
2803
+ date.setUTCHours(date.getUTCHours() - dateInterval.hour);
2804
+ }
2805
+
2806
+ if (dateInterval.minute !== 0) {
2807
+ date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute);
2808
+ }
2809
+
2810
+ if (dateInterval.second !== 0) {
2811
+ date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second);
2812
+ }
2773
2813
  } else {
2774
2814
  date.setTime(date.getTime() - dateInterval.getTime());
2775
2815
  }
@@ -2779,12 +2819,29 @@ var parseISO8601DateToDate = function parseISO8601DateToDate(unvalidatedIsotime)
2779
2819
  if (!dateInterval) return;
2780
2820
 
2781
2821
  if (dateInterval.isRegularInterval === false) {
2782
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year * numberOfSteps);
2783
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() + dateInterval.month * numberOfSteps);
2784
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() + dateInterval.day * numberOfSteps);
2785
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() + dateInterval.hour * numberOfSteps);
2786
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute * numberOfSteps);
2787
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second * numberOfSteps);
2822
+ if (dateInterval.year !== 0) {
2823
+ date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year * numberOfSteps);
2824
+ }
2825
+
2826
+ if (dateInterval.month !== 0) {
2827
+ date.setUTCMonth(date.getUTCMonth() + dateInterval.month * numberOfSteps);
2828
+ }
2829
+
2830
+ if (dateInterval.day !== 0) {
2831
+ date.setUTCDate(date.getUTCDate() + dateInterval.day * numberOfSteps);
2832
+ }
2833
+
2834
+ if (dateInterval.hour !== 0) {
2835
+ date.setUTCHours(date.getUTCHours() + dateInterval.hour * numberOfSteps);
2836
+ }
2837
+
2838
+ if (dateInterval.minute !== 0) {
2839
+ date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute * numberOfSteps);
2840
+ }
2841
+
2842
+ if (dateInterval.second !== 0) {
2843
+ date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second * numberOfSteps);
2844
+ }
2788
2845
  } else {
2789
2846
  date.setTime(date.getTime() + dateInterval.getTime() * numberOfSteps);
2790
2847
  }
@@ -2794,12 +2851,29 @@ var parseISO8601DateToDate = function parseISO8601DateToDate(unvalidatedIsotime)
2794
2851
  if (!dateInterval) return;
2795
2852
 
2796
2853
  if (dateInterval.isRegularInterval === false) {
2797
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year * numberOfSteps);
2798
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() - dateInterval.month * numberOfSteps);
2799
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() - dateInterval.day * numberOfSteps);
2800
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() - dateInterval.hour * numberOfSteps);
2801
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute * numberOfSteps);
2802
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second * numberOfSteps);
2854
+ if (dateInterval.year !== 0) {
2855
+ date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year * numberOfSteps);
2856
+ }
2857
+
2858
+ if (dateInterval.month !== 0) {
2859
+ date.setUTCMonth(date.getUTCMonth() - dateInterval.month * numberOfSteps);
2860
+ }
2861
+
2862
+ if (dateInterval.day !== 0) {
2863
+ date.setUTCDate(date.getUTCDate() - dateInterval.day * numberOfSteps);
2864
+ }
2865
+
2866
+ if (dateInterval.hour !== 0) {
2867
+ date.setUTCHours(date.getUTCHours() - dateInterval.hour * numberOfSteps);
2868
+ }
2869
+
2870
+ if (dateInterval.minute !== 0) {
2871
+ date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute * numberOfSteps);
2872
+ }
2873
+
2874
+ if (dateInterval.second !== 0) {
2875
+ date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second * numberOfSteps);
2876
+ }
2803
2877
  } else {
2804
2878
  date.setTime(date.getTime() - dateInterval.getTime() * numberOfSteps);
2805
2879
  }
@@ -3058,7 +3132,10 @@ var ParseISOTimeRangeDuration = /*#__PURE__*/function () {
3058
3132
  var temptimeTime = temptime.getTime();
3059
3133
  temptime.add(this.timeInterval);
3060
3134
  var temptimeTimeIsOneStepFurther = temptime.getTime();
3061
- if (currentDateTime >= temptimeTime && currentDateTime < temptimeTimeIsOneStepFurther) return j;
3135
+
3136
+ if (currentDateTime >= temptimeTime && currentDateTime < temptimeTimeIsOneStepFurther) {
3137
+ return j;
3138
+ }
3062
3139
  }
3063
3140
 
3064
3141
  throw new Error("Date ".concat(currentDate.toISO8601(), " not found!"));
@@ -3718,7 +3795,10 @@ var WMJSDimension = /*#__PURE__*/function () {
3718
3795
  key: "size",
3719
3796
  value: function size() {
3720
3797
  this.initialize();
3721
- if (this._type === 'timestartstopres') return this._timeRangeDurationDate.getTimeSteps();
3798
+
3799
+ if (this._type === 'timestartstopres') {
3800
+ return this._timeRangeDurationDate.getTimeSteps();
3801
+ }
3722
3802
 
3723
3803
  if (this._type === 'timevalues' || this._type === 'anyvalue') {
3724
3804
  return this._allValues.length;
@@ -5481,7 +5561,10 @@ var WMJSMap = /*#__PURE__*/function () {
5481
5561
  return true;
5482
5562
  }
5483
5563
 
5484
- if (this.divBuffer[0].ready === false || this.divBuffer[1].ready === false) return true;
5564
+ if (this.divBuffer[0].ready === false || this.divBuffer[1].ready === false) {
5565
+ return true;
5566
+ }
5567
+
5485
5568
  return false;
5486
5569
  }
5487
5570
  }, {
@@ -6318,7 +6401,10 @@ var WMJSMap = /*#__PURE__*/function () {
6318
6401
  var foundBBOXRib = false;
6319
6402
 
6320
6403
  if (this.mouseDownPressed === 0) {
6321
- if (this.resizingBBOXEnabled === '') this.resizingBBOXCursor = getComputedStyle(this.baseDiv).cursor; // Find left rib
6404
+ if (this.resizingBBOXEnabled === '') {
6405
+ this.resizingBBOXCursor = getComputedStyle(this.baseDiv).cursor;
6406
+ } // Find left rib
6407
+
6322
6408
 
6323
6409
  if (Math.abs(this.mouseX - tlpx.x) < 6 && this.mouseY > tlpx.y && this.mouseY < brpx.y) {
6324
6410
  foundBBOXRib = true;
@@ -6435,7 +6521,11 @@ var WMJSMap = /*#__PURE__*/function () {
6435
6521
  this.mouseUpX = this.mouseX;
6436
6522
  this.mouseUpY = this.mouseY;
6437
6523
  if (this.mapPanning === 0) return;
6438
- if (this.mouseDownPressed === 1) if (this.mapMode === 'zoomout') this.zoomOut();
6524
+
6525
+ if (this.mouseDownPressed === 1) {
6526
+ if (this.mapMode === 'zoomout') this.zoomOut();
6527
+ }
6528
+
6439
6529
  this.mouseDownPressed = 0;
6440
6530
 
6441
6531
  if (this.mouseDragging === 1) {
@@ -7966,14 +8056,30 @@ var WMJSService = /*#__PURE__*/function () {
7966
8056
  var version = null;
7967
8057
 
7968
8058
  try {
7969
- if (WMSVersion.version100 === jsonData.WMT_MS_Capabilities.attr.version) version = WMSVersion.version100;
7970
- if (WMSVersion.version111 === jsonData.WMT_MS_Capabilities.attr.version) version = WMSVersion.version111;
7971
- if (WMSVersion.version130 === jsonData.WMT_MS_Capabilities.attr.version) version = WMSVersion.version130;
8059
+ if (WMSVersion.version100 === jsonData.WMT_MS_Capabilities.attr.version) {
8060
+ version = WMSVersion.version100;
8061
+ }
8062
+
8063
+ if (WMSVersion.version111 === jsonData.WMT_MS_Capabilities.attr.version) {
8064
+ version = WMSVersion.version111;
8065
+ }
8066
+
8067
+ if (WMSVersion.version130 === jsonData.WMT_MS_Capabilities.attr.version) {
8068
+ version = WMSVersion.version130;
8069
+ }
7972
8070
  } catch (e) {
7973
8071
  try {
7974
- if (WMSVersion.version100 === jsonData.WMS_Capabilities.attr.version) version = WMSVersion.version100;
7975
- if (WMSVersion.version111 === jsonData.WMS_Capabilities.attr.version) version = WMSVersion.version111;
7976
- if (WMSVersion.version130 === jsonData.WMS_Capabilities.attr.version) version = WMSVersion.version130;
8072
+ if (WMSVersion.version100 === jsonData.WMS_Capabilities.attr.version) {
8073
+ version = WMSVersion.version100;
8074
+ }
8075
+
8076
+ if (WMSVersion.version111 === jsonData.WMS_Capabilities.attr.version) {
8077
+ version = WMSVersion.version111;
8078
+ }
8079
+
8080
+ if (WMSVersion.version130 === jsonData.WMS_Capabilities.attr.version) {
8081
+ version = WMSVersion.version130;
8082
+ }
7977
8083
  } catch (_a) {
7978
8084
  var message = this.checkException(jsonData);
7979
8085
 
@@ -8447,7 +8553,10 @@ var WMLayer = /*#__PURE__*/function () {
8447
8553
  this.getlegendgraphicURL = options.service;
8448
8554
  if (options.active === true) this.active = true;else this.active = false;
8449
8555
  this.name = options.name;
8450
- if (options.getgraphinfoURL) this.getgraphinfoURL = options.getgraphinfoURL;
8556
+
8557
+ if (options.getgraphinfoURL) {
8558
+ this.getgraphinfoURL = options.getgraphinfoURL;
8559
+ }
8451
8560
 
8452
8561
  if (options.style) {
8453
8562
  this.currentStyle = options.style;
@@ -8727,8 +8836,13 @@ var WMLayer = /*#__PURE__*/function () {
8727
8836
  var serverFormats = capabilityObject.Request.GetMap.Format;
8728
8837
 
8729
8838
  for (var f = 0; f < serverFormats.length; f += 1) {
8730
- if (serverFormats[f].value.indexOf('24') > 0) this.optimalFormat = serverFormats[f].value;
8731
- if (serverFormats[f].value.indexOf('32') > 0) this.optimalFormat = serverFormats[f].value;
8839
+ if (serverFormats[f].value.indexOf('24') > 0) {
8840
+ this.optimalFormat = serverFormats[f].value;
8841
+ }
8842
+
8843
+ if (serverFormats[f].value.indexOf('32') > 0) {
8844
+ this.optimalFormat = serverFormats[f].value;
8845
+ }
8732
8846
  }
8733
8847
  } catch (e) {
8734
8848
  debug(DebugType.Error);
package/index.umd.js CHANGED
@@ -860,7 +860,10 @@
860
860
  });
861
861
  })["catch"](function () {
862
862
  debug(exports.DebugType.Error, "Unable to fetch image " + url + " with headers [" + JSON.stringify(headers) + "]");
863
- if (url.startsWith('http://')) debug(exports.DebugType.Error, 'Note that URL starts with http:// instead of https://');
863
+
864
+ if (url.startsWith('http://')) {
865
+ debug(exports.DebugType.Error, 'Note that URL starts with http:// instead of https://');
866
+ }
864
867
 
865
868
  _this._loadEvent(true);
866
869
  });
@@ -2309,7 +2312,10 @@
2309
2312
  var level = Math.trunc(levelF + 0.5);
2310
2313
 
2311
2314
  var getAttribution = function getAttribution(textileLayer) {
2312
- if (!textileLayer || !srs || !tileLayer[srs] || !tileLayer[srs].copyRight) return null;
2315
+ if (!textileLayer || !srs || !tileLayer[srs] || !tileLayer[srs].copyRight) {
2316
+ return null;
2317
+ }
2318
+
2313
2319
  return tileLayer[srs].copyRight;
2314
2320
  };
2315
2321
 
@@ -2747,12 +2753,29 @@
2747
2753
  if (!dateInterval) return;
2748
2754
 
2749
2755
  if (dateInterval.isRegularInterval === false) {
2750
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year);
2751
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() + dateInterval.month);
2752
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() + dateInterval.day);
2753
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() + dateInterval.hour);
2754
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute);
2755
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second);
2756
+ if (dateInterval.year !== 0) {
2757
+ date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year);
2758
+ }
2759
+
2760
+ if (dateInterval.month !== 0) {
2761
+ date.setUTCMonth(date.getUTCMonth() + dateInterval.month);
2762
+ }
2763
+
2764
+ if (dateInterval.day !== 0) {
2765
+ date.setUTCDate(date.getUTCDate() + dateInterval.day);
2766
+ }
2767
+
2768
+ if (dateInterval.hour !== 0) {
2769
+ date.setUTCHours(date.getUTCHours() + dateInterval.hour);
2770
+ }
2771
+
2772
+ if (dateInterval.minute !== 0) {
2773
+ date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute);
2774
+ }
2775
+
2776
+ if (dateInterval.second !== 0) {
2777
+ date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second);
2778
+ }
2756
2779
  } else {
2757
2780
  date.setTime(date.getTime() + dateInterval.getTime());
2758
2781
  }
@@ -2762,12 +2785,29 @@
2762
2785
  if (!dateInterval) return;
2763
2786
 
2764
2787
  if (dateInterval.isRegularInterval === false) {
2765
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year);
2766
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() - dateInterval.month);
2767
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() - dateInterval.day);
2768
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() - dateInterval.hour);
2769
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute);
2770
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second);
2788
+ if (dateInterval.year !== 0) {
2789
+ date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year);
2790
+ }
2791
+
2792
+ if (dateInterval.month !== 0) {
2793
+ date.setUTCMonth(date.getUTCMonth() - dateInterval.month);
2794
+ }
2795
+
2796
+ if (dateInterval.day !== 0) {
2797
+ date.setUTCDate(date.getUTCDate() - dateInterval.day);
2798
+ }
2799
+
2800
+ if (dateInterval.hour !== 0) {
2801
+ date.setUTCHours(date.getUTCHours() - dateInterval.hour);
2802
+ }
2803
+
2804
+ if (dateInterval.minute !== 0) {
2805
+ date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute);
2806
+ }
2807
+
2808
+ if (dateInterval.second !== 0) {
2809
+ date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second);
2810
+ }
2771
2811
  } else {
2772
2812
  date.setTime(date.getTime() - dateInterval.getTime());
2773
2813
  }
@@ -2777,12 +2817,29 @@
2777
2817
  if (!dateInterval) return;
2778
2818
 
2779
2819
  if (dateInterval.isRegularInterval === false) {
2780
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year * numberOfSteps);
2781
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() + dateInterval.month * numberOfSteps);
2782
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() + dateInterval.day * numberOfSteps);
2783
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() + dateInterval.hour * numberOfSteps);
2784
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute * numberOfSteps);
2785
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second * numberOfSteps);
2820
+ if (dateInterval.year !== 0) {
2821
+ date.setUTCFullYear(date.getUTCFullYear() + dateInterval.year * numberOfSteps);
2822
+ }
2823
+
2824
+ if (dateInterval.month !== 0) {
2825
+ date.setUTCMonth(date.getUTCMonth() + dateInterval.month * numberOfSteps);
2826
+ }
2827
+
2828
+ if (dateInterval.day !== 0) {
2829
+ date.setUTCDate(date.getUTCDate() + dateInterval.day * numberOfSteps);
2830
+ }
2831
+
2832
+ if (dateInterval.hour !== 0) {
2833
+ date.setUTCHours(date.getUTCHours() + dateInterval.hour * numberOfSteps);
2834
+ }
2835
+
2836
+ if (dateInterval.minute !== 0) {
2837
+ date.setUTCMinutes(date.getUTCMinutes() + dateInterval.minute * numberOfSteps);
2838
+ }
2839
+
2840
+ if (dateInterval.second !== 0) {
2841
+ date.setUTCSeconds(date.getUTCSeconds() + dateInterval.second * numberOfSteps);
2842
+ }
2786
2843
  } else {
2787
2844
  date.setTime(date.getTime() + dateInterval.getTime() * numberOfSteps);
2788
2845
  }
@@ -2792,12 +2849,29 @@
2792
2849
  if (!dateInterval) return;
2793
2850
 
2794
2851
  if (dateInterval.isRegularInterval === false) {
2795
- if (dateInterval.year !== 0) date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year * numberOfSteps);
2796
- if (dateInterval.month !== 0) date.setUTCMonth(date.getUTCMonth() - dateInterval.month * numberOfSteps);
2797
- if (dateInterval.day !== 0) date.setUTCDate(date.getUTCDate() - dateInterval.day * numberOfSteps);
2798
- if (dateInterval.hour !== 0) date.setUTCHours(date.getUTCHours() - dateInterval.hour * numberOfSteps);
2799
- if (dateInterval.minute !== 0) date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute * numberOfSteps);
2800
- if (dateInterval.second !== 0) date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second * numberOfSteps);
2852
+ if (dateInterval.year !== 0) {
2853
+ date.setUTCFullYear(date.getUTCFullYear() - dateInterval.year * numberOfSteps);
2854
+ }
2855
+
2856
+ if (dateInterval.month !== 0) {
2857
+ date.setUTCMonth(date.getUTCMonth() - dateInterval.month * numberOfSteps);
2858
+ }
2859
+
2860
+ if (dateInterval.day !== 0) {
2861
+ date.setUTCDate(date.getUTCDate() - dateInterval.day * numberOfSteps);
2862
+ }
2863
+
2864
+ if (dateInterval.hour !== 0) {
2865
+ date.setUTCHours(date.getUTCHours() - dateInterval.hour * numberOfSteps);
2866
+ }
2867
+
2868
+ if (dateInterval.minute !== 0) {
2869
+ date.setUTCMinutes(date.getUTCMinutes() - dateInterval.minute * numberOfSteps);
2870
+ }
2871
+
2872
+ if (dateInterval.second !== 0) {
2873
+ date.setUTCSeconds(date.getUTCSeconds() - dateInterval.second * numberOfSteps);
2874
+ }
2801
2875
  } else {
2802
2876
  date.setTime(date.getTime() - dateInterval.getTime() * numberOfSteps);
2803
2877
  }
@@ -3052,7 +3126,10 @@
3052
3126
  var temptimeTime = temptime.getTime();
3053
3127
  temptime.add(this.timeInterval);
3054
3128
  var temptimeTimeIsOneStepFurther = temptime.getTime();
3055
- if (currentDateTime >= temptimeTime && currentDateTime < temptimeTimeIsOneStepFurther) return j;
3129
+
3130
+ if (currentDateTime >= temptimeTime && currentDateTime < temptimeTimeIsOneStepFurther) {
3131
+ return j;
3132
+ }
3056
3133
  }
3057
3134
 
3058
3135
  throw new Error("Date " + currentDate.toISO8601() + " not found!");
@@ -3729,7 +3806,10 @@
3729
3806
 
3730
3807
  WMJSDimension.prototype.size = function () {
3731
3808
  this.initialize();
3732
- if (this._type === 'timestartstopres') return this._timeRangeDurationDate.getTimeSteps();
3809
+
3810
+ if (this._type === 'timestartstopres') {
3811
+ return this._timeRangeDurationDate.getTimeSteps();
3812
+ }
3733
3813
 
3734
3814
  if (this._type === 'timevalues' || this._type === 'anyvalue') {
3735
3815
  return this._allValues.length;
@@ -5471,7 +5551,10 @@
5471
5551
  return true;
5472
5552
  }
5473
5553
 
5474
- if (this.divBuffer[0].ready === false || this.divBuffer[1].ready === false) return true;
5554
+ if (this.divBuffer[0].ready === false || this.divBuffer[1].ready === false) {
5555
+ return true;
5556
+ }
5557
+
5475
5558
  return false;
5476
5559
  };
5477
5560
 
@@ -6272,7 +6355,10 @@
6272
6355
  var foundBBOXRib = false;
6273
6356
 
6274
6357
  if (this.mouseDownPressed === 0) {
6275
- if (this.resizingBBOXEnabled === '') this.resizingBBOXCursor = getComputedStyle(this.baseDiv).cursor; // Find left rib
6358
+ if (this.resizingBBOXEnabled === '') {
6359
+ this.resizingBBOXCursor = getComputedStyle(this.baseDiv).cursor;
6360
+ } // Find left rib
6361
+
6276
6362
 
6277
6363
  if (Math.abs(this.mouseX - tlpx.x) < 6 && this.mouseY > tlpx.y && this.mouseY < brpx.y) {
6278
6364
  foundBBOXRib = true;
@@ -6389,7 +6475,11 @@
6389
6475
  this.mouseUpX = this.mouseX;
6390
6476
  this.mouseUpY = this.mouseY;
6391
6477
  if (this.mapPanning === 0) return;
6392
- if (this.mouseDownPressed === 1) if (this.mapMode === 'zoomout') this.zoomOut();
6478
+
6479
+ if (this.mouseDownPressed === 1) {
6480
+ if (this.mapMode === 'zoomout') this.zoomOut();
6481
+ }
6482
+
6393
6483
  this.mouseDownPressed = 0;
6394
6484
 
6395
6485
  if (this.mouseDragging === 1) {
@@ -7910,14 +8000,30 @@
7910
8000
  var version = null;
7911
8001
 
7912
8002
  try {
7913
- if (WMSVersion.version100 === jsonData.WMT_MS_Capabilities.attr.version) version = WMSVersion.version100;
7914
- if (WMSVersion.version111 === jsonData.WMT_MS_Capabilities.attr.version) version = WMSVersion.version111;
7915
- if (WMSVersion.version130 === jsonData.WMT_MS_Capabilities.attr.version) version = WMSVersion.version130;
8003
+ if (WMSVersion.version100 === jsonData.WMT_MS_Capabilities.attr.version) {
8004
+ version = WMSVersion.version100;
8005
+ }
8006
+
8007
+ if (WMSVersion.version111 === jsonData.WMT_MS_Capabilities.attr.version) {
8008
+ version = WMSVersion.version111;
8009
+ }
8010
+
8011
+ if (WMSVersion.version130 === jsonData.WMT_MS_Capabilities.attr.version) {
8012
+ version = WMSVersion.version130;
8013
+ }
7916
8014
  } catch (e) {
7917
8015
  try {
7918
- if (WMSVersion.version100 === jsonData.WMS_Capabilities.attr.version) version = WMSVersion.version100;
7919
- if (WMSVersion.version111 === jsonData.WMS_Capabilities.attr.version) version = WMSVersion.version111;
7920
- if (WMSVersion.version130 === jsonData.WMS_Capabilities.attr.version) version = WMSVersion.version130;
8016
+ if (WMSVersion.version100 === jsonData.WMS_Capabilities.attr.version) {
8017
+ version = WMSVersion.version100;
8018
+ }
8019
+
8020
+ if (WMSVersion.version111 === jsonData.WMS_Capabilities.attr.version) {
8021
+ version = WMSVersion.version111;
8022
+ }
8023
+
8024
+ if (WMSVersion.version130 === jsonData.WMS_Capabilities.attr.version) {
8025
+ version = WMSVersion.version130;
8026
+ }
7921
8027
  } catch (_a) {
7922
8028
  var message = this.checkException(jsonData);
7923
8029
 
@@ -8405,7 +8511,10 @@
8405
8511
  this.getlegendgraphicURL = options.service;
8406
8512
  if (options.active === true) this.active = true;else this.active = false;
8407
8513
  this.name = options.name;
8408
- if (options.getgraphinfoURL) this.getgraphinfoURL = options.getgraphinfoURL;
8514
+
8515
+ if (options.getgraphinfoURL) {
8516
+ this.getgraphinfoURL = options.getgraphinfoURL;
8517
+ }
8409
8518
 
8410
8519
  if (options.style) {
8411
8520
  this.currentStyle = options.style;
@@ -8674,8 +8783,13 @@
8674
8783
  var serverFormats = capabilityObject.Request.GetMap.Format;
8675
8784
 
8676
8785
  for (var f = 0; f < serverFormats.length; f += 1) {
8677
- if (serverFormats[f].value.indexOf('24') > 0) this.optimalFormat = serverFormats[f].value;
8678
- if (serverFormats[f].value.indexOf('32') > 0) this.optimalFormat = serverFormats[f].value;
8786
+ if (serverFormats[f].value.indexOf('24') > 0) {
8787
+ this.optimalFormat = serverFormats[f].value;
8788
+ }
8789
+
8790
+ if (serverFormats[f].value.indexOf('32') > 0) {
8791
+ this.optimalFormat = serverFormats[f].value;
8792
+ }
8679
8793
  }
8680
8794
  } catch (e) {
8681
8795
  debug(exports.DebugType.Error, 'This WMS service has no getmap formats listed: using image/png');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap",
3
- "version": "4.16.0",
3
+ "version": "4.17.0",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {