@deck.gl/geo-layers 9.0.0-beta.8 → 9.0.0-beta.9

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 CHANGED
@@ -10897,6 +10897,7 @@ var __exports__ = (() => {
10897
10897
  refinementStrategy: "best-available",
10898
10898
  zRange: null,
10899
10899
  maxRequests: 6,
10900
+ debounceTime: 0,
10900
10901
  zoomOffset: 0,
10901
10902
  onTileLoad: () => {
10902
10903
  },
@@ -10909,6 +10910,7 @@ var __exports__ = (() => {
10909
10910
  constructor(opts) {
10910
10911
  this._getCullBounds = memoize(getCullBounds);
10911
10912
  this.opts = { ...DEFAULT_TILESET2D_PROPS, ...opts };
10913
+ this.setOptions(this.opts);
10912
10914
  this.onTileLoad = (tile) => {
10913
10915
  this.opts.onTileLoad?.(tile);
10914
10916
  if (this.opts.maxCacheByteSize) {
@@ -10917,8 +10919,9 @@ var __exports__ = (() => {
10917
10919
  }
10918
10920
  };
10919
10921
  this._requestScheduler = new RequestScheduler({
10920
- maxRequests: opts.maxRequests,
10921
- throttleRequests: Boolean(opts.maxRequests && opts.maxRequests > 0)
10922
+ throttleRequests: this.opts.maxRequests > 0 || this.opts.debounceTime > 0,
10923
+ maxRequests: this.opts.maxRequests,
10924
+ debounceTime: this.opts.debounceTime
10922
10925
  });
10923
10926
  this._cache = /* @__PURE__ */ new Map();
10924
10927
  this._tiles = [];
@@ -10930,7 +10933,6 @@ var __exports__ = (() => {
10930
10933
  this._frameNumber = 0;
10931
10934
  this._modelMatrix = new Matrix4();
10932
10935
  this._modelMatrixInverse = new Matrix4();
10933
- this.setOptions(opts);
10934
10936
  }
10935
10937
  get tiles() {
10936
10938
  return this._tiles;
@@ -11270,6 +11272,7 @@ var __exports__ = (() => {
11270
11272
  refinementStrategy: STRATEGY_DEFAULT,
11271
11273
  zRange: null,
11272
11274
  maxRequests: 6,
11275
+ debounceTime: 0,
11273
11276
  zoomOffset: 0
11274
11277
  };
11275
11278
  var TileLayer = class extends import_core14.CompositeLayer {
@@ -11321,6 +11324,7 @@ var __exports__ = (() => {
11321
11324
  maxZoom,
11322
11325
  minZoom,
11323
11326
  maxRequests,
11327
+ debounceTime,
11324
11328
  zoomOffset
11325
11329
  } = this.props;
11326
11330
  return {
@@ -11332,6 +11336,7 @@ var __exports__ = (() => {
11332
11336
  refinementStrategy,
11333
11337
  extent,
11334
11338
  maxRequests,
11339
+ debounceTime,
11335
11340
  zoomOffset,
11336
11341
  getTileData: this.getTileData.bind(this),
11337
11342
  onTileLoad: this._onTileLoad.bind(this),
@@ -25714,9 +25719,6 @@ void main(void) {
25714
25719
  binary: true
25715
25720
  };
25716
25721
  var MVTLayer = class extends TileLayer {
25717
- constructor(...propObjects) {
25718
- super(...propObjects);
25719
- }
25720
25722
  initializeState() {
25721
25723
  super.initializeState();
25722
25724
  const binary = this.context.viewport.resolution !== void 0 ? false : this.props.binary;
package/dist/index.cjs CHANGED
@@ -1059,6 +1059,7 @@ var DEFAULT_TILESET2D_PROPS = {
1059
1059
  refinementStrategy: "best-available",
1060
1060
  zRange: null,
1061
1061
  maxRequests: 6,
1062
+ debounceTime: 0,
1062
1063
  zoomOffset: 0,
1063
1064
  onTileLoad: () => {
1064
1065
  },
@@ -1071,6 +1072,7 @@ var Tileset2D = class {
1071
1072
  constructor(opts) {
1072
1073
  this._getCullBounds = memoize(getCullBounds);
1073
1074
  this.opts = { ...DEFAULT_TILESET2D_PROPS, ...opts };
1075
+ this.setOptions(this.opts);
1074
1076
  this.onTileLoad = (tile) => {
1075
1077
  var _a, _b;
1076
1078
  (_b = (_a = this.opts).onTileLoad) == null ? void 0 : _b.call(_a, tile);
@@ -1080,8 +1082,9 @@ var Tileset2D = class {
1080
1082
  }
1081
1083
  };
1082
1084
  this._requestScheduler = new import_loader_utils.RequestScheduler({
1083
- maxRequests: opts.maxRequests,
1084
- throttleRequests: Boolean(opts.maxRequests && opts.maxRequests > 0)
1085
+ throttleRequests: this.opts.maxRequests > 0 || this.opts.debounceTime > 0,
1086
+ maxRequests: this.opts.maxRequests,
1087
+ debounceTime: this.opts.debounceTime
1085
1088
  });
1086
1089
  this._cache = /* @__PURE__ */ new Map();
1087
1090
  this._tiles = [];
@@ -1093,7 +1096,6 @@ var Tileset2D = class {
1093
1096
  this._frameNumber = 0;
1094
1097
  this._modelMatrix = new import_core4.Matrix4();
1095
1098
  this._modelMatrixInverse = new import_core4.Matrix4();
1096
- this.setOptions(opts);
1097
1099
  }
1098
1100
  get tiles() {
1099
1101
  return this._tiles;
@@ -1427,6 +1429,7 @@ var defaultProps6 = {
1427
1429
  refinementStrategy: STRATEGY_DEFAULT,
1428
1430
  zRange: null,
1429
1431
  maxRequests: 6,
1432
+ debounceTime: 0,
1430
1433
  zoomOffset: 0
1431
1434
  };
1432
1435
  var _TileLayer = class extends import_core5.CompositeLayer {
@@ -1467,7 +1470,7 @@ var _TileLayer = class extends import_core5.CompositeLayer {
1467
1470
  this._updateTileset();
1468
1471
  }
1469
1472
  _getTilesetOptions() {
1470
- const { tileSize, maxCacheSize, maxCacheByteSize, refinementStrategy, extent, maxZoom, minZoom, maxRequests, zoomOffset } = this.props;
1473
+ const { tileSize, maxCacheSize, maxCacheByteSize, refinementStrategy, extent, maxZoom, minZoom, maxRequests, debounceTime, zoomOffset } = this.props;
1471
1474
  return {
1472
1475
  maxCacheSize,
1473
1476
  maxCacheByteSize,
@@ -1477,6 +1480,7 @@ var _TileLayer = class extends import_core5.CompositeLayer {
1477
1480
  refinementStrategy,
1478
1481
  extent,
1479
1482
  maxRequests,
1483
+ debounceTime,
1480
1484
  zoomOffset,
1481
1485
  getTileData: this.getTileData.bind(this),
1482
1486
  onTileLoad: this._onTileLoad.bind(this),
@@ -2813,9 +2817,6 @@ var defaultProps13 = {
2813
2817
  binary: true
2814
2818
  };
2815
2819
  var _MVTLayer = class extends TileLayer {
2816
- constructor(...propObjects) {
2817
- super(...propObjects);
2818
- }
2819
2820
  initializeState() {
2820
2821
  super.initializeState();
2821
2822
  const binary = this.context.viewport.resolution !== void 0 ? false : this.props.binary;