@deck.gl/geo-layers 9.0.0-beta.7 → 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/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;