bruce-cesium 3.8.6 → 3.8.7
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-cesium.es5.js +49 -33
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +48 -32
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js +2 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js +11 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +34 -29
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/getters/entity-filter-getter.d.ts +10 -1
- package/dist/types/rendering/render-managers/common/shared-getters.d.ts +1 -0
- package/dist/types/rendering/visuals-register.d.ts +1 -0
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityHistoricData, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, CesiumInspector, ClockRange, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10312,7 +10312,7 @@ var EntitiesRenderManager;
|
|
|
10312
10312
|
};
|
|
10313
10313
|
Manager.prototype.setGetter = function () {
|
|
10314
10314
|
var _this = this;
|
|
10315
|
-
var _a;
|
|
10315
|
+
var _a, _b;
|
|
10316
10316
|
this.unsetGetter();
|
|
10317
10317
|
var isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
|
|
10318
10318
|
var tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
|
|
@@ -10332,7 +10332,8 @@ var EntitiesRenderManager;
|
|
|
10332
10332
|
tagIds: (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [],
|
|
10333
10333
|
debugShowBounds: Boolean(window === null || window === void 0 ? void 0 : window.ENTITIES_RENDER_MANAGER_SHOW_BOUNDS),
|
|
10334
10334
|
cdn: this.item.cdnEnabled,
|
|
10335
|
-
historicAttrKey: this.item.BruceEntity.historicAttrKey
|
|
10335
|
+
historicAttrKey: this.item.BruceEntity.historicAttrKey,
|
|
10336
|
+
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId
|
|
10336
10337
|
});
|
|
10337
10338
|
var minMax = RenderManager.GetZoomMinMax({
|
|
10338
10339
|
zoomControl: this.item.CameraZoomSettings
|
|
@@ -10388,11 +10389,11 @@ var EntitiesRenderManager;
|
|
|
10388
10389
|
this.sources = [];
|
|
10389
10390
|
};
|
|
10390
10391
|
Manager.prototype.ReRender = function (params) {
|
|
10391
|
-
var _a;
|
|
10392
|
+
var _a, _b;
|
|
10392
10393
|
return __awaiter(this, void 0, void 0, function () {
|
|
10393
10394
|
var entityIds, force, entities, data, e_1;
|
|
10394
|
-
return __generator(this, function (
|
|
10395
|
-
switch (
|
|
10395
|
+
return __generator(this, function (_c) {
|
|
10396
|
+
switch (_c.label) {
|
|
10396
10397
|
case 0:
|
|
10397
10398
|
entityIds = params.entityIds, force = params.force, entities = params.entities;
|
|
10398
10399
|
if (entities && !entityIds) {
|
|
@@ -10413,19 +10414,20 @@ var EntitiesRenderManager;
|
|
|
10413
10414
|
this.renderEntities(entities, true);
|
|
10414
10415
|
return [3 /*break*/, 4];
|
|
10415
10416
|
case 1:
|
|
10416
|
-
|
|
10417
|
+
_c.trys.push([1, 3, , 4]);
|
|
10417
10418
|
return [4 /*yield*/, Entity$1.GetListByIds({
|
|
10418
10419
|
api: this.apiGetter.getApi(),
|
|
10419
10420
|
entityIds: entityIds,
|
|
10420
10421
|
historicKey: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey,
|
|
10421
|
-
historicPoint: this.viewer.clock.currentTime.toString()
|
|
10422
|
+
historicPoint: this.viewer.clock.currentTime.toString(),
|
|
10423
|
+
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId
|
|
10422
10424
|
})];
|
|
10423
10425
|
case 2:
|
|
10424
|
-
data =
|
|
10426
|
+
data = _c.sent();
|
|
10425
10427
|
this.renderEntities(data.entities, true);
|
|
10426
10428
|
return [3 /*break*/, 4];
|
|
10427
10429
|
case 3:
|
|
10428
|
-
e_1 =
|
|
10430
|
+
e_1 = _c.sent();
|
|
10429
10431
|
console.error(e_1);
|
|
10430
10432
|
return [3 /*break*/, 4];
|
|
10431
10433
|
case 4: return [3 /*break*/, 8];
|
|
@@ -10435,8 +10437,8 @@ var EntitiesRenderManager;
|
|
|
10435
10437
|
return [3 /*break*/, 8];
|
|
10436
10438
|
case 6: return [4 /*yield*/, this.doEntityCheck(entityIds)];
|
|
10437
10439
|
case 7:
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
+
_c.sent();
|
|
10441
|
+
_c.label = 8;
|
|
10440
10442
|
case 8: return [2 /*return*/];
|
|
10441
10443
|
}
|
|
10442
10444
|
});
|
|
@@ -10492,19 +10494,20 @@ var EntitiesRenderManager;
|
|
|
10492
10494
|
if (!(ids.length > 0)) return [3 /*break*/, 4];
|
|
10493
10495
|
checkBatch = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
10494
10496
|
var entityIds, entities;
|
|
10495
|
-
var _a;
|
|
10496
|
-
return __generator(this, function (
|
|
10497
|
-
switch (
|
|
10497
|
+
var _a, _b;
|
|
10498
|
+
return __generator(this, function (_c) {
|
|
10499
|
+
switch (_c.label) {
|
|
10498
10500
|
case 0:
|
|
10499
10501
|
entityIds = ids.splice(0, CHECK_BATCH_SIZE);
|
|
10500
10502
|
return [4 /*yield*/, Entity$1.GetListByIds({
|
|
10501
10503
|
api: api,
|
|
10502
10504
|
entityIds: entityIds,
|
|
10503
10505
|
historicKey: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey,
|
|
10504
|
-
historicPoint: this.viewer.clock.currentTime.toString()
|
|
10506
|
+
historicPoint: this.viewer.clock.currentTime.toString(),
|
|
10507
|
+
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId
|
|
10505
10508
|
})];
|
|
10506
10509
|
case 1:
|
|
10507
|
-
entities = (
|
|
10510
|
+
entities = (_c.sent()).entities;
|
|
10508
10511
|
if (this.disposed) {
|
|
10509
10512
|
return [2 /*return*/];
|
|
10510
10513
|
}
|
|
@@ -10900,12 +10903,12 @@ var EntitiesRenderManager;
|
|
|
10900
10903
|
* @returns
|
|
10901
10904
|
*/
|
|
10902
10905
|
Manager.prototype.renderAsIndividuals = function (entities, force) {
|
|
10903
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
10906
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
10904
10907
|
if (force === void 0) { force = false; }
|
|
10905
10908
|
return __awaiter(this, void 0, void 0, function () {
|
|
10906
|
-
var entitiesHistoric, toRemove, i, entity, startTmp, stopTmp, startStr, stopStr, historicData,
|
|
10907
|
-
return __generator(this, function (
|
|
10908
|
-
switch (
|
|
10909
|
+
var entitiesHistoric, toRemove, i, entity, startTmp, stopTmp, startStr, stopStr, historicData, _m, updated, cEntities, i, entity, id, cEntity, rego, visual, wasClustered, tagIds, rego_1;
|
|
10910
|
+
return __generator(this, function (_o) {
|
|
10911
|
+
switch (_o.label) {
|
|
10909
10912
|
case 0:
|
|
10910
10913
|
entitiesHistoric = {};
|
|
10911
10914
|
if (!((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey)) return [3 /*break*/, 2];
|
|
@@ -10934,13 +10937,13 @@ var EntitiesRenderManager;
|
|
|
10934
10937
|
api: this.apiGetter.getApi()
|
|
10935
10938
|
})];
|
|
10936
10939
|
case 1:
|
|
10937
|
-
historicData =
|
|
10940
|
+
historicData = _o.sent();
|
|
10938
10941
|
if (this.disposed) {
|
|
10939
10942
|
this.doDispose();
|
|
10940
10943
|
return [2 /*return*/];
|
|
10941
10944
|
}
|
|
10942
10945
|
entitiesHistoric = historicData.recordsByIds;
|
|
10943
|
-
|
|
10946
|
+
_o.label = 2;
|
|
10944
10947
|
case 2: return [4 /*yield*/, EntityRenderEngine.Render({
|
|
10945
10948
|
viewer: this.viewer,
|
|
10946
10949
|
apiGetter: this.apiGetter,
|
|
@@ -10952,7 +10955,7 @@ var EntitiesRenderManager;
|
|
|
10952
10955
|
force: force
|
|
10953
10956
|
})];
|
|
10954
10957
|
case 3:
|
|
10955
|
-
|
|
10958
|
+
_m = _o.sent(), updated = _m.updated, cEntities = _m.entities;
|
|
10956
10959
|
if (this.disposed) {
|
|
10957
10960
|
this.doDispose();
|
|
10958
10961
|
return [2 /*return*/];
|
|
@@ -10973,6 +10976,7 @@ var EntitiesRenderManager;
|
|
|
10973
10976
|
tagIds = (_c = entity.Bruce) === null || _c === void 0 ? void 0 : _c["Layer.ID"];
|
|
10974
10977
|
rego_1 = {
|
|
10975
10978
|
entityId: id,
|
|
10979
|
+
schemaId: (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.schemaId,
|
|
10976
10980
|
menuItemId: this.item.id,
|
|
10977
10981
|
visual: cEntity,
|
|
10978
10982
|
priority: 0,
|
|
@@ -10982,8 +10986,8 @@ var EntitiesRenderManager;
|
|
|
10982
10986
|
overrideShow: wasClustered ? false : null,
|
|
10983
10987
|
name: cEntity.name,
|
|
10984
10988
|
cdn: this.item.cdnEnabled,
|
|
10985
|
-
historicDateTime: (
|
|
10986
|
-
historicAttrKey: (
|
|
10989
|
+
historicDateTime: (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.historicDateTime,
|
|
10990
|
+
historicAttrKey: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.historicAttrKey
|
|
10987
10991
|
};
|
|
10988
10992
|
this.visualsManager.AddRego({
|
|
10989
10993
|
rego: rego_1,
|
|
@@ -10994,10 +10998,11 @@ var EntitiesRenderManager;
|
|
|
10994
10998
|
rego.name = cEntity.name;
|
|
10995
10999
|
rego.visual = cEntity;
|
|
10996
11000
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
10997
|
-
rego.tagIds = ((
|
|
10998
|
-
rego.historicDateTime = (
|
|
10999
|
-
rego.historicAttrKey = (
|
|
11001
|
+
rego.tagIds = ((_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
|
|
11002
|
+
rego.historicDateTime = (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.historicDateTime;
|
|
11003
|
+
rego.historicAttrKey = (_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j.historicAttrKey;
|
|
11000
11004
|
rego.cdn = this.item.cdnEnabled;
|
|
11005
|
+
rego.schemaId = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.schemaId;
|
|
11001
11006
|
// We manually trigger an update event since the graphic was updated but not recreated.
|
|
11002
11007
|
this.visualsManager.OnUpdate.Trigger({
|
|
11003
11008
|
type: VisualsRegister.EVisualUpdateType.Update,
|
|
@@ -11012,7 +11017,7 @@ var EntitiesRenderManager;
|
|
|
11012
11017
|
menuItemId: this.item.id,
|
|
11013
11018
|
requestRender: false
|
|
11014
11019
|
});
|
|
11015
|
-
(
|
|
11020
|
+
(_l = this.clustering) === null || _l === void 0 ? void 0 : _l.RemoveEntity(id, false);
|
|
11016
11021
|
}
|
|
11017
11022
|
}
|
|
11018
11023
|
this.viewer.scene.requestRender();
|
|
@@ -14268,7 +14273,7 @@ var EntityFilterGetter;
|
|
|
14268
14273
|
EStatus["Loading"] = "LOADING";
|
|
14269
14274
|
})(EStatus = EntityFilterGetter.EStatus || (EntityFilterGetter.EStatus = {}));
|
|
14270
14275
|
var Getter = /** @class */ (function () {
|
|
14271
|
-
function Getter(
|
|
14276
|
+
function Getter(params) {
|
|
14272
14277
|
this.onUpdate = null;
|
|
14273
14278
|
this.LastStateUpdates = {};
|
|
14274
14279
|
this.onStateUpdate = null;
|
|
@@ -14283,6 +14288,7 @@ var EntityFilterGetter;
|
|
|
14283
14288
|
this.maxHeight = 100000;
|
|
14284
14289
|
this.viewRect = null;
|
|
14285
14290
|
this.viewCenter = null;
|
|
14291
|
+
var api = params.api, viewer = params.viewer, viewPort = params.viewPort, typeId = params.typeId, batchSize = params.batchSize, attrFilter = params.attrFilter, historicAttrKey = params.historicAttrKey, viaCdn = params.viaCdn;
|
|
14286
14292
|
this.api = api;
|
|
14287
14293
|
this.typeId = typeId;
|
|
14288
14294
|
this.historicAttrKey = historicAttrKey;
|
|
@@ -14674,6 +14680,7 @@ function createFilterGetterCacheKey(params) {
|
|
|
14674
14680
|
cacheKey += params.typeId;
|
|
14675
14681
|
cacheKey += params.batchSize;
|
|
14676
14682
|
cacheKey += String(params.cdn);
|
|
14683
|
+
cacheKey += params.schemaId ? params.schemaId : "";
|
|
14677
14684
|
cacheKey += JSON.stringify(params.tagIds ? params.tagIds : []);
|
|
14678
14685
|
cacheKey += params.historicAttrKey ? params.historicAttrKey : "";
|
|
14679
14686
|
// This could potentially crash, but if it crashes here then it would crash during API request anyways.
|
|
@@ -14691,7 +14698,16 @@ var SharedGetters;
|
|
|
14691
14698
|
var cacheKey = createFilterGetterCacheKey(params);
|
|
14692
14699
|
var getter = this.data[cacheKey];
|
|
14693
14700
|
if (!getter) {
|
|
14694
|
-
getter = new EntityFilterGetter.Getter(
|
|
14701
|
+
getter = new EntityFilterGetter.Getter({
|
|
14702
|
+
api: params.api,
|
|
14703
|
+
viewer: params.viewer,
|
|
14704
|
+
viewPort: params.monitor,
|
|
14705
|
+
typeId: params.typeId,
|
|
14706
|
+
batchSize: params.batchSize,
|
|
14707
|
+
attrFilter: params.attrFilter,
|
|
14708
|
+
historicAttrKey: params.historicAttrKey,
|
|
14709
|
+
viaCdn: params.cdn
|
|
14710
|
+
});
|
|
14695
14711
|
this.data[cacheKey] = getter;
|
|
14696
14712
|
/**
|
|
14697
14713
|
* Debug option.
|
|
@@ -24101,7 +24117,7 @@ var ViewRenderEngine;
|
|
|
24101
24117
|
ViewRenderEngine.Render = Render;
|
|
24102
24118
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
24103
24119
|
|
|
24104
|
-
var VERSION = "3.8.
|
|
24120
|
+
var VERSION = "3.8.7";
|
|
24105
24121
|
|
|
24106
24122
|
export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, Draw3dPolygon, Draw3dPolyline };
|
|
24107
24123
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|