bruce-models 2.7.1 → 2.7.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.
@@ -7572,16 +7572,26 @@
7572
7572
  const maxLon = viewRect.east;
7573
7573
  const MAX_CELLS = 150;
7574
7574
  const cellDegreeSize = getCellSizeFromHeight(viewRect.alt);
7575
- const curMinLon = floorValueToCellSize(cellDegreeSize, minLon);
7576
- const curMinLat = floorValueToCellSize(cellDegreeSize, minLat);
7575
+ let curMinLon = floorValueToCellSize(cellDegreeSize, minLon);
7576
+ let curMinLat = floorValueToCellSize(cellDegreeSize, minLat);
7577
+ // For larger views we add additional padding because our view-area culling is too strong.
7578
+ if (cellDegreeSize >= 2) {
7579
+ curMinLon -= cellDegreeSize;
7580
+ curMinLat -= cellDegreeSize;
7581
+ }
7577
7582
  let centerX = cameraPos === null || cameraPos === void 0 ? void 0 : cameraPos.longitude;
7578
7583
  let centerY = cameraPos === null || cameraPos === void 0 ? void 0 : cameraPos.latitude;
7579
7584
  if (isNaN(centerX) || isNaN(centerY)) {
7580
7585
  centerX = (minLon + maxLon) / 2;
7581
7586
  centerY = (minLat + maxLat) / 2;
7582
7587
  }
7583
- const width = Math.ceil((maxLon - curMinLon) / cellDegreeSize);
7584
- const height = Math.ceil((maxLat - curMinLat) / cellDegreeSize);
7588
+ let width = Math.ceil((maxLon - curMinLon) / cellDegreeSize);
7589
+ let height = Math.ceil((maxLat - curMinLat) / cellDegreeSize);
7590
+ // For larger views we add additional padding because our view-area culling is too strong.
7591
+ if (cellDegreeSize >= 2) {
7592
+ width += 1;
7593
+ height += 1;
7594
+ }
7585
7595
  const cellDistances = [];
7586
7596
  for (let x = 0; x < width; x++) {
7587
7597
  for (let y = 0; y < height; y++) {
@@ -7642,7 +7652,13 @@
7642
7652
  else if (height < 500000) {
7643
7653
  return 1;
7644
7654
  }
7645
- return 1.5;
7655
+ else if (height < 1000000) {
7656
+ return 1.3;
7657
+ }
7658
+ else if (height < 1200000) {
7659
+ return 1.8;
7660
+ }
7661
+ return 4;
7646
7662
  }
7647
7663
  function isCellFetched(cell) {
7648
7664
  if (cell.Fetched) {
@@ -11687,7 +11703,7 @@
11687
11703
  DataSource.GetList = GetList;
11688
11704
  })(exports.DataSource || (exports.DataSource = {}));
11689
11705
 
11690
- const VERSION$1 = "2.7.1";
11706
+ const VERSION$1 = "2.7.3";
11691
11707
 
11692
11708
  exports.VERSION = VERSION$1;
11693
11709
  exports.AbstractApi = AbstractApi;