bruce-cesium 4.7.6 → 4.7.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 +165 -75
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +163 -73
- 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 +8 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js +1 -0
- package/dist/lib/rendering/render-managers/common/shared-getters.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +35 -21
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js +17 -2
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +13 -3
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js +11 -2
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +77 -43
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/getters/entity-filter-getter.d.ts +2 -0
- package/dist/types/rendering/render-managers/common/shared-getters.d.ts +1 -0
- package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +3 -0
- package/dist/types/rendering/tileset-render-engine.d.ts +15 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -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, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile,
|
|
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, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, 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,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, GeoJsonDataSource, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, Matrix4, Matrix3, IonResource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -11968,6 +11968,10 @@ var EntitiesRenderManager;
|
|
|
11968
11968
|
// Highly experimental flag to try improve rendering large sets of polygons and polylines.
|
|
11969
11969
|
// Many things are not supported when this is enabled.
|
|
11970
11970
|
this.useGeojson = false;
|
|
11971
|
+
// Zoom control to reference.
|
|
11972
|
+
this.zoomControl = [];
|
|
11973
|
+
// Scenario for retrieving Entities.
|
|
11974
|
+
this.scenario = null;
|
|
11971
11975
|
var viewer = params.viewer, apiGetter = params.apiGetter, monitor = params.monitor, item = params.item, visualsManager = params.register, sharedGetters = params.sharedGetters;
|
|
11972
11976
|
this.viewer = viewer;
|
|
11973
11977
|
this.sharedGetters = sharedGetters;
|
|
@@ -11989,15 +11993,16 @@ var EntitiesRenderManager;
|
|
|
11989
11993
|
});
|
|
11990
11994
|
Manager.prototype.Init = function (params) {
|
|
11991
11995
|
var _this = this;
|
|
11992
|
-
var _a, _b, _c, _d, _e, _f;
|
|
11996
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
11993
11997
|
if (this.disposed) {
|
|
11994
11998
|
throw (new Error("This item is disposed."));
|
|
11995
11999
|
}
|
|
11996
12000
|
if (params === null || params === void 0 ? void 0 : params.item) {
|
|
11997
12001
|
this.item = params.item;
|
|
11998
12002
|
}
|
|
11999
|
-
|
|
12000
|
-
|
|
12003
|
+
this.zoomControl = this.item.CameraZoomSettings;
|
|
12004
|
+
if (!((_a = this.zoomControl) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
12005
|
+
this.zoomControl = [
|
|
12001
12006
|
{
|
|
12002
12007
|
MinZoom: 0,
|
|
12003
12008
|
MaxZoom: 200000,
|
|
@@ -12008,10 +12013,11 @@ var EntitiesRenderManager;
|
|
|
12008
12013
|
}
|
|
12009
12014
|
];
|
|
12010
12015
|
}
|
|
12011
|
-
if (this.useGeojson && this.
|
|
12016
|
+
if (this.useGeojson && this.zoomControl.length > 1) {
|
|
12012
12017
|
console.warn("Geojson rendering does not support multiple zoom controls. Only the first one will be used.");
|
|
12013
|
-
this.
|
|
12018
|
+
this.zoomControl = [this.zoomControl[0]];
|
|
12014
12019
|
}
|
|
12020
|
+
this.scenario = (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b["Scenario.ID"];
|
|
12015
12021
|
var isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
|
|
12016
12022
|
var tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
|
|
12017
12023
|
if (!tagsToRender) {
|
|
@@ -12020,9 +12026,9 @@ var EntitiesRenderManager;
|
|
|
12020
12026
|
tagsToRender = [].concat(tagsToRender);
|
|
12021
12027
|
var shouldRender = !isTagItem || tagsToRender.length > 0;
|
|
12022
12028
|
this.unsetGetter();
|
|
12023
|
-
(
|
|
12029
|
+
(_c = this.viewMonitorRemoval) === null || _c === void 0 ? void 0 : _c.call(this);
|
|
12024
12030
|
this.viewMonitorRemoval = null;
|
|
12025
|
-
(
|
|
12031
|
+
(_d = this.entityCheckQueue) === null || _d === void 0 ? void 0 : _d.Dispose();
|
|
12026
12032
|
this.entityCheckQueue = null;
|
|
12027
12033
|
clearInterval(this.renderQueueInterval);
|
|
12028
12034
|
this.renderQueueInterval = null;
|
|
@@ -12034,27 +12040,26 @@ var EntitiesRenderManager;
|
|
|
12034
12040
|
menuItemId: this.item.id,
|
|
12035
12041
|
retainTagIds: tagsToRender
|
|
12036
12042
|
});
|
|
12037
|
-
(
|
|
12043
|
+
(_e = this.clustering) === null || _e === void 0 ? void 0 : _e.Dispose();
|
|
12038
12044
|
}
|
|
12039
12045
|
else {
|
|
12040
12046
|
this.visualsManager.RemoveRegos({
|
|
12041
12047
|
menuItemId: this.item.id
|
|
12042
12048
|
});
|
|
12043
|
-
(
|
|
12049
|
+
(_f = this.clustering) === null || _f === void 0 ? void 0 : _f.Dispose();
|
|
12044
12050
|
return;
|
|
12045
12051
|
}
|
|
12046
12052
|
if (this.item.enableClustering) {
|
|
12047
|
-
this.clustering = new PointClustering(this.visualsManager, this.item.id, (
|
|
12053
|
+
this.clustering = new PointClustering(this.visualsManager, this.item.id, (_g = this.item) === null || _g === void 0 ? void 0 : _g.clustering);
|
|
12048
12054
|
}
|
|
12049
12055
|
this.setGetter();
|
|
12050
12056
|
this.viewMonitorRemoval = this.monitor.Updated().Subscribe(function () {
|
|
12051
12057
|
_this.entityCheckQueue.Call();
|
|
12052
12058
|
});
|
|
12053
12059
|
this.entityCheckQueue = new DelayQueue(function () {
|
|
12054
|
-
var _a;
|
|
12055
12060
|
// Don't bother checking for zoom control changes if we only have 1 item.
|
|
12056
12061
|
// We'll let Cesium handle hide/show at max zoom range.
|
|
12057
|
-
var shouldCheck =
|
|
12062
|
+
var shouldCheck = _this.zoomControl && _this.zoomControl.length > 1;
|
|
12058
12063
|
if (shouldCheck) {
|
|
12059
12064
|
_this.doEntityCheck(Object.keys(_this.renderedEntities));
|
|
12060
12065
|
}
|
|
@@ -12084,10 +12089,11 @@ var EntitiesRenderManager;
|
|
|
12084
12089
|
cdn: this.item.cdnEnabled,
|
|
12085
12090
|
historicAttrKey: this.item.BruceEntity.historicAttrKey,
|
|
12086
12091
|
historicInterpolation: this.item.historicInterpolation,
|
|
12087
|
-
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId
|
|
12092
|
+
schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId,
|
|
12093
|
+
scenario: this.scenario
|
|
12088
12094
|
});
|
|
12089
12095
|
var minMax = RenderManager.GetZoomMinMax({
|
|
12090
|
-
zoomControl: this.
|
|
12096
|
+
zoomControl: this.zoomControl
|
|
12091
12097
|
});
|
|
12092
12098
|
this.getter.IncludeMenuItem(this.item.id, (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [], minMax[0], minMax[1]);
|
|
12093
12099
|
this.getterSub = this.getter.OnUpdate.Subscribe(function (entities) {
|
|
@@ -12197,16 +12203,24 @@ var EntitiesRenderManager;
|
|
|
12197
12203
|
});
|
|
12198
12204
|
};
|
|
12199
12205
|
Manager.prototype.UpdateSettings = function (params) {
|
|
12200
|
-
var CameraZoomSettings = params.zoomControl, queueRerender = params.queueRerender;
|
|
12206
|
+
var CameraZoomSettings = params.zoomControl, queueRerender = params.queueRerender, scenario = params.scenario;
|
|
12201
12207
|
if (this.disposed) {
|
|
12202
12208
|
return;
|
|
12203
12209
|
}
|
|
12210
|
+
var changed = false;
|
|
12204
12211
|
if (CameraZoomSettings === null || CameraZoomSettings === void 0 ? void 0 : CameraZoomSettings.length) {
|
|
12205
|
-
this.
|
|
12206
|
-
if (this.renderAsGeojson && this.
|
|
12212
|
+
this.zoomControl = CameraZoomSettings;
|
|
12213
|
+
if (this.renderAsGeojson && this.zoomControl.length > 1) {
|
|
12207
12214
|
console.warn("Geojson rendering does not support multiple zoom controls. Only the first one will be used.");
|
|
12208
|
-
this.
|
|
12215
|
+
this.zoomControl = [this.zoomControl[0]];
|
|
12209
12216
|
}
|
|
12217
|
+
changed = true;
|
|
12218
|
+
}
|
|
12219
|
+
if (scenario != null) {
|
|
12220
|
+
this.scenario = scenario;
|
|
12221
|
+
changed = true;
|
|
12222
|
+
}
|
|
12223
|
+
if (changed) {
|
|
12210
12224
|
this.setGetter();
|
|
12211
12225
|
}
|
|
12212
12226
|
if (queueRerender != false) {
|
|
@@ -12319,7 +12333,7 @@ var EntitiesRenderManager;
|
|
|
12319
12333
|
entities = entities.filter(function (x) { var _a; return ((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a["EntityType.ID"]) == typeId_1; });
|
|
12320
12334
|
}
|
|
12321
12335
|
if (!this.useGeojson) return [3 /*break*/, 5];
|
|
12322
|
-
zoomItem = this.
|
|
12336
|
+
zoomItem = this.zoomControl[0];
|
|
12323
12337
|
if (!(zoomItem.DisplayType == ZoomControl.EDisplayType.Point)) return [3 /*break*/, 2];
|
|
12324
12338
|
// We'll just render these as individuals since we don't support point geojson.
|
|
12325
12339
|
return [4 /*yield*/, this.renderAsIndividuals(entities, force)];
|
|
@@ -12369,7 +12383,7 @@ var EntitiesRenderManager;
|
|
|
12369
12383
|
var _a;
|
|
12370
12384
|
_this.renderedEntities[(_a = entity.Bruce) === null || _a === void 0 ? void 0 : _a.ID] = true;
|
|
12371
12385
|
});
|
|
12372
|
-
zoomItem = this.
|
|
12386
|
+
zoomItem = this.zoomControl[0];
|
|
12373
12387
|
if (!(zoomItem.DisplayType == ZoomControl.EDisplayType.Model3D && entities.length)) return [3 /*break*/, 2];
|
|
12374
12388
|
return [4 /*yield*/, EntityLod.GetLods({
|
|
12375
12389
|
api: this.apiGetter.getApi(),
|
|
@@ -12767,7 +12781,7 @@ var EntitiesRenderManager;
|
|
|
12767
12781
|
entities: entities,
|
|
12768
12782
|
menuItemId: this.item.id,
|
|
12769
12783
|
visualRegister: this.visualsManager,
|
|
12770
|
-
zoomControl: this.
|
|
12784
|
+
zoomControl: this.zoomControl,
|
|
12771
12785
|
entitiesHistoric: entitiesHistoric,
|
|
12772
12786
|
entityHistoricDrawTrack: this.item.historicDrawTrack,
|
|
12773
12787
|
force: force,
|
|
@@ -15085,9 +15099,10 @@ var TilesetRenderEngine;
|
|
|
15085
15099
|
}
|
|
15086
15100
|
TilesetRenderEngine.RenderLegacy = RenderLegacy;
|
|
15087
15101
|
var Styler = /** @class */ (function () {
|
|
15088
|
-
function Styler(
|
|
15089
|
-
var _a;
|
|
15102
|
+
function Styler() {
|
|
15090
15103
|
this.disposed = false;
|
|
15104
|
+
// Indicates if the styler has been loaded/initialized and is ready to style.
|
|
15105
|
+
this.loaded = false;
|
|
15091
15106
|
this.styleMappingLoaded = false;
|
|
15092
15107
|
this.styleMappingsLoaded = {};
|
|
15093
15108
|
this.fallbackStyle = null;
|
|
@@ -15096,6 +15111,7 @@ var TilesetRenderEngine;
|
|
|
15096
15111
|
// Dictionary of Entity ID -> boolean to indicate which Entities have been styled.
|
|
15097
15112
|
// This is used to determine if the Style colour needs to be overriden or not.
|
|
15098
15113
|
this.styledEntityIds = {};
|
|
15114
|
+
this.scenario = 0;
|
|
15099
15115
|
this.runningQueues = 0;
|
|
15100
15116
|
this.recordLoadQueue = [];
|
|
15101
15117
|
this.recordCheckQueue = [];
|
|
@@ -15104,30 +15120,6 @@ var TilesetRenderEngine;
|
|
|
15104
15120
|
this._styleProgress = 0;
|
|
15105
15121
|
// Event for when the style progress changes.
|
|
15106
15122
|
this.OnStyleProgress = new BruceEvent();
|
|
15107
|
-
this.viewer = viewer;
|
|
15108
|
-
this.api = api;
|
|
15109
|
-
this.cTileset = cTileset;
|
|
15110
|
-
this.expandSources = expandSources;
|
|
15111
|
-
this.fallbackStyleId = fallbackStyleId;
|
|
15112
|
-
this.styleMapping = styleMapping;
|
|
15113
|
-
if (styleMapping) {
|
|
15114
|
-
// Dereference.
|
|
15115
|
-
styleMapping = JSON.parse(JSON.stringify(styleMapping));
|
|
15116
|
-
}
|
|
15117
|
-
// ND-1641. BOOKMARKS - (DEMO) View does not match bookmark.
|
|
15118
|
-
// We have some evil hard-coded style mappings that need to be fixed.
|
|
15119
|
-
// These exist within legacy project views.
|
|
15120
|
-
// Update: This now also lets people have a style mapping without a real style record.
|
|
15121
|
-
if ((_a = this.styleMapping) === null || _a === void 0 ? void 0 : _a.length) {
|
|
15122
|
-
for (var i = 0; i < this.styleMapping.length; i++) {
|
|
15123
|
-
var mapItem = this.styleMapping[i];
|
|
15124
|
-
var mapStyle = mapItem.style ? mapItem.style : mapItem.Style;
|
|
15125
|
-
this.styleMapping[i].style = correctStyle(mapStyle);
|
|
15126
|
-
}
|
|
15127
|
-
}
|
|
15128
|
-
this.register = register;
|
|
15129
|
-
this.menuItemId = menuItemId;
|
|
15130
|
-
this.loadStyles();
|
|
15131
15123
|
}
|
|
15132
15124
|
Object.defineProperty(Styler.prototype, "Disposed", {
|
|
15133
15125
|
get: function () {
|
|
@@ -15136,6 +15128,13 @@ var TilesetRenderEngine;
|
|
|
15136
15128
|
enumerable: false,
|
|
15137
15129
|
configurable: true
|
|
15138
15130
|
});
|
|
15131
|
+
Object.defineProperty(Styler.prototype, "Loaded", {
|
|
15132
|
+
get: function () {
|
|
15133
|
+
return this.loaded;
|
|
15134
|
+
},
|
|
15135
|
+
enumerable: false,
|
|
15136
|
+
configurable: true
|
|
15137
|
+
});
|
|
15139
15138
|
Object.defineProperty(Styler.prototype, "StyleProgress", {
|
|
15140
15139
|
get: function () {
|
|
15141
15140
|
return this._styleProgress;
|
|
@@ -15143,6 +15142,44 @@ var TilesetRenderEngine;
|
|
|
15143
15142
|
enumerable: false,
|
|
15144
15143
|
configurable: true
|
|
15145
15144
|
});
|
|
15145
|
+
Styler.prototype.Init = function (params) {
|
|
15146
|
+
var _a;
|
|
15147
|
+
var viewer = params.viewer, api = params.api, cTileset = params.cTileset, fallbackStyleId = params.fallbackStyleId, styleMapping = params.styleMapping, expandSources = params.expandSources, menuItemId = params.menuItemId, register = params.register, scenario = params.scenario;
|
|
15148
|
+
this.viewer = viewer;
|
|
15149
|
+
this.api = api;
|
|
15150
|
+
this.cTileset = cTileset;
|
|
15151
|
+
this.register = register;
|
|
15152
|
+
this.menuItemId = menuItemId;
|
|
15153
|
+
if (expandSources != null) {
|
|
15154
|
+
this.expandSources = expandSources;
|
|
15155
|
+
}
|
|
15156
|
+
if (fallbackStyleId != null) {
|
|
15157
|
+
this.fallbackStyleId = fallbackStyleId;
|
|
15158
|
+
}
|
|
15159
|
+
if (this.styleMapping) {
|
|
15160
|
+
this.styleMapping = styleMapping;
|
|
15161
|
+
if (this.styleMapping) {
|
|
15162
|
+
// Dereference.
|
|
15163
|
+
this.styleMapping = JSON.parse(JSON.stringify(this.styleMapping));
|
|
15164
|
+
}
|
|
15165
|
+
// ND-1641. BOOKMARKS - (DEMO) View does not match bookmark.
|
|
15166
|
+
// We have some evil hard-coded style mappings that need to be fixed.
|
|
15167
|
+
// These exist within legacy project views.
|
|
15168
|
+
// Update: This now also lets people have a style mapping without a real style record.
|
|
15169
|
+
if ((_a = this.styleMapping) === null || _a === void 0 ? void 0 : _a.length) {
|
|
15170
|
+
for (var i = 0; i < this.styleMapping.length; i++) {
|
|
15171
|
+
var mapItem = this.styleMapping[i];
|
|
15172
|
+
var mapStyle = mapItem.style ? mapItem.style : mapItem.Style;
|
|
15173
|
+
this.styleMapping[i].style = correctStyle(mapStyle);
|
|
15174
|
+
}
|
|
15175
|
+
}
|
|
15176
|
+
}
|
|
15177
|
+
if (scenario != null) {
|
|
15178
|
+
this.scenario = scenario;
|
|
15179
|
+
}
|
|
15180
|
+
this.loadStyles();
|
|
15181
|
+
this.loaded = true;
|
|
15182
|
+
};
|
|
15146
15183
|
/**
|
|
15147
15184
|
* Updates style mapping and fallback style.
|
|
15148
15185
|
* This will trigger a re-style of all entities, and will stop existing style loads.
|
|
@@ -15178,22 +15215,30 @@ var TilesetRenderEngine;
|
|
|
15178
15215
|
if (params.expandSources != null) {
|
|
15179
15216
|
this.expandSources = params.expandSources;
|
|
15180
15217
|
}
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
this.
|
|
15185
|
-
|
|
15186
|
-
|
|
15187
|
-
|
|
15188
|
-
|
|
15189
|
-
|
|
15190
|
-
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15218
|
+
if (params.scenario != null) {
|
|
15219
|
+
this.scenario = params.scenario;
|
|
15220
|
+
}
|
|
15221
|
+
if (this.loaded) {
|
|
15222
|
+
// Empty queues.
|
|
15223
|
+
// Requeue all.
|
|
15224
|
+
this.recordLoadQueue = [];
|
|
15225
|
+
this.recordCheckQueue = [];
|
|
15226
|
+
var regos = this.register.GetRegos({
|
|
15227
|
+
menuItemId: this.menuItemId
|
|
15228
|
+
});
|
|
15229
|
+
// Reset progress.
|
|
15230
|
+
this.updateStyleProgress();
|
|
15231
|
+
this.styleMappingLoaded = false;
|
|
15232
|
+
this.styleMappingsLoaded = {};
|
|
15233
|
+
this.QueueEntities(regos);
|
|
15234
|
+
this.loadStyles();
|
|
15235
|
+
}
|
|
15194
15236
|
};
|
|
15195
15237
|
Styler.prototype.QueueEntities = function (entities, highPriority) {
|
|
15196
15238
|
if (highPriority === void 0) { highPriority = false; }
|
|
15239
|
+
if (!this.loaded) {
|
|
15240
|
+
return;
|
|
15241
|
+
}
|
|
15197
15242
|
// We set a default colour right away to avoid race conditions at later times.
|
|
15198
15243
|
for (var i = 0; i < entities.length; i++) {
|
|
15199
15244
|
var entity = entities[i];
|
|
@@ -15240,7 +15285,8 @@ var TilesetRenderEngine;
|
|
|
15240
15285
|
api: this.api,
|
|
15241
15286
|
entityIds: batch,
|
|
15242
15287
|
migrated: true,
|
|
15243
|
-
expandSources: this.expandSources
|
|
15288
|
+
expandSources: this.expandSources,
|
|
15289
|
+
scenario: this.scenario
|
|
15244
15290
|
})];
|
|
15245
15291
|
case 2:
|
|
15246
15292
|
entities = (_c.sent()).entities;
|
|
@@ -15489,8 +15535,10 @@ var TilesetRenderEngine;
|
|
|
15489
15535
|
_c.label = 19;
|
|
15490
15536
|
case 19:
|
|
15491
15537
|
this.styleMappingsLoaded[styleMap.EntityTypeID] = true;
|
|
15492
|
-
this.
|
|
15493
|
-
|
|
15538
|
+
if (this.loaded) {
|
|
15539
|
+
this.processTilesetFeatureCheckQueue();
|
|
15540
|
+
this.processQueue();
|
|
15541
|
+
}
|
|
15494
15542
|
_c.label = 20;
|
|
15495
15543
|
case 20:
|
|
15496
15544
|
i++;
|
|
@@ -15500,7 +15548,7 @@ var TilesetRenderEngine;
|
|
|
15500
15548
|
return [2 /*return*/];
|
|
15501
15549
|
}
|
|
15502
15550
|
this.styleMappingLoaded = true;
|
|
15503
|
-
if (
|
|
15551
|
+
if (!(!this.disposed && this.loaded)) return [3 /*break*/, 23];
|
|
15504
15552
|
return [4 /*yield*/, this.processTilesetFeatureCheckQueue()];
|
|
15505
15553
|
case 22:
|
|
15506
15554
|
_c.sent();
|
|
@@ -15778,7 +15826,7 @@ var TilesetCadRenderManager;
|
|
|
15778
15826
|
function Manager(params) {
|
|
15779
15827
|
this.disposed = false;
|
|
15780
15828
|
this.cTileset = null;
|
|
15781
|
-
this.styler =
|
|
15829
|
+
this.styler = new TilesetRenderEngine.Styler();
|
|
15782
15830
|
// Indicates the hierarchy depth limit has been hit.
|
|
15783
15831
|
// This likely means poor data so we have to disable drilling otherwise lag would be too bad.
|
|
15784
15832
|
// The result is no entity type IDs are known so most styles fail.
|
|
@@ -15864,13 +15912,23 @@ var TilesetCadRenderManager;
|
|
|
15864
15912
|
}
|
|
15865
15913
|
this.viewer.scene.requestRender();
|
|
15866
15914
|
TilesetRenderEngine.OnTilesetReady(this.cTileset).then(function () {
|
|
15867
|
-
var _a;
|
|
15915
|
+
var _a, _b;
|
|
15868
15916
|
try {
|
|
15869
15917
|
if (_this.disposed || cTileset.isDestroyed()) {
|
|
15870
15918
|
return;
|
|
15871
15919
|
}
|
|
15872
15920
|
_this.onCTilesetLoad();
|
|
15873
|
-
_this.styler
|
|
15921
|
+
_this.styler.Init({
|
|
15922
|
+
viewer: _this.viewer,
|
|
15923
|
+
api: api,
|
|
15924
|
+
cTileset: _this.cTileset,
|
|
15925
|
+
fallbackStyleId: _this.item.styleId,
|
|
15926
|
+
styleMapping: _this.item.StyleMapping,
|
|
15927
|
+
expandSources: (_a = _this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.ExpandSources,
|
|
15928
|
+
menuItemId: _this.item.id,
|
|
15929
|
+
register: _this.visualsManager,
|
|
15930
|
+
scenario: (_b = _this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b["Scenario.ID"]
|
|
15931
|
+
});
|
|
15874
15932
|
_this.viewer.scene.requestRender();
|
|
15875
15933
|
}
|
|
15876
15934
|
catch (e) {
|
|
@@ -16532,12 +16590,13 @@ var EntityFilterGetter;
|
|
|
16532
16590
|
this.maxHeight = 100000;
|
|
16533
16591
|
this.viewRect = null;
|
|
16534
16592
|
this.viewCenter = null;
|
|
16593
|
+
this.scenario = 0;
|
|
16535
16594
|
this.historicRefreshAbortController = null;
|
|
16536
16595
|
// Entity IDs found for the latest integrity.
|
|
16537
16596
|
// We use this for refreshing historic data without having to repeat geographic queries.
|
|
16538
16597
|
this.gatheredIntegrity = null;
|
|
16539
16598
|
this.gatheredEntityIds = [];
|
|
16540
|
-
var api = params.api, viewer = params.viewer, viewPort = params.viewPort, typeId = params.typeId, schemaId = params.schemaId, batchSize = params.batchSize, attrFilter = params.attrFilter, historicAttrKey = params.historicAttrKey, historicInterpolation = params.historicInterpolation, viaCdn = params.viaCdn;
|
|
16599
|
+
var api = params.api, viewer = params.viewer, viewPort = params.viewPort, typeId = params.typeId, schemaId = params.schemaId, batchSize = params.batchSize, attrFilter = params.attrFilter, historicAttrKey = params.historicAttrKey, historicInterpolation = params.historicInterpolation, viaCdn = params.viaCdn, scenario = params.scenario;
|
|
16541
16600
|
this.api = api;
|
|
16542
16601
|
this.typeId = typeId;
|
|
16543
16602
|
this.schemaId = schemaId;
|
|
@@ -16548,6 +16607,7 @@ var EntityFilterGetter;
|
|
|
16548
16607
|
this.viewPort = viewPort;
|
|
16549
16608
|
this.attrFilter = attrFilter;
|
|
16550
16609
|
this.viewer = viewer;
|
|
16610
|
+
this.scenario = scenario ? scenario : 0;
|
|
16551
16611
|
this.updateBounds();
|
|
16552
16612
|
}
|
|
16553
16613
|
Object.defineProperty(Getter.prototype, "OnUpdate", {
|
|
@@ -16590,6 +16650,9 @@ var EntityFilterGetter;
|
|
|
16590
16650
|
if (this.historicAttrKey) {
|
|
16591
16651
|
integrity += this.historicAttrKey;
|
|
16592
16652
|
}
|
|
16653
|
+
if (this.scenario) {
|
|
16654
|
+
integrity += this.scenario;
|
|
16655
|
+
}
|
|
16593
16656
|
return integrity;
|
|
16594
16657
|
};
|
|
16595
16658
|
Getter.prototype.viewAreaSub = function () {
|
|
@@ -16868,6 +16931,7 @@ var EntityFilterGetter;
|
|
|
16868
16931
|
}
|
|
16869
16932
|
return [4 /*yield*/, Entity$1.GetList({
|
|
16870
16933
|
api: this.api,
|
|
16934
|
+
scenario: this.scenario,
|
|
16871
16935
|
historicKey: this.historicAttrKey,
|
|
16872
16936
|
historicPoint: this.historicAttrDateTime,
|
|
16873
16937
|
schemaId: this.schemaId,
|
|
@@ -17052,6 +17116,7 @@ var EntityFilterGetter;
|
|
|
17052
17116
|
}
|
|
17053
17117
|
return [4 /*yield*/, Entity$1.GetList({
|
|
17054
17118
|
api: this.api,
|
|
17119
|
+
scenario: this.scenario,
|
|
17055
17120
|
historicKey: this.historicAttrKey,
|
|
17056
17121
|
historicPoint: historicAttrDateTime,
|
|
17057
17122
|
schemaId: this.schemaId,
|
|
@@ -17149,6 +17214,7 @@ function createFilterGetterCacheKey(params) {
|
|
|
17149
17214
|
cacheKey += params.schemaId ? params.schemaId : "";
|
|
17150
17215
|
cacheKey += JSON.stringify(params.tagIds ? params.tagIds : []);
|
|
17151
17216
|
cacheKey += params.historicAttrKey ? params.historicAttrKey : "";
|
|
17217
|
+
cacheKey += params.scenario ? params.scenario : 0;
|
|
17152
17218
|
if (params.historicAttrKey) {
|
|
17153
17219
|
cacheKey += params.historicInterpolation ? "true" : "false";
|
|
17154
17220
|
}
|
|
@@ -17777,7 +17843,7 @@ var TilesetEntitiesRenderManager;
|
|
|
17777
17843
|
this.initCounter = 0;
|
|
17778
17844
|
this.disposed = false;
|
|
17779
17845
|
this.cTileset = null;
|
|
17780
|
-
this.styler =
|
|
17846
|
+
this.styler = new TilesetRenderEngine.Styler();
|
|
17781
17847
|
var viewer = params.viewer, visualsManager = params.register, apiGetter = params.getters, item = params.item;
|
|
17782
17848
|
this.viewer = viewer;
|
|
17783
17849
|
this.getters = apiGetter;
|
|
@@ -17906,7 +17972,16 @@ var TilesetEntitiesRenderManager;
|
|
|
17906
17972
|
}
|
|
17907
17973
|
if (_this.item.ApplyStyles) {
|
|
17908
17974
|
var api_1 = _this.getters.GetBruceApi();
|
|
17909
|
-
_this.styler
|
|
17975
|
+
_this.styler.Init({
|
|
17976
|
+
viewer: _this.viewer,
|
|
17977
|
+
api: api_1,
|
|
17978
|
+
cTileset: _this.cTileset,
|
|
17979
|
+
fallbackStyleId: +_this.item.styleId,
|
|
17980
|
+
styleMapping: [],
|
|
17981
|
+
expandSources: false,
|
|
17982
|
+
menuItemId: _this.item.id,
|
|
17983
|
+
register: _this.visualsManager
|
|
17984
|
+
});
|
|
17910
17985
|
}
|
|
17911
17986
|
_this.onCTilesetLoad();
|
|
17912
17987
|
_this.viewer.scene.requestRender();
|
|
@@ -18370,7 +18445,7 @@ var TilesetArbRenderManager;
|
|
|
18370
18445
|
function Manager(params) {
|
|
18371
18446
|
this.disposed = false;
|
|
18372
18447
|
this.cTileset = null;
|
|
18373
|
-
this.styler =
|
|
18448
|
+
this.styler = new TilesetRenderEngine.Styler();
|
|
18374
18449
|
this.tilesetType = null;
|
|
18375
18450
|
this.viewer = params.viewer;
|
|
18376
18451
|
this.getters = params.getters;
|
|
@@ -18553,6 +18628,9 @@ var TilesetArbRenderManager;
|
|
|
18553
18628
|
}
|
|
18554
18629
|
this.viewer.scene.requestRender();
|
|
18555
18630
|
TilesetRenderEngine.OnTilesetReady(this.cTileset).then(function () {
|
|
18631
|
+
if (_this.disposed || _this.viewer.isDestroyed()) {
|
|
18632
|
+
return;
|
|
18633
|
+
}
|
|
18556
18634
|
// Colour mask to apply to the Tileset as a whole.
|
|
18557
18635
|
// Individual Entities can override this.
|
|
18558
18636
|
// This is typically used for Tilesets without Entities to allow some sort of basic styling per-bookmark.
|
|
@@ -18575,7 +18653,16 @@ var TilesetArbRenderManager;
|
|
|
18575
18653
|
if (_this.item.ApplyStyles ||
|
|
18576
18654
|
_this.item.Type == MenuItem.EType.IonTileset) {
|
|
18577
18655
|
var api = _this.getters.GetBruceApi();
|
|
18578
|
-
_this.styler
|
|
18656
|
+
_this.styler.Init({
|
|
18657
|
+
viewer: _this.viewer,
|
|
18658
|
+
api: api,
|
|
18659
|
+
cTileset: _this.cTileset,
|
|
18660
|
+
fallbackStyleId: _this.item.styleId,
|
|
18661
|
+
styleMapping: _this.item.StyleMapping,
|
|
18662
|
+
expandSources: false,
|
|
18663
|
+
menuItemId: _this.item.id,
|
|
18664
|
+
register: _this.visualsManager
|
|
18665
|
+
});
|
|
18579
18666
|
}
|
|
18580
18667
|
_this.onCTilesetLoad();
|
|
18581
18668
|
_this.viewer.scene.requestRender();
|
|
@@ -18585,6 +18672,9 @@ var TilesetArbRenderManager;
|
|
|
18585
18672
|
}
|
|
18586
18673
|
});
|
|
18587
18674
|
this.cTileset.tileLoad.addEventListener(function (tile) {
|
|
18675
|
+
if (_this.disposed || _this.viewer.isDestroyed()) {
|
|
18676
|
+
return;
|
|
18677
|
+
}
|
|
18588
18678
|
try {
|
|
18589
18679
|
_this.mapCTile(tile);
|
|
18590
18680
|
}
|
|
@@ -28536,7 +28626,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
28536
28626
|
return WidgetViewBar;
|
|
28537
28627
|
}(Widget.AWidget));
|
|
28538
28628
|
|
|
28539
|
-
var VERSION = "4.7.
|
|
28629
|
+
var VERSION = "4.7.7";
|
|
28540
28630
|
|
|
28541
28631
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, 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 };
|
|
28542
28632
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|