bruce-cesium 5.2.1 → 5.2.2

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.
@@ -12145,7 +12145,7 @@
12145
12145
  const minMax = exports.RenderManager.GetZoomMinMax({
12146
12146
  zoomControl: this.zoomControl
12147
12147
  });
12148
- this.getter.IncludeMenuItem(this.item.id, (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [], minMax[0], minMax[1]);
12148
+ this.getter.IncludeMenuItem(this.item.id, this.item.BruceEntity["EntityType.ID"], (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [], minMax[0], minMax[1]);
12149
12149
  this.getterSub = this.getter.OnUpdate.Subscribe((entities) => {
12150
12150
  if (isTagItem) {
12151
12151
  this.distributeForRender(entities.filter((entity) => {
@@ -14580,7 +14580,8 @@
14580
14580
  const RETRY_DELAY_INCREMENT = 500;
14581
14581
  const REQUEST_PAGE_DELAY = 50;
14582
14582
  class regMenuItemGetter {
14583
- constructor(tagIds, minHeight, maxHeight) {
14583
+ constructor(typeId, tagIds, minHeight, maxHeight) {
14584
+ this.TypeId = typeId;
14584
14585
  this.TagIds = tagIds;
14585
14586
  this.MinHeight = minHeight;
14586
14587
  this.MaxHeight = maxHeight;
@@ -14647,9 +14648,9 @@
14647
14648
  // We use this for refreshing historic data without having to repeat geographic queries.
14648
14649
  this.gatheredIntegrity = null;
14649
14650
  this.gatheredEntityIds = [];
14650
- const { api, viewer, viewPort, typeId, schemaId, batchSize, attrFilter, historicAttrKey, historicInterpolation, historic, viaCdn, scenario } = params;
14651
+ const { api, viewer, viewPort, typeIds, schemaId, batchSize, attrFilter, historicAttrKey, historicInterpolation, historic, viaCdn, scenario } = params;
14651
14652
  this.api = api;
14652
- this.typeId = typeId;
14653
+ this.typeIds = typeIds;
14653
14654
  this.schemaId = schemaId;
14654
14655
  this.historic = Boolean(historic);
14655
14656
  this.historicAttrKey = historicAttrKey;
@@ -14679,6 +14680,9 @@
14679
14680
  if (this.scenario) {
14680
14681
  integrity += this.scenario;
14681
14682
  }
14683
+ if (this.typeIds) {
14684
+ integrity += this.typeIds.join();
14685
+ }
14682
14686
  return integrity;
14683
14687
  }
14684
14688
  viewAreaSub() {
@@ -14776,8 +14780,8 @@
14776
14780
  GetMenuItems() {
14777
14781
  return Object.keys(this.registeredItems);
14778
14782
  }
14779
- IncludeMenuItem(menuItemId, layerIds, minHeight, maxHeight) {
14780
- this.registeredItems[menuItemId] = new regMenuItemGetter(layerIds, minHeight, maxHeight);
14783
+ IncludeMenuItem(menuItemId, typeId, layerIds, minHeight, maxHeight) {
14784
+ this.registeredItems[menuItemId] = new regMenuItemGetter(typeId, layerIds, minHeight, maxHeight);
14781
14785
  this.updateState();
14782
14786
  }
14783
14787
  ExcludeMenuItem(menuItemId) {
@@ -14801,6 +14805,7 @@
14801
14805
  }
14802
14806
  updateState() {
14803
14807
  const tagIds = [];
14808
+ const typeIds = [];
14804
14809
  const menuItemIds = this.GetMenuItems();
14805
14810
  let minHeight = null;
14806
14811
  let maxHeight = null;
@@ -14822,12 +14827,19 @@
14822
14827
  }
14823
14828
  }
14824
14829
  }
14830
+ const itemTypeId = menuItem.TypeId;
14831
+ if (itemTypeId) {
14832
+ if (!typeIds.includes(itemTypeId)) {
14833
+ typeIds.push(itemTypeId);
14834
+ }
14835
+ }
14825
14836
  }
14826
14837
  }
14827
14838
  if (menuItemIds.length > 0) {
14828
14839
  // Reset cells so none are marked as fetched.
14829
14840
  this.cells = new EntityGlobe.Grid();
14830
14841
  this.tagIds = tagIds;
14842
+ this.typeIds = typeIds;
14831
14843
  this.minHeight = minHeight;
14832
14844
  this.maxHeight = maxHeight;
14833
14845
  this.updateBounds();
@@ -14924,7 +14936,7 @@
14924
14936
  nextPage: false,
14925
14937
  nextPageUrl: null
14926
14938
  };
14927
- await exports.SharedGetters.Queue.Run("Loading Entities from Menu Item that loads Entity Type: " + this.typeId, async () => {
14939
+ await exports.SharedGetters.Queue.Run("Loading Entities from Menu Item that loads Entity Type: " + this.typeIds, async () => {
14928
14940
  var _a;
14929
14941
  if (abortController.signal.aborted || !((_a = this.GetMenuItems()) === null || _a === void 0 ? void 0 : _a.length)) {
14930
14942
  return;
@@ -14952,7 +14964,7 @@
14952
14964
  filter: {
14953
14965
  pageSize: PAGE_SIZE,
14954
14966
  pageIndex: curCell.FetchPageIndex,
14955
- entityTypeId: this.typeId,
14967
+ entityTypeId: this.typeIds,
14956
14968
  layerIds: this.tagIds,
14957
14969
  // Any tag specified will be allowed.
14958
14970
  layerIdsOperator: "in",
@@ -15097,7 +15109,7 @@
15097
15109
  // Controller we can use to abort the request when a new loop starts.
15098
15110
  const controller = this.historicRefreshAbortController = new AbortController();
15099
15111
  let entities = [];
15100
- await exports.SharedGetters.Queue.Run("Refreshing historic data in Menu Item that loads Entity Type: " + this.typeId, async () => {
15112
+ await exports.SharedGetters.Queue.Run("Refreshing historic data in Menu Item that loads Entity Type: " + this.typeIds, async () => {
15101
15113
  var _a;
15102
15114
  if (controller.signal.aborted || !((_a = this.GetMenuItems()) === null || _a === void 0 ? void 0 : _a.length)) {
15103
15115
  return;
@@ -15111,7 +15123,7 @@
15111
15123
  filter: {
15112
15124
  pageSize: batch.length,
15113
15125
  pageIndex: 0,
15114
- entityTypeId: this.typeId,
15126
+ entityTypeId: this.typeIds,
15115
15127
  layerIds: this.tagIds,
15116
15128
  layerIdsOperator: "in",
15117
15129
  sortOrder: BModels.Api.ESortOrder.Asc,
@@ -15167,7 +15179,9 @@
15167
15179
  function createFilterGetterCacheKey(params) {
15168
15180
  let cacheKey = "";
15169
15181
  cacheKey += params.api.GetBaseUrl();
15170
- cacheKey += params.typeId;
15182
+ // Not including Type ID in the cache key now.
15183
+ // This allows us to re-use the same getter between Entity Types.
15184
+ // cacheKey += params.typeId;
15171
15185
  cacheKey += params.batchSize;
15172
15186
  cacheKey += String(params.cdn);
15173
15187
  cacheKey += params.schemaId ? params.schemaId : "";
@@ -15196,7 +15210,7 @@
15196
15210
  api: params.api,
15197
15211
  viewer: params.viewer,
15198
15212
  viewPort: params.monitor,
15199
- typeId: params.typeId,
15213
+ typeIds: !params.typeId ? null : typeof params.typeId == "string" ? [params.typeId] : params.typeId,
15200
15214
  schemaId: params.schemaId,
15201
15215
  batchSize: params.batchSize,
15202
15216
  attrFilter: params.attrFilter,
@@ -29812,7 +29826,7 @@
29812
29826
  }
29813
29827
  }
29814
29828
 
29815
- const VERSION = "5.2.1";
29829
+ const VERSION = "5.2.2";
29816
29830
 
29817
29831
  exports.VERSION = VERSION;
29818
29832
  exports.isHistoricMetadataChanged = isHistoricMetadataChanged;