@dra2020/baseclient 1.0.2 → 1.0.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.
@@ -1468,11 +1468,31 @@ class GeoMultiCollection {
1468
1468
  });
1469
1469
  return found;
1470
1470
  }
1471
- forEach(cb) {
1471
+ nthFilteredFeature(n, cb) {
1472
+ let found;
1472
1473
  this.forEachEntry(e => {
1474
+ if (found)
1475
+ return;
1473
1476
  let col = this._col(e);
1474
1477
  if (col)
1475
- col.features.forEach(f => { if (this.hidden[f.properties.id] === undefined)
1478
+ for (let i = 0; !found && i < col.features.length; i++) {
1479
+ let f = col.features[i];
1480
+ if (this.hidden[f.properties.id] === undefined && cb(f)) {
1481
+ if (n === 0) {
1482
+ found = f;
1483
+ break;
1484
+ }
1485
+ n--;
1486
+ }
1487
+ }
1488
+ });
1489
+ return found;
1490
+ }
1491
+ forEach(cb) {
1492
+ this.forEachEntry(e => {
1493
+ let col = this._col(e);
1494
+ if (e.col)
1495
+ e.col.features.forEach(f => { if (this.hidden[f.properties.id] === undefined)
1476
1496
  cb(f); });
1477
1497
  });
1478
1498
  }