bruce-cesium 4.5.1 → 4.5.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.
@@ -1,6 +1,6 @@
1
- import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
1
+ import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttribute, EntityAttachment, EntityAttachmentType } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, DistanceDisplayCondition, PolygonHierarchy, ShadowMode, PolylineGraphics, ArcType, CornerType, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, PolygonPipeline, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, CzmlDataSource, Intersect } from 'cesium';
3
+ import { Cartographic, JulianDate, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5089,7 +5089,7 @@ function getName(api, entity) {
5089
5089
  }
5090
5090
  function getStyle(api, entity, styleId) {
5091
5091
  return __awaiter(this, void 0, void 0, function () {
5092
- var style, e_4, typeId, type, e_5, hideError, error, code;
5092
+ var style, e_4, typeId, type, e_5, hideError, error, code, e_6, hideError, error, code;
5093
5093
  return __generator(this, function (_a) {
5094
5094
  switch (_a.label) {
5095
5095
  case 0:
@@ -5110,27 +5110,30 @@ function getStyle(api, entity, styleId) {
5110
5110
  console.error(e_4);
5111
5111
  return [3 /*break*/, 4];
5112
5112
  case 4:
5113
- if (!!style) return [3 /*break*/, 9];
5113
+ if (!!style) return [3 /*break*/, 12];
5114
5114
  typeId = entity.Bruce["EntityType.ID"];
5115
- if (!typeId) return [3 /*break*/, 9];
5115
+ if (!typeId) return [3 /*break*/, 12];
5116
+ _a.label = 5;
5117
+ case 5:
5118
+ _a.trys.push([5, 11, , 12]);
5116
5119
  return [4 /*yield*/, EntityType.Get({
5117
5120
  api: api,
5118
5121
  entityTypeId: typeId
5119
5122
  })];
5120
- case 5:
5121
- type = (_a.sent()).entityType;
5122
- if (!type["DisplaySetting.ID"]) return [3 /*break*/, 9];
5123
- _a.label = 6;
5124
5123
  case 6:
5125
- _a.trys.push([6, 8, , 9]);
5124
+ type = (_a.sent()).entityType;
5125
+ if (!type["DisplaySetting.ID"]) return [3 /*break*/, 10];
5126
+ _a.label = 7;
5127
+ case 7:
5128
+ _a.trys.push([7, 9, , 10]);
5126
5129
  return [4 /*yield*/, Style.Get({
5127
5130
  api: api,
5128
5131
  styleId: type["DisplaySetting.ID"]
5129
5132
  })];
5130
- case 7:
5131
- style = (_a.sent()).style;
5132
- return [3 /*break*/, 9];
5133
5133
  case 8:
5134
+ style = (_a.sent()).style;
5135
+ return [3 /*break*/, 10];
5136
+ case 9:
5134
5137
  e_5 = _a.sent();
5135
5138
  hideError = false;
5136
5139
  // TODO: we need a util for extracting code + message rather than writing all this every time.
@@ -5144,8 +5147,24 @@ function getStyle(api, entity, styleId) {
5144
5147
  if (!hideError) {
5145
5148
  console.error(e_5);
5146
5149
  }
5147
- return [3 /*break*/, 9];
5148
- case 9: return [2 /*return*/, style];
5150
+ return [3 /*break*/, 10];
5151
+ case 10: return [3 /*break*/, 12];
5152
+ case 11:
5153
+ e_6 = _a.sent();
5154
+ hideError = false;
5155
+ // TODO: we need a util for extracting code + message rather than writing all this every time.
5156
+ if (e_6 && typeof e_6 == "object" && e_6.ERROR) {
5157
+ error = e_6.ERROR;
5158
+ code = error && typeof error == "object" ? error.Code : "";
5159
+ // Avoiding logging a common error.
5160
+ // This happens when rendering entities that don't have records.
5161
+ hideError = String(code).toLowerCase() == "notfound";
5162
+ }
5163
+ if (!hideError) {
5164
+ console.error(e_6);
5165
+ }
5166
+ return [3 /*break*/, 12];
5167
+ case 12: return [2 /*return*/, style];
5149
5168
  }
5150
5169
  });
5151
5170
  });
@@ -6727,7 +6746,7 @@ function getName$1(api, entity) {
6727
6746
  }
6728
6747
  function getStyle$1(api, entity, styleId) {
6729
6748
  return __awaiter(this, void 0, void 0, function () {
6730
- var style, e_3, typeId, type, e_4, hideError, error, code;
6749
+ var style, e_3, typeId, type, e_4, hideError, error, code, e_5, hideError, error, code;
6731
6750
  return __generator(this, function (_a) {
6732
6751
  switch (_a.label) {
6733
6752
  case 0:
@@ -6748,27 +6767,30 @@ function getStyle$1(api, entity, styleId) {
6748
6767
  console.error(e_3);
6749
6768
  return [3 /*break*/, 4];
6750
6769
  case 4:
6751
- if (!!style) return [3 /*break*/, 9];
6770
+ if (!!style) return [3 /*break*/, 12];
6752
6771
  typeId = entity.Bruce["EntityType.ID"];
6753
- if (!typeId) return [3 /*break*/, 9];
6772
+ if (!typeId) return [3 /*break*/, 12];
6773
+ _a.label = 5;
6774
+ case 5:
6775
+ _a.trys.push([5, 11, , 12]);
6754
6776
  return [4 /*yield*/, EntityType.Get({
6755
6777
  api: api,
6756
6778
  entityTypeId: typeId
6757
6779
  })];
6758
- case 5:
6759
- type = (_a.sent()).entityType;
6760
- if (!type["DisplaySetting.ID"]) return [3 /*break*/, 9];
6761
- _a.label = 6;
6762
6780
  case 6:
6763
- _a.trys.push([6, 8, , 9]);
6781
+ type = (_a.sent()).entityType;
6782
+ if (!type["DisplaySetting.ID"]) return [3 /*break*/, 10];
6783
+ _a.label = 7;
6784
+ case 7:
6785
+ _a.trys.push([7, 9, , 10]);
6764
6786
  return [4 /*yield*/, Style.Get({
6765
6787
  api: api,
6766
6788
  styleId: type["DisplaySetting.ID"]
6767
6789
  })];
6768
- case 7:
6769
- style = (_a.sent()).style;
6770
- return [3 /*break*/, 9];
6771
6790
  case 8:
6791
+ style = (_a.sent()).style;
6792
+ return [3 /*break*/, 10];
6793
+ case 9:
6772
6794
  e_4 = _a.sent();
6773
6795
  hideError = false;
6774
6796
  // TODO: we need a util for extracting code + message rather than writing all this every time.
@@ -6782,8 +6804,24 @@ function getStyle$1(api, entity, styleId) {
6782
6804
  if (!hideError) {
6783
6805
  console.error(e_4);
6784
6806
  }
6785
- return [3 /*break*/, 9];
6786
- case 9: return [2 /*return*/, style];
6807
+ return [3 /*break*/, 10];
6808
+ case 10: return [3 /*break*/, 12];
6809
+ case 11:
6810
+ e_5 = _a.sent();
6811
+ hideError = false;
6812
+ // TODO: we need a util for extracting code + message rather than writing all this every time.
6813
+ if (e_5 && typeof e_5 == "object" && e_5.ERROR) {
6814
+ error = e_5.ERROR;
6815
+ code = error && typeof error == "object" ? error.Code : "";
6816
+ // Avoiding logging a common error.
6817
+ // This happens when rendering entities that don't have records.
6818
+ hideError = String(code).toLowerCase() == "notfound";
6819
+ }
6820
+ if (!hideError) {
6821
+ console.error(e_5);
6822
+ }
6823
+ return [3 /*break*/, 12];
6824
+ case 12: return [2 /*return*/, style];
6787
6825
  }
6788
6826
  });
6789
6827
  });
@@ -7176,7 +7214,7 @@ function getName$2(api, entity) {
7176
7214
  }
7177
7215
  function getStyle$2(api, entity, styleId) {
7178
7216
  return __awaiter(this, void 0, void 0, function () {
7179
- var style, e_2, typeId, type, e_3, hideError, error, code;
7217
+ var style, e_2, typeId, type, e_3, hideError, error, code, e_4, hideError, error, code;
7180
7218
  return __generator(this, function (_a) {
7181
7219
  switch (_a.label) {
7182
7220
  case 0:
@@ -7197,27 +7235,30 @@ function getStyle$2(api, entity, styleId) {
7197
7235
  console.error(e_2);
7198
7236
  return [3 /*break*/, 4];
7199
7237
  case 4:
7200
- if (!!style) return [3 /*break*/, 9];
7238
+ if (!!style) return [3 /*break*/, 12];
7201
7239
  typeId = entity.Bruce["EntityType.ID"];
7202
- if (!typeId) return [3 /*break*/, 9];
7240
+ if (!typeId) return [3 /*break*/, 12];
7241
+ _a.label = 5;
7242
+ case 5:
7243
+ _a.trys.push([5, 11, , 12]);
7203
7244
  return [4 /*yield*/, EntityType.Get({
7204
7245
  api: api,
7205
7246
  entityTypeId: typeId
7206
7247
  })];
7207
- case 5:
7208
- type = (_a.sent()).entityType;
7209
- if (!type["DisplaySetting.ID"]) return [3 /*break*/, 9];
7210
- _a.label = 6;
7211
7248
  case 6:
7212
- _a.trys.push([6, 8, , 9]);
7249
+ type = (_a.sent()).entityType;
7250
+ if (!type["DisplaySetting.ID"]) return [3 /*break*/, 10];
7251
+ _a.label = 7;
7252
+ case 7:
7253
+ _a.trys.push([7, 9, , 10]);
7213
7254
  return [4 /*yield*/, Style.Get({
7214
7255
  api: api,
7215
7256
  styleId: type["DisplaySetting.ID"]
7216
7257
  })];
7217
- case 7:
7218
- style = (_a.sent()).style;
7219
- return [3 /*break*/, 9];
7220
7258
  case 8:
7259
+ style = (_a.sent()).style;
7260
+ return [3 /*break*/, 10];
7261
+ case 9:
7221
7262
  e_3 = _a.sent();
7222
7263
  hideError = false;
7223
7264
  // TODO: we need a util for extracting code + message rather than writing all this every time.
@@ -7231,8 +7272,24 @@ function getStyle$2(api, entity, styleId) {
7231
7272
  if (!hideError) {
7232
7273
  console.error(e_3);
7233
7274
  }
7234
- return [3 /*break*/, 9];
7235
- case 9: return [2 /*return*/, style];
7275
+ return [3 /*break*/, 10];
7276
+ case 10: return [3 /*break*/, 12];
7277
+ case 11:
7278
+ e_4 = _a.sent();
7279
+ hideError = false;
7280
+ // TODO: we need a util for extracting code + message rather than writing all this every time.
7281
+ if (e_4 && typeof e_4 == "object" && e_4.ERROR) {
7282
+ error = e_4.ERROR;
7283
+ code = error && typeof error == "object" ? error.Code : "";
7284
+ // Avoiding logging a common error.
7285
+ // This happens when rendering entities that don't have records.
7286
+ hideError = String(code).toLowerCase() == "notfound";
7287
+ }
7288
+ if (!hideError) {
7289
+ console.error(e_4);
7290
+ }
7291
+ return [3 /*break*/, 12];
7292
+ case 12: return [2 /*return*/, style];
7236
7293
  }
7237
7294
  });
7238
7295
  });
@@ -7685,7 +7742,7 @@ function getName$3(api, entity) {
7685
7742
  }
7686
7743
  function getStyle$3(api, entity, styleId) {
7687
7744
  return __awaiter(this, void 0, void 0, function () {
7688
- var style, e_2, typeId, type, e_3, hideError, error, code;
7745
+ var style, e_2, typeId, type, e_3, hideError, error, code, e_4, hideError, error, code;
7689
7746
  return __generator(this, function (_a) {
7690
7747
  switch (_a.label) {
7691
7748
  case 0:
@@ -7706,27 +7763,30 @@ function getStyle$3(api, entity, styleId) {
7706
7763
  console.error(e_2);
7707
7764
  return [3 /*break*/, 4];
7708
7765
  case 4:
7709
- if (!!style) return [3 /*break*/, 9];
7766
+ if (!!style) return [3 /*break*/, 12];
7710
7767
  typeId = entity.Bruce["EntityType.ID"];
7711
- if (!typeId) return [3 /*break*/, 9];
7768
+ if (!typeId) return [3 /*break*/, 12];
7769
+ _a.label = 5;
7770
+ case 5:
7771
+ _a.trys.push([5, 11, , 12]);
7712
7772
  return [4 /*yield*/, EntityType.Get({
7713
7773
  api: api,
7714
7774
  entityTypeId: typeId
7715
7775
  })];
7716
- case 5:
7717
- type = (_a.sent()).entityType;
7718
- if (!type["DisplaySetting.ID"]) return [3 /*break*/, 9];
7719
- _a.label = 6;
7720
7776
  case 6:
7721
- _a.trys.push([6, 8, , 9]);
7777
+ type = (_a.sent()).entityType;
7778
+ if (!type["DisplaySetting.ID"]) return [3 /*break*/, 10];
7779
+ _a.label = 7;
7780
+ case 7:
7781
+ _a.trys.push([7, 9, , 10]);
7722
7782
  return [4 /*yield*/, Style.Get({
7723
7783
  api: api,
7724
7784
  styleId: type["DisplaySetting.ID"]
7725
7785
  })];
7726
- case 7:
7727
- style = (_a.sent()).style;
7728
- return [3 /*break*/, 9];
7729
7786
  case 8:
7787
+ style = (_a.sent()).style;
7788
+ return [3 /*break*/, 10];
7789
+ case 9:
7730
7790
  e_3 = _a.sent();
7731
7791
  hideError = false;
7732
7792
  // TODO: we need a util for extracting code + message rather than writing all this every time.
@@ -7740,8 +7800,24 @@ function getStyle$3(api, entity, styleId) {
7740
7800
  if (!hideError) {
7741
7801
  console.error(e_3);
7742
7802
  }
7743
- return [3 /*break*/, 9];
7744
- case 9: return [2 /*return*/, style];
7803
+ return [3 /*break*/, 10];
7804
+ case 10: return [3 /*break*/, 12];
7805
+ case 11:
7806
+ e_4 = _a.sent();
7807
+ hideError = false;
7808
+ // TODO: we need a util for extracting code + message rather than writing all this every time.
7809
+ if (e_4 && typeof e_4 == "object" && e_4.ERROR) {
7810
+ error = e_4.ERROR;
7811
+ code = error && typeof error == "object" ? error.Code : "";
7812
+ // Avoiding logging a common error.
7813
+ // This happens when rendering entities that don't have records.
7814
+ hideError = String(code).toLowerCase() == "notfound";
7815
+ }
7816
+ if (!hideError) {
7817
+ console.error(e_4);
7818
+ }
7819
+ return [3 /*break*/, 12];
7820
+ case 12: return [2 /*return*/, style];
7745
7821
  }
7746
7822
  });
7747
7823
  });
@@ -27363,7 +27439,7 @@ var ViewerUtils;
27363
27439
  ViewerUtils.GetEventTracker = GetEventTracker;
27364
27440
  })(ViewerUtils || (ViewerUtils = {}));
27365
27441
 
27366
- var VERSION = "4.5.1";
27442
+ var VERSION = "4.5.2";
27367
27443
 
27368
27444
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, WidgetSearchBar, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
27369
27445
  //# sourceMappingURL=bruce-cesium.es5.js.map