@opengeoweb/webmap 4.17.0 → 4.18.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 +784 -252
- package/index.umd.js +775 -245
- package/lib/components/WMCanvasBuffer.d.ts +1 -1
- package/lib/components/WMFlyToBBox.d.ts +2 -1
- package/lib/components/WMJSDimension.d.ts +2 -1
- package/lib/components/WMJSMap.d.ts +17 -17
- package/lib/components/WMJSService.d.ts +5 -4
- package/lib/components/WMLayer.d.ts +3 -3
- package/lib/components/WMListener.d.ts +11 -2
- package/lib/components/WMTime.d.ts +1 -1
- package/lib/components/types.d.ts +28 -6
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -158,7 +158,9 @@
|
|
|
158
158
|
*/
|
|
159
159
|
|
|
160
160
|
var isDefined = function isDefined(variable) {
|
|
161
|
-
if (variable === null)
|
|
161
|
+
if (variable === null) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
162
164
|
|
|
163
165
|
if (typeof variable === 'undefined') {
|
|
164
166
|
return false;
|
|
@@ -173,7 +175,9 @@
|
|
|
173
175
|
*/
|
|
174
176
|
|
|
175
177
|
var toArray = function toArray(array) {
|
|
176
|
-
if (array === null || typeof array === 'undefined')
|
|
178
|
+
if (array === null || typeof array === 'undefined') {
|
|
179
|
+
return [];
|
|
180
|
+
}
|
|
177
181
|
|
|
178
182
|
if (array instanceof Array) {
|
|
179
183
|
return array;
|
|
@@ -191,7 +195,10 @@
|
|
|
191
195
|
*/
|
|
192
196
|
|
|
193
197
|
var WMJScheckURL = function WMJScheckURL(url) {
|
|
194
|
-
if (!isDefined(url))
|
|
198
|
+
if (!isDefined(url)) {
|
|
199
|
+
return '?';
|
|
200
|
+
}
|
|
201
|
+
|
|
195
202
|
var trimmedUrl = url.trim();
|
|
196
203
|
|
|
197
204
|
if (trimmedUrl.indexOf('?') === -1) {
|
|
@@ -218,14 +225,26 @@
|
|
|
218
225
|
return event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
|
|
219
226
|
};
|
|
220
227
|
var URLDecode = function URLDecode(encodedURL) {
|
|
221
|
-
if (!isDefined(encodedURL))
|
|
228
|
+
if (!isDefined(encodedURL)) {
|
|
229
|
+
return '';
|
|
230
|
+
}
|
|
231
|
+
|
|
222
232
|
return encodedURL.replace('+', ' ').replace('%2B', '+').replace('%20', ' ').replace('%5E', '^').replace('%26', '&').replace('%3F', '?').replace('%3E', '>').replace('%3C', '<').replace('%5C', '\\').replace('%2F', '/').replace('%25', '%').replace('%3A', ':').replace('%27', "'").replace('%24', '$');
|
|
223
233
|
}; // Encodes plain text to URL encoding
|
|
224
234
|
|
|
225
235
|
var URLEncode = function URLEncode(plaintext) {
|
|
226
|
-
if (!plaintext)
|
|
227
|
-
|
|
228
|
-
|
|
236
|
+
if (!plaintext) {
|
|
237
|
+
return plaintext;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (plaintext === undefined) {
|
|
241
|
+
return plaintext;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (plaintext === '') {
|
|
245
|
+
return plaintext;
|
|
246
|
+
}
|
|
247
|
+
|
|
229
248
|
var SAFECHARS = '0123456789' + // Numeric
|
|
230
249
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + // Alphabetic
|
|
231
250
|
'abcdefghijklmnopqrstuvwxyz' + "%-_.!~*'()"; // RFC2396 Mark characters
|
|
@@ -264,8 +283,15 @@
|
|
|
264
283
|
var getCorrectWMSDimName = function getCorrectWMSDimName(origDimName) {
|
|
265
284
|
/* Adds DIM_ for dimensions other than height or time */
|
|
266
285
|
var upperCaseDimName = origDimName.toUpperCase();
|
|
267
|
-
|
|
268
|
-
if (upperCaseDimName === '
|
|
286
|
+
|
|
287
|
+
if (upperCaseDimName === 'TIME') {
|
|
288
|
+
return upperCaseDimName;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (upperCaseDimName === 'ELEVATION') {
|
|
292
|
+
return upperCaseDimName;
|
|
293
|
+
}
|
|
294
|
+
|
|
269
295
|
return "DIM_" + upperCaseDimName;
|
|
270
296
|
};
|
|
271
297
|
/* Returns all dimensions with its current values as URL */
|
|
@@ -380,7 +406,10 @@
|
|
|
380
406
|
|
|
381
407
|
var addStylesForLayer = function addStylesForLayer(layerObjectFromWMS) {
|
|
382
408
|
/* Get the Style object */
|
|
383
|
-
if (!layerObjectFromWMS.Style)
|
|
409
|
+
if (!layerObjectFromWMS.Style) {
|
|
410
|
+
return [];
|
|
411
|
+
}
|
|
412
|
+
|
|
384
413
|
var layerStyles = toArray(layerObjectFromWMS.Style);
|
|
385
414
|
/* Loop through the list of styles from the document, create a default object and try to fill in the object with the props from the WMS GetCapabilities document */
|
|
386
415
|
|
|
@@ -420,7 +449,10 @@
|
|
|
420
449
|
});
|
|
421
450
|
};
|
|
422
451
|
var addDimensionsForLayer = function addDimensionsForLayer(layerObjectFromWMS) {
|
|
423
|
-
if (!layerObjectFromWMS.Dimension)
|
|
452
|
+
if (!layerObjectFromWMS.Dimension) {
|
|
453
|
+
return [];
|
|
454
|
+
}
|
|
455
|
+
|
|
424
456
|
var layerDimensions = toArray(layerObjectFromWMS.Dimension);
|
|
425
457
|
var layerDimensionsExtents = toArray(layerObjectFromWMS.Extent);
|
|
426
458
|
var dimensionList = layerDimensions.map(function (layerDimension) {
|
|
@@ -481,10 +513,19 @@
|
|
|
481
513
|
var spreadArray = __spreadArray([], __read(array));
|
|
482
514
|
|
|
483
515
|
return spreadArray.sort(function (a, b) {
|
|
484
|
-
|
|
516
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
517
|
+
var x = a[key]; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
518
|
+
|
|
485
519
|
var y = b[key];
|
|
486
|
-
|
|
487
|
-
if (x
|
|
520
|
+
|
|
521
|
+
if (x < y) {
|
|
522
|
+
return -1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (x > y) {
|
|
526
|
+
return 1;
|
|
527
|
+
}
|
|
528
|
+
|
|
488
529
|
return 0;
|
|
489
530
|
});
|
|
490
531
|
}
|
|
@@ -728,7 +769,10 @@
|
|
|
728
769
|
|
|
729
770
|
|
|
730
771
|
WMImage.prototype.isLoaded = function () {
|
|
731
|
-
if (this._isLoading)
|
|
772
|
+
if (this._isLoading) {
|
|
773
|
+
return false;
|
|
774
|
+
}
|
|
775
|
+
|
|
732
776
|
return this._isLoaded;
|
|
733
777
|
};
|
|
734
778
|
/**
|
|
@@ -822,7 +866,8 @@
|
|
|
822
866
|
this._srcLoaded = undefined;
|
|
823
867
|
|
|
824
868
|
this._load();
|
|
825
|
-
};
|
|
869
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
870
|
+
|
|
826
871
|
|
|
827
872
|
WMImage.prototype._getImageWithHeaders = function (url, headers) {
|
|
828
873
|
var _this = this;
|
|
@@ -1244,7 +1289,11 @@
|
|
|
1244
1289
|
/* A string like "-180,-90,180,90" is given */
|
|
1245
1290
|
try {
|
|
1246
1291
|
var a = left.split(',');
|
|
1247
|
-
|
|
1292
|
+
|
|
1293
|
+
if (a.length !== 4) {
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1248
1297
|
this.left = parseFloat(a[0]);
|
|
1249
1298
|
this.bottom = parseFloat(a[1]);
|
|
1250
1299
|
this.right = parseFloat(a[2]);
|
|
@@ -1257,10 +1306,21 @@
|
|
|
1257
1306
|
/* Apply defaults to invalid values */
|
|
1258
1307
|
|
|
1259
1308
|
|
|
1260
|
-
if (this.left == null)
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1309
|
+
if (this.left == null) {
|
|
1310
|
+
this.left = -180;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
if (this.right == null) {
|
|
1314
|
+
this.right = 180;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
if (this.bottom == null) {
|
|
1318
|
+
this.bottom = -90;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
if (this.top == null) {
|
|
1322
|
+
this.top = 90;
|
|
1323
|
+
}
|
|
1264
1324
|
};
|
|
1265
1325
|
/*
|
|
1266
1326
|
* Compares two boundingboxes and returns true if they are equal
|
|
@@ -1417,10 +1477,12 @@
|
|
|
1417
1477
|
};
|
|
1418
1478
|
|
|
1419
1479
|
WMListener.prototype.suspendEvent = function (name) {
|
|
1480
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1420
1481
|
this._suspendedEvents[name] = true;
|
|
1421
1482
|
};
|
|
1422
1483
|
|
|
1423
1484
|
WMListener.prototype.resumeEvent = function (name) {
|
|
1485
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1424
1486
|
this._suspendedEvents[name] = false;
|
|
1425
1487
|
};
|
|
1426
1488
|
|
|
@@ -1434,7 +1496,8 @@
|
|
|
1434
1496
|
|
|
1435
1497
|
|
|
1436
1498
|
WMListener.prototype.triggerEvent = function (name, param) {
|
|
1437
|
-
if (this._allEventsSuspended === true ||
|
|
1499
|
+
if (this._allEventsSuspended === true || // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1500
|
+
this._suspendedEvents[name] === true) {
|
|
1438
1501
|
return [];
|
|
1439
1502
|
}
|
|
1440
1503
|
|
|
@@ -1628,7 +1691,10 @@
|
|
|
1628
1691
|
var cachedImage = imageStore.getImageForSrc(altImage.imageSource);
|
|
1629
1692
|
return cachedImage && cachedImage.isLoaded() && !cachedImage.isLoading() && !cachedImage.hasError();
|
|
1630
1693
|
});
|
|
1631
|
-
|
|
1694
|
+
|
|
1695
|
+
if (index !== -1) {
|
|
1696
|
+
return sortedImagesForUrl[index];
|
|
1697
|
+
}
|
|
1632
1698
|
}
|
|
1633
1699
|
|
|
1634
1700
|
return null;
|
|
@@ -1840,7 +1906,10 @@
|
|
|
1840
1906
|
};
|
|
1841
1907
|
|
|
1842
1908
|
WMCanvasBuffer.prototype.finishedLoading = function () {
|
|
1843
|
-
if (this.ready)
|
|
1909
|
+
if (this.ready) {
|
|
1910
|
+
return;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1844
1913
|
this.ready = true;
|
|
1845
1914
|
|
|
1846
1915
|
for (var j = 0; j < this.layers.length; j += 1) {
|
|
@@ -1863,7 +1932,11 @@
|
|
|
1863
1932
|
WMCanvasBuffer.prototype.resize = function (w, h) {
|
|
1864
1933
|
var width = parseInt(w, 10);
|
|
1865
1934
|
var height = parseInt(h, 10);
|
|
1866
|
-
|
|
1935
|
+
|
|
1936
|
+
if (this._width === width && this._height === height) {
|
|
1937
|
+
return;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1867
1940
|
this._width = width;
|
|
1868
1941
|
this._height = height;
|
|
1869
1942
|
this.canvas.width = width;
|
|
@@ -2003,7 +2076,10 @@
|
|
|
2003
2076
|
_map.isAnimating = false;
|
|
2004
2077
|
|
|
2005
2078
|
_map.setAnimationDelay = function (delay) {
|
|
2006
|
-
if (delay < 1)
|
|
2079
|
+
if (delay < 1) {
|
|
2080
|
+
delay = 1;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2007
2083
|
_map.animationDelay = delay;
|
|
2008
2084
|
};
|
|
2009
2085
|
|
|
@@ -2062,8 +2138,14 @@
|
|
|
2062
2138
|
};
|
|
2063
2139
|
|
|
2064
2140
|
WMJSAnimate.prototype._animate = function () {
|
|
2065
|
-
if (this._map.isAnimating === false)
|
|
2066
|
-
|
|
2141
|
+
if (this._map.isAnimating === false) {
|
|
2142
|
+
return;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
if (this._map.animateBusy === true) {
|
|
2146
|
+
return;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2067
2149
|
var animationStep = this._map.animationList[this._map.currentAnimationStep];
|
|
2068
2150
|
|
|
2069
2151
|
if (!animationStep) {
|
|
@@ -2182,7 +2264,9 @@
|
|
|
2182
2264
|
index -= this._map.animationList.length;
|
|
2183
2265
|
}
|
|
2184
2266
|
|
|
2185
|
-
if (index < 0)
|
|
2267
|
+
if (index < 0) {
|
|
2268
|
+
index = 0;
|
|
2269
|
+
}
|
|
2186
2270
|
|
|
2187
2271
|
if (index >= 0) {
|
|
2188
2272
|
var animationStep = this._map.animationList[index];
|
|
@@ -2214,7 +2298,10 @@
|
|
|
2214
2298
|
};
|
|
2215
2299
|
|
|
2216
2300
|
WMJSAnimate.prototype.stopAnimating = function () {
|
|
2217
|
-
if (this._map.isAnimating === false)
|
|
2301
|
+
if (this._map.isAnimating === false) {
|
|
2302
|
+
return;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2218
2305
|
this._map._animationList = undefined;
|
|
2219
2306
|
this._divAnimationInfo.style.display = 'none';
|
|
2220
2307
|
this._map.isAnimating = false;
|
|
@@ -2262,9 +2349,18 @@
|
|
|
2262
2349
|
/* Temporal mappings from bgmaps.cgi service names to names defined here */
|
|
2263
2350
|
|
|
2264
2351
|
|
|
2265
|
-
if (layerName === 'streetmap')
|
|
2266
|
-
|
|
2267
|
-
|
|
2352
|
+
if (layerName === 'streetmap') {
|
|
2353
|
+
layerName = 'OSM';
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
if (layerName === 'pdok') {
|
|
2357
|
+
layerName = 'OSM';
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
if (layerName === 'naturalearth2') {
|
|
2361
|
+
layerName = 'NaturalEarth2';
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2268
2364
|
var tileLayer = tileOptions[layerName];
|
|
2269
2365
|
|
|
2270
2366
|
if (!tileLayer) {
|
|
@@ -2298,10 +2394,23 @@
|
|
|
2298
2394
|
var initialResolution = 2 * pi * 6378137 / tileSize;
|
|
2299
2395
|
var originShiftX = -2 * pi * 6378137 / 2.0;
|
|
2300
2396
|
var originShiftY = 2 * pi * 6378137 / 2.0;
|
|
2301
|
-
|
|
2302
|
-
if (tileSettings.
|
|
2303
|
-
|
|
2304
|
-
|
|
2397
|
+
|
|
2398
|
+
if (tileSettings.tileSize) {
|
|
2399
|
+
tileSize = tileSettings.tileSize;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
if (tileSettings.resolution) {
|
|
2403
|
+
initialResolution = tileSettings.resolution;
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
if (tileSettings.origX) {
|
|
2407
|
+
originShiftX = tileSettings.origX;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
if (tileSettings.origY) {
|
|
2411
|
+
originShiftY = tileSettings.origY;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2305
2414
|
var screenWidth = width;
|
|
2306
2415
|
var bboxw = currentBBOX.right - currentBBOX.left;
|
|
2307
2416
|
var originShiftX2 = initialResolution * tileSize + originShiftX;
|
|
@@ -2326,8 +2435,14 @@
|
|
|
2326
2435
|
var tileServerFormat = tileSettings.tileServerFormat || 'png';
|
|
2327
2436
|
var tmsEnabled = tileSettings.tms || false; // 'osm' or 'argisonline'
|
|
2328
2437
|
|
|
2329
|
-
if (level < tileSettings.minLevel)
|
|
2330
|
-
|
|
2438
|
+
if (level < tileSettings.minLevel) {
|
|
2439
|
+
level = tileSettings.minLevel;
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
if (level > tileSettings.maxLevel) {
|
|
2443
|
+
level = tileSettings.maxLevel;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2331
2446
|
var numTilesAtLevel = Math.pow(2, level);
|
|
2332
2447
|
var numTilesAtLevelX = tileSetWidth / (initialResolution / numTilesAtLevel * tileSize);
|
|
2333
2448
|
var numTilesAtLevelY = tileSetHeight / (initialResolution / numTilesAtLevel * tileSize);
|
|
@@ -2379,7 +2494,7 @@
|
|
|
2379
2494
|
x: bounds.right,
|
|
2380
2495
|
y: bounds.top
|
|
2381
2496
|
}, newBBOX, width, height);
|
|
2382
|
-
var imageURL;
|
|
2497
|
+
var imageURL = '';
|
|
2383
2498
|
|
|
2384
2499
|
if (tileServerType === 'osm') {
|
|
2385
2500
|
if (tmsEnabled) {
|
|
@@ -2442,14 +2557,37 @@
|
|
|
2442
2557
|
numTilesAtLevelX *= 2;
|
|
2443
2558
|
}
|
|
2444
2559
|
|
|
2445
|
-
if (tilenbottom < 1)
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
if (
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2560
|
+
if (tilenbottom < 1) {
|
|
2561
|
+
tilenbottom = 1;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
if (tilenbottom > numTilesAtLevelY) {
|
|
2565
|
+
tilenbottom = numTilesAtLevelY;
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
if (tilenleft < 1) {
|
|
2569
|
+
tilenleft = 1;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
if (tilenleft > numTilesAtLevelX) {
|
|
2573
|
+
tilenleft = numTilesAtLevelX;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
if (tilentop < 1) {
|
|
2577
|
+
tilentop = 1;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
if (tilentop > numTilesAtLevelY) {
|
|
2581
|
+
tilentop = numTilesAtLevelY;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
if (tilenright < 1) {
|
|
2585
|
+
tilenright = 1;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
if (tilenright > numTilesAtLevelX) {
|
|
2589
|
+
tilenright = numTilesAtLevelX;
|
|
2590
|
+
}
|
|
2453
2591
|
|
|
2454
2592
|
if (tilentop - tilenbottom > 20) {
|
|
2455
2593
|
debug(exports.DebugType.Error, "Too many tiles in vertical " + (tilentop - tilenbottom));
|
|
@@ -2470,8 +2608,14 @@
|
|
|
2470
2608
|
|
|
2471
2609
|
drawBGTiles(level);
|
|
2472
2610
|
imagesToRender.sort(function (imageA, imageB) {
|
|
2473
|
-
if (imageA.level < imageB.level)
|
|
2474
|
-
|
|
2611
|
+
if (imageA.level < imageB.level) {
|
|
2612
|
+
return -1;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
if (imageA.level > imageB.level) {
|
|
2616
|
+
return 1;
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2475
2619
|
return 0;
|
|
2476
2620
|
});
|
|
2477
2621
|
|
|
@@ -2525,7 +2669,11 @@
|
|
|
2525
2669
|
|
|
2526
2670
|
if (layer) {
|
|
2527
2671
|
var legendURL = layer.legendGraphic;
|
|
2528
|
-
|
|
2672
|
+
|
|
2673
|
+
if (!legendURL) {
|
|
2674
|
+
return undefined;
|
|
2675
|
+
} // For THREDDS WMS we need to add layers=
|
|
2676
|
+
|
|
2529
2677
|
|
|
2530
2678
|
if (!legendURL.includes('&layers=')) {
|
|
2531
2679
|
legendURL += "&layers=" + URLEncode(layer.name) + "&";
|
|
@@ -2638,7 +2786,11 @@
|
|
|
2638
2786
|
this.minute = parseInt(minute, 10);
|
|
2639
2787
|
this.second = parseInt(second, 10);
|
|
2640
2788
|
this.isRegularInterval = false;
|
|
2641
|
-
|
|
2789
|
+
|
|
2790
|
+
if (this.month === 0 && this.year === 0) {
|
|
2791
|
+
this.isRegularInterval = true;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2642
2794
|
this.getTime = this.getTime.bind(this);
|
|
2643
2795
|
this.toISO8601 = this.toISO8601.bind(this);
|
|
2644
2796
|
}
|
|
@@ -2648,8 +2800,14 @@
|
|
|
2648
2800
|
/* Months and years are unequally distributed in time
|
|
2649
2801
|
So get time is not possible */
|
|
2650
2802
|
|
|
2651
|
-
if (this.month !== 0)
|
|
2652
|
-
|
|
2803
|
+
if (this.month !== 0) {
|
|
2804
|
+
throw new Error('month !== 0');
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
if (this.year !== 0) {
|
|
2808
|
+
throw new Error('year !== 0');
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2653
2811
|
timeres += this.day * 60 * 60 * 24;
|
|
2654
2812
|
timeres += this.hour * 60 * 60;
|
|
2655
2813
|
timeres += this.minute * 60;
|
|
@@ -2660,17 +2818,35 @@
|
|
|
2660
2818
|
|
|
2661
2819
|
DateInterval.prototype.toISO8601 = function () {
|
|
2662
2820
|
var isoTime = 'P';
|
|
2663
|
-
|
|
2664
|
-
if (this.
|
|
2665
|
-
|
|
2821
|
+
|
|
2822
|
+
if (this.year !== 0) {
|
|
2823
|
+
isoTime += this.year + "Y";
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
if (this.month !== 0) {
|
|
2827
|
+
isoTime += this.month + "M";
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
if (this.day !== 0) {
|
|
2831
|
+
isoTime += this.day + "D";
|
|
2832
|
+
}
|
|
2666
2833
|
|
|
2667
2834
|
if (this.hour !== 0 && this.minute !== 0 && this.second !== 0) {
|
|
2668
2835
|
isoTime += 'T';
|
|
2669
2836
|
}
|
|
2670
2837
|
|
|
2671
|
-
if (this.hour !== 0)
|
|
2672
|
-
|
|
2673
|
-
|
|
2838
|
+
if (this.hour !== 0) {
|
|
2839
|
+
isoTime += this.hour + "H";
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
if (this.minute !== 0) {
|
|
2843
|
+
isoTime += this.minute + "M";
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
if (this.second !== 0) {
|
|
2847
|
+
isoTime += this.second + "S";
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2674
2850
|
return isoTime;
|
|
2675
2851
|
};
|
|
2676
2852
|
|
|
@@ -2720,16 +2896,29 @@
|
|
|
2720
2896
|
*/
|
|
2721
2897
|
var makeISO8601StringFromFlexibleWMSDateString = function makeISO8601StringFromFlexibleWMSDateString(isoString) {
|
|
2722
2898
|
// Datestring starting with a - token are not supported.
|
|
2723
|
-
if (!isoString || isoString.startsWith('-'))
|
|
2724
|
-
|
|
2899
|
+
if (!isoString || isoString.startsWith('-')) {
|
|
2900
|
+
return isoString;
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2903
|
+
var trimmed = isoString.trim();
|
|
2904
|
+
|
|
2905
|
+
if (trimmed.length === 4) {
|
|
2906
|
+
return trimmed + "-01-01T00:00:00Z"; // YYYY
|
|
2907
|
+
}
|
|
2725
2908
|
|
|
2726
|
-
if (
|
|
2909
|
+
if (trimmed.length === 7) {
|
|
2910
|
+
return trimmed + "-01T00:00:00Z"; // YYYY-MM
|
|
2911
|
+
}
|
|
2727
2912
|
|
|
2728
|
-
if (
|
|
2913
|
+
if (trimmed.length === 10) {
|
|
2914
|
+
return trimmed + "T00:00:00Z"; // YYYY-MM-DD
|
|
2915
|
+
}
|
|
2729
2916
|
|
|
2730
|
-
if (
|
|
2917
|
+
if (trimmed.length === 14) {
|
|
2918
|
+
return trimmed.slice(0, -1) + ":00:00Z"; // YYYY-MM-DDTHHZ
|
|
2919
|
+
}
|
|
2731
2920
|
|
|
2732
|
-
return
|
|
2921
|
+
return trimmed;
|
|
2733
2922
|
};
|
|
2734
2923
|
|
|
2735
2924
|
var isotime = makeISO8601StringFromFlexibleWMSDateString(unvalidatedIsotime);
|
|
@@ -2750,7 +2939,9 @@
|
|
|
2750
2939
|
var date = new Date(Date.UTC(year, month - 1, day, hours, minutes, seconds));
|
|
2751
2940
|
|
|
2752
2941
|
date.add = function (dateInterval) {
|
|
2753
|
-
if (!dateInterval)
|
|
2942
|
+
if (!dateInterval) {
|
|
2943
|
+
return;
|
|
2944
|
+
}
|
|
2754
2945
|
|
|
2755
2946
|
if (dateInterval.isRegularInterval === false) {
|
|
2756
2947
|
if (dateInterval.year !== 0) {
|
|
@@ -2782,7 +2973,9 @@
|
|
|
2782
2973
|
};
|
|
2783
2974
|
|
|
2784
2975
|
date.substract = function (dateInterval) {
|
|
2785
|
-
if (!dateInterval)
|
|
2976
|
+
if (!dateInterval) {
|
|
2977
|
+
return;
|
|
2978
|
+
}
|
|
2786
2979
|
|
|
2787
2980
|
if (dateInterval.isRegularInterval === false) {
|
|
2788
2981
|
if (dateInterval.year !== 0) {
|
|
@@ -2814,7 +3007,9 @@
|
|
|
2814
3007
|
};
|
|
2815
3008
|
|
|
2816
3009
|
date.addMultipleTimes = function (dateInterval, numberOfSteps) {
|
|
2817
|
-
if (!dateInterval)
|
|
3010
|
+
if (!dateInterval) {
|
|
3011
|
+
return;
|
|
3012
|
+
}
|
|
2818
3013
|
|
|
2819
3014
|
if (dateInterval.isRegularInterval === false) {
|
|
2820
3015
|
if (dateInterval.year !== 0) {
|
|
@@ -2846,7 +3041,9 @@
|
|
|
2846
3041
|
};
|
|
2847
3042
|
|
|
2848
3043
|
date.substractMultipleTimes = function (dateInterval, numberOfSteps) {
|
|
2849
|
-
if (!dateInterval)
|
|
3044
|
+
if (!dateInterval) {
|
|
3045
|
+
return;
|
|
3046
|
+
}
|
|
2850
3047
|
|
|
2851
3048
|
if (dateInterval.isRegularInterval === false) {
|
|
2852
3049
|
if (dateInterval.year !== 0) {
|
|
@@ -2909,8 +3106,17 @@
|
|
|
2909
3106
|
|
|
2910
3107
|
/** ****************************************************** */
|
|
2911
3108
|
|
|
2912
|
-
var parseISO8601IntervalToDateInterval = function parseISO8601IntervalToDateInterval(
|
|
2913
|
-
if (!
|
|
3109
|
+
var parseISO8601IntervalToDateInterval = function parseISO8601IntervalToDateInterval(_isotime) {
|
|
3110
|
+
if (!_isotime) {
|
|
3111
|
+
return undefined;
|
|
3112
|
+
}
|
|
3113
|
+
|
|
3114
|
+
var isotime = _isotime.trim();
|
|
3115
|
+
|
|
3116
|
+
if (isotime.charAt(0) !== 'P') {
|
|
3117
|
+
return undefined;
|
|
3118
|
+
}
|
|
3119
|
+
|
|
2914
3120
|
var splittedOnT = isotime.split('T');
|
|
2915
3121
|
var years = '0';
|
|
2916
3122
|
var months = '0';
|
|
@@ -2935,7 +3141,11 @@
|
|
|
2935
3141
|
|
|
2936
3142
|
if (dayIndex !== -1) {
|
|
2937
3143
|
var start = yearIndex;
|
|
2938
|
-
|
|
3144
|
+
|
|
3145
|
+
if (monthIndex !== -1) {
|
|
3146
|
+
start = monthIndex;
|
|
3147
|
+
}
|
|
3148
|
+
|
|
2939
3149
|
days = YYYYMMDDPart.substring(start + 1, dayIndex);
|
|
2940
3150
|
}
|
|
2941
3151
|
} // parse the right part
|
|
@@ -2960,7 +3170,11 @@
|
|
|
2960
3170
|
|
|
2961
3171
|
if (secondIndex !== -1) {
|
|
2962
3172
|
var start = hourIndex;
|
|
2963
|
-
|
|
3173
|
+
|
|
3174
|
+
if (minuteIndex !== -1) {
|
|
3175
|
+
start = minuteIndex;
|
|
3176
|
+
}
|
|
3177
|
+
|
|
2964
3178
|
seconds = HHMMSSPart.substring(start + 1, secondIndex);
|
|
2965
3179
|
}
|
|
2966
3180
|
}
|
|
@@ -2978,7 +3192,10 @@
|
|
|
2978
3192
|
/** ******************************************************* */
|
|
2979
3193
|
|
|
2980
3194
|
function getNumberOfTimeSteps(starttime, stoptime, interval) {
|
|
2981
|
-
if (!starttime || !stoptime || !interval)
|
|
3195
|
+
if (!starttime || !stoptime || !interval) {
|
|
3196
|
+
return undefined;
|
|
3197
|
+
}
|
|
3198
|
+
|
|
2982
3199
|
var steps = 0;
|
|
2983
3200
|
|
|
2984
3201
|
if (interval.month !== 0 || interval.year !== 0) {
|
|
@@ -3009,7 +3226,9 @@
|
|
|
3009
3226
|
this.initialized = false;
|
|
3010
3227
|
var times = isoTimeRangeDuration.split('/'); // Some safety checks
|
|
3011
3228
|
|
|
3012
|
-
if (times[2] === undefined)
|
|
3229
|
+
if (times[2] === undefined) {
|
|
3230
|
+
times[2] = 'PT1M';
|
|
3231
|
+
}
|
|
3013
3232
|
|
|
3014
3233
|
if (times[1] === undefined) {
|
|
3015
3234
|
// eslint-disable-next-line prefer-destructuring
|
|
@@ -3116,7 +3335,10 @@
|
|
|
3116
3335
|
return this.timeSteps - 1;
|
|
3117
3336
|
}
|
|
3118
3337
|
|
|
3119
|
-
if (currentDateTime > this.stopTime.getTime())
|
|
3338
|
+
if (currentDateTime > this.stopTime.getTime()) {
|
|
3339
|
+
return this.timeSteps - 1;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3120
3342
|
var timeStep = 0;
|
|
3121
3343
|
|
|
3122
3344
|
if (this.timeInterval.isRegularInterval === false) {
|
|
@@ -3321,7 +3543,9 @@
|
|
|
3321
3543
|
|
|
3322
3544
|
if (this._type === 'timestartstopres') {
|
|
3323
3545
|
/* Compose a new dataString interval and re-initialize the time dimension */
|
|
3324
|
-
var dateStringItems = this.values.split('/')
|
|
3546
|
+
var dateStringItems = this.values.split('/').map(function (value) {
|
|
3547
|
+
return value.trim();
|
|
3548
|
+
});
|
|
3325
3549
|
var dateStringInterval = dateStringItems[2];
|
|
3326
3550
|
var newValue = newStartValueTimeAsMoment.toISOString() + "/" + newEndValueTimeAsMoment.toISOString() + "/" + dateStringInterval;
|
|
3327
3551
|
this.defaultValue = newEndValueTimeAsMoment.toISOString();
|
|
@@ -3339,7 +3563,10 @@
|
|
|
3339
3563
|
var newValues = '';
|
|
3340
3564
|
|
|
3341
3565
|
for (var j = 0; j < newArray.length; j += 1) {
|
|
3342
|
-
if (j > 0)
|
|
3566
|
+
if (j > 0) {
|
|
3567
|
+
newValues += ',';
|
|
3568
|
+
}
|
|
3569
|
+
|
|
3343
3570
|
newValues += newArray[j].toISO8601();
|
|
3344
3571
|
}
|
|
3345
3572
|
|
|
@@ -3366,14 +3593,20 @@
|
|
|
3366
3593
|
forceReferenceTimeValue = false;
|
|
3367
3594
|
}
|
|
3368
3595
|
|
|
3369
|
-
if (this._initialized === true)
|
|
3596
|
+
if (this._initialized === true) {
|
|
3597
|
+
return;
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3370
3600
|
var ogcdimvalues = this.values;
|
|
3371
3601
|
|
|
3372
3602
|
if (forceothervalues) {
|
|
3373
3603
|
ogcdimvalues = forceothervalues;
|
|
3374
3604
|
}
|
|
3375
3605
|
|
|
3376
|
-
if (!isDefined(ogcdimvalues))
|
|
3606
|
+
if (!isDefined(ogcdimvalues)) {
|
|
3607
|
+
return;
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3377
3610
|
this._allValues = [];
|
|
3378
3611
|
this._initialized = true;
|
|
3379
3612
|
|
|
@@ -3394,10 +3627,14 @@
|
|
|
3394
3627
|
var values = ogcdimvalues.split(',');
|
|
3395
3628
|
|
|
3396
3629
|
for (var j = 0; j < values.length; j += 1) {
|
|
3397
|
-
var
|
|
3630
|
+
var valuesRangedNoTrim = values[j].split('/');
|
|
3398
3631
|
|
|
3399
|
-
if (
|
|
3632
|
+
if (valuesRangedNoTrim.length === 3) {
|
|
3633
|
+
var valuesRanged = valuesRangedNoTrim.map(function (value) {
|
|
3634
|
+
return value.trim();
|
|
3635
|
+
});
|
|
3400
3636
|
/* Can be either time like '2021-03-17T06:00:00Z/2021-03-21T00:00:00Z/PT6H' or something else, like '0/24/2' */
|
|
3637
|
+
|
|
3401
3638
|
if (valuesRanged[2].charAt(0) === 'P') {
|
|
3402
3639
|
var partTimeRanges = new ParseISOTimeRangeDuration(values[j]);
|
|
3403
3640
|
|
|
@@ -3415,8 +3652,14 @@
|
|
|
3415
3652
|
var stop_1 = parseFloat(valuesRanged[1]);
|
|
3416
3653
|
var res = parseFloat(valuesRanged[2]);
|
|
3417
3654
|
stop_1 += res;
|
|
3418
|
-
|
|
3419
|
-
if (
|
|
3655
|
+
|
|
3656
|
+
if (start > stop_1) {
|
|
3657
|
+
stop_1 = start;
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
if (res <= 0) {
|
|
3661
|
+
res = 1;
|
|
3662
|
+
}
|
|
3420
3663
|
|
|
3421
3664
|
for (var j2 = start; j2 < stop_1; j2 += res) {
|
|
3422
3665
|
this._allValues.push(String(j2));
|
|
@@ -3435,26 +3678,39 @@
|
|
|
3435
3678
|
}
|
|
3436
3679
|
}
|
|
3437
3680
|
}
|
|
3681
|
+
/* If no default value is given, take the last / most recent one */
|
|
3438
3682
|
|
|
3439
|
-
|
|
3440
|
-
|
|
3683
|
+
|
|
3684
|
+
if (!isDefined(this.defaultValue) || this.defaultValue === '') {
|
|
3685
|
+
this.defaultValue = this.getLastValue();
|
|
3686
|
+
}
|
|
3687
|
+
/* Check if the string 'current' is given, and find the closest value inside the dimension */
|
|
3688
|
+
|
|
3689
|
+
|
|
3690
|
+
if (this.defaultValue === 'current') {
|
|
3691
|
+
this.defaultValue = this.getClosestValue(moment__default["default"]().utc().format('YYYY-MM-DDTHH:mm:ss[Z]'), true);
|
|
3441
3692
|
}
|
|
3442
3693
|
/* If no currentvalue is set, set the default */
|
|
3443
3694
|
|
|
3444
3695
|
|
|
3445
|
-
if (!
|
|
3446
|
-
this.currentValue = this.
|
|
3696
|
+
if (!this.currentValue || this.currentValue.length === 0) {
|
|
3697
|
+
this.currentValue = this.defaultValue;
|
|
3447
3698
|
}
|
|
3448
3699
|
/* Check for out of range values and adjust accordingly to a valid range */
|
|
3449
3700
|
|
|
3450
3701
|
|
|
3451
3702
|
var index = this.getIndexForValue(this.currentValue);
|
|
3452
|
-
if (index === -2) this.currentValue = this.getLastValue(); // Date is past the latest (-2), so set it to the last value
|
|
3453
3703
|
|
|
3454
|
-
if (index === -
|
|
3704
|
+
if (index === -2) {
|
|
3705
|
+
this.currentValue = this.getLastValue(); // Date is past the latest (-2), so set it to the last value
|
|
3706
|
+
}
|
|
3455
3707
|
|
|
3708
|
+
if (index === -1) {
|
|
3709
|
+
this.currentValue = this.getFirstValue(); // Date is past the first (-1), so set it to the first value
|
|
3710
|
+
}
|
|
3456
3711
|
/* In case of reference time, the time dimension range is changed, check if the current time still fits in that range */
|
|
3457
3712
|
|
|
3713
|
+
|
|
3458
3714
|
if (forceReferenceTimeValue) {
|
|
3459
3715
|
if (this.getIndexForValue(this.currentValue, true) < 0) {
|
|
3460
3716
|
this.currentValue = this.getClosestValue(this.currentValue);
|
|
@@ -3605,7 +3861,11 @@
|
|
|
3605
3861
|
|
|
3606
3862
|
if (newValue === 'middle') {
|
|
3607
3863
|
var middleIndex = Math.ceil(this.size() / 2) - 1;
|
|
3608
|
-
|
|
3864
|
+
|
|
3865
|
+
if (middleIndex < 0) {
|
|
3866
|
+
middleIndex = 0;
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3609
3869
|
return this.getValueForIndex(middleIndex);
|
|
3610
3870
|
}
|
|
3611
3871
|
|
|
@@ -3625,7 +3885,11 @@
|
|
|
3625
3885
|
value = this.getValueForIndex(index);
|
|
3626
3886
|
} catch (e) {
|
|
3627
3887
|
if (typeof e.message === 'number') {
|
|
3628
|
-
if (e.message === 0)
|
|
3888
|
+
if (e.message === 0) {
|
|
3889
|
+
value = WMDateTooEarlyString;
|
|
3890
|
+
} else {
|
|
3891
|
+
value = WMDateTooLateString;
|
|
3892
|
+
}
|
|
3629
3893
|
}
|
|
3630
3894
|
}
|
|
3631
3895
|
|
|
@@ -3666,8 +3930,14 @@
|
|
|
3666
3930
|
return this._timeRangeDurationDate.getDateAtTimeStep(index);
|
|
3667
3931
|
}
|
|
3668
3932
|
|
|
3669
|
-
if (this._type === 'timevalues')
|
|
3670
|
-
|
|
3933
|
+
if (this._type === 'timevalues') {
|
|
3934
|
+
return this._allValues[index];
|
|
3935
|
+
}
|
|
3936
|
+
|
|
3937
|
+
if (this._type === 'anyvalue') {
|
|
3938
|
+
return this._allValues[index];
|
|
3939
|
+
}
|
|
3940
|
+
|
|
3671
3941
|
return null;
|
|
3672
3942
|
};
|
|
3673
3943
|
/**
|
|
@@ -3678,7 +3948,11 @@
|
|
|
3678
3948
|
|
|
3679
3949
|
WMJSDimension.prototype.getDimInterval = function () {
|
|
3680
3950
|
this.initialize();
|
|
3681
|
-
|
|
3951
|
+
|
|
3952
|
+
if (!this.dimTimeInterval) {
|
|
3953
|
+
return undefined;
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3682
3956
|
var _a = this.dimTimeInterval,
|
|
3683
3957
|
year = _a.year,
|
|
3684
3958
|
month = _a.month,
|
|
@@ -3751,7 +4025,10 @@
|
|
|
3751
4025
|
|
|
3752
4026
|
return this._timeRangeDurationDate.getTimeStepFromDate(value, outSideOfRangeFlag);
|
|
3753
4027
|
} catch (e) {
|
|
3754
|
-
if (parseInt(e.message, 10) === 0)
|
|
4028
|
+
if (parseInt(e.message, 10) === 0) {
|
|
4029
|
+
return -1;
|
|
4030
|
+
}
|
|
4031
|
+
|
|
3755
4032
|
return -2;
|
|
3756
4033
|
}
|
|
3757
4034
|
}
|
|
@@ -3759,7 +4036,7 @@
|
|
|
3759
4036
|
if (this._type === 'timevalues') {
|
|
3760
4037
|
try {
|
|
3761
4038
|
var dateToFind = parseISO8601DateToDate(value).getTime();
|
|
3762
|
-
var minDistance =
|
|
4039
|
+
var minDistance = null;
|
|
3763
4040
|
var foundIndex = 0;
|
|
3764
4041
|
var minTime = null;
|
|
3765
4042
|
var maxTime = null;
|
|
@@ -3767,11 +4044,23 @@
|
|
|
3767
4044
|
for (var j = 0; j < this._allValues.length; j += 1) {
|
|
3768
4045
|
var time = this._allDates[j].getTime();
|
|
3769
4046
|
|
|
3770
|
-
if (time < minTime || minTime === null)
|
|
3771
|
-
|
|
4047
|
+
if (time < minTime || minTime === null) {
|
|
4048
|
+
minTime = time;
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4051
|
+
if (time > maxTime || maxTime === null) {
|
|
4052
|
+
maxTime = time;
|
|
4053
|
+
}
|
|
4054
|
+
|
|
3772
4055
|
var distance = time - dateToFind;
|
|
3773
|
-
|
|
3774
|
-
if (
|
|
4056
|
+
|
|
4057
|
+
if (distance < 0) {
|
|
4058
|
+
distance = -distance;
|
|
4059
|
+
}
|
|
4060
|
+
|
|
4061
|
+
if (j === 0) {
|
|
4062
|
+
minDistance = distance;
|
|
4063
|
+
}
|
|
3775
4064
|
|
|
3776
4065
|
if (distance < minDistance) {
|
|
3777
4066
|
minDistance = distance;
|
|
@@ -3780,8 +4069,13 @@
|
|
|
3780
4069
|
}
|
|
3781
4070
|
|
|
3782
4071
|
if (outSideOfRangeFlag) {
|
|
3783
|
-
if (minTime > dateToFind)
|
|
3784
|
-
|
|
4072
|
+
if (minTime > dateToFind) {
|
|
4073
|
+
return -1;
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
if (maxTime < dateToFind) {
|
|
4077
|
+
return -2;
|
|
4078
|
+
}
|
|
3785
4079
|
}
|
|
3786
4080
|
|
|
3787
4081
|
return foundIndex;
|
|
@@ -3793,7 +4087,9 @@
|
|
|
3793
4087
|
|
|
3794
4088
|
if (this._type === 'anyvalue') {
|
|
3795
4089
|
for (var j = 0; j < this._allValues.length; j += 1) {
|
|
3796
|
-
if (this._allValues[j] === value)
|
|
4090
|
+
if (this._allValues[j] === value) {
|
|
4091
|
+
return j;
|
|
4092
|
+
}
|
|
3797
4093
|
}
|
|
3798
4094
|
}
|
|
3799
4095
|
|
|
@@ -3921,7 +4217,9 @@
|
|
|
3921
4217
|
};
|
|
3922
4218
|
|
|
3923
4219
|
this.repositionMapPin = function (_bbox) {
|
|
3924
|
-
if (!_bbox)
|
|
4220
|
+
if (!_bbox) {
|
|
4221
|
+
return;
|
|
4222
|
+
}
|
|
3925
4223
|
|
|
3926
4224
|
var newpos = _this._map.getPixelCoordFromGeoCoord({
|
|
3927
4225
|
x: _this.geoPosX,
|
|
@@ -3934,8 +4232,14 @@
|
|
|
3934
4232
|
this.setMapPin = function (_x, _y, _bbox) {
|
|
3935
4233
|
var x = _x;
|
|
3936
4234
|
var y = _y;
|
|
3937
|
-
|
|
3938
|
-
if (
|
|
4235
|
+
|
|
4236
|
+
if (!x || !y) {
|
|
4237
|
+
return;
|
|
4238
|
+
}
|
|
4239
|
+
|
|
4240
|
+
if (_this.disableMapPin && !_bbox) {
|
|
4241
|
+
return; // we still want to update the pin position when the bbox changes.
|
|
4242
|
+
}
|
|
3939
4243
|
|
|
3940
4244
|
_this.x = parseInt(x, 10);
|
|
3941
4245
|
_this.y = parseInt(y, 10);
|
|
@@ -4044,10 +4348,13 @@
|
|
|
4044
4348
|
}; // Build a valid WMS request for a certain layer
|
|
4045
4349
|
|
|
4046
4350
|
var buildWMSGetMapRequest = function buildWMSGetMapRequest(map, layer) {
|
|
4047
|
-
if (!isDefined(layer.name))
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4351
|
+
if (!isDefined(layer.name)) {
|
|
4352
|
+
return {
|
|
4353
|
+
url: undefined,
|
|
4354
|
+
headers: null
|
|
4355
|
+
};
|
|
4356
|
+
}
|
|
4357
|
+
|
|
4051
4358
|
var srs = map.getProjection().srs;
|
|
4052
4359
|
var mapBbox = map.getDrawBBOX();
|
|
4053
4360
|
|
|
@@ -4059,10 +4366,13 @@
|
|
|
4059
4366
|
layer.format = 'image/png';
|
|
4060
4367
|
}
|
|
4061
4368
|
|
|
4062
|
-
if (layer.name.length < 1)
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4369
|
+
if (layer.name.length < 1) {
|
|
4370
|
+
return {
|
|
4371
|
+
url: undefined,
|
|
4372
|
+
headers: null
|
|
4373
|
+
};
|
|
4374
|
+
} // GetFeatureInfo timeseries in the mapview
|
|
4375
|
+
|
|
4066
4376
|
|
|
4067
4377
|
if (srs === 'GFI:TIME_ELEVATION') {
|
|
4068
4378
|
var x = 707;
|
|
@@ -4172,8 +4482,10 @@
|
|
|
4172
4482
|
* */
|
|
4173
4483
|
var SCALE_DELAY = 10;
|
|
4174
4484
|
var ZOOMED_CALLBACK_DELAY = 500;
|
|
4485
|
+
var THROTTLE_OPTIONS = {
|
|
4486
|
+
noTrailing: true
|
|
4487
|
+
};
|
|
4175
4488
|
var THROTTLE_WAIT_TIME = 300;
|
|
4176
|
-
var THROTTLE_NO_TRAILING = true;
|
|
4177
4489
|
|
|
4178
4490
|
var WMFlyToBBox =
|
|
4179
4491
|
/** @class */
|
|
@@ -4183,7 +4495,6 @@
|
|
|
4183
4495
|
|
|
4184
4496
|
this.flyZoomToBBOXTimerStart = 1;
|
|
4185
4497
|
this.flyZoomToBBOXTimerSteps = 5;
|
|
4186
|
-
this.flyZoomToBBOXDebounced = throttleDebounce.debounce;
|
|
4187
4498
|
this.flyZoomToBBOXScaler = 0;
|
|
4188
4499
|
this.flyZoomToBBOXCurrent = new WMBBOX();
|
|
4189
4500
|
this.flyZoomToBBOXFly = new WMBBOX();
|
|
@@ -4276,9 +4587,9 @@
|
|
|
4276
4587
|
}
|
|
4277
4588
|
};
|
|
4278
4589
|
|
|
4279
|
-
this.startZoomThrottled = throttleDebounce.throttle(THROTTLE_WAIT_TIME,
|
|
4280
|
-
|
|
4281
|
-
});
|
|
4590
|
+
this.startZoomThrottled = throttleDebounce.throttle(THROTTLE_WAIT_TIME, function (currentbox, newbox) {
|
|
4591
|
+
_this.flyZoomToBBOXStartZoom(currentbox, newbox);
|
|
4592
|
+
}, THROTTLE_OPTIONS);
|
|
4282
4593
|
|
|
4283
4594
|
this.flyZoomToBBOXStartZoomThrottled = function (currentbox, newbox) {
|
|
4284
4595
|
_this.startZoomThrottled(currentbox, newbox);
|
|
@@ -4303,7 +4614,6 @@
|
|
|
4303
4614
|
var bgMapImageStore = new WMImageStore(bgImageStoreLength, {
|
|
4304
4615
|
id: 'bgMapImageStore'
|
|
4305
4616
|
});
|
|
4306
|
-
|
|
4307
4617
|
var detectLeftButton = function detectLeftButton(evt) {
|
|
4308
4618
|
if (evt.buttons) {
|
|
4309
4619
|
return evt.buttons === 1;
|
|
@@ -4465,7 +4775,6 @@
|
|
|
4465
4775
|
/* pan,zoom,zoomout,info */
|
|
4466
4776
|
|
|
4467
4777
|
this.numGetFeatureInfoRequests = 0;
|
|
4468
|
-
this.getFeatureInfoResult = [];
|
|
4469
4778
|
this.oldMapMode = undefined;
|
|
4470
4779
|
this.InValidMouseAction = 0;
|
|
4471
4780
|
this.resizingBBOXCursor = '';
|
|
@@ -4481,7 +4790,11 @@
|
|
|
4481
4790
|
this.proj4.srs = 'empty';
|
|
4482
4791
|
this.proj4.projection = undefined;
|
|
4483
4792
|
this.longlat = 'EPSG:4326';
|
|
4484
|
-
|
|
4793
|
+
|
|
4794
|
+
if (proj4__default["default"]) {
|
|
4795
|
+
proj4__default["default"].defs(WMProj4Defs);
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4485
4798
|
this.previousMouseButtonState = 'up';
|
|
4486
4799
|
/* Binds */
|
|
4487
4800
|
|
|
@@ -4520,7 +4833,6 @@
|
|
|
4520
4833
|
this.setSize = this.setSize.bind(this);
|
|
4521
4834
|
this._setSize = this._setSize.bind(this);
|
|
4522
4835
|
this.abort = this.abort.bind(this);
|
|
4523
|
-
this.isBusy = this.isBusy.bind(this);
|
|
4524
4836
|
this._makeInfoHTML = this._makeInfoHTML.bind(this);
|
|
4525
4837
|
this.showScaleBar = this.showScaleBar.bind(this);
|
|
4526
4838
|
this.hideScaleBar = this.hideScaleBar.bind(this);
|
|
@@ -4808,30 +5120,52 @@
|
|
|
4808
5120
|
do {
|
|
4809
5121
|
numMapUnits *= 10.0;
|
|
4810
5122
|
divFactor = a / numMapUnits;
|
|
4811
|
-
|
|
5123
|
+
|
|
5124
|
+
if (divFactor === 0) {
|
|
5125
|
+
return undefined;
|
|
5126
|
+
}
|
|
5127
|
+
|
|
4812
5128
|
realWidth = desiredWidth / divFactor;
|
|
4813
5129
|
} while (realWidth < desiredWidth);
|
|
4814
5130
|
|
|
4815
5131
|
do {
|
|
4816
5132
|
numMapUnits /= 2.0;
|
|
4817
5133
|
divFactor = a / numMapUnits;
|
|
4818
|
-
|
|
5134
|
+
|
|
5135
|
+
if (divFactor === 0) {
|
|
5136
|
+
return undefined;
|
|
5137
|
+
}
|
|
5138
|
+
|
|
4819
5139
|
realWidth = desiredWidth / divFactor;
|
|
4820
5140
|
} while (realWidth > desiredWidth);
|
|
4821
5141
|
|
|
4822
5142
|
do {
|
|
4823
5143
|
numMapUnits *= 1.2;
|
|
4824
5144
|
divFactor = a / numMapUnits;
|
|
4825
|
-
|
|
5145
|
+
|
|
5146
|
+
if (divFactor === 0) {
|
|
5147
|
+
return undefined;
|
|
5148
|
+
}
|
|
5149
|
+
|
|
4826
5150
|
realWidth = desiredWidth / divFactor;
|
|
4827
5151
|
} while (realWidth < desiredWidth);
|
|
4828
5152
|
|
|
4829
5153
|
var roundedMapUnits = numMapUnits;
|
|
4830
5154
|
var d = Math.pow(10, Math.round(Math.log10(numMapUnits) + 0.5) - 1);
|
|
4831
5155
|
roundedMapUnits = Math.round(roundedMapUnits / d);
|
|
4832
|
-
|
|
4833
|
-
if (roundedMapUnits
|
|
4834
|
-
|
|
5156
|
+
|
|
5157
|
+
if (roundedMapUnits < 2.5) {
|
|
5158
|
+
roundedMapUnits = 2.5;
|
|
5159
|
+
}
|
|
5160
|
+
|
|
5161
|
+
if (roundedMapUnits > 2.5 && roundedMapUnits < 7.5) {
|
|
5162
|
+
roundedMapUnits = 5;
|
|
5163
|
+
}
|
|
5164
|
+
|
|
5165
|
+
if (roundedMapUnits > 7.5) {
|
|
5166
|
+
roundedMapUnits = 10;
|
|
5167
|
+
}
|
|
5168
|
+
|
|
4835
5169
|
roundedMapUnits *= d;
|
|
4836
5170
|
divFactor = desiredWidth / pixelsPerUnit / roundedMapUnits;
|
|
4837
5171
|
realWidth = desiredWidth / divFactor;
|
|
@@ -4876,15 +5210,42 @@
|
|
|
4876
5210
|
ctx.moveTo(offsetX + scaleBarProps.width * 2 + 1, scaleBarHeight - 2 + offsetY);
|
|
4877
5211
|
ctx.lineTo(offsetX + scaleBarProps.width * 2 + 1, scaleBarHeight - 2 - 7 + offsetY);
|
|
4878
5212
|
var units = '';
|
|
4879
|
-
|
|
4880
|
-
if (this.srs === 'EPSG:
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
if (this.srs === 'EPSG:
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
5213
|
+
|
|
5214
|
+
if (this.srs === 'EPSG:3411') {
|
|
5215
|
+
units = 'meter';
|
|
5216
|
+
}
|
|
5217
|
+
|
|
5218
|
+
if (this.srs === 'EPSG:3412') {
|
|
5219
|
+
units = 'meter';
|
|
5220
|
+
}
|
|
5221
|
+
|
|
5222
|
+
if (this.srs === 'EPSG:3575') {
|
|
5223
|
+
units = 'meter';
|
|
5224
|
+
}
|
|
5225
|
+
|
|
5226
|
+
if (this.srs === 'EPSG:4326') {
|
|
5227
|
+
units = 'degrees';
|
|
5228
|
+
}
|
|
5229
|
+
|
|
5230
|
+
if (this.srs === 'EPSG:28992') {
|
|
5231
|
+
units = 'meter';
|
|
5232
|
+
}
|
|
5233
|
+
|
|
5234
|
+
if (this.srs === 'EPSG:32661') {
|
|
5235
|
+
units = 'meter';
|
|
5236
|
+
}
|
|
5237
|
+
|
|
5238
|
+
if (this.srs === 'EPSG:3857') {
|
|
5239
|
+
units = 'meter';
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
if (this.srs === 'EPSG:900913') {
|
|
5243
|
+
units = 'meter';
|
|
5244
|
+
}
|
|
5245
|
+
|
|
5246
|
+
if (this.srs === 'EPSG:102100') {
|
|
5247
|
+
units = 'meter';
|
|
5248
|
+
}
|
|
4888
5249
|
|
|
4889
5250
|
if (units === 'meter') {
|
|
4890
5251
|
if (scaleBarProps.mapunits > 1000) {
|
|
@@ -4910,7 +5271,11 @@
|
|
|
4910
5271
|
|
|
4911
5272
|
if (isDefined(this.mouseGeoCoordXY)) {
|
|
4912
5273
|
var roundingFactor = 1.0 / Math.pow(10, parseInt(Math.log((this.bbox.right - this.bbox.left) / this.width) / Math.log(10), 10) - 2);
|
|
4913
|
-
|
|
5274
|
+
|
|
5275
|
+
if (roundingFactor < 1) {
|
|
5276
|
+
roundingFactor = 1;
|
|
5277
|
+
}
|
|
5278
|
+
|
|
4914
5279
|
ctx.fillStyle = '#000000';
|
|
4915
5280
|
var xText = Math.round(this.mouseGeoCoordXY.x * roundingFactor) / roundingFactor;
|
|
4916
5281
|
var yText = Math.round(this.mouseGeoCoordXY.y * roundingFactor) / roundingFactor;
|
|
@@ -5105,32 +5470,18 @@
|
|
|
5105
5470
|
};
|
|
5106
5471
|
|
|
5107
5472
|
WMJSMap.prototype.rebuildMapDimensions = function () {
|
|
5108
|
-
for (var j = 0; j < this.mapdimensions.length; j += 1) {
|
|
5109
|
-
this.mapdimensions[j].used = false;
|
|
5110
|
-
}
|
|
5111
|
-
|
|
5112
5473
|
for (var i = 0; i < this.layers.length; i += 1) {
|
|
5113
5474
|
for (var j = 0; j < this.layers[i].dimensions.length; j += 1) {
|
|
5114
5475
|
var dim = this.layers[i].dimensions[j];
|
|
5115
5476
|
var mapdim = this.getDimension(dim.name);
|
|
5116
5477
|
|
|
5117
|
-
if (isDefined(mapdim)) {
|
|
5118
|
-
mapdim.used = true;
|
|
5119
|
-
} else {
|
|
5478
|
+
if (!isDefined(mapdim)) {
|
|
5120
5479
|
var newdim = dim.clone();
|
|
5121
|
-
newdim.used = true;
|
|
5122
5480
|
this.mapdimensions.push(newdim);
|
|
5123
5481
|
}
|
|
5124
5482
|
}
|
|
5125
5483
|
}
|
|
5126
5484
|
|
|
5127
|
-
for (var j = 0; j < this.mapdimensions.length; j += 1) {
|
|
5128
|
-
if (this.mapdimensions[j].used === false) {
|
|
5129
|
-
this.mapdimensions.splice(j, 1);
|
|
5130
|
-
j -= 1;
|
|
5131
|
-
}
|
|
5132
|
-
}
|
|
5133
|
-
|
|
5134
5485
|
this.callBack.triggerEvent('onmapdimupdate');
|
|
5135
5486
|
};
|
|
5136
5487
|
|
|
@@ -5212,7 +5563,9 @@
|
|
|
5212
5563
|
WMJSMap.prototype.toggleLayer = function (layer) {
|
|
5213
5564
|
if (layer.enabled === true) {
|
|
5214
5565
|
layer.enabled = false;
|
|
5215
|
-
} else
|
|
5566
|
+
} else {
|
|
5567
|
+
layer.enabled = true;
|
|
5568
|
+
}
|
|
5216
5569
|
|
|
5217
5570
|
this.calculateNumBaseLayers();
|
|
5218
5571
|
this.rebuildMapDimensions();
|
|
@@ -5225,7 +5578,9 @@
|
|
|
5225
5578
|
};
|
|
5226
5579
|
|
|
5227
5580
|
WMJSMap.prototype._getLayerIndex = function (layer) {
|
|
5228
|
-
if (!layer)
|
|
5581
|
+
if (!layer) {
|
|
5582
|
+
return undefined;
|
|
5583
|
+
}
|
|
5229
5584
|
|
|
5230
5585
|
for (var j = 0; j < this.layers.length; j += 1) {
|
|
5231
5586
|
if (this.layers[j] === layer) {
|
|
@@ -5247,7 +5602,10 @@
|
|
|
5247
5602
|
};
|
|
5248
5603
|
|
|
5249
5604
|
WMJSMap.prototype.deleteLayer = function (layerToDelete) {
|
|
5250
|
-
if (this.layers.length <= 0)
|
|
5605
|
+
if (this.layers.length <= 0) {
|
|
5606
|
+
return;
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5251
5609
|
layerToDelete.setAutoUpdate(false);
|
|
5252
5610
|
|
|
5253
5611
|
var layerIndex = this._getLayerIndex(layerToDelete);
|
|
@@ -5398,14 +5756,18 @@
|
|
|
5398
5756
|
|
|
5399
5757
|
|
|
5400
5758
|
WMJSMap.prototype.setProjection = function (_srs, _bbox) {
|
|
5401
|
-
if (!_srs)
|
|
5759
|
+
if (!_srs) {
|
|
5760
|
+
_srs = 'EPSG:4326';
|
|
5761
|
+
}
|
|
5402
5762
|
|
|
5403
5763
|
if (_typeof(_srs) === 'object') {
|
|
5404
5764
|
_bbox = _srs.bbox;
|
|
5405
5765
|
_srs = _srs.srs;
|
|
5406
5766
|
}
|
|
5407
5767
|
|
|
5408
|
-
if (!_srs)
|
|
5768
|
+
if (!_srs) {
|
|
5769
|
+
_srs = 'EPSG:4326';
|
|
5770
|
+
}
|
|
5409
5771
|
|
|
5410
5772
|
if (this.srs !== _srs) {
|
|
5411
5773
|
this.defaultBBOX.setBBOX(_bbox);
|
|
@@ -5498,7 +5860,9 @@
|
|
|
5498
5860
|
};
|
|
5499
5861
|
|
|
5500
5862
|
WMJSMap.prototype._setSize = function (w, h) {
|
|
5501
|
-
if (!w || !h)
|
|
5863
|
+
if (!w || !h) {
|
|
5864
|
+
return;
|
|
5865
|
+
}
|
|
5502
5866
|
|
|
5503
5867
|
if (w < 4 || h < 4) {
|
|
5504
5868
|
return;
|
|
@@ -5508,8 +5872,14 @@
|
|
|
5508
5872
|
var projinfo = this.getProjection();
|
|
5509
5873
|
this.width = w;
|
|
5510
5874
|
this.height = h;
|
|
5511
|
-
|
|
5512
|
-
if (this.
|
|
5875
|
+
|
|
5876
|
+
if (this.width < 4 || isNaN(this.width)) {
|
|
5877
|
+
this.width = 4;
|
|
5878
|
+
}
|
|
5879
|
+
|
|
5880
|
+
if (this.height < 4 || isNaN(this.height)) {
|
|
5881
|
+
this.height = 4;
|
|
5882
|
+
}
|
|
5513
5883
|
|
|
5514
5884
|
if (!projinfo.srs || !projinfo.bbox) {
|
|
5515
5885
|
debug(exports.DebugType.Error, 'WebMapJS: this.setSize: Setting default projection (EPSG:4326 with (-180,-90,180,90)');
|
|
@@ -5521,12 +5891,19 @@
|
|
|
5521
5891
|
this.setProjection(projinfo.srs, projinfo.bbox);
|
|
5522
5892
|
}
|
|
5523
5893
|
|
|
5524
|
-
if (!this.baseDiv || !this.baseDiv.style)
|
|
5894
|
+
if (!this.baseDiv || !this.baseDiv.style) {
|
|
5895
|
+
return;
|
|
5896
|
+
}
|
|
5897
|
+
|
|
5525
5898
|
Object.assign(this.baseDiv.style, {
|
|
5526
5899
|
width: this.width,
|
|
5527
5900
|
height: this.height
|
|
5528
5901
|
});
|
|
5529
|
-
|
|
5902
|
+
|
|
5903
|
+
if (!this.mainElement || !this.mainElement.style) {
|
|
5904
|
+
return;
|
|
5905
|
+
}
|
|
5906
|
+
|
|
5530
5907
|
this.mainElement.style.width = this.width + "px";
|
|
5531
5908
|
this.mainElement.style.height = this.height + "px";
|
|
5532
5909
|
this.setBBOX(this.resizeBBOX);
|
|
@@ -5546,18 +5923,6 @@
|
|
|
5546
5923
|
this.callBack.triggerEvent('onloadingcomplete');
|
|
5547
5924
|
};
|
|
5548
5925
|
|
|
5549
|
-
WMJSMap.prototype.isBusy = function () {
|
|
5550
|
-
if (this.suspendDrawing === true || this.mapBusy || this.layersBusy === 1) {
|
|
5551
|
-
return true;
|
|
5552
|
-
}
|
|
5553
|
-
|
|
5554
|
-
if (this.divBuffer[0].ready === false || this.divBuffer[1].ready === false) {
|
|
5555
|
-
return true;
|
|
5556
|
-
}
|
|
5557
|
-
|
|
5558
|
-
return false;
|
|
5559
|
-
};
|
|
5560
|
-
|
|
5561
5926
|
WMJSMap.prototype._makeInfoHTML = function () {
|
|
5562
5927
|
try {
|
|
5563
5928
|
// Create the layerinformation table
|
|
@@ -5607,7 +5972,9 @@
|
|
|
5607
5972
|
}
|
|
5608
5973
|
}
|
|
5609
5974
|
|
|
5610
|
-
if (foundDim === false)
|
|
5975
|
+
if (foundDim === false) {
|
|
5976
|
+
infoHTML += '<td>-</td>';
|
|
5977
|
+
}
|
|
5611
5978
|
}
|
|
5612
5979
|
|
|
5613
5980
|
infoHTML += '</tr>';
|
|
@@ -5646,7 +6013,10 @@
|
|
|
5646
6013
|
};
|
|
5647
6014
|
|
|
5648
6015
|
WMJSMap.prototype.display = function () {
|
|
5649
|
-
if (!this.divBuffer)
|
|
6016
|
+
if (!this.divBuffer) {
|
|
6017
|
+
return;
|
|
6018
|
+
}
|
|
6019
|
+
|
|
5650
6020
|
this.divBuffer.display();
|
|
5651
6021
|
this.drawnBBOX.setBBOX(this.bbox);
|
|
5652
6022
|
};
|
|
@@ -5656,10 +6026,6 @@
|
|
|
5656
6026
|
};
|
|
5657
6027
|
|
|
5658
6028
|
WMJSMap.prototype.draw = function (animationList) {
|
|
5659
|
-
if (animationList === void 0) {
|
|
5660
|
-
animationList = {};
|
|
5661
|
-
}
|
|
5662
|
-
|
|
5663
6029
|
if (this.isDestroyed) {
|
|
5664
6030
|
return;
|
|
5665
6031
|
}
|
|
@@ -5680,7 +6046,6 @@
|
|
|
5680
6046
|
/**
|
|
5681
6047
|
* API Function called to draw the layers, fires getmap request and shows the layers on the screen
|
|
5682
6048
|
*/
|
|
5683
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5684
6049
|
|
|
5685
6050
|
|
|
5686
6051
|
WMJSMap.prototype._draw = function (animationList) {
|
|
@@ -5697,8 +6062,7 @@
|
|
|
5697
6062
|
this.needsRedraw = false;
|
|
5698
6063
|
this.draw(this._animationList);
|
|
5699
6064
|
}
|
|
5700
|
-
};
|
|
5701
|
-
|
|
6065
|
+
};
|
|
5702
6066
|
|
|
5703
6067
|
WMJSMap.prototype._drawAndLoad = function (animationList) {
|
|
5704
6068
|
if (this.width < 4 || this.height < 4) {
|
|
@@ -5855,9 +6219,16 @@
|
|
|
5855
6219
|
triggerEvent = true;
|
|
5856
6220
|
}
|
|
5857
6221
|
|
|
5858
|
-
if (!this.divBuffer)
|
|
6222
|
+
if (!this.divBuffer) {
|
|
6223
|
+
return;
|
|
6224
|
+
}
|
|
6225
|
+
|
|
5859
6226
|
var mapbbox = this.bbox;
|
|
5860
|
-
|
|
6227
|
+
|
|
6228
|
+
if (isDefined(_mapbbox)) {
|
|
6229
|
+
mapbbox = _mapbbox;
|
|
6230
|
+
}
|
|
6231
|
+
|
|
5861
6232
|
this.updateBBOX.setBBOX(mapbbox);
|
|
5862
6233
|
this.divBuffer.setBBOX(this.updateBBOX, this.drawnBBOX);
|
|
5863
6234
|
this.drawnBBOX.setBBOX(mapbbox);
|
|
@@ -5888,7 +6259,9 @@
|
|
|
5888
6259
|
}
|
|
5889
6260
|
|
|
5890
6261
|
this.callBack.triggerEvent('onlayeradd');
|
|
5891
|
-
} else
|
|
6262
|
+
} else {
|
|
6263
|
+
this.baseLayers = undefined;
|
|
6264
|
+
}
|
|
5892
6265
|
};
|
|
5893
6266
|
|
|
5894
6267
|
WMJSMap.prototype.setBaseLayers = function (layer) {
|
|
@@ -5905,7 +6278,9 @@
|
|
|
5905
6278
|
}
|
|
5906
6279
|
|
|
5907
6280
|
this.callBack.triggerEvent('onlayerchange');
|
|
5908
|
-
} else
|
|
6281
|
+
} else {
|
|
6282
|
+
this.baseLayers = undefined;
|
|
6283
|
+
}
|
|
5909
6284
|
};
|
|
5910
6285
|
|
|
5911
6286
|
WMJSMap.prototype.getBaseLayers = function () {
|
|
@@ -5922,7 +6297,10 @@
|
|
|
5922
6297
|
|
|
5923
6298
|
WMJSMap.prototype.mouseWheelEvent = function (event) {
|
|
5924
6299
|
preventdefaultEvent(event);
|
|
5925
|
-
|
|
6300
|
+
|
|
6301
|
+
if (this.mouseWheelBusy === 1) {
|
|
6302
|
+
return;
|
|
6303
|
+
}
|
|
5926
6304
|
|
|
5927
6305
|
var _a = this.getMouseCoordinatesForDocument(event),
|
|
5928
6306
|
x = _a.x,
|
|
@@ -5980,7 +6358,10 @@
|
|
|
5980
6358
|
};
|
|
5981
6359
|
|
|
5982
6360
|
WMJSMap.prototype.destroy = function () {
|
|
5983
|
-
if (!this.initialized)
|
|
6361
|
+
if (!this.initialized) {
|
|
6362
|
+
return;
|
|
6363
|
+
}
|
|
6364
|
+
|
|
5984
6365
|
this.stopAnimating();
|
|
5985
6366
|
|
|
5986
6367
|
for (var i = this.layers.length - 1; i >= 0; i -= 1) {
|
|
@@ -6068,7 +6449,10 @@
|
|
|
6068
6449
|
/* For invalid layers we cannot build an url */
|
|
6069
6450
|
|
|
6070
6451
|
|
|
6071
|
-
if (!layer.name)
|
|
6452
|
+
if (!layer.name) {
|
|
6453
|
+
return '';
|
|
6454
|
+
}
|
|
6455
|
+
|
|
6072
6456
|
var request = WMJScheckURL(layer.service);
|
|
6073
6457
|
request += "&SERVICE=WMS&REQUEST=GetFeatureInfo&VERSION=" + layer.version;
|
|
6074
6458
|
request += "&LAYERS=" + URLEncode(layer.name);
|
|
@@ -6230,7 +6614,10 @@
|
|
|
6230
6614
|
this.oldMapMode = undefined;
|
|
6231
6615
|
}
|
|
6232
6616
|
} else {
|
|
6233
|
-
if (this.oldMapMode === undefined)
|
|
6617
|
+
if (this.oldMapMode === undefined) {
|
|
6618
|
+
this.oldMapMode = this.mapMode;
|
|
6619
|
+
}
|
|
6620
|
+
|
|
6234
6621
|
this.mapMode = 'zoom';
|
|
6235
6622
|
}
|
|
6236
6623
|
|
|
@@ -6418,10 +6805,21 @@
|
|
|
6418
6805
|
|
|
6419
6806
|
if (foundBBOXRib === true || this.resizingBBOXEnabled !== '' && this.mouseDownPressed === 1) {
|
|
6420
6807
|
if (this.mouseDownPressed === 1) {
|
|
6421
|
-
if (this.resizingBBOXEnabled === 'left')
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6808
|
+
if (this.resizingBBOXEnabled === 'left') {
|
|
6809
|
+
tlpx.x = this.mouseX;
|
|
6810
|
+
}
|
|
6811
|
+
|
|
6812
|
+
if (this.resizingBBOXEnabled === 'top') {
|
|
6813
|
+
tlpx.y = this.mouseY;
|
|
6814
|
+
}
|
|
6815
|
+
|
|
6816
|
+
if (this.resizingBBOXEnabled === 'right') {
|
|
6817
|
+
brpx.x = this.mouseX;
|
|
6818
|
+
}
|
|
6819
|
+
|
|
6820
|
+
if (this.resizingBBOXEnabled === 'bottom') {
|
|
6821
|
+
brpx.y = this.mouseY;
|
|
6822
|
+
}
|
|
6425
6823
|
|
|
6426
6824
|
if (this.resizingBBOXEnabled === 'topleft') {
|
|
6427
6825
|
tlpx.x = this.mouseX;
|
|
@@ -6474,10 +6872,15 @@
|
|
|
6474
6872
|
|
|
6475
6873
|
this.mouseUpX = this.mouseX;
|
|
6476
6874
|
this.mouseUpY = this.mouseY;
|
|
6477
|
-
|
|
6875
|
+
|
|
6876
|
+
if (this.mapPanning === 0) {
|
|
6877
|
+
return;
|
|
6878
|
+
}
|
|
6478
6879
|
|
|
6479
6880
|
if (this.mouseDownPressed === 1) {
|
|
6480
|
-
if (this.mapMode === 'zoomout')
|
|
6881
|
+
if (this.mapMode === 'zoomout') {
|
|
6882
|
+
this.zoomOut();
|
|
6883
|
+
}
|
|
6481
6884
|
}
|
|
6482
6885
|
|
|
6483
6886
|
this.mouseDownPressed = 0;
|
|
@@ -6567,8 +6970,13 @@
|
|
|
6567
6970
|
|
|
6568
6971
|
|
|
6569
6972
|
WMJSMap.prototype._mouseDragStart = function (x, y) {
|
|
6570
|
-
if (this.mapMode === 'pan')
|
|
6571
|
-
|
|
6973
|
+
if (this.mapMode === 'pan') {
|
|
6974
|
+
this._mapPanStart(x, y);
|
|
6975
|
+
}
|
|
6976
|
+
|
|
6977
|
+
if (this.mapMode === 'zoom') {
|
|
6978
|
+
this._mapZoomStart();
|
|
6979
|
+
}
|
|
6572
6980
|
};
|
|
6573
6981
|
|
|
6574
6982
|
WMJSMap.prototype.mouseDrag = function (x, y) {
|
|
@@ -6578,15 +6986,30 @@
|
|
|
6578
6986
|
this.mouseDragging = 1;
|
|
6579
6987
|
}
|
|
6580
6988
|
|
|
6581
|
-
if (this.mapMode === 'pan')
|
|
6582
|
-
|
|
6989
|
+
if (this.mapMode === 'pan') {
|
|
6990
|
+
this._mapPan(x, y);
|
|
6991
|
+
}
|
|
6992
|
+
|
|
6993
|
+
if (this.mapMode === 'zoom') {
|
|
6994
|
+
this._mapZoom();
|
|
6995
|
+
}
|
|
6583
6996
|
};
|
|
6584
6997
|
|
|
6585
6998
|
WMJSMap.prototype.mouseDragEnd = function (x, y) {
|
|
6586
|
-
if (this.mouseDragging === 0)
|
|
6999
|
+
if (this.mouseDragging === 0) {
|
|
7000
|
+
return;
|
|
7001
|
+
}
|
|
7002
|
+
|
|
6587
7003
|
this.mouseDragging = 0;
|
|
6588
|
-
|
|
6589
|
-
if (this.mapMode === '
|
|
7004
|
+
|
|
7005
|
+
if (this.mapMode === 'pan') {
|
|
7006
|
+
this._mapPanEnd(x, y);
|
|
7007
|
+
}
|
|
7008
|
+
|
|
7009
|
+
if (this.mapMode === 'zoom') {
|
|
7010
|
+
this._mapZoomEnd();
|
|
7011
|
+
}
|
|
7012
|
+
|
|
6590
7013
|
this.callBack.triggerEvent('mapdragend', {
|
|
6591
7014
|
map: this,
|
|
6592
7015
|
x: this.mouseUpX,
|
|
@@ -6617,7 +7040,9 @@
|
|
|
6617
7040
|
};
|
|
6618
7041
|
|
|
6619
7042
|
WMJSMap.prototype._mapPan = function (x, y) {
|
|
6620
|
-
if (this.mapPanning === 0)
|
|
7043
|
+
if (this.mapPanning === 0) {
|
|
7044
|
+
return;
|
|
7045
|
+
}
|
|
6621
7046
|
|
|
6622
7047
|
if (this.mouseX < 0 || this.mouseY < 0 || this.mouseX > this.mainElement.clientWidth || this.mouseY > this.mainElement.clientHeight) {
|
|
6623
7048
|
this._mapPanEnd(x, y);
|
|
@@ -6645,7 +7070,11 @@
|
|
|
6645
7070
|
|
|
6646
7071
|
WMJSMap.prototype._mapPanEnd = function (x, y) {
|
|
6647
7072
|
this.baseDiv.style.cursor = 'default';
|
|
6648
|
-
|
|
7073
|
+
|
|
7074
|
+
if (this.mapPanning === 0) {
|
|
7075
|
+
return;
|
|
7076
|
+
}
|
|
7077
|
+
|
|
6649
7078
|
this.mapPanning = 0;
|
|
6650
7079
|
var mapPanGeoCoords = this.getGeoCoordFromPixelCoord({
|
|
6651
7080
|
x: x,
|
|
@@ -6699,7 +7128,10 @@
|
|
|
6699
7128
|
};
|
|
6700
7129
|
|
|
6701
7130
|
WMJSMap.prototype._mapZoom = function () {
|
|
6702
|
-
if (this.mapZooming === 0)
|
|
7131
|
+
if (this.mapZooming === 0) {
|
|
7132
|
+
return;
|
|
7133
|
+
}
|
|
7134
|
+
|
|
6703
7135
|
var x = this.mouseX - this.mouseDownX;
|
|
6704
7136
|
var y = this.mouseY - this.mouseDownY;
|
|
6705
7137
|
|
|
@@ -6716,12 +7148,16 @@
|
|
|
6716
7148
|
if (w < 0) {
|
|
6717
7149
|
w = -w;
|
|
6718
7150
|
this.divZoomBox.style.left = this.mouseX + "px";
|
|
6719
|
-
} else
|
|
7151
|
+
} else {
|
|
7152
|
+
this.divZoomBox.style.left = this.mouseDownX + "px";
|
|
7153
|
+
}
|
|
6720
7154
|
|
|
6721
7155
|
if (h < 0) {
|
|
6722
7156
|
h = -h;
|
|
6723
7157
|
this.divZoomBox.style.top = this.mouseY + "px";
|
|
6724
|
-
} else
|
|
7158
|
+
} else {
|
|
7159
|
+
this.divZoomBox.style.top = this.mouseDownY + "px";
|
|
7160
|
+
}
|
|
6725
7161
|
|
|
6726
7162
|
this.divZoomBox.style.width = w + "px";
|
|
6727
7163
|
this.divZoomBox.style.height = h + "px";
|
|
@@ -6731,10 +7167,18 @@
|
|
|
6731
7167
|
var x = this.mouseUpX - this.mouseDownX;
|
|
6732
7168
|
var y = this.mouseUpY - this.mouseDownY;
|
|
6733
7169
|
this.baseDiv.style.cursor = 'default';
|
|
6734
|
-
|
|
7170
|
+
|
|
7171
|
+
if (this.mapZooming === 0) {
|
|
7172
|
+
return;
|
|
7173
|
+
}
|
|
7174
|
+
|
|
6735
7175
|
this.mapZooming = 0;
|
|
6736
7176
|
this.divZoomBox.style.display = 'none';
|
|
6737
|
-
|
|
7177
|
+
|
|
7178
|
+
if (x < 0 && y < 0) {
|
|
7179
|
+
return;
|
|
7180
|
+
}
|
|
7181
|
+
|
|
6738
7182
|
var zoomBBOXPixels = new WMBBOX();
|
|
6739
7183
|
|
|
6740
7184
|
if (x < 0) {
|
|
@@ -6808,7 +7252,10 @@
|
|
|
6808
7252
|
ratio = 1;
|
|
6809
7253
|
}
|
|
6810
7254
|
|
|
6811
|
-
if (ratio < 0)
|
|
7255
|
+
if (ratio < 0) {
|
|
7256
|
+
ratio = -ratio;
|
|
7257
|
+
}
|
|
7258
|
+
|
|
6812
7259
|
var screenRatio = this.width / this.height; // Is W > H?
|
|
6813
7260
|
|
|
6814
7261
|
if (ratio > screenRatio) {
|
|
@@ -6855,8 +7302,14 @@
|
|
|
6855
7302
|
|
|
6856
7303
|
WMJSMap.prototype.getGeoCoordFromPixelCoord = function (coordinates, _bbox) {
|
|
6857
7304
|
var mybbox = this.bbox;
|
|
6858
|
-
|
|
6859
|
-
if (
|
|
7305
|
+
|
|
7306
|
+
if (_bbox) {
|
|
7307
|
+
mybbox = _bbox;
|
|
7308
|
+
}
|
|
7309
|
+
|
|
7310
|
+
if (!isDefined(coordinates)) {
|
|
7311
|
+
return undefined;
|
|
7312
|
+
}
|
|
6860
7313
|
|
|
6861
7314
|
try {
|
|
6862
7315
|
var lon = coordinates.x / this.width * (mybbox.right - mybbox.left) + mybbox.left;
|
|
@@ -6978,9 +7431,19 @@
|
|
|
6978
7431
|
var w = this.width;
|
|
6979
7432
|
var h = this.height;
|
|
6980
7433
|
var b = this.updateBBOX;
|
|
6981
|
-
|
|
6982
|
-
if (isDefined(
|
|
6983
|
-
|
|
7434
|
+
|
|
7435
|
+
if (isDefined(_width)) {
|
|
7436
|
+
w = _width;
|
|
7437
|
+
}
|
|
7438
|
+
|
|
7439
|
+
if (isDefined(_height)) {
|
|
7440
|
+
h = _height;
|
|
7441
|
+
}
|
|
7442
|
+
|
|
7443
|
+
if (isDefined(_bbox)) {
|
|
7444
|
+
b = _bbox;
|
|
7445
|
+
}
|
|
7446
|
+
|
|
6984
7447
|
var x = w * (coordinates.x - b.left) / (b.right - b.left);
|
|
6985
7448
|
var y = h * (coordinates.y - b.top) / (b.bottom - b.top);
|
|
6986
7449
|
return {
|
|
@@ -6999,7 +7462,10 @@
|
|
|
6999
7462
|
};
|
|
7000
7463
|
|
|
7001
7464
|
WMJSMap.prototype.removeListener = function (name, f) {
|
|
7002
|
-
if (this.isDestroyed)
|
|
7465
|
+
if (this.isDestroyed) {
|
|
7466
|
+
return;
|
|
7467
|
+
}
|
|
7468
|
+
|
|
7003
7469
|
this.callBack.removeEvents(name, f);
|
|
7004
7470
|
};
|
|
7005
7471
|
|
|
@@ -7153,7 +7619,10 @@
|
|
|
7153
7619
|
this.WMProjectionUndo[0].bbox.setBBOX(this.bbox);
|
|
7154
7620
|
this.WMProjectionUndo[0].srs = this.srs;
|
|
7155
7621
|
this.NrOfUndos += 1;
|
|
7156
|
-
|
|
7622
|
+
|
|
7623
|
+
if (this.NrOfUndos > this.MaxUndos) {
|
|
7624
|
+
this.NrOfUndos = this.MaxUndos;
|
|
7625
|
+
}
|
|
7157
7626
|
}
|
|
7158
7627
|
|
|
7159
7628
|
this.DoRedo = 0;
|
|
@@ -7178,7 +7647,9 @@
|
|
|
7178
7647
|
|
|
7179
7648
|
if (isDefined(ratio) === false) {
|
|
7180
7649
|
ratio = 1;
|
|
7181
|
-
} else if (ratio === 0)
|
|
7650
|
+
} else if (ratio === 0) {
|
|
7651
|
+
return;
|
|
7652
|
+
}
|
|
7182
7653
|
|
|
7183
7654
|
a *= ratio;
|
|
7184
7655
|
this.zoomTo(new WMBBOX(this.resizeBBOX.left - a, this.resizeBBOX.bottom - a, this.resizeBBOX.right + a, this.resizeBBOX.top + a));
|
|
@@ -7197,9 +7668,16 @@
|
|
|
7197
7668
|
this.divBoundingBox.displayed = true;
|
|
7198
7669
|
}
|
|
7199
7670
|
|
|
7200
|
-
if (this.divBoundingBox.displayed !== true)
|
|
7671
|
+
if (this.divBoundingBox.displayed !== true) {
|
|
7672
|
+
return;
|
|
7673
|
+
}
|
|
7674
|
+
|
|
7201
7675
|
var b = this.bbox;
|
|
7202
|
-
|
|
7676
|
+
|
|
7677
|
+
if (isDefined(_mapbbox)) {
|
|
7678
|
+
b = _mapbbox;
|
|
7679
|
+
}
|
|
7680
|
+
|
|
7203
7681
|
var coord1 = this.getPixelCoordFromGeoCoord({
|
|
7204
7682
|
x: this.divBoundingBox.bbox.left,
|
|
7205
7683
|
y: this.divBoundingBox.bbox.top
|
|
@@ -7838,7 +8316,10 @@
|
|
|
7838
8316
|
|
|
7839
8317
|
|
|
7840
8318
|
var headers = [];
|
|
7841
|
-
|
|
8319
|
+
|
|
8320
|
+
if (options && options.headers) {
|
|
8321
|
+
headers = options.headers;
|
|
8322
|
+
}
|
|
7842
8323
|
|
|
7843
8324
|
if (!isDefined(service)) {
|
|
7844
8325
|
fail(I18n.no_service_defined.text);
|
|
@@ -7940,7 +8421,10 @@
|
|
|
7940
8421
|
WMJSService.prototype.checkVersion111 = function (jsonData) {
|
|
7941
8422
|
try {
|
|
7942
8423
|
var rootLayer = jsonData.WMT_MS_Capabilities.Capability.Layer;
|
|
7943
|
-
|
|
8424
|
+
|
|
8425
|
+
if (!rootLayer) {
|
|
8426
|
+
throw new Error('No 111 layer');
|
|
8427
|
+
}
|
|
7944
8428
|
} catch (e) {
|
|
7945
8429
|
var message = this.checkException(jsonData);
|
|
7946
8430
|
|
|
@@ -7961,7 +8445,10 @@
|
|
|
7961
8445
|
WMJSService.prototype.checkVersion130 = function (jsonData) {
|
|
7962
8446
|
try {
|
|
7963
8447
|
var rootLayer = jsonData.WMS_Capabilities.Capability.Layer;
|
|
7964
|
-
|
|
8448
|
+
|
|
8449
|
+
if (!rootLayer) {
|
|
8450
|
+
throw new Error('No 130 layer');
|
|
8451
|
+
}
|
|
7965
8452
|
} catch (e) {
|
|
7966
8453
|
var message = this.checkException(jsonData);
|
|
7967
8454
|
|
|
@@ -8131,7 +8618,8 @@
|
|
|
8131
8618
|
if (WMSCapabilities.Service.OnlineResource.value) {
|
|
8132
8619
|
_this.onlineresource = WMSCapabilities.Service.OnlineResource.value;
|
|
8133
8620
|
} else {
|
|
8134
|
-
_this.onlineresource =
|
|
8621
|
+
_this.onlineresource = // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8622
|
+
WMSCapabilities.Service.OnlineResource.attr['xlink:href'];
|
|
8135
8623
|
}
|
|
8136
8624
|
} catch (e) {
|
|
8137
8625
|
_this.onlineresource = I18n.not_available_message.text;
|
|
@@ -8167,7 +8655,9 @@
|
|
|
8167
8655
|
|
|
8168
8656
|
if (se) {
|
|
8169
8657
|
try {
|
|
8170
|
-
if (se.attr.code)
|
|
8658
|
+
if (se.attr.code) {
|
|
8659
|
+
code = se.attr.code;
|
|
8660
|
+
}
|
|
8171
8661
|
} catch (e) {// do nothing
|
|
8172
8662
|
}
|
|
8173
8663
|
|
|
@@ -8193,8 +8683,6 @@
|
|
|
8193
8683
|
WMJSService.prototype.getNodes = function (succes, failure, forceReload, options) {
|
|
8194
8684
|
var _this = this;
|
|
8195
8685
|
|
|
8196
|
-
this.nodeCache = undefined;
|
|
8197
|
-
|
|
8198
8686
|
if (!failure) {
|
|
8199
8687
|
// eslint-disable-next-line no-param-reassign
|
|
8200
8688
|
failure = function failure(msg) {
|
|
@@ -8509,7 +8997,13 @@
|
|
|
8509
8997
|
this.getmapURL = options.service;
|
|
8510
8998
|
this.getfeatureinfoURL = options.service;
|
|
8511
8999
|
this.getlegendgraphicURL = options.service;
|
|
8512
|
-
|
|
9000
|
+
|
|
9001
|
+
if (options.active === true) {
|
|
9002
|
+
this.active = true;
|
|
9003
|
+
} else {
|
|
9004
|
+
this.active = false;
|
|
9005
|
+
}
|
|
9006
|
+
|
|
8513
9007
|
this.name = options.name;
|
|
8514
9008
|
|
|
8515
9009
|
if (options.getgraphinfoURL) {
|
|
@@ -8532,16 +9026,29 @@
|
|
|
8532
9026
|
this.id = options.id;
|
|
8533
9027
|
}
|
|
8534
9028
|
|
|
8535
|
-
if (options.format)
|
|
9029
|
+
if (options.format) {
|
|
9030
|
+
this.format = options.format;
|
|
9031
|
+
} else {
|
|
9032
|
+
this.format = 'image/png';
|
|
9033
|
+
}
|
|
8536
9034
|
|
|
8537
9035
|
if (isDefined(options.opacity)) {
|
|
8538
9036
|
this.opacity = options.opacity;
|
|
8539
9037
|
}
|
|
8540
9038
|
|
|
8541
|
-
if (options.title)
|
|
9039
|
+
if (options.title) {
|
|
9040
|
+
this.title = options.title;
|
|
9041
|
+
}
|
|
9042
|
+
|
|
8542
9043
|
this["abstract"] = I18n.not_available_message.text;
|
|
8543
|
-
|
|
8544
|
-
if (options.
|
|
9044
|
+
|
|
9045
|
+
if (options.enabled === false) {
|
|
9046
|
+
this.enabled = false;
|
|
9047
|
+
}
|
|
9048
|
+
|
|
9049
|
+
if (options.keepOnTop === true) {
|
|
9050
|
+
this.keepOnTop = true;
|
|
9051
|
+
}
|
|
8545
9052
|
|
|
8546
9053
|
if (options.transparent === false) {
|
|
8547
9054
|
this.transparent = false;
|
|
@@ -8723,11 +9230,18 @@
|
|
|
8723
9230
|
updateMapDimensions = true;
|
|
8724
9231
|
}
|
|
8725
9232
|
|
|
8726
|
-
if (!isDefined(value))
|
|
9233
|
+
if (!isDefined(value)) {
|
|
9234
|
+
return;
|
|
9235
|
+
}
|
|
9236
|
+
|
|
8727
9237
|
var dimIndex = this.dimensions.findIndex(function (dim) {
|
|
8728
9238
|
return dim.name === name;
|
|
8729
9239
|
});
|
|
8730
|
-
|
|
9240
|
+
|
|
9241
|
+
if (dimIndex < 0) {
|
|
9242
|
+
return;
|
|
9243
|
+
}
|
|
9244
|
+
|
|
8731
9245
|
var dim = this.dimensions[dimIndex];
|
|
8732
9246
|
dim.setValue(value);
|
|
8733
9247
|
this.handleReferenceTime(name, value, updateMapDimensions);
|
|
@@ -9097,10 +9611,22 @@
|
|
|
9097
9611
|
|
|
9098
9612
|
for (var j = 0; j < this.styles.length; j += 1) {
|
|
9099
9613
|
if (this.styles[j].name === styleName) {
|
|
9100
|
-
if (nextPrev === -1)
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9614
|
+
if (nextPrev === -1) {
|
|
9615
|
+
j -= 1;
|
|
9616
|
+
}
|
|
9617
|
+
|
|
9618
|
+
if (nextPrev === 1) {
|
|
9619
|
+
j += 1;
|
|
9620
|
+
}
|
|
9621
|
+
|
|
9622
|
+
if (j < 0) {
|
|
9623
|
+
j = this.styles.length - 1;
|
|
9624
|
+
}
|
|
9625
|
+
|
|
9626
|
+
if (j > this.styles.length - 1) {
|
|
9627
|
+
j = 0;
|
|
9628
|
+
}
|
|
9629
|
+
|
|
9104
9630
|
return this.styles[j];
|
|
9105
9631
|
}
|
|
9106
9632
|
}
|
|
@@ -9120,7 +9646,11 @@
|
|
|
9120
9646
|
var dimIndex = this.dimensions.findIndex(function (dim) {
|
|
9121
9647
|
return dim.name === name;
|
|
9122
9648
|
});
|
|
9123
|
-
|
|
9649
|
+
|
|
9650
|
+
if (dimIndex < 0) {
|
|
9651
|
+
return undefined;
|
|
9652
|
+
}
|
|
9653
|
+
|
|
9124
9654
|
return this.dimensions[dimIndex];
|
|
9125
9655
|
};
|
|
9126
9656
|
/**
|