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.
- package/dist/bruce-models.es5.js +22 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +22 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/getters/entity-globe.js +21 -5
- package/dist/lib/entity/getters/entity-globe.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/menu-item.d.ts +6 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -7572,16 +7572,26 @@
|
|
|
7572
7572
|
const maxLon = viewRect.east;
|
|
7573
7573
|
const MAX_CELLS = 150;
|
|
7574
7574
|
const cellDegreeSize = getCellSizeFromHeight(viewRect.alt);
|
|
7575
|
-
|
|
7576
|
-
|
|
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
|
-
|
|
7584
|
-
|
|
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
|
-
|
|
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.
|
|
11706
|
+
const VERSION$1 = "2.7.3";
|
|
11691
11707
|
|
|
11692
11708
|
exports.VERSION = VERSION$1;
|
|
11693
11709
|
exports.AbstractApi = AbstractApi;
|