@deck.gl/geo-layers 8.7.0-alpha.8 → 8.7.0-beta.3
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/dist/dist.dev.js +913 -705
- package/dist/es5/index.js +8 -0
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/tile-layer/tileset-2d.js +19 -2
- package/dist/es5/tile-layer/tileset-2d.js.map +1 -1
- package/dist/es5/tile-layer/utils.js +1 -1
- package/dist/es5/tile-layer/utils.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tile-layer/tileset-2d.js +14 -2
- package/dist/esm/tile-layer/tileset-2d.js.map +1 -1
- package/dist/esm/tile-layer/utils.js +1 -1
- package/dist/esm/tile-layer/utils.js.map +1 -1
- package/dist.min.js +2 -2
- package/package.json +11 -11
- package/src/index.ts +2 -0
- package/src/tile-layer/tileset-2d.js +14 -2
- package/src/tile-layer/utils.js +4 -4
package/dist/dist.dev.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
exports["deck"] = factory(require("deck"), require("luma"), require("h3"));
|
|
8
8
|
else
|
|
9
9
|
root["deck"] = factory(root["deck"], root["luma"], root["h3"]);
|
|
10
|
-
})(window, function(
|
|
10
|
+
})(window, function(__WEBPACK_EXTERNAL_MODULE__deck_gl_core__, __WEBPACK_EXTERNAL_MODULE__luma_gl_core__, __WEBPACK_EXTERNAL_MODULE_h3_js__) {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
12
|
/******/ // The module cache
|
|
13
13
|
/******/ var installedModules = {};
|
|
@@ -1758,7 +1758,12 @@ async function parseImplicitTiles(subtree, options, parentData = {
|
|
|
1758
1758
|
|
|
1759
1759
|
if (currentTile.contentUrl || currentTile.children.length) {
|
|
1760
1760
|
const globalLevel = lev + 1;
|
|
1761
|
-
const
|
|
1761
|
+
const childCoordinates = {
|
|
1762
|
+
childTileX,
|
|
1763
|
+
childTileY,
|
|
1764
|
+
childTileZ
|
|
1765
|
+
};
|
|
1766
|
+
const formattedTile = formatTileData(currentTile, globalLevel, childCoordinates, options);
|
|
1762
1767
|
tile.children.push(formattedTile);
|
|
1763
1768
|
}
|
|
1764
1769
|
}
|
|
@@ -1778,17 +1783,19 @@ function getAvailabilityResult(availabilityData, index) {
|
|
|
1778
1783
|
return false;
|
|
1779
1784
|
}
|
|
1780
1785
|
|
|
1781
|
-
function formatTileData(tile, level, options) {
|
|
1786
|
+
function formatTileData(tile, level, childCoordinates, options) {
|
|
1782
1787
|
const {
|
|
1783
1788
|
basePath,
|
|
1784
1789
|
refine,
|
|
1785
1790
|
getRefine,
|
|
1786
1791
|
lodMetricType,
|
|
1787
1792
|
getTileType,
|
|
1788
|
-
rootLodMetricValue
|
|
1793
|
+
rootLodMetricValue,
|
|
1794
|
+
rootBoundingVolume
|
|
1789
1795
|
} = options;
|
|
1790
1796
|
const uri = tile.contentUrl && tile.contentUrl.replace("".concat(basePath, "/"), '');
|
|
1791
1797
|
const lodMetricValue = rootLodMetricValue / 2 ** level;
|
|
1798
|
+
const boundingVolume = calculateBoundingVolumeForChildTile(level, rootBoundingVolume, childCoordinates);
|
|
1792
1799
|
return {
|
|
1793
1800
|
children: tile.children,
|
|
1794
1801
|
contentUrl: tile.contentUrl,
|
|
@@ -1799,10 +1806,35 @@ function formatTileData(tile, level, options) {
|
|
|
1799
1806
|
refine: getRefine(refine),
|
|
1800
1807
|
type: getTileType(tile),
|
|
1801
1808
|
lodMetricType,
|
|
1802
|
-
lodMetricValue
|
|
1809
|
+
lodMetricValue,
|
|
1810
|
+
boundingVolume
|
|
1803
1811
|
};
|
|
1804
1812
|
}
|
|
1805
1813
|
|
|
1814
|
+
function calculateBoundingVolumeForChildTile(level, rootBoundingVolume, childCoordinates) {
|
|
1815
|
+
if (rootBoundingVolume.region) {
|
|
1816
|
+
const {
|
|
1817
|
+
childTileX,
|
|
1818
|
+
childTileY,
|
|
1819
|
+
childTileZ
|
|
1820
|
+
} = childCoordinates;
|
|
1821
|
+
const [west, south, east, north, minimumHeight, maximumHeight] = rootBoundingVolume.region;
|
|
1822
|
+
const boundingVolumesCount = 2 ** level;
|
|
1823
|
+
const sizeX = (east - west) / boundingVolumesCount;
|
|
1824
|
+
const sizeY = (north - south) / boundingVolumesCount;
|
|
1825
|
+
const sizeZ = (maximumHeight - minimumHeight) / boundingVolumesCount;
|
|
1826
|
+
const [childWest, childEast] = [west + sizeX * childTileX, west + sizeX * (childTileX + 1)];
|
|
1827
|
+
const [childSouth, childNorth] = [south + sizeY * childTileY, south + sizeY * (childTileY + 1)];
|
|
1828
|
+
const [childMinimumHeight, childMaximumHeight] = [minimumHeight + sizeZ * childTileZ, minimumHeight + sizeZ * (childTileZ + 1)];
|
|
1829
|
+
return {
|
|
1830
|
+
region: [childWest, childSouth, childEast, childNorth, childMinimumHeight, childMaximumHeight]
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
console.warn('Unsupported bounding volume type: ', rootBoundingVolume);
|
|
1835
|
+
return null;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1806
1838
|
function concatBits(first, second) {
|
|
1807
1839
|
return parseInt(first.toString(2) + second.toString(2), 2);
|
|
1808
1840
|
}
|
|
@@ -2391,6 +2423,7 @@ async function normalizeImplicitTileHeaders(tileset) {
|
|
|
2391
2423
|
const contentUrlTemplate = "".concat(basePath, "/").concat(tileset.root.content.uri);
|
|
2392
2424
|
const refine = tileset.root.refine;
|
|
2393
2425
|
const rootLodMetricValue = tileset.root.geometricError;
|
|
2426
|
+
const rootBoundingVolume = tileset.root.boundingVolume;
|
|
2394
2427
|
const options = {
|
|
2395
2428
|
contentUrlTemplate,
|
|
2396
2429
|
subtreesUriTemplate,
|
|
@@ -2401,6 +2434,7 @@ async function normalizeImplicitTileHeaders(tileset) {
|
|
|
2401
2434
|
basePath,
|
|
2402
2435
|
lodMetricType: _loaders_gl_tiles__WEBPACK_IMPORTED_MODULE_2__["LOD_METRIC_TYPE"].GEOMETRIC_ERROR,
|
|
2403
2436
|
rootLodMetricValue,
|
|
2437
|
+
rootBoundingVolume,
|
|
2404
2438
|
getTileType,
|
|
2405
2439
|
getRefine
|
|
2406
2440
|
};
|
|
@@ -2965,7 +2999,7 @@ async function parse3DTile(arrayBuffer, byteOffset = 0, options, context, tile =
|
|
|
2965
2999
|
"use strict";
|
|
2966
3000
|
__webpack_require__.r(__webpack_exports__);
|
|
2967
3001
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
2968
|
-
const VERSION = true ? "3.1.
|
|
3002
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
2969
3003
|
//# sourceMappingURL=version.js.map
|
|
2970
3004
|
|
|
2971
3005
|
/***/ }),
|
|
@@ -3135,7 +3169,7 @@ function hasImplicitTilingExtension(tilesetJson) {
|
|
|
3135
3169
|
/*!**********************************************************************************!*\
|
|
3136
3170
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/core/dist/esm/index.js ***!
|
|
3137
3171
|
\**********************************************************************************/
|
|
3138
|
-
/*! exports provided: fetchFile, readArrayBuffer, readFileSync, writeFile, writeFileSync, setLoaderOptions, registerLoaders, selectLoader, selectLoaderSync, parse, parseSync, parseInBatches, load, loadInBatches, encode, encodeSync, encodeInBatches, encodeText, encodeURLtoURL, save, saveSync, setPathPrefix, getPathPrefix, resolvePath, RequestScheduler, makeIterator, makeStream,
|
|
3172
|
+
/*! exports provided: fetchFile, readArrayBuffer, readFileSync, writeFile, writeFileSync, setLoaderOptions, registerLoaders, selectLoader, selectLoaderSync, parse, parseSync, parseInBatches, load, loadInBatches, encode, encodeSync, encodeInBatches, encodeText, encodeURLtoURL, save, saveSync, setPathPrefix, getPathPrefix, resolvePath, RequestScheduler, makeIterator, makeStream, NullWorkerLoader, NullLoader, JSONLoader, _fetchProgress, _BrowserFileSystem, _unregisterLoaders, isBrowser, isWorker, self, window, global, document, assert, forEach, concatenateArrayBuffersAsync, makeTextDecoderIterator, makeTextEncoderIterator, makeLineIterator, makeNumberedLineIterator, isPureObject, isPromise, isIterable, isAsyncIterable, isIterator, isResponse, isReadableStream, isWritableStream */
|
|
3139
3173
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3140
3174
|
|
|
3141
3175
|
"use strict";
|
|
@@ -3208,27 +3242,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3208
3242
|
/* harmony import */ var _iterators_make_iterator_make_iterator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./iterators/make-iterator/make-iterator */ "../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-iterator.js");
|
|
3209
3243
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeIterator", function() { return _iterators_make_iterator_make_iterator__WEBPACK_IMPORTED_MODULE_15__["makeIterator"]; });
|
|
3210
3244
|
|
|
3211
|
-
/* harmony import */ var
|
|
3212
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeStream", function() { return
|
|
3245
|
+
/* harmony import */ var _iterators_make_stream_make_node_stream__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./iterators/make-stream/make-node-stream */ "../../node_modules/@loaders.gl/core/dist/esm/iterators/make-stream/make-dom-stream.js");
|
|
3246
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeStream", function() { return _iterators_make_stream_make_node_stream__WEBPACK_IMPORTED_MODULE_16__["makeStream"]; });
|
|
3213
3247
|
|
|
3214
|
-
/* harmony import */ var
|
|
3215
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3248
|
+
/* harmony import */ var _null_loader__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./null-loader */ "../../node_modules/@loaders.gl/core/dist/esm/null-loader.js");
|
|
3249
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NullWorkerLoader", function() { return _null_loader__WEBPACK_IMPORTED_MODULE_17__["NullWorkerLoader"]; });
|
|
3216
3250
|
|
|
3217
|
-
/* harmony
|
|
3218
|
-
/* harmony import */ var _iterators_make_stream_make_node_stream__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_iterators_make_stream_make_node_stream__WEBPACK_IMPORTED_MODULE_18__);
|
|
3219
|
-
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "makeNodeStream", function() { return _iterators_make_stream_make_node_stream__WEBPACK_IMPORTED_MODULE_18___default.a; });
|
|
3220
|
-
/* harmony import */ var _null_loader__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./null-loader */ "../../node_modules/@loaders.gl/core/dist/esm/null-loader.js");
|
|
3221
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NullWorkerLoader", function() { return _null_loader__WEBPACK_IMPORTED_MODULE_19__["NullWorkerLoader"]; });
|
|
3222
|
-
|
|
3223
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NullLoader", function() { return _null_loader__WEBPACK_IMPORTED_MODULE_19__["NullLoader"]; });
|
|
3251
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NullLoader", function() { return _null_loader__WEBPACK_IMPORTED_MODULE_17__["NullLoader"]; });
|
|
3224
3252
|
|
|
3225
3253
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JSONLoader", function() { return _loaders_gl_loader_utils__WEBPACK_IMPORTED_MODULE_14__["JSONLoader"]; });
|
|
3226
3254
|
|
|
3227
|
-
/* harmony import */ var
|
|
3228
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_fetchProgress", function() { return
|
|
3255
|
+
/* harmony import */ var _lib_progress_fetch_progress__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./lib/progress/fetch-progress */ "../../node_modules/@loaders.gl/core/dist/esm/lib/progress/fetch-progress.js");
|
|
3256
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_fetchProgress", function() { return _lib_progress_fetch_progress__WEBPACK_IMPORTED_MODULE_18__["default"]; });
|
|
3229
3257
|
|
|
3230
|
-
/* harmony import */ var
|
|
3231
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_BrowserFileSystem", function() { return
|
|
3258
|
+
/* harmony import */ var _lib_filesystems_browser_filesystem__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./lib/filesystems/browser-filesystem */ "../../node_modules/@loaders.gl/core/dist/esm/lib/filesystems/browser-filesystem.js");
|
|
3259
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_BrowserFileSystem", function() { return _lib_filesystems_browser_filesystem__WEBPACK_IMPORTED_MODULE_19__["default"]; });
|
|
3232
3260
|
|
|
3233
3261
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_unregisterLoaders", function() { return _lib_api_register_loaders__WEBPACK_IMPORTED_MODULE_5__["_unregisterLoaders"]; });
|
|
3234
3262
|
|
|
@@ -3258,24 +3286,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3258
3286
|
|
|
3259
3287
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeNumberedLineIterator", function() { return _loaders_gl_loader_utils__WEBPACK_IMPORTED_MODULE_14__["makeNumberedLineIterator"]; });
|
|
3260
3288
|
|
|
3261
|
-
/* harmony import */ var
|
|
3262
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPureObject", function() { return
|
|
3263
|
-
|
|
3264
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_22__["isPromise"]; });
|
|
3265
|
-
|
|
3266
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_22__["isIterable"]; });
|
|
3289
|
+
/* harmony import */ var _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./javascript-utils/is-type */ "../../node_modules/@loaders.gl/core/dist/esm/javascript-utils/is-type.js");
|
|
3290
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPureObject", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isPureObject"]; });
|
|
3267
3291
|
|
|
3268
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3292
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isPromise"]; });
|
|
3269
3293
|
|
|
3270
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3294
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isIterable"]; });
|
|
3271
3295
|
|
|
3272
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3296
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isAsyncIterable", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isAsyncIterable"]; });
|
|
3273
3297
|
|
|
3274
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3298
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isIterator", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isIterator"]; });
|
|
3275
3299
|
|
|
3276
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3300
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isResponse", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isResponse"]; });
|
|
3277
3301
|
|
|
3302
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isReadableStream", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isReadableStream"]; });
|
|
3278
3303
|
|
|
3304
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWritableStream", function() { return _javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_20__["isWritableStream"]; });
|
|
3279
3305
|
|
|
3280
3306
|
|
|
3281
3307
|
|
|
@@ -3498,13 +3524,13 @@ function* makeStringIterator(string, options) {
|
|
|
3498
3524
|
/*!******************************************************************************************************************!*\
|
|
3499
3525
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/core/dist/esm/iterators/make-stream/make-dom-stream.js ***!
|
|
3500
3526
|
\******************************************************************************************************************/
|
|
3501
|
-
/*! exports provided:
|
|
3527
|
+
/*! exports provided: makeStream */
|
|
3502
3528
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3503
3529
|
|
|
3504
3530
|
"use strict";
|
|
3505
3531
|
__webpack_require__.r(__webpack_exports__);
|
|
3506
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3507
|
-
function
|
|
3532
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeStream", function() { return makeStream; });
|
|
3533
|
+
function makeStream(source, options) {
|
|
3508
3534
|
const iterator = source[Symbol.asyncIterator] ? source[Symbol.asyncIterator]() : source[Symbol.iterator]();
|
|
3509
3535
|
return new ReadableStream({
|
|
3510
3536
|
type: 'bytes',
|
|
@@ -3541,30 +3567,6 @@ function makeDOMStream(source, options) {
|
|
|
3541
3567
|
|
|
3542
3568
|
/***/ }),
|
|
3543
3569
|
|
|
3544
|
-
/***/ "../../node_modules/@loaders.gl/core/dist/esm/iterators/make-stream/make-stream.js":
|
|
3545
|
-
/*!**************************************************************************************************************!*\
|
|
3546
|
-
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/core/dist/esm/iterators/make-stream/make-stream.js ***!
|
|
3547
|
-
\**************************************************************************************************************/
|
|
3548
|
-
/*! exports provided: makeStream */
|
|
3549
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3550
|
-
|
|
3551
|
-
"use strict";
|
|
3552
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3553
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeStream", function() { return makeStream; });
|
|
3554
|
-
/* harmony import */ var _loaders_gl_loader_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/loader-utils */ "../../node_modules/@loaders.gl/loader-utils/dist/esm/index.js");
|
|
3555
|
-
/* harmony import */ var _make_dom_stream__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./make-dom-stream */ "../../node_modules/@loaders.gl/core/dist/esm/iterators/make-stream/make-dom-stream.js");
|
|
3556
|
-
/* harmony import */ var _make_node_stream__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./make-node-stream */ 7);
|
|
3557
|
-
/* harmony import */ var _make_node_stream__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_make_node_stream__WEBPACK_IMPORTED_MODULE_2__);
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
function makeStream(data, options) {
|
|
3562
|
-
return _loaders_gl_loader_utils__WEBPACK_IMPORTED_MODULE_0__["isBrowser"] ? Object(_make_dom_stream__WEBPACK_IMPORTED_MODULE_1__["makeDOMStream"])(data, options) : _make_node_stream__WEBPACK_IMPORTED_MODULE_2___default()(data, options);
|
|
3563
|
-
}
|
|
3564
|
-
//# sourceMappingURL=make-stream.js.map
|
|
3565
|
-
|
|
3566
|
-
/***/ }),
|
|
3567
|
-
|
|
3568
3570
|
/***/ "../../node_modules/@loaders.gl/core/dist/esm/javascript-utils/is-type.js":
|
|
3569
3571
|
/*!*****************************************************************************************************!*\
|
|
3570
3572
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/core/dist/esm/javascript-utils/is-type.js ***!
|
|
@@ -5573,7 +5575,7 @@ function arrayBufferToBase64(buffer) {
|
|
|
5573
5575
|
__webpack_require__.r(__webpack_exports__);
|
|
5574
5576
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullWorkerLoader", function() { return NullWorkerLoader; });
|
|
5575
5577
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullLoader", function() { return NullLoader; });
|
|
5576
|
-
const VERSION = true ? "3.1.
|
|
5578
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
5577
5579
|
const NullWorkerLoader = {
|
|
5578
5580
|
name: 'Null loader',
|
|
5579
5581
|
id: 'null',
|
|
@@ -6751,7 +6753,7 @@ function makeMetadata(metadata) {
|
|
|
6751
6753
|
"use strict";
|
|
6752
6754
|
__webpack_require__.r(__webpack_exports__);
|
|
6753
6755
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
6754
|
-
const VERSION = true ? "3.1.
|
|
6756
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
6755
6757
|
//# sourceMappingURL=version.js.map
|
|
6756
6758
|
|
|
6757
6759
|
/***/ }),
|
|
@@ -6760,25 +6762,33 @@ const VERSION = true ? "3.1.0" : undefined;
|
|
|
6760
6762
|
/*!*********************************************************************************!*\
|
|
6761
6763
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/gis/dist/esm/index.js ***!
|
|
6762
6764
|
\*********************************************************************************/
|
|
6763
|
-
/*! exports provided: geojsonToBinary, binaryToGeojson, binaryToGeoJson, binaryToGeometry, transformBinaryCoords, transformGeoJsonCoords */
|
|
6765
|
+
/*! exports provided: flatGeojsonToBinary, geojsonToBinary, geojsonToFlatGeojson, binaryToGeojson, binaryToGeoJson, binaryToGeometry, transformBinaryCoords, transformGeoJsonCoords */
|
|
6764
6766
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6765
6767
|
|
|
6766
6768
|
"use strict";
|
|
6767
6769
|
__webpack_require__.r(__webpack_exports__);
|
|
6768
|
-
/* harmony import */ var
|
|
6769
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
6770
|
+
/* harmony import */ var _lib_flat_geojson_to_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/flat-geojson-to-binary */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/flat-geojson-to-binary.js");
|
|
6771
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatGeojsonToBinary", function() { return _lib_flat_geojson_to_binary__WEBPACK_IMPORTED_MODULE_0__["flatGeojsonToBinary"]; });
|
|
6772
|
+
|
|
6773
|
+
/* harmony import */ var _lib_geojson_to_binary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/geojson-to-binary */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-binary.js");
|
|
6774
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geojsonToBinary", function() { return _lib_geojson_to_binary__WEBPACK_IMPORTED_MODULE_1__["geojsonToBinary"]; });
|
|
6775
|
+
|
|
6776
|
+
/* harmony import */ var _lib_geojson_to_flat_geojson__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/geojson-to-flat-geojson */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-flat-geojson.js");
|
|
6777
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geojsonToFlatGeojson", function() { return _lib_geojson_to_flat_geojson__WEBPACK_IMPORTED_MODULE_2__["geojsonToFlatGeojson"]; });
|
|
6778
|
+
|
|
6779
|
+
/* harmony import */ var _lib_binary_to_geojson__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/binary-to-geojson */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/binary-to-geojson.js");
|
|
6780
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "binaryToGeojson", function() { return _lib_binary_to_geojson__WEBPACK_IMPORTED_MODULE_3__["binaryToGeojson"]; });
|
|
6781
|
+
|
|
6782
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "binaryToGeoJson", function() { return _lib_binary_to_geojson__WEBPACK_IMPORTED_MODULE_3__["binaryToGeoJson"]; });
|
|
6770
6783
|
|
|
6771
|
-
/* harmony
|
|
6772
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "binaryToGeojson", function() { return _lib_binary_to_geojson__WEBPACK_IMPORTED_MODULE_1__["binaryToGeojson"]; });
|
|
6784
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "binaryToGeometry", function() { return _lib_binary_to_geojson__WEBPACK_IMPORTED_MODULE_3__["binaryToGeometry"]; });
|
|
6773
6785
|
|
|
6774
|
-
/* harmony
|
|
6786
|
+
/* harmony import */ var _lib_transform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/transform */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/transform.js");
|
|
6787
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformBinaryCoords", function() { return _lib_transform__WEBPACK_IMPORTED_MODULE_4__["transformBinaryCoords"]; });
|
|
6775
6788
|
|
|
6776
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
6789
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformGeoJsonCoords", function() { return _lib_transform__WEBPACK_IMPORTED_MODULE_4__["transformGeoJsonCoords"]; });
|
|
6777
6790
|
|
|
6778
|
-
/* harmony import */ var _lib_transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/transform */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/transform.js");
|
|
6779
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformBinaryCoords", function() { return _lib_transform__WEBPACK_IMPORTED_MODULE_2__["transformBinaryCoords"]; });
|
|
6780
6791
|
|
|
6781
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformGeoJsonCoords", function() { return _lib_transform__WEBPACK_IMPORTED_MODULE_2__["transformGeoJsonCoords"]; });
|
|
6782
6792
|
|
|
6783
6793
|
|
|
6784
6794
|
|
|
@@ -7076,31 +7086,17 @@ function parseType(data) {
|
|
|
7076
7086
|
|
|
7077
7087
|
/***/ }),
|
|
7078
7088
|
|
|
7079
|
-
/***/ "../../node_modules/@loaders.gl/gis/dist/esm/lib/
|
|
7080
|
-
|
|
7081
|
-
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/gis/dist/esm/lib/
|
|
7082
|
-
|
|
7083
|
-
/*! exports provided:
|
|
7089
|
+
/***/ "../../node_modules/@loaders.gl/gis/dist/esm/lib/extract-geometry-info.js":
|
|
7090
|
+
/*!*****************************************************************************************************!*\
|
|
7091
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/gis/dist/esm/lib/extract-geometry-info.js ***!
|
|
7092
|
+
\*****************************************************************************************************/
|
|
7093
|
+
/*! exports provided: extractGeometryInfo */
|
|
7084
7094
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7085
7095
|
|
|
7086
7096
|
"use strict";
|
|
7087
7097
|
__webpack_require__.r(__webpack_exports__);
|
|
7088
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
7089
|
-
|
|
7090
|
-
function geojsonToBinary(features, options = {}) {
|
|
7091
|
-
const firstPassData = firstPass(features);
|
|
7092
|
-
return secondPass(features, firstPassData, {
|
|
7093
|
-
coordLength: options.coordLength || firstPassData.coordLength,
|
|
7094
|
-
numericPropKeys: options.numericPropKeys || firstPassData.numericPropKeys,
|
|
7095
|
-
PositionDataType: options.PositionDataType || Float32Array
|
|
7096
|
-
});
|
|
7097
|
-
}
|
|
7098
|
-
const TEST_EXPORTS = {
|
|
7099
|
-
firstPass,
|
|
7100
|
-
secondPass
|
|
7101
|
-
};
|
|
7102
|
-
|
|
7103
|
-
function firstPass(features) {
|
|
7098
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractGeometryInfo", function() { return extractGeometryInfo; });
|
|
7099
|
+
function extractGeometryInfo(features) {
|
|
7104
7100
|
let pointPositionsCount = 0;
|
|
7105
7101
|
let pointFeaturesCount = 0;
|
|
7106
7102
|
let linePositionsCount = 0;
|
|
@@ -7111,7 +7107,6 @@ function firstPass(features) {
|
|
|
7111
7107
|
let polygonRingsCount = 0;
|
|
7112
7108
|
let polygonFeaturesCount = 0;
|
|
7113
7109
|
const coordLengths = new Set();
|
|
7114
|
-
const propArrayTypes = {};
|
|
7115
7110
|
|
|
7116
7111
|
for (const feature of features) {
|
|
7117
7112
|
const geometry = feature.geometry;
|
|
@@ -7162,9 +7157,10 @@ function firstPass(features) {
|
|
|
7162
7157
|
polygonFeaturesCount++;
|
|
7163
7158
|
polygonObjectsCount++;
|
|
7164
7159
|
polygonRingsCount += geometry.coordinates.length;
|
|
7165
|
-
|
|
7160
|
+
const flattened = geometry.coordinates.flat();
|
|
7161
|
+
polygonPositionsCount += flattened.length;
|
|
7166
7162
|
|
|
7167
|
-
for (const coord of
|
|
7163
|
+
for (const coord of flattened) {
|
|
7168
7164
|
coordLengths.add(coord.length);
|
|
7169
7165
|
}
|
|
7170
7166
|
|
|
@@ -7176,9 +7172,10 @@ function firstPass(features) {
|
|
|
7176
7172
|
for (const polygon of geometry.coordinates) {
|
|
7177
7173
|
polygonObjectsCount++;
|
|
7178
7174
|
polygonRingsCount += polygon.length;
|
|
7179
|
-
|
|
7175
|
+
const flattened = polygon.flat();
|
|
7176
|
+
polygonPositionsCount += flattened.length;
|
|
7180
7177
|
|
|
7181
|
-
for (const coord of
|
|
7178
|
+
for (const coord of flattened) {
|
|
7182
7179
|
coordLengths.add(coord.length);
|
|
7183
7180
|
}
|
|
7184
7181
|
}
|
|
@@ -7188,13 +7185,6 @@ function firstPass(features) {
|
|
|
7188
7185
|
default:
|
|
7189
7186
|
throw new Error("Unsupported geometry type: ".concat(geometry.type));
|
|
7190
7187
|
}
|
|
7191
|
-
|
|
7192
|
-
if (feature.properties) {
|
|
7193
|
-
for (const key in feature.properties) {
|
|
7194
|
-
const val = feature.properties[key];
|
|
7195
|
-
propArrayTypes[key] = deduceArrayType(val, propArrayTypes[key]);
|
|
7196
|
-
}
|
|
7197
|
-
}
|
|
7198
7188
|
}
|
|
7199
7189
|
|
|
7200
7190
|
return {
|
|
@@ -7207,13 +7197,57 @@ function firstPass(features) {
|
|
|
7207
7197
|
polygonPositionsCount,
|
|
7208
7198
|
polygonObjectsCount,
|
|
7209
7199
|
polygonRingsCount,
|
|
7210
|
-
polygonFeaturesCount
|
|
7211
|
-
numericPropKeys: Object.keys(propArrayTypes).filter(k => propArrayTypes[k] !== Array),
|
|
7212
|
-
propArrayTypes
|
|
7200
|
+
polygonFeaturesCount
|
|
7213
7201
|
};
|
|
7214
7202
|
}
|
|
7203
|
+
//# sourceMappingURL=extract-geometry-info.js.map
|
|
7204
|
+
|
|
7205
|
+
/***/ }),
|
|
7206
|
+
|
|
7207
|
+
/***/ "../../node_modules/@loaders.gl/gis/dist/esm/lib/flat-geojson-to-binary.js":
|
|
7208
|
+
/*!******************************************************************************************************!*\
|
|
7209
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/gis/dist/esm/lib/flat-geojson-to-binary.js ***!
|
|
7210
|
+
\******************************************************************************************************/
|
|
7211
|
+
/*! exports provided: flatGeojsonToBinary, TEST_EXPORTS */
|
|
7212
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7213
|
+
|
|
7214
|
+
"use strict";
|
|
7215
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7216
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatGeojsonToBinary", function() { return flatGeojsonToBinary; });
|
|
7217
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TEST_EXPORTS", function() { return TEST_EXPORTS; });
|
|
7218
|
+
/* harmony import */ var _math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @math.gl/polygon */ "../../node_modules/@math.gl/polygon/dist/esm/index.js");
|
|
7219
|
+
|
|
7220
|
+
function flatGeojsonToBinary(features, geometryInfo, options) {
|
|
7221
|
+
const propArrayTypes = extractNumericPropTypes(features);
|
|
7222
|
+
const numericPropKeys = Object.keys(propArrayTypes).filter(k => propArrayTypes[k] !== Array);
|
|
7223
|
+
return fillArrays(features, {
|
|
7224
|
+
propArrayTypes,
|
|
7225
|
+
...geometryInfo
|
|
7226
|
+
}, {
|
|
7227
|
+
numericPropKeys: options && options.numericPropKeys || numericPropKeys,
|
|
7228
|
+
PositionDataType: options ? options.PositionDataType : Float32Array
|
|
7229
|
+
});
|
|
7230
|
+
}
|
|
7231
|
+
const TEST_EXPORTS = {
|
|
7232
|
+
extractNumericPropTypes
|
|
7233
|
+
};
|
|
7215
7234
|
|
|
7216
|
-
function
|
|
7235
|
+
function extractNumericPropTypes(features) {
|
|
7236
|
+
const propArrayTypes = {};
|
|
7237
|
+
|
|
7238
|
+
for (const feature of features) {
|
|
7239
|
+
if (feature.properties) {
|
|
7240
|
+
for (const key in feature.properties) {
|
|
7241
|
+
const val = feature.properties[key];
|
|
7242
|
+
propArrayTypes[key] = deduceArrayType(val, propArrayTypes[key]);
|
|
7243
|
+
}
|
|
7244
|
+
}
|
|
7245
|
+
}
|
|
7246
|
+
|
|
7247
|
+
return propArrayTypes;
|
|
7248
|
+
}
|
|
7249
|
+
|
|
7250
|
+
function fillArrays(features, geometryInfo, options) {
|
|
7217
7251
|
const {
|
|
7218
7252
|
pointPositionsCount,
|
|
7219
7253
|
pointFeaturesCount,
|
|
@@ -7223,47 +7257,52 @@ function secondPass(features, firstPassData, options) {
|
|
|
7223
7257
|
polygonPositionsCount,
|
|
7224
7258
|
polygonObjectsCount,
|
|
7225
7259
|
polygonRingsCount,
|
|
7260
|
+
polygonFeaturesCount,
|
|
7226
7261
|
propArrayTypes,
|
|
7227
|
-
|
|
7228
|
-
} =
|
|
7262
|
+
coordLength
|
|
7263
|
+
} = geometryInfo;
|
|
7229
7264
|
const {
|
|
7230
|
-
|
|
7231
|
-
numericPropKeys,
|
|
7265
|
+
numericPropKeys = [],
|
|
7232
7266
|
PositionDataType = Float32Array
|
|
7233
7267
|
} = options;
|
|
7268
|
+
const hasGlobalId = features[0] && 'id' in features[0];
|
|
7234
7269
|
const GlobalFeatureIdsDataType = features.length > 65535 ? Uint32Array : Uint16Array;
|
|
7235
7270
|
const points = {
|
|
7271
|
+
type: 'Point',
|
|
7236
7272
|
positions: new PositionDataType(pointPositionsCount * coordLength),
|
|
7237
7273
|
globalFeatureIds: new GlobalFeatureIdsDataType(pointPositionsCount),
|
|
7238
7274
|
featureIds: pointFeaturesCount > 65535 ? new Uint32Array(pointPositionsCount) : new Uint16Array(pointPositionsCount),
|
|
7239
7275
|
numericProps: {},
|
|
7240
|
-
properties:
|
|
7241
|
-
fields:
|
|
7276
|
+
properties: [],
|
|
7277
|
+
fields: []
|
|
7242
7278
|
};
|
|
7243
7279
|
const lines = {
|
|
7244
|
-
|
|
7280
|
+
type: 'LineString',
|
|
7245
7281
|
pathIndices: linePositionsCount > 65535 ? new Uint32Array(linePathsCount + 1) : new Uint16Array(linePathsCount + 1),
|
|
7282
|
+
positions: new PositionDataType(linePositionsCount * coordLength),
|
|
7246
7283
|
globalFeatureIds: new GlobalFeatureIdsDataType(linePositionsCount),
|
|
7247
7284
|
featureIds: lineFeaturesCount > 65535 ? new Uint32Array(linePositionsCount) : new Uint16Array(linePositionsCount),
|
|
7248
7285
|
numericProps: {},
|
|
7249
|
-
properties:
|
|
7250
|
-
fields:
|
|
7286
|
+
properties: [],
|
|
7287
|
+
fields: []
|
|
7251
7288
|
};
|
|
7252
7289
|
const polygons = {
|
|
7253
|
-
|
|
7290
|
+
type: 'Polygon',
|
|
7254
7291
|
polygonIndices: polygonPositionsCount > 65535 ? new Uint32Array(polygonObjectsCount + 1) : new Uint16Array(polygonObjectsCount + 1),
|
|
7255
7292
|
primitivePolygonIndices: polygonPositionsCount > 65535 ? new Uint32Array(polygonRingsCount + 1) : new Uint16Array(polygonRingsCount + 1),
|
|
7293
|
+
positions: new PositionDataType(polygonPositionsCount * coordLength),
|
|
7294
|
+
triangles: [],
|
|
7256
7295
|
globalFeatureIds: new GlobalFeatureIdsDataType(polygonPositionsCount),
|
|
7257
7296
|
featureIds: polygonFeaturesCount > 65535 ? new Uint32Array(polygonPositionsCount) : new Uint16Array(polygonPositionsCount),
|
|
7258
7297
|
numericProps: {},
|
|
7259
|
-
properties:
|
|
7260
|
-
fields:
|
|
7298
|
+
properties: [],
|
|
7299
|
+
fields: []
|
|
7261
7300
|
};
|
|
7262
7301
|
|
|
7263
7302
|
for (const object of [points, lines, polygons]) {
|
|
7264
|
-
for (const propName of numericPropKeys
|
|
7265
|
-
const
|
|
7266
|
-
object.numericProps[propName] = new
|
|
7303
|
+
for (const propName of numericPropKeys) {
|
|
7304
|
+
const T = propArrayTypes[propName];
|
|
7305
|
+
object.numericProps[propName] = new T(object.positions.length / coordLength);
|
|
7267
7306
|
}
|
|
7268
7307
|
}
|
|
7269
7308
|
|
|
@@ -7289,38 +7328,41 @@ function secondPass(features, firstPassData, options) {
|
|
|
7289
7328
|
|
|
7290
7329
|
switch (geometry.type) {
|
|
7291
7330
|
case 'Point':
|
|
7292
|
-
handlePoint(geometry
|
|
7331
|
+
handlePoint(geometry, points, indexMap, coordLength, properties);
|
|
7293
7332
|
points.properties.push(keepStringProperties(properties, numericPropKeys));
|
|
7294
|
-
indexMap.pointFeature++;
|
|
7295
|
-
break;
|
|
7296
7333
|
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7334
|
+
if (hasGlobalId) {
|
|
7335
|
+
points.fields.push({
|
|
7336
|
+
id: feature.id
|
|
7337
|
+
});
|
|
7338
|
+
}
|
|
7339
|
+
|
|
7300
7340
|
indexMap.pointFeature++;
|
|
7301
7341
|
break;
|
|
7302
7342
|
|
|
7303
7343
|
case 'LineString':
|
|
7304
|
-
handleLineString(geometry
|
|
7344
|
+
handleLineString(geometry, lines, indexMap, coordLength, properties);
|
|
7305
7345
|
lines.properties.push(keepStringProperties(properties, numericPropKeys));
|
|
7306
|
-
indexMap.lineFeature++;
|
|
7307
|
-
break;
|
|
7308
7346
|
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7347
|
+
if (hasGlobalId) {
|
|
7348
|
+
lines.fields.push({
|
|
7349
|
+
id: feature.id
|
|
7350
|
+
});
|
|
7351
|
+
}
|
|
7352
|
+
|
|
7312
7353
|
indexMap.lineFeature++;
|
|
7313
7354
|
break;
|
|
7314
7355
|
|
|
7315
7356
|
case 'Polygon':
|
|
7316
|
-
handlePolygon(geometry
|
|
7357
|
+
handlePolygon(geometry, polygons, indexMap, coordLength, properties);
|
|
7317
7358
|
polygons.properties.push(keepStringProperties(properties, numericPropKeys));
|
|
7318
|
-
indexMap.polygonFeature++;
|
|
7319
|
-
break;
|
|
7320
7359
|
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7360
|
+
if (hasGlobalId) {
|
|
7361
|
+
polygons.fields.push({
|
|
7362
|
+
id: feature.id
|
|
7363
|
+
});
|
|
7364
|
+
}
|
|
7365
|
+
|
|
7324
7366
|
indexMap.polygonFeature++;
|
|
7325
7367
|
break;
|
|
7326
7368
|
|
|
@@ -7334,61 +7376,92 @@ function secondPass(features, firstPassData, options) {
|
|
|
7334
7376
|
return makeAccessorObjects(points, lines, polygons, coordLength);
|
|
7335
7377
|
}
|
|
7336
7378
|
|
|
7337
|
-
function handlePoint(
|
|
7338
|
-
points.positions.set(
|
|
7339
|
-
|
|
7340
|
-
points
|
|
7341
|
-
|
|
7342
|
-
indexMap.pointPosition
|
|
7379
|
+
function handlePoint(geometry, points, indexMap, coordLength, properties) {
|
|
7380
|
+
points.positions.set(geometry.data, indexMap.pointPosition * coordLength);
|
|
7381
|
+
const nPositions = geometry.data.length / coordLength;
|
|
7382
|
+
fillNumericProperties(points, properties, indexMap.pointPosition, nPositions);
|
|
7383
|
+
points.globalFeatureIds.fill(indexMap.feature, indexMap.pointPosition, indexMap.pointPosition + nPositions);
|
|
7384
|
+
points.featureIds.fill(indexMap.pointFeature, indexMap.pointPosition, indexMap.pointPosition + nPositions);
|
|
7385
|
+
indexMap.pointPosition += nPositions;
|
|
7343
7386
|
}
|
|
7344
7387
|
|
|
7345
|
-
function
|
|
7346
|
-
|
|
7347
|
-
|
|
7388
|
+
function handleLineString(geometry, lines, indexMap, coordLength, properties) {
|
|
7389
|
+
lines.positions.set(geometry.data, indexMap.linePosition * coordLength);
|
|
7390
|
+
const nPositions = geometry.data.length / coordLength;
|
|
7391
|
+
fillNumericProperties(lines, properties, indexMap.linePosition, nPositions);
|
|
7392
|
+
lines.globalFeatureIds.fill(indexMap.feature, indexMap.linePosition, indexMap.linePosition + nPositions);
|
|
7393
|
+
lines.featureIds.fill(indexMap.lineFeature, indexMap.linePosition, indexMap.linePosition + nPositions);
|
|
7394
|
+
|
|
7395
|
+
for (let i = 0, il = geometry.indices.length; i < il; ++i) {
|
|
7396
|
+
const start = geometry.indices[i];
|
|
7397
|
+
const end = i === il - 1 ? geometry.data.length : geometry.indices[i + 1];
|
|
7398
|
+
lines.pathIndices[indexMap.linePath++] = indexMap.linePosition;
|
|
7399
|
+
indexMap.linePosition += (end - start) / coordLength;
|
|
7348
7400
|
}
|
|
7349
7401
|
}
|
|
7350
7402
|
|
|
7351
|
-
function
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
lines.globalFeatureIds.set(new Uint32Array(nPositions).fill(indexMap.feature), indexMap.linePosition);
|
|
7358
|
-
lines.featureIds.set(new Uint32Array(nPositions).fill(indexMap.lineFeature), indexMap.linePosition);
|
|
7359
|
-
indexMap.linePosition += nPositions;
|
|
7360
|
-
}
|
|
7403
|
+
function handlePolygon(geometry, polygons, indexMap, coordLength, properties) {
|
|
7404
|
+
polygons.positions.set(geometry.data, indexMap.polygonPosition * coordLength);
|
|
7405
|
+
const nPositions = geometry.data.length / coordLength;
|
|
7406
|
+
fillNumericProperties(polygons, properties, indexMap.polygonPosition, nPositions);
|
|
7407
|
+
polygons.globalFeatureIds.fill(indexMap.feature, indexMap.polygonPosition, indexMap.polygonPosition + nPositions);
|
|
7408
|
+
polygons.featureIds.fill(indexMap.polygonFeature, indexMap.polygonPosition, indexMap.polygonPosition + nPositions);
|
|
7361
7409
|
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7410
|
+
for (let l = 0, ll = geometry.indices.length; l < ll; ++l) {
|
|
7411
|
+
const startPosition = indexMap.polygonPosition;
|
|
7412
|
+
polygons.polygonIndices[indexMap.polygonObject++] = startPosition;
|
|
7413
|
+
const areas = geometry.areas[l];
|
|
7414
|
+
const indices = geometry.indices[l];
|
|
7415
|
+
const nextIndices = geometry.indices[l + 1];
|
|
7416
|
+
|
|
7417
|
+
for (let i = 0, il = indices.length; i < il; ++i) {
|
|
7418
|
+
const start = indices[i];
|
|
7419
|
+
const end = i === il - 1 ? nextIndices === undefined ? geometry.data.length : nextIndices[0] : indices[i + 1];
|
|
7420
|
+
polygons.primitivePolygonIndices[indexMap.polygonRing++] = indexMap.polygonPosition;
|
|
7421
|
+
indexMap.polygonPosition += (end - start) / coordLength;
|
|
7422
|
+
}
|
|
7423
|
+
|
|
7424
|
+
const endPosition = indexMap.polygonPosition;
|
|
7425
|
+
triangulatePolygon(polygons, areas, indices, {
|
|
7426
|
+
startPosition,
|
|
7427
|
+
endPosition,
|
|
7428
|
+
coordLength
|
|
7429
|
+
});
|
|
7365
7430
|
}
|
|
7366
7431
|
}
|
|
7367
7432
|
|
|
7368
|
-
function
|
|
7369
|
-
|
|
7370
|
-
|
|
7433
|
+
function triangulatePolygon(polygons, areas, indices, {
|
|
7434
|
+
startPosition,
|
|
7435
|
+
endPosition,
|
|
7436
|
+
coordLength
|
|
7437
|
+
}) {
|
|
7438
|
+
const start = startPosition * coordLength;
|
|
7439
|
+
const end = endPosition * coordLength;
|
|
7440
|
+
const polygonPositions = polygons.positions.subarray(start, end);
|
|
7441
|
+
const offset = indices[0];
|
|
7442
|
+
const holes = indices.slice(1).map(n => (n - offset) / coordLength);
|
|
7443
|
+
const triangles = Object(_math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__["earcut"])(polygonPositions, holes, coordLength, areas);
|
|
7371
7444
|
|
|
7372
|
-
for (
|
|
7373
|
-
polygons.
|
|
7374
|
-
indexMap.polygonRing++;
|
|
7375
|
-
fillCoords(polygons.positions, ring, indexMap.polygonPosition, coordLength);
|
|
7376
|
-
const nPositions = ring.length;
|
|
7377
|
-
fillNumericProperties(polygons, properties, indexMap.polygonPosition, nPositions);
|
|
7378
|
-
polygons.globalFeatureIds.set(new Uint32Array(nPositions).fill(indexMap.feature), indexMap.polygonPosition);
|
|
7379
|
-
polygons.featureIds.set(new Uint32Array(nPositions).fill(indexMap.polygonFeature), indexMap.polygonPosition);
|
|
7380
|
-
indexMap.polygonPosition += nPositions;
|
|
7445
|
+
for (let t = 0, tl = triangles.length; t < tl; ++t) {
|
|
7446
|
+
polygons.triangles.push(startPosition + triangles[t]);
|
|
7381
7447
|
}
|
|
7382
7448
|
}
|
|
7383
7449
|
|
|
7384
|
-
function
|
|
7385
|
-
|
|
7386
|
-
|
|
7450
|
+
function wrapProps(obj, size) {
|
|
7451
|
+
const returnObj = {};
|
|
7452
|
+
|
|
7453
|
+
for (const key in obj) {
|
|
7454
|
+
returnObj[key] = {
|
|
7455
|
+
value: obj[key],
|
|
7456
|
+
size
|
|
7457
|
+
};
|
|
7387
7458
|
}
|
|
7459
|
+
|
|
7460
|
+
return returnObj;
|
|
7388
7461
|
}
|
|
7389
7462
|
|
|
7390
7463
|
function makeAccessorObjects(points, lines, polygons, coordLength) {
|
|
7391
|
-
|
|
7464
|
+
return {
|
|
7392
7465
|
points: { ...points,
|
|
7393
7466
|
positions: {
|
|
7394
7467
|
value: points.positions,
|
|
@@ -7402,17 +7475,17 @@ function makeAccessorObjects(points, lines, polygons, coordLength) {
|
|
|
7402
7475
|
value: points.featureIds,
|
|
7403
7476
|
size: 1
|
|
7404
7477
|
},
|
|
7405
|
-
|
|
7478
|
+
numericProps: wrapProps(points.numericProps, 1)
|
|
7406
7479
|
},
|
|
7407
7480
|
lines: { ...lines,
|
|
7408
|
-
pathIndices: {
|
|
7409
|
-
value: lines.pathIndices,
|
|
7410
|
-
size: 1
|
|
7411
|
-
},
|
|
7412
7481
|
positions: {
|
|
7413
7482
|
value: lines.positions,
|
|
7414
7483
|
size: coordLength
|
|
7415
7484
|
},
|
|
7485
|
+
pathIndices: {
|
|
7486
|
+
value: lines.pathIndices,
|
|
7487
|
+
size: 1
|
|
7488
|
+
},
|
|
7416
7489
|
globalFeatureIds: {
|
|
7417
7490
|
value: lines.globalFeatureIds,
|
|
7418
7491
|
size: 1
|
|
@@ -7421,9 +7494,13 @@ function makeAccessorObjects(points, lines, polygons, coordLength) {
|
|
|
7421
7494
|
value: lines.featureIds,
|
|
7422
7495
|
size: 1
|
|
7423
7496
|
},
|
|
7424
|
-
|
|
7497
|
+
numericProps: wrapProps(lines.numericProps, 1)
|
|
7425
7498
|
},
|
|
7426
7499
|
polygons: { ...polygons,
|
|
7500
|
+
positions: {
|
|
7501
|
+
value: polygons.positions,
|
|
7502
|
+
size: coordLength
|
|
7503
|
+
},
|
|
7427
7504
|
polygonIndices: {
|
|
7428
7505
|
value: polygons.polygonIndices,
|
|
7429
7506
|
size: 1
|
|
@@ -7432,9 +7509,9 @@ function makeAccessorObjects(points, lines, polygons, coordLength) {
|
|
|
7432
7509
|
value: polygons.primitivePolygonIndices,
|
|
7433
7510
|
size: 1
|
|
7434
7511
|
},
|
|
7435
|
-
|
|
7436
|
-
value: polygons.
|
|
7437
|
-
size:
|
|
7512
|
+
triangles: {
|
|
7513
|
+
value: new Uint32Array(polygons.triangles),
|
|
7514
|
+
size: 1
|
|
7438
7515
|
},
|
|
7439
7516
|
globalFeatureIds: {
|
|
7440
7517
|
value: polygons.globalFeatureIds,
|
|
@@ -7444,26 +7521,16 @@ function makeAccessorObjects(points, lines, polygons, coordLength) {
|
|
|
7444
7521
|
value: polygons.featureIds,
|
|
7445
7522
|
size: 1
|
|
7446
7523
|
},
|
|
7447
|
-
|
|
7524
|
+
numericProps: wrapProps(polygons.numericProps, 1)
|
|
7448
7525
|
}
|
|
7449
7526
|
};
|
|
7450
|
-
|
|
7451
|
-
for (const geomType in returnObj) {
|
|
7452
|
-
for (const numericProp in returnObj[geomType].numericProps) {
|
|
7453
|
-
returnObj[geomType].numericProps[numericProp] = {
|
|
7454
|
-
value: returnObj[geomType].numericProps[numericProp],
|
|
7455
|
-
size: 1
|
|
7456
|
-
};
|
|
7457
|
-
}
|
|
7458
|
-
}
|
|
7459
|
-
|
|
7460
|
-
return returnObj;
|
|
7461
7527
|
}
|
|
7462
7528
|
|
|
7463
7529
|
function fillNumericProperties(object, properties, index, length) {
|
|
7464
7530
|
for (const numericPropName in object.numericProps) {
|
|
7465
7531
|
if (numericPropName in properties) {
|
|
7466
|
-
|
|
7532
|
+
const value = properties[numericPropName];
|
|
7533
|
+
object.numericProps[numericPropName].fill(value, index, index + length);
|
|
7467
7534
|
}
|
|
7468
7535
|
}
|
|
7469
7536
|
}
|
|
@@ -7480,27 +7547,181 @@ function keepStringProperties(properties, numericKeys) {
|
|
|
7480
7547
|
return props;
|
|
7481
7548
|
}
|
|
7482
7549
|
|
|
7483
|
-
function
|
|
7484
|
-
|
|
7550
|
+
function deduceArrayType(x, constructor) {
|
|
7551
|
+
if (constructor === Array || !Number.isFinite(x)) {
|
|
7552
|
+
return Array;
|
|
7553
|
+
}
|
|
7554
|
+
|
|
7555
|
+
return constructor === Float64Array || Math.fround(x) !== x ? Float64Array : Float32Array;
|
|
7556
|
+
}
|
|
7557
|
+
//# sourceMappingURL=flat-geojson-to-binary.js.map
|
|
7558
|
+
|
|
7559
|
+
/***/ }),
|
|
7560
|
+
|
|
7561
|
+
/***/ "../../node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-binary.js":
|
|
7562
|
+
/*!*************************************************************************************************!*\
|
|
7563
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-binary.js ***!
|
|
7564
|
+
\*************************************************************************************************/
|
|
7565
|
+
/*! exports provided: geojsonToBinary */
|
|
7566
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7567
|
+
|
|
7568
|
+
"use strict";
|
|
7569
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7570
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "geojsonToBinary", function() { return geojsonToBinary; });
|
|
7571
|
+
/* harmony import */ var _extract_geometry_info__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./extract-geometry-info */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/extract-geometry-info.js");
|
|
7572
|
+
/* harmony import */ var _geojson_to_flat_geojson__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./geojson-to-flat-geojson */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-flat-geojson.js");
|
|
7573
|
+
/* harmony import */ var _flat_geojson_to_binary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flat-geojson-to-binary */ "../../node_modules/@loaders.gl/gis/dist/esm/lib/flat-geojson-to-binary.js");
|
|
7574
|
+
|
|
7575
|
+
|
|
7576
|
+
|
|
7577
|
+
function geojsonToBinary(features, options = {
|
|
7578
|
+
fixRingWinding: true
|
|
7579
|
+
}) {
|
|
7580
|
+
const geometryInfo = Object(_extract_geometry_info__WEBPACK_IMPORTED_MODULE_0__["extractGeometryInfo"])(features);
|
|
7581
|
+
const coordLength = geometryInfo.coordLength;
|
|
7582
|
+
const {
|
|
7583
|
+
fixRingWinding
|
|
7584
|
+
} = options;
|
|
7585
|
+
const flatFeatures = Object(_geojson_to_flat_geojson__WEBPACK_IMPORTED_MODULE_1__["geojsonToFlatGeojson"])(features, {
|
|
7586
|
+
coordLength,
|
|
7587
|
+
fixRingWinding
|
|
7588
|
+
});
|
|
7589
|
+
return Object(_flat_geojson_to_binary__WEBPACK_IMPORTED_MODULE_2__["flatGeojsonToBinary"])(flatFeatures, geometryInfo, {
|
|
7590
|
+
numericPropKeys: options.numericPropKeys,
|
|
7591
|
+
PositionDataType: options.PositionDataType || Float32Array
|
|
7592
|
+
});
|
|
7593
|
+
}
|
|
7594
|
+
//# sourceMappingURL=geojson-to-binary.js.map
|
|
7595
|
+
|
|
7596
|
+
/***/ }),
|
|
7597
|
+
|
|
7598
|
+
/***/ "../../node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-flat-geojson.js":
|
|
7599
|
+
/*!*******************************************************************************************************!*\
|
|
7600
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/gis/dist/esm/lib/geojson-to-flat-geojson.js ***!
|
|
7601
|
+
\*******************************************************************************************************/
|
|
7602
|
+
/*! exports provided: geojsonToFlatGeojson */
|
|
7603
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7604
|
+
|
|
7605
|
+
"use strict";
|
|
7606
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7607
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "geojsonToFlatGeojson", function() { return geojsonToFlatGeojson; });
|
|
7608
|
+
/* harmony import */ var _math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @math.gl/polygon */ "../../node_modules/@math.gl/polygon/dist/esm/index.js");
|
|
7609
|
+
|
|
7610
|
+
function geojsonToFlatGeojson(features, options = {
|
|
7611
|
+
coordLength: 2,
|
|
7612
|
+
fixRingWinding: true
|
|
7613
|
+
}) {
|
|
7614
|
+
return features.map(feature => flattenFeature(feature, options));
|
|
7615
|
+
}
|
|
7616
|
+
|
|
7617
|
+
function flattenPoint(coordinates, data, indices, options) {
|
|
7618
|
+
indices.push(data.length);
|
|
7619
|
+
data.push(...coordinates);
|
|
7485
7620
|
|
|
7486
|
-
for (
|
|
7487
|
-
|
|
7488
|
-
index += coordLength;
|
|
7621
|
+
for (let i = coordinates.length; i < options.coordLength; i++) {
|
|
7622
|
+
data.push(0);
|
|
7489
7623
|
}
|
|
7490
7624
|
}
|
|
7491
7625
|
|
|
7492
|
-
function
|
|
7493
|
-
|
|
7626
|
+
function flattenLineString(coordinates, data, indices, options) {
|
|
7627
|
+
indices.push(data.length);
|
|
7628
|
+
|
|
7629
|
+
for (const c of coordinates) {
|
|
7630
|
+
data.push(...c);
|
|
7631
|
+
|
|
7632
|
+
for (let i = c.length; i < options.coordLength; i++) {
|
|
7633
|
+
data.push(0);
|
|
7634
|
+
}
|
|
7635
|
+
}
|
|
7494
7636
|
}
|
|
7495
7637
|
|
|
7496
|
-
function
|
|
7497
|
-
|
|
7498
|
-
|
|
7638
|
+
function flattenPolygon(coordinates, data, indices, areas, options) {
|
|
7639
|
+
let count = 0;
|
|
7640
|
+
const ringAreas = [];
|
|
7641
|
+
const polygons = [];
|
|
7642
|
+
|
|
7643
|
+
for (const lineString of coordinates) {
|
|
7644
|
+
const lineString2d = lineString.map(p => p.slice(0, 2));
|
|
7645
|
+
let area = Object(_math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__["getPolygonSignedArea"])(lineString2d.flat());
|
|
7646
|
+
const ccw = area < 0;
|
|
7647
|
+
|
|
7648
|
+
if (options.fixRingWinding && (count === 0 && !ccw || count > 0 && ccw)) {
|
|
7649
|
+
lineString.reverse();
|
|
7650
|
+
area = -area;
|
|
7651
|
+
}
|
|
7652
|
+
|
|
7653
|
+
ringAreas.push(area);
|
|
7654
|
+
flattenLineString(lineString, data, polygons, options);
|
|
7655
|
+
count++;
|
|
7499
7656
|
}
|
|
7500
7657
|
|
|
7501
|
-
|
|
7658
|
+
if (count > 0) {
|
|
7659
|
+
areas.push(ringAreas);
|
|
7660
|
+
indices.push(polygons);
|
|
7661
|
+
}
|
|
7502
7662
|
}
|
|
7503
|
-
|
|
7663
|
+
|
|
7664
|
+
function flattenFeature(feature, options) {
|
|
7665
|
+
const {
|
|
7666
|
+
geometry
|
|
7667
|
+
} = feature;
|
|
7668
|
+
|
|
7669
|
+
if (geometry.type === 'GeometryCollection') {
|
|
7670
|
+
throw new Error('GeometryCollection type not supported');
|
|
7671
|
+
}
|
|
7672
|
+
|
|
7673
|
+
const data = [];
|
|
7674
|
+
const indices = [];
|
|
7675
|
+
let areas;
|
|
7676
|
+
let type;
|
|
7677
|
+
|
|
7678
|
+
switch (geometry.type) {
|
|
7679
|
+
case 'Point':
|
|
7680
|
+
type = 'Point';
|
|
7681
|
+
flattenPoint(geometry.coordinates, data, indices, options);
|
|
7682
|
+
break;
|
|
7683
|
+
|
|
7684
|
+
case 'MultiPoint':
|
|
7685
|
+
type = 'Point';
|
|
7686
|
+
geometry.coordinates.map(c => flattenPoint(c, data, indices, options));
|
|
7687
|
+
break;
|
|
7688
|
+
|
|
7689
|
+
case 'LineString':
|
|
7690
|
+
type = 'LineString';
|
|
7691
|
+
flattenLineString(geometry.coordinates, data, indices, options);
|
|
7692
|
+
break;
|
|
7693
|
+
|
|
7694
|
+
case 'MultiLineString':
|
|
7695
|
+
type = 'LineString';
|
|
7696
|
+
geometry.coordinates.map(c => flattenLineString(c, data, indices, options));
|
|
7697
|
+
break;
|
|
7698
|
+
|
|
7699
|
+
case 'Polygon':
|
|
7700
|
+
type = 'Polygon';
|
|
7701
|
+
areas = [];
|
|
7702
|
+
flattenPolygon(geometry.coordinates, data, indices, areas, options);
|
|
7703
|
+
break;
|
|
7704
|
+
|
|
7705
|
+
case 'MultiPolygon':
|
|
7706
|
+
type = 'Polygon';
|
|
7707
|
+
areas = [];
|
|
7708
|
+
geometry.coordinates.map(c => flattenPolygon(c, data, indices, areas, options));
|
|
7709
|
+
break;
|
|
7710
|
+
|
|
7711
|
+
default:
|
|
7712
|
+
throw new Error("Unknown type: ".concat(type));
|
|
7713
|
+
}
|
|
7714
|
+
|
|
7715
|
+
return { ...feature,
|
|
7716
|
+
geometry: {
|
|
7717
|
+
type,
|
|
7718
|
+
indices,
|
|
7719
|
+
data,
|
|
7720
|
+
areas
|
|
7721
|
+
}
|
|
7722
|
+
};
|
|
7723
|
+
}
|
|
7724
|
+
//# sourceMappingURL=geojson-to-flat-geojson.js.map
|
|
7504
7725
|
|
|
7505
7726
|
/***/ }),
|
|
7506
7727
|
|
|
@@ -10340,7 +10561,7 @@ function assert(condition, message) {
|
|
|
10340
10561
|
"use strict";
|
|
10341
10562
|
__webpack_require__.r(__webpack_exports__);
|
|
10342
10563
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
10343
|
-
const VERSION = true ? "3.1.
|
|
10564
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
10344
10565
|
//# sourceMappingURL=version.js.map
|
|
10345
10566
|
|
|
10346
10567
|
/***/ }),
|
|
@@ -11445,7 +11666,7 @@ function getMipLevels({
|
|
|
11445
11666
|
"use strict";
|
|
11446
11667
|
__webpack_require__.r(__webpack_exports__);
|
|
11447
11668
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
11448
|
-
const VERSION = true ? "3.1.
|
|
11669
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
11449
11670
|
//# sourceMappingURL=version.js.map
|
|
11450
11671
|
|
|
11451
11672
|
/***/ }),
|
|
@@ -11612,7 +11833,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11612
11833
|
__webpack_require__.r(__webpack_exports__);
|
|
11613
11834
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONLoader", function() { return JSONLoader; });
|
|
11614
11835
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_typecheckJSONLoader", function() { return _typecheckJSONLoader; });
|
|
11615
|
-
const VERSION = true ? "3.1.
|
|
11836
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
11616
11837
|
const JSONLoader = {
|
|
11617
11838
|
name: 'JSON',
|
|
11618
11839
|
id: 'json',
|
|
@@ -13494,13 +13715,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13494
13715
|
/* harmony import */ var _math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @math.gl/polygon */ "../../node_modules/@math.gl/polygon/dist/esm/index.js");
|
|
13495
13716
|
|
|
13496
13717
|
function classifyRings(geom) {
|
|
13497
|
-
const len = geom.
|
|
13718
|
+
const len = geom.indices.length;
|
|
13719
|
+
const type = 'Polygon';
|
|
13498
13720
|
|
|
13499
13721
|
if (len <= 1) {
|
|
13500
13722
|
return {
|
|
13723
|
+
type,
|
|
13501
13724
|
data: geom.data,
|
|
13502
13725
|
areas: [[Object(_math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__["getPolygonSignedArea"])(geom.data)]],
|
|
13503
|
-
|
|
13726
|
+
indices: [geom.indices]
|
|
13504
13727
|
};
|
|
13505
13728
|
}
|
|
13506
13729
|
|
|
@@ -13512,8 +13735,8 @@ function classifyRings(geom) {
|
|
|
13512
13735
|
let offset = 0;
|
|
13513
13736
|
|
|
13514
13737
|
for (let endIndex, i = 0, startIndex; i < len; i++) {
|
|
13515
|
-
startIndex = geom.
|
|
13516
|
-
endIndex = geom.
|
|
13738
|
+
startIndex = geom.indices[i] - offset;
|
|
13739
|
+
endIndex = geom.indices[i + 1] - offset || geom.data.length;
|
|
13517
13740
|
const shape = geom.data.slice(startIndex, endIndex);
|
|
13518
13741
|
const area = Object(_math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__["getPolygonSignedArea"])(shape);
|
|
13519
13742
|
|
|
@@ -13544,8 +13767,9 @@ function classifyRings(geom) {
|
|
|
13544
13767
|
if (ringAreas) areas.push(ringAreas);
|
|
13545
13768
|
if (polygon.length) polygons.push(polygon);
|
|
13546
13769
|
return {
|
|
13770
|
+
type,
|
|
13547
13771
|
areas,
|
|
13548
|
-
|
|
13772
|
+
indices: polygons,
|
|
13549
13773
|
data: geom.data
|
|
13550
13774
|
};
|
|
13551
13775
|
}
|
|
@@ -13660,352 +13884,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13660
13884
|
|
|
13661
13885
|
/***/ }),
|
|
13662
13886
|
|
|
13663
|
-
/***/ "../../node_modules/@loaders.gl/mvt/dist/esm/lib/binary-vector-tile/features-to-binary.js":
|
|
13664
|
-
/*!*********************************************************************************************************************!*\
|
|
13665
|
-
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/mvt/dist/esm/lib/binary-vector-tile/features-to-binary.js ***!
|
|
13666
|
-
\*********************************************************************************************************************/
|
|
13667
|
-
/*! exports provided: featuresToBinary, TEST_EXPORTS */
|
|
13668
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13669
|
-
|
|
13670
|
-
"use strict";
|
|
13671
|
-
__webpack_require__.r(__webpack_exports__);
|
|
13672
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "featuresToBinary", function() { return featuresToBinary; });
|
|
13673
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TEST_EXPORTS", function() { return TEST_EXPORTS; });
|
|
13674
|
-
/* harmony import */ var _math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @math.gl/polygon */ "../../node_modules/@math.gl/polygon/dist/esm/index.js");
|
|
13675
|
-
|
|
13676
|
-
function featuresToBinary(features, firstPassData, options) {
|
|
13677
|
-
const propArrayTypes = extractNumericPropTypes(features);
|
|
13678
|
-
const numericPropKeys = Object.keys(propArrayTypes).filter(k => propArrayTypes[k] !== Array);
|
|
13679
|
-
return fillArrays(features, firstPassData, {
|
|
13680
|
-
numericPropKeys: options ? options.numericPropKeys : numericPropKeys,
|
|
13681
|
-
propArrayTypes,
|
|
13682
|
-
PositionDataType: options ? options.PositionDataType : Float32Array
|
|
13683
|
-
});
|
|
13684
|
-
}
|
|
13685
|
-
const TEST_EXPORTS = {
|
|
13686
|
-
fillArrays
|
|
13687
|
-
};
|
|
13688
|
-
|
|
13689
|
-
function extractNumericPropTypes(features) {
|
|
13690
|
-
const propArrayTypes = {};
|
|
13691
|
-
|
|
13692
|
-
for (const feature of features) {
|
|
13693
|
-
if (feature.properties) {
|
|
13694
|
-
for (const key in feature.properties) {
|
|
13695
|
-
const val = feature.properties[key];
|
|
13696
|
-
propArrayTypes[key] = deduceArrayType(val, propArrayTypes[key]);
|
|
13697
|
-
}
|
|
13698
|
-
}
|
|
13699
|
-
}
|
|
13700
|
-
|
|
13701
|
-
return propArrayTypes;
|
|
13702
|
-
}
|
|
13703
|
-
|
|
13704
|
-
function fillArrays(features, firstPassData, options) {
|
|
13705
|
-
const {
|
|
13706
|
-
pointPositionsCount,
|
|
13707
|
-
pointFeaturesCount,
|
|
13708
|
-
linePositionsCount,
|
|
13709
|
-
linePathsCount,
|
|
13710
|
-
lineFeaturesCount,
|
|
13711
|
-
polygonPositionsCount,
|
|
13712
|
-
polygonObjectsCount,
|
|
13713
|
-
polygonRingsCount,
|
|
13714
|
-
polygonFeaturesCount
|
|
13715
|
-
} = firstPassData;
|
|
13716
|
-
const {
|
|
13717
|
-
numericPropKeys,
|
|
13718
|
-
propArrayTypes,
|
|
13719
|
-
PositionDataType = Float32Array
|
|
13720
|
-
} = options;
|
|
13721
|
-
const hasGlobalId = features[0] && 'id' in features[0];
|
|
13722
|
-
const coordLength = 2;
|
|
13723
|
-
const GlobalFeatureIdsDataType = features.length > 65535 ? Uint32Array : Uint16Array;
|
|
13724
|
-
const points = {
|
|
13725
|
-
positions: new PositionDataType(pointPositionsCount * coordLength),
|
|
13726
|
-
globalFeatureIds: new GlobalFeatureIdsDataType(pointPositionsCount),
|
|
13727
|
-
featureIds: pointFeaturesCount > 65535 ? new Uint32Array(pointPositionsCount) : new Uint16Array(pointPositionsCount),
|
|
13728
|
-
numericProps: {},
|
|
13729
|
-
properties: [],
|
|
13730
|
-
fields: []
|
|
13731
|
-
};
|
|
13732
|
-
const lines = {
|
|
13733
|
-
pathIndices: linePositionsCount > 65535 ? new Uint32Array(linePathsCount + 1) : new Uint16Array(linePathsCount + 1),
|
|
13734
|
-
positions: new PositionDataType(linePositionsCount * coordLength),
|
|
13735
|
-
globalFeatureIds: new GlobalFeatureIdsDataType(linePositionsCount),
|
|
13736
|
-
featureIds: lineFeaturesCount > 65535 ? new Uint32Array(linePositionsCount) : new Uint16Array(linePositionsCount),
|
|
13737
|
-
numericProps: {},
|
|
13738
|
-
properties: [],
|
|
13739
|
-
fields: []
|
|
13740
|
-
};
|
|
13741
|
-
const polygons = {
|
|
13742
|
-
polygonIndices: polygonPositionsCount > 65535 ? new Uint32Array(polygonObjectsCount + 1) : new Uint16Array(polygonObjectsCount + 1),
|
|
13743
|
-
primitivePolygonIndices: polygonPositionsCount > 65535 ? new Uint32Array(polygonRingsCount + 1) : new Uint16Array(polygonRingsCount + 1),
|
|
13744
|
-
positions: new PositionDataType(polygonPositionsCount * coordLength),
|
|
13745
|
-
triangles: [],
|
|
13746
|
-
globalFeatureIds: new GlobalFeatureIdsDataType(polygonPositionsCount),
|
|
13747
|
-
featureIds: polygonFeaturesCount > 65535 ? new Uint32Array(polygonPositionsCount) : new Uint16Array(polygonPositionsCount),
|
|
13748
|
-
numericProps: {},
|
|
13749
|
-
properties: [],
|
|
13750
|
-
fields: []
|
|
13751
|
-
};
|
|
13752
|
-
|
|
13753
|
-
for (const object of [points, lines, polygons]) {
|
|
13754
|
-
for (const propName of numericPropKeys) {
|
|
13755
|
-
const TypedArray = propArrayTypes[propName];
|
|
13756
|
-
object.numericProps[propName] = new TypedArray(object.positions.length / coordLength);
|
|
13757
|
-
}
|
|
13758
|
-
}
|
|
13759
|
-
|
|
13760
|
-
lines.pathIndices[linePathsCount] = linePositionsCount;
|
|
13761
|
-
polygons.polygonIndices[polygonObjectsCount] = polygonPositionsCount;
|
|
13762
|
-
polygons.primitivePolygonIndices[polygonRingsCount] = polygonPositionsCount;
|
|
13763
|
-
const indexMap = {
|
|
13764
|
-
pointPosition: 0,
|
|
13765
|
-
pointFeature: 0,
|
|
13766
|
-
linePosition: 0,
|
|
13767
|
-
linePath: 0,
|
|
13768
|
-
lineFeature: 0,
|
|
13769
|
-
polygonPosition: 0,
|
|
13770
|
-
polygonObject: 0,
|
|
13771
|
-
polygonRing: 0,
|
|
13772
|
-
polygonFeature: 0,
|
|
13773
|
-
feature: 0
|
|
13774
|
-
};
|
|
13775
|
-
|
|
13776
|
-
for (const feature of features) {
|
|
13777
|
-
const geometry = feature.geometry;
|
|
13778
|
-
const properties = feature.properties || {};
|
|
13779
|
-
|
|
13780
|
-
switch (geometry.type) {
|
|
13781
|
-
case 'Point':
|
|
13782
|
-
case 'MultiPoint':
|
|
13783
|
-
handlePoint(geometry, points, indexMap, coordLength, properties);
|
|
13784
|
-
points.properties.push(keepStringProperties(properties, numericPropKeys));
|
|
13785
|
-
|
|
13786
|
-
if (hasGlobalId) {
|
|
13787
|
-
points.fields.push({
|
|
13788
|
-
id: feature.id
|
|
13789
|
-
});
|
|
13790
|
-
}
|
|
13791
|
-
|
|
13792
|
-
indexMap.pointFeature++;
|
|
13793
|
-
break;
|
|
13794
|
-
|
|
13795
|
-
case 'LineString':
|
|
13796
|
-
case 'MultiLineString':
|
|
13797
|
-
handleLineString(geometry, lines, indexMap, coordLength, properties);
|
|
13798
|
-
lines.properties.push(keepStringProperties(properties, numericPropKeys));
|
|
13799
|
-
|
|
13800
|
-
if (hasGlobalId) {
|
|
13801
|
-
lines.fields.push({
|
|
13802
|
-
id: feature.id
|
|
13803
|
-
});
|
|
13804
|
-
}
|
|
13805
|
-
|
|
13806
|
-
indexMap.lineFeature++;
|
|
13807
|
-
break;
|
|
13808
|
-
|
|
13809
|
-
case 'Polygon':
|
|
13810
|
-
case 'MultiPolygon':
|
|
13811
|
-
handlePolygon(geometry, polygons, indexMap, coordLength, properties);
|
|
13812
|
-
polygons.properties.push(keepStringProperties(properties, numericPropKeys));
|
|
13813
|
-
|
|
13814
|
-
if (hasGlobalId) {
|
|
13815
|
-
polygons.fields.push({
|
|
13816
|
-
id: feature.id
|
|
13817
|
-
});
|
|
13818
|
-
}
|
|
13819
|
-
|
|
13820
|
-
indexMap.polygonFeature++;
|
|
13821
|
-
break;
|
|
13822
|
-
|
|
13823
|
-
default:
|
|
13824
|
-
throw new Error('Invalid geometry type');
|
|
13825
|
-
}
|
|
13826
|
-
|
|
13827
|
-
indexMap.feature++;
|
|
13828
|
-
}
|
|
13829
|
-
|
|
13830
|
-
return makeAccessorObjects(points, lines, polygons, coordLength);
|
|
13831
|
-
}
|
|
13832
|
-
|
|
13833
|
-
function handlePoint(geometry, points, indexMap, coordLength, properties) {
|
|
13834
|
-
points.positions.set(geometry.data, indexMap.pointPosition * coordLength);
|
|
13835
|
-
const nPositions = geometry.data.length / coordLength;
|
|
13836
|
-
fillNumericProperties(points, properties, indexMap.pointPosition, nPositions);
|
|
13837
|
-
points.globalFeatureIds.fill(indexMap.feature, indexMap.pointPosition, indexMap.pointPosition + nPositions);
|
|
13838
|
-
points.featureIds.fill(indexMap.pointFeature, indexMap.pointPosition, indexMap.pointPosition + nPositions);
|
|
13839
|
-
indexMap.pointPosition += nPositions;
|
|
13840
|
-
}
|
|
13841
|
-
|
|
13842
|
-
function handleLineString(geometry, lines, indexMap, coordLength, properties) {
|
|
13843
|
-
lines.positions.set(geometry.data, indexMap.linePosition * coordLength);
|
|
13844
|
-
const nPositions = geometry.data.length / coordLength;
|
|
13845
|
-
fillNumericProperties(lines, properties, indexMap.linePosition, nPositions);
|
|
13846
|
-
lines.globalFeatureIds.fill(indexMap.feature, indexMap.linePosition, indexMap.linePosition + nPositions);
|
|
13847
|
-
lines.featureIds.fill(indexMap.lineFeature, indexMap.linePosition, indexMap.linePosition + nPositions);
|
|
13848
|
-
|
|
13849
|
-
for (let i = 0, il = geometry.lines.length; i < il; ++i) {
|
|
13850
|
-
const start = geometry.lines[i];
|
|
13851
|
-
const end = i === il - 1 ? geometry.data.length : geometry.lines[i + 1];
|
|
13852
|
-
lines.pathIndices[indexMap.linePath++] = indexMap.linePosition;
|
|
13853
|
-
indexMap.linePosition += (end - start) / coordLength;
|
|
13854
|
-
}
|
|
13855
|
-
}
|
|
13856
|
-
|
|
13857
|
-
function handlePolygon(geometry, polygons, indexMap, coordLength, properties) {
|
|
13858
|
-
polygons.positions.set(geometry.data, indexMap.polygonPosition * coordLength);
|
|
13859
|
-
const nPositions = geometry.data.length / coordLength;
|
|
13860
|
-
fillNumericProperties(polygons, properties, indexMap.polygonPosition, nPositions);
|
|
13861
|
-
polygons.globalFeatureIds.fill(indexMap.feature, indexMap.polygonPosition, indexMap.polygonPosition + nPositions);
|
|
13862
|
-
polygons.featureIds.fill(indexMap.polygonFeature, indexMap.polygonPosition, indexMap.polygonPosition + nPositions);
|
|
13863
|
-
|
|
13864
|
-
for (let l = 0, ll = geometry.lines.length; l < ll; ++l) {
|
|
13865
|
-
const startPosition = indexMap.polygonPosition;
|
|
13866
|
-
polygons.polygonIndices[indexMap.polygonObject++] = startPosition;
|
|
13867
|
-
const areas = geometry.areas[l];
|
|
13868
|
-
const lines = geometry.lines[l];
|
|
13869
|
-
const nextLines = geometry.lines[l + 1];
|
|
13870
|
-
|
|
13871
|
-
for (let i = 0, il = lines.length; i < il; ++i) {
|
|
13872
|
-
const start = lines[i];
|
|
13873
|
-
const end = i === il - 1 ? nextLines === undefined ? geometry.data.length : nextLines[0] : lines[i + 1];
|
|
13874
|
-
polygons.primitivePolygonIndices[indexMap.polygonRing++] = indexMap.polygonPosition;
|
|
13875
|
-
indexMap.polygonPosition += (end - start) / coordLength;
|
|
13876
|
-
}
|
|
13877
|
-
|
|
13878
|
-
const endPosition = indexMap.polygonPosition;
|
|
13879
|
-
triangulatePolygon(polygons, areas, lines, {
|
|
13880
|
-
startPosition,
|
|
13881
|
-
endPosition,
|
|
13882
|
-
coordLength
|
|
13883
|
-
});
|
|
13884
|
-
}
|
|
13885
|
-
}
|
|
13886
|
-
|
|
13887
|
-
function triangulatePolygon(polygons, areas, lines, {
|
|
13888
|
-
startPosition,
|
|
13889
|
-
endPosition,
|
|
13890
|
-
coordLength
|
|
13891
|
-
}) {
|
|
13892
|
-
const start = startPosition * coordLength;
|
|
13893
|
-
const end = endPosition * coordLength;
|
|
13894
|
-
const polygonPositions = polygons.positions.subarray(start, end);
|
|
13895
|
-
const offset = lines[0];
|
|
13896
|
-
const holes = lines.slice(1).map(n => (n - offset) / coordLength);
|
|
13897
|
-
const indices = Object(_math_gl_polygon__WEBPACK_IMPORTED_MODULE_0__["earcut"])(polygonPositions, holes, coordLength, areas);
|
|
13898
|
-
|
|
13899
|
-
for (let t = 0, tl = indices.length; t < tl; ++t) {
|
|
13900
|
-
polygons.triangles.push(startPosition + indices[t]);
|
|
13901
|
-
}
|
|
13902
|
-
}
|
|
13903
|
-
|
|
13904
|
-
function makeAccessorObjects(points, lines, polygons, coordLength) {
|
|
13905
|
-
const returnObj = {
|
|
13906
|
-
points: { ...points,
|
|
13907
|
-
positions: {
|
|
13908
|
-
value: points.positions,
|
|
13909
|
-
size: coordLength
|
|
13910
|
-
},
|
|
13911
|
-
globalFeatureIds: {
|
|
13912
|
-
value: points.globalFeatureIds,
|
|
13913
|
-
size: 1
|
|
13914
|
-
},
|
|
13915
|
-
featureIds: {
|
|
13916
|
-
value: points.featureIds,
|
|
13917
|
-
size: 1
|
|
13918
|
-
}
|
|
13919
|
-
},
|
|
13920
|
-
lines: { ...lines,
|
|
13921
|
-
pathIndices: {
|
|
13922
|
-
value: lines.pathIndices,
|
|
13923
|
-
size: 1
|
|
13924
|
-
},
|
|
13925
|
-
positions: {
|
|
13926
|
-
value: lines.positions,
|
|
13927
|
-
size: coordLength
|
|
13928
|
-
},
|
|
13929
|
-
globalFeatureIds: {
|
|
13930
|
-
value: lines.globalFeatureIds,
|
|
13931
|
-
size: 1
|
|
13932
|
-
},
|
|
13933
|
-
featureIds: {
|
|
13934
|
-
value: lines.featureIds,
|
|
13935
|
-
size: 1
|
|
13936
|
-
}
|
|
13937
|
-
},
|
|
13938
|
-
polygons: { ...polygons,
|
|
13939
|
-
polygonIndices: {
|
|
13940
|
-
value: polygons.polygonIndices,
|
|
13941
|
-
size: 1
|
|
13942
|
-
},
|
|
13943
|
-
primitivePolygonIndices: {
|
|
13944
|
-
value: polygons.primitivePolygonIndices,
|
|
13945
|
-
size: 1
|
|
13946
|
-
},
|
|
13947
|
-
positions: {
|
|
13948
|
-
value: polygons.positions,
|
|
13949
|
-
size: coordLength
|
|
13950
|
-
},
|
|
13951
|
-
triangles: {
|
|
13952
|
-
value: new Uint32Array(polygons.triangles),
|
|
13953
|
-
size: 1
|
|
13954
|
-
},
|
|
13955
|
-
globalFeatureIds: {
|
|
13956
|
-
value: polygons.globalFeatureIds,
|
|
13957
|
-
size: 1
|
|
13958
|
-
},
|
|
13959
|
-
featureIds: {
|
|
13960
|
-
value: polygons.featureIds,
|
|
13961
|
-
size: 1
|
|
13962
|
-
}
|
|
13963
|
-
}
|
|
13964
|
-
};
|
|
13965
|
-
|
|
13966
|
-
for (const geomType in returnObj) {
|
|
13967
|
-
for (const numericProp in returnObj[geomType].numericProps) {
|
|
13968
|
-
returnObj[geomType].numericProps[numericProp] = {
|
|
13969
|
-
value: returnObj[geomType].numericProps[numericProp],
|
|
13970
|
-
size: 1
|
|
13971
|
-
};
|
|
13972
|
-
}
|
|
13973
|
-
}
|
|
13974
|
-
|
|
13975
|
-
return returnObj;
|
|
13976
|
-
}
|
|
13977
|
-
|
|
13978
|
-
function fillNumericProperties(object, properties, index, length) {
|
|
13979
|
-
for (const numericPropName in object.numericProps) {
|
|
13980
|
-
if (numericPropName in properties) {
|
|
13981
|
-
object.numericProps[numericPropName].fill(properties[numericPropName], index, index + length);
|
|
13982
|
-
}
|
|
13983
|
-
}
|
|
13984
|
-
}
|
|
13985
|
-
|
|
13986
|
-
function keepStringProperties(properties, numericKeys) {
|
|
13987
|
-
const props = {};
|
|
13988
|
-
|
|
13989
|
-
for (const key in properties) {
|
|
13990
|
-
if (!numericKeys.includes(key)) {
|
|
13991
|
-
props[key] = properties[key];
|
|
13992
|
-
}
|
|
13993
|
-
}
|
|
13994
|
-
|
|
13995
|
-
return props;
|
|
13996
|
-
}
|
|
13997
|
-
|
|
13998
|
-
function deduceArrayType(x, constructor) {
|
|
13999
|
-
if (constructor === Array || !Number.isFinite(x)) {
|
|
14000
|
-
return Array;
|
|
14001
|
-
}
|
|
14002
|
-
|
|
14003
|
-
return constructor === Float64Array || Math.fround(x) !== x ? Float64Array : Float32Array;
|
|
14004
|
-
}
|
|
14005
|
-
//# sourceMappingURL=features-to-binary.js.map
|
|
14006
|
-
|
|
14007
|
-
/***/ }),
|
|
14008
|
-
|
|
14009
13887
|
/***/ "../../node_modules/@loaders.gl/mvt/dist/esm/lib/binary-vector-tile/vector-tile-feature.js":
|
|
14010
13888
|
/*!**********************************************************************************************************************!*\
|
|
14011
13889
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@loaders.gl/mvt/dist/esm/lib/binary-vector-tile/vector-tile-feature.js ***!
|
|
@@ -14032,11 +13910,7 @@ const TEST_EXPORTS = {
|
|
|
14032
13910
|
classifyRings: _helpers_binary_util_functions__WEBPACK_IMPORTED_MODULE_1__["classifyRings"]
|
|
14033
13911
|
};
|
|
14034
13912
|
class VectorTileFeature {
|
|
14035
|
-
|
|
14036
|
-
return ['Unknown', 'Point', 'LineString', 'Polygon'];
|
|
14037
|
-
}
|
|
14038
|
-
|
|
14039
|
-
constructor(pbf, end, extent, keys, values, firstPassData) {
|
|
13913
|
+
constructor(pbf, end, extent, keys, values, geometryInfo) {
|
|
14040
13914
|
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "properties", void 0);
|
|
14041
13915
|
|
|
14042
13916
|
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "extent", void 0);
|
|
@@ -14053,7 +13927,7 @@ class VectorTileFeature {
|
|
|
14053
13927
|
|
|
14054
13928
|
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_values", void 0);
|
|
14055
13929
|
|
|
14056
|
-
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "
|
|
13930
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_geometryInfo", void 0);
|
|
14057
13931
|
|
|
14058
13932
|
this.properties = {};
|
|
14059
13933
|
this.extent = extent;
|
|
@@ -14063,7 +13937,7 @@ class VectorTileFeature {
|
|
|
14063
13937
|
this._geometry = -1;
|
|
14064
13938
|
this._keys = keys;
|
|
14065
13939
|
this._values = values;
|
|
14066
|
-
this.
|
|
13940
|
+
this._geometryInfo = geometryInfo;
|
|
14067
13941
|
pbf.readFields(_helpers_binary_util_functions__WEBPACK_IMPORTED_MODULE_1__["readFeature"], this, end);
|
|
14068
13942
|
}
|
|
14069
13943
|
|
|
@@ -14076,7 +13950,7 @@ class VectorTileFeature {
|
|
|
14076
13950
|
x = 0;
|
|
14077
13951
|
y = 0;
|
|
14078
13952
|
i = 0;
|
|
14079
|
-
const
|
|
13953
|
+
const indices = [];
|
|
14080
13954
|
const data = [];
|
|
14081
13955
|
|
|
14082
13956
|
while (pbf.pos < endPos) {
|
|
@@ -14093,14 +13967,14 @@ class VectorTileFeature {
|
|
|
14093
13967
|
y += pbf.readSVarint();
|
|
14094
13968
|
|
|
14095
13969
|
if (cmd === 1) {
|
|
14096
|
-
|
|
13970
|
+
indices.push(i);
|
|
14097
13971
|
}
|
|
14098
13972
|
|
|
14099
13973
|
data.push(x, y);
|
|
14100
13974
|
i += 2;
|
|
14101
13975
|
} else if (cmd === 7) {
|
|
14102
13976
|
if (i > 0) {
|
|
14103
|
-
const start =
|
|
13977
|
+
const start = indices[indices.length - 1];
|
|
14104
13978
|
data.push(data[start], data[start + 1]);
|
|
14105
13979
|
i += 2;
|
|
14106
13980
|
}
|
|
@@ -14111,50 +13985,55 @@ class VectorTileFeature {
|
|
|
14111
13985
|
|
|
14112
13986
|
return {
|
|
14113
13987
|
data,
|
|
14114
|
-
|
|
13988
|
+
indices
|
|
14115
13989
|
};
|
|
14116
13990
|
}
|
|
14117
13991
|
|
|
14118
13992
|
_toBinaryCoordinates(transform) {
|
|
14119
|
-
|
|
13993
|
+
const geom = this.loadGeometry();
|
|
13994
|
+
let geometry;
|
|
14120
13995
|
transform(geom.data, this);
|
|
14121
13996
|
const coordLength = 2;
|
|
14122
13997
|
|
|
14123
13998
|
switch (this.type) {
|
|
14124
13999
|
case 1:
|
|
14125
|
-
this.
|
|
14126
|
-
this.
|
|
14000
|
+
this._geometryInfo.pointFeaturesCount++;
|
|
14001
|
+
this._geometryInfo.pointPositionsCount += geom.indices.length;
|
|
14002
|
+
geometry = {
|
|
14003
|
+
type: 'Point',
|
|
14004
|
+
...geom
|
|
14005
|
+
};
|
|
14127
14006
|
break;
|
|
14128
14007
|
|
|
14129
14008
|
case 2:
|
|
14130
|
-
this.
|
|
14131
|
-
this.
|
|
14132
|
-
this.
|
|
14009
|
+
this._geometryInfo.lineFeaturesCount++;
|
|
14010
|
+
this._geometryInfo.linePathsCount += geom.indices.length;
|
|
14011
|
+
this._geometryInfo.linePositionsCount += geom.data.length / coordLength;
|
|
14012
|
+
geometry = {
|
|
14013
|
+
type: 'LineString',
|
|
14014
|
+
...geom
|
|
14015
|
+
};
|
|
14133
14016
|
break;
|
|
14134
14017
|
|
|
14135
14018
|
case 3:
|
|
14136
|
-
|
|
14137
|
-
this.
|
|
14138
|
-
this.
|
|
14019
|
+
geometry = Object(_helpers_binary_util_functions__WEBPACK_IMPORTED_MODULE_1__["classifyRings"])(geom);
|
|
14020
|
+
this._geometryInfo.polygonFeaturesCount++;
|
|
14021
|
+
this._geometryInfo.polygonObjectsCount += geometry.indices.length;
|
|
14139
14022
|
|
|
14140
|
-
for (const
|
|
14141
|
-
this.
|
|
14023
|
+
for (const indices of geometry.indices) {
|
|
14024
|
+
this._geometryInfo.polygonRingsCount += indices.length;
|
|
14142
14025
|
}
|
|
14143
14026
|
|
|
14144
|
-
this.
|
|
14145
|
-
geom = classified;
|
|
14027
|
+
this._geometryInfo.polygonPositionsCount += geometry.data.length / coordLength;
|
|
14146
14028
|
break;
|
|
14147
|
-
}
|
|
14148
14029
|
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
if (geom.lines.length > 1) {
|
|
14152
|
-
geom.type = "Multi".concat(geom.type);
|
|
14030
|
+
default:
|
|
14031
|
+
throw new Error("Invalid geometry type: ".concat(this.type));
|
|
14153
14032
|
}
|
|
14154
14033
|
|
|
14155
14034
|
const result = {
|
|
14156
14035
|
type: 'Feature',
|
|
14157
|
-
geometry
|
|
14036
|
+
geometry,
|
|
14158
14037
|
properties: this.properties
|
|
14159
14038
|
};
|
|
14160
14039
|
|
|
@@ -14170,7 +14049,15 @@ class VectorTileFeature {
|
|
|
14170
14049
|
return this._toBinaryCoordinates(options);
|
|
14171
14050
|
}
|
|
14172
14051
|
|
|
14173
|
-
|
|
14052
|
+
const {
|
|
14053
|
+
x,
|
|
14054
|
+
y,
|
|
14055
|
+
z
|
|
14056
|
+
} = options;
|
|
14057
|
+
const size = this.extent * Math.pow(2, z);
|
|
14058
|
+
const x0 = this.extent * x;
|
|
14059
|
+
const y0 = this.extent * y;
|
|
14060
|
+
return this._toBinaryCoordinates(data => Object(_helpers_binary_util_functions__WEBPACK_IMPORTED_MODULE_1__["project"])(data, x0, y0, size));
|
|
14174
14061
|
}
|
|
14175
14062
|
|
|
14176
14063
|
}
|
|
@@ -14222,7 +14109,7 @@ class VectorTileLayer {
|
|
|
14222
14109
|
this.length = this._features.length;
|
|
14223
14110
|
}
|
|
14224
14111
|
|
|
14225
|
-
feature(i,
|
|
14112
|
+
feature(i, geometryInfo) {
|
|
14226
14113
|
if (i < 0 || i >= this._features.length) {
|
|
14227
14114
|
throw new Error('feature index out of bounds');
|
|
14228
14115
|
}
|
|
@@ -14231,7 +14118,7 @@ class VectorTileLayer {
|
|
|
14231
14118
|
|
|
14232
14119
|
const end = this._pbf.readVarint() + this._pbf.pos;
|
|
14233
14120
|
|
|
14234
|
-
return new _vector_tile_feature__WEBPACK_IMPORTED_MODULE_1__["default"](this._pbf, end, this.extent, this._keys, this._values,
|
|
14121
|
+
return new _vector_tile_feature__WEBPACK_IMPORTED_MODULE_1__["default"](this._pbf, end, this.extent, this._keys, this._values, geometryInfo);
|
|
14235
14122
|
}
|
|
14236
14123
|
|
|
14237
14124
|
}
|
|
@@ -14641,7 +14528,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14641
14528
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return parseMVT; });
|
|
14642
14529
|
/* harmony import */ var _mapbox_vector_tile_vector_tile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mapbox-vector-tile/vector-tile */ "../../node_modules/@loaders.gl/mvt/dist/esm/lib/mapbox-vector-tile/vector-tile.js");
|
|
14643
14530
|
/* harmony import */ var _binary_vector_tile_vector_tile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binary-vector-tile/vector-tile */ "../../node_modules/@loaders.gl/mvt/dist/esm/lib/binary-vector-tile/vector-tile.js");
|
|
14644
|
-
/* harmony import */ var
|
|
14531
|
+
/* harmony import */ var _loaders_gl_gis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @loaders.gl/gis */ "../../node_modules/@loaders.gl/gis/dist/esm/index.js");
|
|
14645
14532
|
/* harmony import */ var pbf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! pbf */ "../../node_modules/pbf/index.js");
|
|
14646
14533
|
/* harmony import */ var pbf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(pbf__WEBPACK_IMPORTED_MODULE_3__);
|
|
14647
14534
|
|
|
@@ -14654,7 +14541,8 @@ function parseMVT(arrayBuffer, options) {
|
|
|
14654
14541
|
|
|
14655
14542
|
if (options) {
|
|
14656
14543
|
const binary = options.gis.format === 'binary';
|
|
14657
|
-
const
|
|
14544
|
+
const geometryInfo = {
|
|
14545
|
+
coordLength: 2,
|
|
14658
14546
|
pointPositionsCount: 0,
|
|
14659
14547
|
pointFeaturesCount: 0,
|
|
14660
14548
|
linePositionsCount: 0,
|
|
@@ -14681,7 +14569,7 @@ function parseMVT(arrayBuffer, options) {
|
|
|
14681
14569
|
}
|
|
14682
14570
|
|
|
14683
14571
|
for (let i = 0; i < vectorTileLayer.length; i++) {
|
|
14684
|
-
const vectorTileFeature = vectorTileLayer.feature(i,
|
|
14572
|
+
const vectorTileFeature = vectorTileLayer.feature(i, geometryInfo);
|
|
14685
14573
|
const decodedFeature = binary ? getDecodedFeatureBinary(vectorTileFeature, featureOptions) : getDecodedFeature(vectorTileFeature, featureOptions);
|
|
14686
14574
|
features.push(decodedFeature);
|
|
14687
14575
|
}
|
|
@@ -14689,7 +14577,7 @@ function parseMVT(arrayBuffer, options) {
|
|
|
14689
14577
|
}
|
|
14690
14578
|
|
|
14691
14579
|
if (binary) {
|
|
14692
|
-
const data = Object(
|
|
14580
|
+
const data = Object(_loaders_gl_gis__WEBPACK_IMPORTED_MODULE_2__["flatGeojsonToBinary"])(features, geometryInfo);
|
|
14693
14581
|
data.byteLength = arrayBuffer.byteLength;
|
|
14694
14582
|
return data;
|
|
14695
14583
|
}
|
|
@@ -14731,7 +14619,7 @@ function getDecodedFeature(feature, options) {
|
|
|
14731
14619
|
function getDecodedFeatureBinary(feature, options) {
|
|
14732
14620
|
const decodedFeature = feature.toBinaryCoordinates(options.coordinates === 'wgs84' ? options.tileIndex : transformToLocalCoordinatesBinary);
|
|
14733
14621
|
|
|
14734
|
-
if (options.layerProperty) {
|
|
14622
|
+
if (options.layerProperty && decodedFeature.properties) {
|
|
14735
14623
|
decodedFeature.properties[options.layerProperty] = options.layerName;
|
|
14736
14624
|
}
|
|
14737
14625
|
|
|
@@ -14776,7 +14664,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14776
14664
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MVTLoader", function() { return MVTLoader; });
|
|
14777
14665
|
/* harmony import */ var _lib_parse_mvt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/parse-mvt */ "../../node_modules/@loaders.gl/mvt/dist/esm/lib/parse-mvt.js");
|
|
14778
14666
|
|
|
14779
|
-
const VERSION = true ? "3.1.
|
|
14667
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
14780
14668
|
const MVTWorkerLoader = {
|
|
14781
14669
|
name: 'Mapbox Vector Tile',
|
|
14782
14670
|
id: 'mvt',
|
|
@@ -18002,9 +17890,13 @@ function getDelatinTileMesh(meshMaxError, width, height, terrain) {
|
|
|
18002
17890
|
}
|
|
18003
17891
|
|
|
18004
17892
|
async function loadTerrain(arrayBuffer, options, context) {
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
17893
|
+
const loadImageOptions = { ...options,
|
|
17894
|
+
mimeType: 'application/x.image',
|
|
17895
|
+
image: { ...options.image,
|
|
17896
|
+
type: 'data'
|
|
17897
|
+
}
|
|
17898
|
+
};
|
|
17899
|
+
const image = await context.parse(arrayBuffer, loadImageOptions);
|
|
18008
17900
|
return getMesh(image, options.terrain);
|
|
18009
17901
|
}
|
|
18010
17902
|
//# sourceMappingURL=parse-terrain.js.map
|
|
@@ -18021,7 +17913,7 @@ async function loadTerrain(arrayBuffer, options, context) {
|
|
|
18021
17913
|
"use strict";
|
|
18022
17914
|
__webpack_require__.r(__webpack_exports__);
|
|
18023
17915
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
18024
|
-
const VERSION = true ? "3.1.
|
|
17916
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
18025
17917
|
//# sourceMappingURL=version.js.map
|
|
18026
17918
|
|
|
18027
17919
|
/***/ }),
|
|
@@ -18078,8 +17970,8 @@ const TerrainLoader = {
|
|
|
18078
17970
|
module: 'terrain',
|
|
18079
17971
|
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__["VERSION"],
|
|
18080
17972
|
worker: true,
|
|
18081
|
-
extensions: ['png', 'pngraw'],
|
|
18082
|
-
mimeTypes: ['image/png'],
|
|
17973
|
+
extensions: ['png', 'pngraw', 'jpg', 'jpeg', 'gif', 'webp', 'bmp'],
|
|
17974
|
+
mimeTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/bmp'],
|
|
18083
17975
|
options: {
|
|
18084
17976
|
terrain: {
|
|
18085
17977
|
tesselator: 'auto',
|
|
@@ -18441,16 +18333,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18441
18333
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeImageURLToCompressedTextureURL", function() { return encodeImageURLToCompressedTextureURL; });
|
|
18442
18334
|
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../node_modules/@loaders.gl/worker-utils/dist/esm/index.js");
|
|
18443
18335
|
|
|
18444
|
-
|
|
18445
|
-
async function encodeImageURLToCompressedTextureURL(inputUrl, outputUrl) {
|
|
18336
|
+
async function encodeImageURLToCompressedTextureURL(inputUrl, outputUrl, options) {
|
|
18446
18337
|
const args = ['texture-compressor', '--type', 's3tc', '--compression', 'DXT1', '--quality', 'normal', '--input', inputUrl, '--output', outputUrl];
|
|
18447
18338
|
const childProcess = new _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__["ChildProcessProxy"]();
|
|
18448
18339
|
await childProcess.start({
|
|
18449
18340
|
command: 'npx',
|
|
18450
18341
|
arguments: args,
|
|
18451
|
-
spawn:
|
|
18452
|
-
cwd: MODULE_ROOT
|
|
18453
|
-
}
|
|
18342
|
+
spawn: options
|
|
18454
18343
|
});
|
|
18455
18344
|
return outputUrl;
|
|
18456
18345
|
}
|
|
@@ -18544,7 +18433,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18544
18433
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadBasisTrascoderModule", function() { return loadBasisTrascoderModule; });
|
|
18545
18434
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadBasisEncoderModule", function() { return loadBasisEncoderModule; });
|
|
18546
18435
|
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../node_modules/@loaders.gl/worker-utils/dist/esm/index.js");
|
|
18547
|
-
const VERSION = true ? "3.1.
|
|
18436
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
18548
18437
|
|
|
18549
18438
|
const BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION, "/dist/libs/basis_encoder.wasm");
|
|
18550
18439
|
const BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION, "/dist/libs/basis_encoder.js");
|
|
@@ -19858,7 +19747,7 @@ function getWebGLContext() {
|
|
|
19858
19747
|
"use strict";
|
|
19859
19748
|
__webpack_require__.r(__webpack_exports__);
|
|
19860
19749
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
19861
|
-
const VERSION = true ? "3.1.
|
|
19750
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
19862
19751
|
//# sourceMappingURL=version.js.map
|
|
19863
19752
|
|
|
19864
19753
|
/***/ }),
|
|
@@ -20163,7 +20052,7 @@ function getFrameState(viewport, frameNumber) {
|
|
|
20163
20052
|
const {
|
|
20164
20053
|
metersPerUnit
|
|
20165
20054
|
} = viewport.distanceScales;
|
|
20166
|
-
const viewportCenterCartographic =
|
|
20055
|
+
const viewportCenterCartographic = viewport.unprojectPosition(viewport.center);
|
|
20167
20056
|
const viewportCenterCartesian = _math_gl_geospatial__WEBPACK_IMPORTED_MODULE_2__["Ellipsoid"].WGS84.cartographicToCartesian(viewportCenterCartographic, new _math_gl_core__WEBPACK_IMPORTED_MODULE_0__["Vector3"]());
|
|
20168
20057
|
const enuToFixedTransform = _math_gl_geospatial__WEBPACK_IMPORTED_MODULE_2__["Ellipsoid"].WGS84.eastNorthUpToFixedFrame(viewportCenterCartesian);
|
|
20169
20058
|
const cameraPositionCartographic = viewport.unprojectPosition(viewport.cameraPosition);
|
|
@@ -22951,8 +22840,8 @@ const nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
|
22951
22840
|
"use strict";
|
|
22952
22841
|
__webpack_require__.r(__webpack_exports__);
|
|
22953
22842
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
22954
|
-
const DEFAULT_VERSION = '
|
|
22955
|
-
const VERSION = true ? "3.1.
|
|
22843
|
+
const DEFAULT_VERSION = 'latest';
|
|
22844
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
22956
22845
|
|
|
22957
22846
|
if (false) {}
|
|
22958
22847
|
//# sourceMappingURL=version.js.map
|
|
@@ -22979,8 +22868,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22979
22868
|
|
|
22980
22869
|
|
|
22981
22870
|
|
|
22982
|
-
const LATEST = '
|
|
22983
|
-
const VERSION = true ? "3.1.
|
|
22871
|
+
const LATEST = 'latest';
|
|
22872
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
22984
22873
|
const loadLibraryPromises = {};
|
|
22985
22874
|
async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
|
|
22986
22875
|
if (moduleName) {
|
|
@@ -23024,7 +22913,11 @@ async function loadLibraryFromFile(libraryUrl) {
|
|
|
23024
22913
|
}
|
|
23025
22914
|
|
|
23026
22915
|
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isBrowser"]) {
|
|
23027
|
-
|
|
22916
|
+
try {
|
|
22917
|
+
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__ && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__["requireFromFile"] && (await _node_require_utils_node__WEBPACK_IMPORTED_MODULE_1__["requireFromFile"](libraryUrl));
|
|
22918
|
+
} catch {
|
|
22919
|
+
return null;
|
|
22920
|
+
}
|
|
23028
22921
|
}
|
|
23029
22922
|
|
|
23030
22923
|
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_0__["isWorker"]) {
|
|
@@ -23191,8 +23084,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23191
23084
|
/* harmony import */ var _env_utils_version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/version */ "../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js");
|
|
23192
23085
|
|
|
23193
23086
|
|
|
23194
|
-
const NPM_TAG = '
|
|
23195
|
-
const VERSION = true ? "3.1.
|
|
23087
|
+
const NPM_TAG = 'latest';
|
|
23088
|
+
const VERSION = true ? "3.1.5" : undefined;
|
|
23196
23089
|
function getWorkerName(worker) {
|
|
23197
23090
|
const warning = worker.version !== VERSION ? " (worker-utils@".concat(VERSION, ")") : '';
|
|
23198
23091
|
return "".concat(worker.name, "@").concat(worker.version).concat(warning);
|
|
@@ -52652,9 +52545,9 @@ function assert(condition, message) {
|
|
|
52652
52545
|
"use strict";
|
|
52653
52546
|
__webpack_require__.r(__webpack_exports__);
|
|
52654
52547
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return fitBounds; });
|
|
52655
|
-
/* harmony import */ var
|
|
52656
|
-
/* harmony import */ var
|
|
52657
|
-
/* harmony import */ var
|
|
52548
|
+
/* harmony import */ var _assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./assert */ "../../node_modules/@math.gl/web-mercator/dist/esm/assert.js");
|
|
52549
|
+
/* harmony import */ var _math_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math-utils */ "../../node_modules/@math.gl/web-mercator/dist/esm/math-utils.js");
|
|
52550
|
+
/* harmony import */ var _web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./web-mercator-utils */ "../../node_modules/@math.gl/web-mercator/dist/esm/web-mercator-utils.js");
|
|
52658
52551
|
|
|
52659
52552
|
|
|
52660
52553
|
|
|
@@ -52678,29 +52571,22 @@ function fitBounds({
|
|
|
52678
52571
|
right: p
|
|
52679
52572
|
};
|
|
52680
52573
|
} else {
|
|
52681
|
-
Object(
|
|
52574
|
+
Object(_assert__WEBPACK_IMPORTED_MODULE_0__["default"])(Number.isFinite(padding.top) && Number.isFinite(padding.bottom) && Number.isFinite(padding.left) && Number.isFinite(padding.right));
|
|
52682
52575
|
}
|
|
52683
52576
|
|
|
52684
|
-
const
|
|
52685
|
-
|
|
52686
|
-
height,
|
|
52687
|
-
longitude: 0,
|
|
52688
|
-
latitude: 0,
|
|
52689
|
-
zoom: 0
|
|
52690
|
-
});
|
|
52691
|
-
const nw = viewport.project([west, north]);
|
|
52692
|
-
const se = viewport.project([east, south]);
|
|
52577
|
+
const nw = Object(_web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["lngLatToWorld"])([west, Object(_math_utils__WEBPACK_IMPORTED_MODULE_1__["clamp"])(north, -_web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["MAX_LATITUDE"], _web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["MAX_LATITUDE"])]);
|
|
52578
|
+
const se = Object(_web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["lngLatToWorld"])([east, Object(_math_utils__WEBPACK_IMPORTED_MODULE_1__["clamp"])(south, -_web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["MAX_LATITUDE"], _web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["MAX_LATITUDE"])]);
|
|
52693
52579
|
const size = [Math.max(Math.abs(se[0] - nw[0]), minExtent), Math.max(Math.abs(se[1] - nw[1]), minExtent)];
|
|
52694
52580
|
const targetSize = [width - padding.left - padding.right - Math.abs(offset[0]) * 2, height - padding.top - padding.bottom - Math.abs(offset[1]) * 2];
|
|
52695
|
-
Object(
|
|
52581
|
+
Object(_assert__WEBPACK_IMPORTED_MODULE_0__["default"])(targetSize[0] > 0 && targetSize[1] > 0);
|
|
52696
52582
|
const scaleX = targetSize[0] / size[0];
|
|
52697
52583
|
const scaleY = targetSize[1] / size[1];
|
|
52698
52584
|
const offsetX = (padding.right - padding.left) / 2 / scaleX;
|
|
52699
52585
|
const offsetY = (padding.bottom - padding.top) / 2 / scaleY;
|
|
52700
52586
|
const center = [(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY];
|
|
52701
|
-
const centerLngLat =
|
|
52702
|
-
const zoom = Math.min(maxZoom,
|
|
52703
|
-
Object(
|
|
52587
|
+
const centerLngLat = Object(_web_mercator_utils__WEBPACK_IMPORTED_MODULE_2__["worldToLngLat"])(center);
|
|
52588
|
+
const zoom = Math.min(maxZoom, Object(_math_utils__WEBPACK_IMPORTED_MODULE_1__["log2"])(Math.abs(Math.min(scaleX, scaleY))));
|
|
52589
|
+
Object(_assert__WEBPACK_IMPORTED_MODULE_0__["default"])(Number.isFinite(zoom));
|
|
52704
52590
|
return {
|
|
52705
52591
|
longitude: centerLngLat[0],
|
|
52706
52592
|
latitude: centerLngLat[1],
|
|
@@ -52900,7 +52786,7 @@ function unprojectOnFarPlane(viewport, x, targetZ) {
|
|
|
52900
52786
|
/*!***************************************************************************************!*\
|
|
52901
52787
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@math.gl/web-mercator/dist/esm/index.js ***!
|
|
52902
52788
|
\***************************************************************************************/
|
|
52903
|
-
/*! exports provided: default, WebMercatorViewport, getBounds, fitBounds, normalizeViewportProps, flyToViewport, getFlyToDuration, lngLatToWorld, worldToLngLat, worldToPixels, pixelsToWorld, zoomToScale, scaleToZoom, altitudeToFovy, fovyToAltitude, getMeterZoom, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionMatrix, getProjectionParameters */
|
|
52789
|
+
/*! exports provided: default, WebMercatorViewport, getBounds, fitBounds, normalizeViewportProps, flyToViewport, getFlyToDuration, MAX_LATITUDE, lngLatToWorld, worldToLngLat, worldToPixels, pixelsToWorld, zoomToScale, scaleToZoom, altitudeToFovy, fovyToAltitude, getMeterZoom, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionMatrix, getProjectionParameters */
|
|
52904
52790
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
52905
52791
|
|
|
52906
52792
|
"use strict";
|
|
@@ -52925,6 +52811,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52925
52811
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFlyToDuration", function() { return _fly_to_viewport__WEBPACK_IMPORTED_MODULE_4__["getFlyToDuration"]; });
|
|
52926
52812
|
|
|
52927
52813
|
/* harmony import */ var _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./web-mercator-utils */ "../../node_modules/@math.gl/web-mercator/dist/esm/web-mercator-utils.js");
|
|
52814
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAX_LATITUDE", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["MAX_LATITUDE"]; });
|
|
52815
|
+
|
|
52928
52816
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lngLatToWorld", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["lngLatToWorld"]; });
|
|
52929
52817
|
|
|
52930
52818
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "worldToLngLat", function() { return _web_mercator_utils__WEBPACK_IMPORTED_MODULE_5__["worldToLngLat"]; });
|
|
@@ -52968,7 +52856,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52968
52856
|
/*!********************************************************************************************!*\
|
|
52969
52857
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@math.gl/web-mercator/dist/esm/math-utils.js ***!
|
|
52970
52858
|
\********************************************************************************************/
|
|
52971
|
-
/*! exports provided: createMat4, transformVector, mod, lerp, log2 */
|
|
52859
|
+
/*! exports provided: createMat4, transformVector, mod, lerp, clamp, log2 */
|
|
52972
52860
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
52973
52861
|
|
|
52974
52862
|
"use strict";
|
|
@@ -52977,6 +52865,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52977
52865
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformVector", function() { return transformVector; });
|
|
52978
52866
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mod", function() { return mod; });
|
|
52979
52867
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lerp", function() { return lerp; });
|
|
52868
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return clamp; });
|
|
52980
52869
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log2", function() { return log2; });
|
|
52981
52870
|
/* harmony import */ var gl_matrix_vec4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gl-matrix/vec4 */ "../../node_modules/gl-matrix/esm/vec4.js");
|
|
52982
52871
|
|
|
@@ -52995,6 +52884,9 @@ function mod(value, divisor) {
|
|
|
52995
52884
|
function lerp(start, end, step) {
|
|
52996
52885
|
return step * end + (1 - step) * start;
|
|
52997
52886
|
}
|
|
52887
|
+
function clamp(x, min, max) {
|
|
52888
|
+
return x < min ? min : x > max ? max : x;
|
|
52889
|
+
}
|
|
52998
52890
|
|
|
52999
52891
|
function ieLog2(x) {
|
|
53000
52892
|
return Math.log(x) * Math.LOG2E;
|
|
@@ -53075,11 +52967,12 @@ function normalizeViewportProps({
|
|
|
53075
52967
|
/*!****************************************************************************************************!*\
|
|
53076
52968
|
!*** /Users/alasarr/dev/deck.gl/node_modules/@math.gl/web-mercator/dist/esm/web-mercator-utils.js ***!
|
|
53077
52969
|
\****************************************************************************************************/
|
|
53078
|
-
/*! exports provided: DEFAULT_ALTITUDE, zoomToScale, scaleToZoom, lngLatToWorld, worldToLngLat, getMeterZoom, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionParameters, getProjectionMatrix, altitudeToFovy, fovyToAltitude, worldToPixels, pixelsToWorld */
|
|
52970
|
+
/*! exports provided: MAX_LATITUDE, DEFAULT_ALTITUDE, zoomToScale, scaleToZoom, lngLatToWorld, worldToLngLat, getMeterZoom, getDistanceScales, addMetersToLngLat, getViewMatrix, getProjectionParameters, getProjectionMatrix, altitudeToFovy, fovyToAltitude, worldToPixels, pixelsToWorld */
|
|
53079
52971
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
53080
52972
|
|
|
53081
52973
|
"use strict";
|
|
53082
52974
|
__webpack_require__.r(__webpack_exports__);
|
|
52975
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_LATITUDE", function() { return MAX_LATITUDE; });
|
|
53083
52976
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_ALTITUDE", function() { return DEFAULT_ALTITUDE; });
|
|
53084
52977
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zoomToScale", function() { return zoomToScale; });
|
|
53085
52978
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scaleToZoom", function() { return scaleToZoom; });
|
|
@@ -53111,6 +53004,7 @@ const DEGREES_TO_RADIANS = PI / 180;
|
|
|
53111
53004
|
const RADIANS_TO_DEGREES = 180 / PI;
|
|
53112
53005
|
const TILE_SIZE = 512;
|
|
53113
53006
|
const EARTH_CIRCUMFERENCE = 40.03e6;
|
|
53007
|
+
const MAX_LATITUDE = 85.051129;
|
|
53114
53008
|
const DEFAULT_ALTITUDE = 1.5;
|
|
53115
53009
|
function zoomToScale(zoom) {
|
|
53116
53010
|
return Math.pow(2, zoom);
|
|
@@ -53573,13 +53467,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
53573
53467
|
"use strict";
|
|
53574
53468
|
__webpack_require__.r(__webpack_exports__);
|
|
53575
53469
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stat; });
|
|
53576
|
-
/* harmony import */ var
|
|
53470
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
53471
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
53472
|
+
|
|
53577
53473
|
|
|
53578
53474
|
class Stat {
|
|
53579
53475
|
constructor(name, type) {
|
|
53476
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
53477
|
+
|
|
53478
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
53479
|
+
|
|
53480
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "sampleSize", 1);
|
|
53481
|
+
|
|
53482
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "time", void 0);
|
|
53483
|
+
|
|
53484
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "count", void 0);
|
|
53485
|
+
|
|
53486
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "samples", void 0);
|
|
53487
|
+
|
|
53488
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastTiming", void 0);
|
|
53489
|
+
|
|
53490
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastSampleTime", void 0);
|
|
53491
|
+
|
|
53492
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "lastSampleCount", void 0);
|
|
53493
|
+
|
|
53494
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_count", 0);
|
|
53495
|
+
|
|
53496
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_time", 0);
|
|
53497
|
+
|
|
53498
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_samples", 0);
|
|
53499
|
+
|
|
53500
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_startTime", 0);
|
|
53501
|
+
|
|
53502
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "_timerPending", false);
|
|
53503
|
+
|
|
53580
53504
|
this.name = name;
|
|
53581
53505
|
this.type = type;
|
|
53582
|
-
this.sampleSize = 1;
|
|
53583
53506
|
this.reset();
|
|
53584
53507
|
}
|
|
53585
53508
|
|
|
@@ -53627,7 +53550,7 @@ class Stat {
|
|
|
53627
53550
|
}
|
|
53628
53551
|
|
|
53629
53552
|
timeStart() {
|
|
53630
|
-
this._startTime = Object(
|
|
53553
|
+
this._startTime = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_1__["default"])();
|
|
53631
53554
|
this._timerPending = true;
|
|
53632
53555
|
return this;
|
|
53633
53556
|
}
|
|
@@ -53637,7 +53560,7 @@ class Stat {
|
|
|
53637
53560
|
return this;
|
|
53638
53561
|
}
|
|
53639
53562
|
|
|
53640
|
-
this.addTime(Object(
|
|
53563
|
+
this.addTime(Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_1__["default"])() - this._startTime);
|
|
53641
53564
|
this._timerPending = false;
|
|
53642
53565
|
|
|
53643
53566
|
this._checkSampling();
|
|
@@ -53712,22 +53635,26 @@ class Stat {
|
|
|
53712
53635
|
"use strict";
|
|
53713
53636
|
__webpack_require__.r(__webpack_exports__);
|
|
53714
53637
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stats; });
|
|
53715
|
-
/* harmony import */ var
|
|
53638
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
53639
|
+
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
53640
|
+
|
|
53716
53641
|
|
|
53717
53642
|
class Stats {
|
|
53718
|
-
constructor({
|
|
53719
|
-
id,
|
|
53720
|
-
|
|
53721
|
-
|
|
53722
|
-
|
|
53643
|
+
constructor(options) {
|
|
53644
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "id", void 0);
|
|
53645
|
+
|
|
53646
|
+
Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "stats", {});
|
|
53647
|
+
|
|
53648
|
+
this.id = options.id;
|
|
53723
53649
|
this.stats = {};
|
|
53724
53650
|
|
|
53725
|
-
this._initializeStats(stats);
|
|
53651
|
+
this._initializeStats(options.stats);
|
|
53726
53652
|
|
|
53727
53653
|
Object.seal(this);
|
|
53728
53654
|
}
|
|
53729
53655
|
|
|
53730
|
-
get(name
|
|
53656
|
+
get(name) {
|
|
53657
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'count';
|
|
53731
53658
|
return this._getOrCreate({
|
|
53732
53659
|
name,
|
|
53733
53660
|
type
|
|
@@ -53765,7 +53692,8 @@ class Stats {
|
|
|
53765
53692
|
return table;
|
|
53766
53693
|
}
|
|
53767
53694
|
|
|
53768
|
-
_initializeStats(
|
|
53695
|
+
_initializeStats() {
|
|
53696
|
+
let stats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
53769
53697
|
stats.forEach(stat => this._getOrCreate(stat));
|
|
53770
53698
|
}
|
|
53771
53699
|
|
|
@@ -53780,10 +53708,10 @@ class Stats {
|
|
|
53780
53708
|
} = stat;
|
|
53781
53709
|
|
|
53782
53710
|
if (!this.stats[name]) {
|
|
53783
|
-
if (stat instanceof
|
|
53711
|
+
if (stat instanceof _stat__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
53784
53712
|
this.stats[name] = stat;
|
|
53785
53713
|
} else {
|
|
53786
|
-
this.stats[name] = new
|
|
53714
|
+
this.stats[name] = new _stat__WEBPACK_IMPORTED_MODULE_1__["default"](name, type);
|
|
53787
53715
|
}
|
|
53788
53716
|
}
|
|
53789
53717
|
|
|
@@ -62735,7 +62663,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
62735
62663
|
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/probe.gl/dist/esm/utils/hi-res-timestamp.js");
|
|
62736
62664
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_12__["default"]; });
|
|
62737
62665
|
|
|
62738
|
-
/* harmony import */ var _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @probe.gl/stats */ "../../node_modules/@probe.gl/stats/dist/esm/index.js");
|
|
62666
|
+
/* harmony import */ var _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @probe.gl/stats */ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js");
|
|
62739
62667
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stats", function() { return _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__["Stats"]; });
|
|
62740
62668
|
|
|
62741
62669
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _probe_gl_stats__WEBPACK_IMPORTED_MODULE_13__["Stat"]; });
|
|
@@ -63444,7 +63372,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63444
63372
|
|
|
63445
63373
|
|
|
63446
63374
|
|
|
63447
|
-
const VERSION = true ? "8.7.0-
|
|
63375
|
+
const VERSION = true ? "8.7.0-beta.3" : undefined;
|
|
63448
63376
|
const isBrowser = Object(_env_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
63449
63377
|
//# sourceMappingURL=globals.js.map
|
|
63450
63378
|
|
|
@@ -63561,6 +63489,291 @@ class LocalStorage {
|
|
|
63561
63489
|
module.exports = __webpack_require__(/*! ./dist/es5/env */ "../../node_modules/probe.gl/dist/es5/env/index.js");
|
|
63562
63490
|
|
|
63563
63491
|
|
|
63492
|
+
/***/ }),
|
|
63493
|
+
|
|
63494
|
+
/***/ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js":
|
|
63495
|
+
/*!*******************************************************************************************************!*\
|
|
63496
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js ***!
|
|
63497
|
+
\*******************************************************************************************************/
|
|
63498
|
+
/*! exports provided: Stats, Stat, _getHiResTimestamp */
|
|
63499
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
63500
|
+
|
|
63501
|
+
"use strict";
|
|
63502
|
+
__webpack_require__.r(__webpack_exports__);
|
|
63503
|
+
/* harmony import */ var _lib_stats__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/stats */ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js");
|
|
63504
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stats", function() { return _lib_stats__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
63505
|
+
|
|
63506
|
+
/* harmony import */ var _lib_stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/stat */ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
63507
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _lib_stat__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
63508
|
+
|
|
63509
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
63510
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
63511
|
+
|
|
63512
|
+
|
|
63513
|
+
|
|
63514
|
+
|
|
63515
|
+
//# sourceMappingURL=index.js.map
|
|
63516
|
+
|
|
63517
|
+
/***/ }),
|
|
63518
|
+
|
|
63519
|
+
/***/ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js":
|
|
63520
|
+
/*!**********************************************************************************************************!*\
|
|
63521
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js ***!
|
|
63522
|
+
\**********************************************************************************************************/
|
|
63523
|
+
/*! exports provided: default */
|
|
63524
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
63525
|
+
|
|
63526
|
+
"use strict";
|
|
63527
|
+
__webpack_require__.r(__webpack_exports__);
|
|
63528
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stat; });
|
|
63529
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/hi-res-timestamp */ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
63530
|
+
|
|
63531
|
+
class Stat {
|
|
63532
|
+
constructor(name, type) {
|
|
63533
|
+
this.name = name;
|
|
63534
|
+
this.type = type;
|
|
63535
|
+
this.sampleSize = 1;
|
|
63536
|
+
this.reset();
|
|
63537
|
+
}
|
|
63538
|
+
|
|
63539
|
+
setSampleSize(samples) {
|
|
63540
|
+
this.sampleSize = samples;
|
|
63541
|
+
return this;
|
|
63542
|
+
}
|
|
63543
|
+
|
|
63544
|
+
incrementCount() {
|
|
63545
|
+
this.addCount(1);
|
|
63546
|
+
return this;
|
|
63547
|
+
}
|
|
63548
|
+
|
|
63549
|
+
decrementCount() {
|
|
63550
|
+
this.subtractCount(1);
|
|
63551
|
+
return this;
|
|
63552
|
+
}
|
|
63553
|
+
|
|
63554
|
+
addCount(value) {
|
|
63555
|
+
this._count += value;
|
|
63556
|
+
this._samples++;
|
|
63557
|
+
|
|
63558
|
+
this._checkSampling();
|
|
63559
|
+
|
|
63560
|
+
return this;
|
|
63561
|
+
}
|
|
63562
|
+
|
|
63563
|
+
subtractCount(value) {
|
|
63564
|
+
this._count -= value;
|
|
63565
|
+
this._samples++;
|
|
63566
|
+
|
|
63567
|
+
this._checkSampling();
|
|
63568
|
+
|
|
63569
|
+
return this;
|
|
63570
|
+
}
|
|
63571
|
+
|
|
63572
|
+
addTime(time) {
|
|
63573
|
+
this._time += time;
|
|
63574
|
+
this.lastTiming = time;
|
|
63575
|
+
this._samples++;
|
|
63576
|
+
|
|
63577
|
+
this._checkSampling();
|
|
63578
|
+
|
|
63579
|
+
return this;
|
|
63580
|
+
}
|
|
63581
|
+
|
|
63582
|
+
timeStart() {
|
|
63583
|
+
this._startTime = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
63584
|
+
this._timerPending = true;
|
|
63585
|
+
return this;
|
|
63586
|
+
}
|
|
63587
|
+
|
|
63588
|
+
timeEnd() {
|
|
63589
|
+
if (!this._timerPending) {
|
|
63590
|
+
return this;
|
|
63591
|
+
}
|
|
63592
|
+
|
|
63593
|
+
this.addTime(Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])() - this._startTime);
|
|
63594
|
+
this._timerPending = false;
|
|
63595
|
+
|
|
63596
|
+
this._checkSampling();
|
|
63597
|
+
|
|
63598
|
+
return this;
|
|
63599
|
+
}
|
|
63600
|
+
|
|
63601
|
+
getSampleAverageCount() {
|
|
63602
|
+
return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
|
|
63603
|
+
}
|
|
63604
|
+
|
|
63605
|
+
getSampleAverageTime() {
|
|
63606
|
+
return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
|
|
63607
|
+
}
|
|
63608
|
+
|
|
63609
|
+
getSampleHz() {
|
|
63610
|
+
return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1000) : 0;
|
|
63611
|
+
}
|
|
63612
|
+
|
|
63613
|
+
getAverageCount() {
|
|
63614
|
+
return this.samples > 0 ? this.count / this.samples : 0;
|
|
63615
|
+
}
|
|
63616
|
+
|
|
63617
|
+
getAverageTime() {
|
|
63618
|
+
return this.samples > 0 ? this.time / this.samples : 0;
|
|
63619
|
+
}
|
|
63620
|
+
|
|
63621
|
+
getHz() {
|
|
63622
|
+
return this.time > 0 ? this.samples / (this.time / 1000) : 0;
|
|
63623
|
+
}
|
|
63624
|
+
|
|
63625
|
+
reset() {
|
|
63626
|
+
this.time = 0;
|
|
63627
|
+
this.count = 0;
|
|
63628
|
+
this.samples = 0;
|
|
63629
|
+
this.lastTiming = 0;
|
|
63630
|
+
this.lastSampleTime = 0;
|
|
63631
|
+
this.lastSampleCount = 0;
|
|
63632
|
+
this._count = 0;
|
|
63633
|
+
this._time = 0;
|
|
63634
|
+
this._samples = 0;
|
|
63635
|
+
this._startTime = 0;
|
|
63636
|
+
this._timerPending = false;
|
|
63637
|
+
return this;
|
|
63638
|
+
}
|
|
63639
|
+
|
|
63640
|
+
_checkSampling() {
|
|
63641
|
+
if (this._samples === this.sampleSize) {
|
|
63642
|
+
this.lastSampleTime = this._time;
|
|
63643
|
+
this.lastSampleCount = this._count;
|
|
63644
|
+
this.count += this._count;
|
|
63645
|
+
this.time += this._time;
|
|
63646
|
+
this.samples += this._samples;
|
|
63647
|
+
this._time = 0;
|
|
63648
|
+
this._count = 0;
|
|
63649
|
+
this._samples = 0;
|
|
63650
|
+
}
|
|
63651
|
+
}
|
|
63652
|
+
|
|
63653
|
+
}
|
|
63654
|
+
//# sourceMappingURL=stat.js.map
|
|
63655
|
+
|
|
63656
|
+
/***/ }),
|
|
63657
|
+
|
|
63658
|
+
/***/ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js":
|
|
63659
|
+
/*!***********************************************************************************************************!*\
|
|
63660
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js ***!
|
|
63661
|
+
\***********************************************************************************************************/
|
|
63662
|
+
/*! exports provided: default */
|
|
63663
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
63664
|
+
|
|
63665
|
+
"use strict";
|
|
63666
|
+
__webpack_require__.r(__webpack_exports__);
|
|
63667
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stats; });
|
|
63668
|
+
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stat */ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
63669
|
+
|
|
63670
|
+
class Stats {
|
|
63671
|
+
constructor({
|
|
63672
|
+
id,
|
|
63673
|
+
stats
|
|
63674
|
+
}) {
|
|
63675
|
+
this.id = id;
|
|
63676
|
+
this.stats = {};
|
|
63677
|
+
|
|
63678
|
+
this._initializeStats(stats);
|
|
63679
|
+
|
|
63680
|
+
Object.seal(this);
|
|
63681
|
+
}
|
|
63682
|
+
|
|
63683
|
+
get(name, type = 'count') {
|
|
63684
|
+
return this._getOrCreate({
|
|
63685
|
+
name,
|
|
63686
|
+
type
|
|
63687
|
+
});
|
|
63688
|
+
}
|
|
63689
|
+
|
|
63690
|
+
get size() {
|
|
63691
|
+
return Object.keys(this.stats).length;
|
|
63692
|
+
}
|
|
63693
|
+
|
|
63694
|
+
reset() {
|
|
63695
|
+
for (const key in this.stats) {
|
|
63696
|
+
this.stats[key].reset();
|
|
63697
|
+
}
|
|
63698
|
+
|
|
63699
|
+
return this;
|
|
63700
|
+
}
|
|
63701
|
+
|
|
63702
|
+
forEach(fn) {
|
|
63703
|
+
for (const key in this.stats) {
|
|
63704
|
+
fn(this.stats[key]);
|
|
63705
|
+
}
|
|
63706
|
+
}
|
|
63707
|
+
|
|
63708
|
+
getTable() {
|
|
63709
|
+
const table = {};
|
|
63710
|
+
this.forEach(stat => {
|
|
63711
|
+
table[stat.name] = {
|
|
63712
|
+
time: stat.time || 0,
|
|
63713
|
+
count: stat.count || 0,
|
|
63714
|
+
average: stat.getAverageTime() || 0,
|
|
63715
|
+
hz: stat.getHz() || 0
|
|
63716
|
+
};
|
|
63717
|
+
});
|
|
63718
|
+
return table;
|
|
63719
|
+
}
|
|
63720
|
+
|
|
63721
|
+
_initializeStats(stats = []) {
|
|
63722
|
+
stats.forEach(stat => this._getOrCreate(stat));
|
|
63723
|
+
}
|
|
63724
|
+
|
|
63725
|
+
_getOrCreate(stat) {
|
|
63726
|
+
if (!stat || !stat.name) {
|
|
63727
|
+
return null;
|
|
63728
|
+
}
|
|
63729
|
+
|
|
63730
|
+
const {
|
|
63731
|
+
name,
|
|
63732
|
+
type
|
|
63733
|
+
} = stat;
|
|
63734
|
+
|
|
63735
|
+
if (!this.stats[name]) {
|
|
63736
|
+
if (stat instanceof _stat__WEBPACK_IMPORTED_MODULE_0__["default"]) {
|
|
63737
|
+
this.stats[name] = stat;
|
|
63738
|
+
} else {
|
|
63739
|
+
this.stats[name] = new _stat__WEBPACK_IMPORTED_MODULE_0__["default"](name, type);
|
|
63740
|
+
}
|
|
63741
|
+
}
|
|
63742
|
+
|
|
63743
|
+
return this.stats[name];
|
|
63744
|
+
}
|
|
63745
|
+
|
|
63746
|
+
}
|
|
63747
|
+
//# sourceMappingURL=stats.js.map
|
|
63748
|
+
|
|
63749
|
+
/***/ }),
|
|
63750
|
+
|
|
63751
|
+
/***/ "../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js":
|
|
63752
|
+
/*!************************************************************************************************************************!*\
|
|
63753
|
+
!*** /Users/alasarr/dev/deck.gl/node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js ***!
|
|
63754
|
+
\************************************************************************************************************************/
|
|
63755
|
+
/*! exports provided: default */
|
|
63756
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
63757
|
+
|
|
63758
|
+
"use strict";
|
|
63759
|
+
__webpack_require__.r(__webpack_exports__);
|
|
63760
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHiResTimestamp; });
|
|
63761
|
+
function getHiResTimestamp() {
|
|
63762
|
+
let timestamp;
|
|
63763
|
+
|
|
63764
|
+
if (typeof window !== 'undefined' && window.performance) {
|
|
63765
|
+
timestamp = window.performance.now();
|
|
63766
|
+
} else if (typeof process !== 'undefined' && process.hrtime) {
|
|
63767
|
+
const timeParts = process.hrtime();
|
|
63768
|
+
timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;
|
|
63769
|
+
} else {
|
|
63770
|
+
timestamp = Date.now();
|
|
63771
|
+
}
|
|
63772
|
+
|
|
63773
|
+
return timestamp;
|
|
63774
|
+
}
|
|
63775
|
+
//# sourceMappingURL=hi-res-timestamp.js.map
|
|
63776
|
+
|
|
63564
63777
|
/***/ }),
|
|
63565
63778
|
|
|
63566
63779
|
/***/ "./bundle.ts":
|
|
@@ -63592,7 +63805,7 @@ module.exports = Object.assign(deck, deckGLLayers);
|
|
|
63592
63805
|
"use strict";
|
|
63593
63806
|
__webpack_require__.r(__webpack_exports__);
|
|
63594
63807
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return GreatCircleLayer; });
|
|
63595
|
-
/* harmony import */ var _deck_gl_layers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/layers */ "@deck.gl/
|
|
63808
|
+
/* harmony import */ var _deck_gl_layers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/layers */ "@deck.gl/core");
|
|
63596
63809
|
/* harmony import */ var _deck_gl_layers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_layers__WEBPACK_IMPORTED_MODULE_0__);
|
|
63597
63810
|
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
|
|
63598
63811
|
//
|
|
@@ -63640,7 +63853,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63640
63853
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return H3ClusterLayer; });
|
|
63641
63854
|
/* harmony import */ var h3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! h3-js */ "h3-js");
|
|
63642
63855
|
/* harmony import */ var h3_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(h3_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
63643
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
63856
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
63644
63857
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
63645
63858
|
|
|
63646
63859
|
|
|
@@ -63758,7 +63971,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63758
63971
|
/* harmony import */ var h3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! h3-js */ "h3-js");
|
|
63759
63972
|
/* harmony import */ var h3_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(h3_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
63760
63973
|
/* harmony import */ var _math_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @math.gl/core */ "../../node_modules/@math.gl/core/dist/esm/index.js");
|
|
63761
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
63974
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
63762
63975
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_2__);
|
|
63763
63976
|
|
|
63764
63977
|
|
|
@@ -64110,7 +64323,7 @@ H3HexagonLayer.layerName = 'H3HexagonLayer';
|
|
|
64110
64323
|
/*!**********************!*\
|
|
64111
64324
|
!*** ./src/index.ts ***!
|
|
64112
64325
|
\**********************/
|
|
64113
|
-
/*! exports provided: GreatCircleLayer, S2Layer, TileLayer, TripsLayer, H3ClusterLayer, H3HexagonLayer, Tile3DLayer, TerrainLayer, MVTLayer */
|
|
64326
|
+
/*! exports provided: GreatCircleLayer, S2Layer, TileLayer, TripsLayer, H3ClusterLayer, H3HexagonLayer, Tile3DLayer, TerrainLayer, MVTLayer, _getURLFromTemplate */
|
|
64114
64327
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
64115
64328
|
|
|
64116
64329
|
"use strict";
|
|
@@ -64142,6 +64355,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64142
64355
|
/* harmony import */ var _mvt_layer_mvt_layer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./mvt-layer/mvt-layer */ "./src/mvt-layer/mvt-layer.js");
|
|
64143
64356
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MVTLayer", function() { return _mvt_layer_mvt_layer__WEBPACK_IMPORTED_MODULE_8__["default"]; });
|
|
64144
64357
|
|
|
64358
|
+
/* harmony import */ var _tile_layer_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tile-layer/utils */ "./src/tile-layer/utils.js");
|
|
64359
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getURLFromTemplate", function() { return _tile_layer_utils__WEBPACK_IMPORTED_MODULE_9__["getURLFromTemplate"]; });
|
|
64360
|
+
|
|
64145
64361
|
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
|
|
64146
64362
|
//
|
|
64147
64363
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -64173,6 +64389,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64173
64389
|
|
|
64174
64390
|
|
|
64175
64391
|
|
|
64392
|
+
|
|
64176
64393
|
/***/ }),
|
|
64177
64394
|
|
|
64178
64395
|
/***/ "./src/mesh-layer/mesh-layer-fragment.glsl.js":
|
|
@@ -64348,7 +64565,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64348
64565
|
/* harmony import */ var _luma_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @luma.gl/core */ "@luma.gl/core");
|
|
64349
64566
|
/* harmony import */ var _luma_gl_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_luma_gl_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
64350
64567
|
/* harmony import */ var _luma_gl_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @luma.gl/constants */ "../../node_modules/@luma.gl/constants/dist/esm/index.js");
|
|
64351
|
-
/* harmony import */ var _deck_gl_mesh_layers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @deck.gl/mesh-layers */ "@deck.gl/
|
|
64568
|
+
/* harmony import */ var _deck_gl_mesh_layers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @deck.gl/mesh-layers */ "@deck.gl/core");
|
|
64352
64569
|
/* harmony import */ var _deck_gl_mesh_layers__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_mesh_layers__WEBPACK_IMPORTED_MODULE_3__);
|
|
64353
64570
|
/* harmony import */ var _mesh_layer_vertex_glsl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mesh-layer-vertex.glsl */ "./src/mesh-layer/mesh-layer-vertex.glsl.js");
|
|
64354
64571
|
/* harmony import */ var _mesh_layer_fragment_glsl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mesh-layer-fragment.glsl */ "./src/mesh-layer/mesh-layer-fragment.glsl.js");
|
|
@@ -64722,7 +64939,7 @@ function findIndex(array, predicate, startIndex, endIndex) {
|
|
|
64722
64939
|
"use strict";
|
|
64723
64940
|
__webpack_require__.r(__webpack_exports__);
|
|
64724
64941
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return MVTLayer; });
|
|
64725
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
64942
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
64726
64943
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
64727
64944
|
/* harmony import */ var _math_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @math.gl/core */ "../../node_modules/@math.gl/core/dist/esm/index.js");
|
|
64728
64945
|
/* harmony import */ var _loaders_gl_mvt__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @loaders.gl/mvt */ "../../node_modules/@loaders.gl/mvt/dist/esm/index.js");
|
|
@@ -65333,7 +65550,7 @@ function FromHilbertQuadKey(hilbertQuadkey) {
|
|
|
65333
65550
|
"use strict";
|
|
65334
65551
|
__webpack_require__.r(__webpack_exports__);
|
|
65335
65552
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return S2Layer; });
|
|
65336
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
65553
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
65337
65554
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
65338
65555
|
/* harmony import */ var _s2_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./s2-utils */ "./src/s2-layer/s2-utils.js");
|
|
65339
65556
|
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
|
|
@@ -65566,7 +65783,7 @@ function getS2Polygon(token) {
|
|
|
65566
65783
|
"use strict";
|
|
65567
65784
|
__webpack_require__.r(__webpack_exports__);
|
|
65568
65785
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TerrainLayer; });
|
|
65569
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
65786
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
65570
65787
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
65571
65788
|
/* harmony import */ var _loaders_gl_terrain__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/terrain */ "../../node_modules/@loaders.gl/terrain/dist/esm/index.js");
|
|
65572
65789
|
/* harmony import */ var _tile_layer_tile_layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tile-layer/tile-layer */ "./src/tile-layer/tile-layer.js");
|
|
@@ -65899,7 +66116,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
65899
66116
|
/* harmony import */ var _luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/constants */ "../../node_modules/@luma.gl/constants/dist/esm/index.js");
|
|
65900
66117
|
/* harmony import */ var _luma_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @luma.gl/core */ "@luma.gl/core");
|
|
65901
66118
|
/* harmony import */ var _luma_gl_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_luma_gl_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
65902
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
66119
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
65903
66120
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_2__);
|
|
65904
66121
|
/* harmony import */ var _mesh_layer_mesh_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../mesh-layer/mesh-layer */ "./src/mesh-layer/mesh-layer.js");
|
|
65905
66122
|
/* harmony import */ var _loaders_gl_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @loaders.gl/core */ "../../node_modules/@loaders.gl/core/dist/esm/index.js");
|
|
@@ -66361,7 +66578,7 @@ Tile3DLayer.defaultProps = defaultProps;
|
|
|
66361
66578
|
"use strict";
|
|
66362
66579
|
__webpack_require__.r(__webpack_exports__);
|
|
66363
66580
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Tile2DHeader; });
|
|
66364
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
66581
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
66365
66582
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
66366
66583
|
/* eslint-env browser */
|
|
66367
66584
|
|
|
@@ -66748,7 +66965,7 @@ function getOSMTileIndices(viewport, maxZ, zRange, bounds) {
|
|
|
66748
66965
|
"use strict";
|
|
66749
66966
|
__webpack_require__.r(__webpack_exports__);
|
|
66750
66967
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TileLayer; });
|
|
66751
|
-
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/
|
|
66968
|
+
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
|
|
66752
66969
|
/* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
66753
66970
|
/* harmony import */ var _tileset_2d__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tileset-2d */ "./src/tile-layer/tileset-2d.js");
|
|
66754
66971
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./src/tile-layer/utils.js");
|
|
@@ -67131,6 +67348,8 @@ class Tileset2D {
|
|
|
67131
67348
|
this._viewport = null;
|
|
67132
67349
|
this._selectedTiles = null;
|
|
67133
67350
|
this._frameNumber = 0;
|
|
67351
|
+
this._modelMatrix = new _math_gl_core__WEBPACK_IMPORTED_MODULE_3__["Matrix4"]();
|
|
67352
|
+
this._modelMatrixInverse = new _math_gl_core__WEBPACK_IMPORTED_MODULE_3__["Matrix4"]();
|
|
67134
67353
|
this.setOptions(opts);
|
|
67135
67354
|
}
|
|
67136
67355
|
/* Public API */
|
|
@@ -67148,6 +67367,10 @@ class Tileset2D {
|
|
|
67148
67367
|
return this._selectedTiles.every(tile => tile.isLoaded);
|
|
67149
67368
|
}
|
|
67150
67369
|
|
|
67370
|
+
get needsReload() {
|
|
67371
|
+
return this._selectedTiles.some(tile => tile.needsReload);
|
|
67372
|
+
}
|
|
67373
|
+
|
|
67151
67374
|
setOptions(opts) {
|
|
67152
67375
|
Object.assign(this.opts, opts);
|
|
67153
67376
|
|
|
@@ -67202,8 +67425,8 @@ class Tileset2D {
|
|
|
67202
67425
|
|
|
67203
67426
|
if (!viewport.equals(this._viewport) || isModelMatrixNew) {
|
|
67204
67427
|
if (isModelMatrixNew) {
|
|
67205
|
-
this._modelMatrixInverse =
|
|
67206
|
-
this._modelMatrix =
|
|
67428
|
+
this._modelMatrixInverse = modelMatrixAsMatrix4.clone().invert();
|
|
67429
|
+
this._modelMatrix = modelMatrixAsMatrix4;
|
|
67207
67430
|
}
|
|
67208
67431
|
|
|
67209
67432
|
this._viewport = viewport;
|
|
@@ -67220,7 +67443,14 @@ class Tileset2D {
|
|
|
67220
67443
|
if (this._dirty) {
|
|
67221
67444
|
// Some new tiles are added
|
|
67222
67445
|
this._rebuildTree();
|
|
67223
|
-
}
|
|
67446
|
+
} // Check for needed reloads explicitly even if the view/matrix has not changed.
|
|
67447
|
+
|
|
67448
|
+
} else if (this.needsReload) {
|
|
67449
|
+
this._selectedTiles = this._selectedTiles.map(tile => this._getTile({
|
|
67450
|
+
x: tile.x,
|
|
67451
|
+
y: tile.y,
|
|
67452
|
+
z: tile.z
|
|
67453
|
+
}));
|
|
67224
67454
|
} // Update tile states
|
|
67225
67455
|
|
|
67226
67456
|
|
|
@@ -67638,7 +67868,7 @@ function getURLFromTemplate(template, properties) {
|
|
|
67638
67868
|
y,
|
|
67639
67869
|
z
|
|
67640
67870
|
} = properties;
|
|
67641
|
-
return template.replace(
|
|
67871
|
+
return template.replace(/\{x\}/g, x).replace(/\{y\}/g, y).replace(/\{z\}/g, z).replace(/\{-y\}/g, Math.pow(2, z) - y - 1);
|
|
67642
67872
|
}
|
|
67643
67873
|
/**
|
|
67644
67874
|
* gets the bounding box of a viewport
|
|
@@ -67801,7 +68031,7 @@ function isURLTemplate(s) {
|
|
|
67801
68031
|
"use strict";
|
|
67802
68032
|
__webpack_require__.r(__webpack_exports__);
|
|
67803
68033
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TripsLayer; });
|
|
67804
|
-
/* harmony import */ var _deck_gl_layers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/layers */ "@deck.gl/
|
|
68034
|
+
/* harmony import */ var _deck_gl_layers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/layers */ "@deck.gl/core");
|
|
67805
68035
|
/* harmony import */ var _deck_gl_layers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_layers__WEBPACK_IMPORTED_MODULE_0__);
|
|
67806
68036
|
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
|
|
67807
68037
|
//
|
|
@@ -67992,36 +68222,14 @@ TripsLayer.defaultProps = defaultProps;
|
|
|
67992
68222
|
|
|
67993
68223
|
/***/ }),
|
|
67994
68224
|
|
|
67995
|
-
/***/
|
|
67996
|
-
/*!************************************!*\
|
|
67997
|
-
!*** ./make-node-stream (ignored) ***!
|
|
67998
|
-
\************************************/
|
|
67999
|
-
/*! no static exports found */
|
|
68000
|
-
/***/ (function(module, exports) {
|
|
68001
|
-
|
|
68002
|
-
/* (ignored) */
|
|
68003
|
-
|
|
68004
|
-
/***/ }),
|
|
68005
|
-
|
|
68006
|
-
/***/ 8:
|
|
68007
|
-
/*!**********************************************************!*\
|
|
68008
|
-
!*** ./iterators/make-stream/make-node-stream (ignored) ***!
|
|
68009
|
-
\**********************************************************/
|
|
68010
|
-
/*! no static exports found */
|
|
68011
|
-
/***/ (function(module, exports) {
|
|
68012
|
-
|
|
68013
|
-
/* (ignored) */
|
|
68014
|
-
|
|
68015
|
-
/***/ }),
|
|
68016
|
-
|
|
68017
|
-
/***/ "@deck.gl/layers":
|
|
68225
|
+
/***/ "@deck.gl/core":
|
|
68018
68226
|
/*!***********************!*\
|
|
68019
68227
|
!*** external "deck" ***!
|
|
68020
68228
|
\***********************/
|
|
68021
68229
|
/*! no static exports found */
|
|
68022
68230
|
/***/ (function(module, exports) {
|
|
68023
68231
|
|
|
68024
|
-
module.exports =
|
|
68232
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__deck_gl_core__;
|
|
68025
68233
|
|
|
68026
68234
|
/***/ }),
|
|
68027
68235
|
|