bruce-cesium 4.6.9 → 4.7.0

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, EntityAttribute, EntityAttachment, EntityAttachmentType, Session } 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, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, Entity, DistanceDisplayCondition, JulianDate, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, Quaternion, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -15015,12 +15015,13 @@ var TilesetRenderEngine;
15015
15015
  }
15016
15016
  TilesetRenderEngine.RenderLegacy = RenderLegacy;
15017
15017
  var Styler = /** @class */ (function () {
15018
- function Styler(viewer, api, cTileset, fallbackStyleId, styleMapping, menuItemId, register) {
15018
+ function Styler(viewer, api, cTileset, fallbackStyleId, styleMapping, expandSources, menuItemId, register) {
15019
15019
  var _a;
15020
15020
  this.disposed = false;
15021
15021
  this.styleMappingLoaded = false;
15022
15022
  this.styleMappingsLoaded = {};
15023
15023
  this.fallbackStyle = null;
15024
+ this.expandSources = false;
15024
15025
  this.loadingCounter = 0;
15025
15026
  // Dictionary of Entity ID -> boolean to indicate which Entities have been styled.
15026
15027
  // This is used to determine if the Style colour needs to be overriden or not.
@@ -15031,6 +15032,7 @@ var TilesetRenderEngine;
15031
15032
  this.viewer = viewer;
15032
15033
  this.api = api;
15033
15034
  this.cTileset = cTileset;
15035
+ this.expandSources = expandSources;
15034
15036
  this.fallbackStyleId = fallbackStyleId;
15035
15037
  this.styleMapping = styleMapping;
15036
15038
  if (styleMapping) {
@@ -15091,6 +15093,9 @@ var TilesetRenderEngine;
15091
15093
  else {
15092
15094
  this.fallbackStyle = null;
15093
15095
  }
15096
+ if (params.expandSources != null) {
15097
+ this.expandSources = params.expandSources;
15098
+ }
15094
15099
  // Empty queues.
15095
15100
  // Requeue all.
15096
15101
  this.recordLoadQueue = [];
@@ -15150,7 +15155,8 @@ var TilesetRenderEngine;
15150
15155
  return [4 /*yield*/, Entity$1.GetListByIds({
15151
15156
  api: this.api,
15152
15157
  entityIds: batch,
15153
- migrated: true
15158
+ migrated: true,
15159
+ expandSources: this.expandSources
15154
15160
  })];
15155
15161
  case 2:
15156
15162
  entities = (_c.sent()).entities;
@@ -15211,7 +15217,7 @@ var TilesetRenderEngine;
15211
15217
  });
15212
15218
  };
15213
15219
  Styler.prototype.getEntityIdsForQueue = function () {
15214
- var BATCH_SIZE = 500;
15220
+ var BATCH_SIZE = this.expandSources ? 200 : 500;
15215
15221
  return this.recordLoadQueue.splice(0, BATCH_SIZE);
15216
15222
  };
15217
15223
  Styler.prototype.getEntityRego = function (entityId) {
@@ -15740,12 +15746,13 @@ var TilesetCadRenderManager;
15740
15746
  }
15741
15747
  this.viewer.scene.requestRender();
15742
15748
  TilesetRenderEngine.OnTilesetReady(this.cTileset).then(function () {
15749
+ var _a;
15743
15750
  try {
15744
15751
  if (_this.disposed || cTileset.isDestroyed()) {
15745
15752
  return;
15746
15753
  }
15747
15754
  _this.onCTilesetLoad();
15748
- _this.styler = new TilesetRenderEngine.Styler(_this.viewer, api, _this.cTileset, _this.item.styleId, _this.item.StyleMapping, _this.item.id, _this.visualsManager);
15755
+ _this.styler = new TilesetRenderEngine.Styler(_this.viewer, api, _this.cTileset, _this.item.styleId, _this.item.StyleMapping, (_a = _this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.ExpandSources, _this.item.id, _this.visualsManager);
15749
15756
  _this.viewer.scene.requestRender();
15750
15757
  }
15751
15758
  catch (e) {
@@ -17604,7 +17611,7 @@ var TilesetEntitiesRenderManager;
17604
17611
  }
17605
17612
  if (_this.item.ApplyStyles) {
17606
17613
  var api_1 = _this.getters.GetBruceApi();
17607
- _this.styler = new TilesetRenderEngine.Styler(_this.viewer, api_1, _this.cTileset, +_this.item.styleId, [], _this.item.id, _this.visualsManager);
17614
+ _this.styler = new TilesetRenderEngine.Styler(_this.viewer, api_1, _this.cTileset, +_this.item.styleId, [], false, _this.item.id, _this.visualsManager);
17608
17615
  }
17609
17616
  _this.onCTilesetLoad();
17610
17617
  _this.viewer.scene.requestRender();
@@ -18273,7 +18280,7 @@ var TilesetArbRenderManager;
18273
18280
  if (_this.item.ApplyStyles ||
18274
18281
  _this.item.Type == MenuItem.EType.IonTileset) {
18275
18282
  var api = _this.getters.GetBruceApi();
18276
- _this.styler = new TilesetRenderEngine.Styler(_this.viewer, api, _this.cTileset, _this.item.styleId, _this.item.StyleMapping, _this.item.id, _this.visualsManager);
18283
+ _this.styler = new TilesetRenderEngine.Styler(_this.viewer, api, _this.cTileset, _this.item.styleId, _this.item.StyleMapping, false, _this.item.id, _this.visualsManager);
18277
18284
  }
18278
18285
  _this.onCTilesetLoad();
18279
18286
  _this.viewer.scene.requestRender();
@@ -25964,7 +25971,7 @@ var MARKER_ICON_SVG = "\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24
25964
25971
  var CLOSE_ICON_SVG = "\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M15.7909 12L21.4767 6.3142C22.1744 5.61648 22.1744 4.48523 21.4767 3.78693L20.2131 2.5233C19.5153 1.82557 18.3841 1.82557 17.6858 2.5233L12 8.20909L6.3142 2.5233C5.61648 1.82557 4.48523 1.82557 3.78693 2.5233L2.5233 3.78693C1.82557 4.48466 1.82557 5.61591 2.5233 6.3142L8.20909 12L2.5233 17.6858C1.82557 18.3835 1.82557 19.5148 2.5233 20.2131L3.78693 21.4767C4.48466 22.1744 5.61648 22.1744 6.3142 21.4767L12 15.7909L17.6858 21.4767C18.3835 22.1744 19.5153 22.1744 20.2131 21.4767L21.4767 20.2131C22.1744 19.5153 22.1744 18.3841 21.4767 17.6858L15.7909 12Z\" fill=\"black\"/>\n </svg>\n";
25965
25972
  function generateEle() {
25966
25973
  var ele = document.createElement("div");
25967
- ele.setAttribute("style", "\n left: 0px;\n top: 0px;\n position: absolute;\n z-index: 3;\n border-radius: 18px;\n background-color: white;\n display: flex;\n align-items: center;\n padding: 3px 4px;\n padding-right: 10px;\n font-size: 15px;\n pointer-events: none;\n box-shadow: 0px 0px 1px rgba(18, 22, 25, 0.24), 0px 18px 36px -4px rgba(18, 22, 25, 0.6);\n ");
25974
+ ele.setAttribute("style", "\n left: 0px;\n top: 0px;\n position: absolute;\n z-index: 3;\n border-radius: 18px;\n background-color: white;\n display: flex;\n align-items: center;\n padding: 3px 4px;\n padding-right: 10px;\n font-size: 15px;\n pointer-events: none;\n box-shadow: 0px 0px 1px rgba(18, 22, 25, 0.24), 0px 18px 36px -4px rgba(18, 22, 25, 0.6);\n color: black;\n ");
25968
25975
  var icon = document.createElement("div");
25969
25976
  icon.innerHTML = MARKER_ICON_SVG;
25970
25977
  icon.setAttribute("style", "\n margin-right: 2px;\n height: 30px;\n width: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n ");
@@ -28225,7 +28232,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
28225
28232
  return WidgetViewBar;
28226
28233
  }(Widget.AWidget));
28227
28234
 
28228
- var VERSION = "4.6.9";
28235
+ var VERSION = "4.7.0";
28229
28236
 
28230
28237
  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, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
28231
28238
  //# sourceMappingURL=bruce-cesium.es5.js.map