bruce-cesium 5.4.4 → 5.4.5
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 +20 -17
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +19 -16
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +7 -4
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/utils/entity-utils.js +11 -11
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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, EntityAttachment, EntityAttachmentType, EntityAttribute, 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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, Quaternion, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -2809,8 +2809,8 @@ var EntityUtils;
|
|
|
2809
2809
|
if (location) {
|
|
2810
2810
|
const latitude = EnsureNumber(location.latitude);
|
|
2811
2811
|
const longitude = EnsureNumber(location.longitude);
|
|
2812
|
-
// Disallowing
|
|
2813
|
-
if (latitude
|
|
2812
|
+
// Disallowing 0.
|
|
2813
|
+
if (latitude && longitude) {
|
|
2814
2814
|
const pos3d = Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(location.altitude));
|
|
2815
2815
|
const toAdjust = [pos3d];
|
|
2816
2816
|
await ensureHeightRefs(toAdjust, sample);
|
|
@@ -2982,8 +2982,8 @@ var EntityUtils;
|
|
|
2982
2982
|
if (location && typeof location == "object" && Carto.ValidateCarto(location)) {
|
|
2983
2983
|
const latitude = EnsureNumber(location.latitude);
|
|
2984
2984
|
const longitude = EnsureNumber(location.longitude);
|
|
2985
|
-
// Disallowing
|
|
2986
|
-
if (latitude
|
|
2985
|
+
// Disallowing 0.
|
|
2986
|
+
if (latitude && longitude) {
|
|
2987
2987
|
const pos3d = Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(location.altitude));
|
|
2988
2988
|
posses.push(pos3d);
|
|
2989
2989
|
}
|
|
@@ -3034,8 +3034,8 @@ var EntityUtils;
|
|
|
3034
3034
|
longitude: (EnsureNumber(boundaries.minLongitude) + EnsureNumber(boundaries.maxLongitude)) / 2,
|
|
3035
3035
|
altitude: 0
|
|
3036
3036
|
};
|
|
3037
|
-
// Disallowing
|
|
3038
|
-
if (point.latitude
|
|
3037
|
+
// Disallowing 0.
|
|
3038
|
+
if (point.latitude && point.longitude) {
|
|
3039
3039
|
const bPosses = [
|
|
3040
3040
|
Cartesian3.fromDegrees(EnsureNumber(boundaries.minLongitude), EnsureNumber(boundaries.minLatitude), EnsureNumber(boundaries.minAltitude)),
|
|
3041
3041
|
Cartesian3.fromDegrees(EnsureNumber(boundaries.maxLongitude), EnsureNumber(boundaries.maxLatitude), EnsureNumber(boundaries.maxAltitude))
|
|
@@ -3297,8 +3297,8 @@ var EntityUtils;
|
|
|
3297
3297
|
if (location && typeof location == "object" && Carto.ValidateCarto(location)) {
|
|
3298
3298
|
const latitude = EnsureNumber(location.latitude);
|
|
3299
3299
|
const longitude = EnsureNumber(location.longitude);
|
|
3300
|
-
// Disallowing
|
|
3301
|
-
if (latitude
|
|
3300
|
+
// Disallowing 0.
|
|
3301
|
+
if (latitude && longitude) {
|
|
3302
3302
|
return Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(location.altitude));
|
|
3303
3303
|
}
|
|
3304
3304
|
}
|
|
@@ -3360,8 +3360,8 @@ var EntityUtils;
|
|
|
3360
3360
|
longitude: (EnsureNumber(boundaries.minLongitude) + EnsureNumber(boundaries.maxLongitude)) / 2,
|
|
3361
3361
|
altitude: 0
|
|
3362
3362
|
};
|
|
3363
|
-
// Disallowing
|
|
3364
|
-
if (point.latitude
|
|
3363
|
+
// Disallowing 0.
|
|
3364
|
+
if (point.latitude && point.longitude) {
|
|
3365
3365
|
if (Carto.ValidateCarto(point)) {
|
|
3366
3366
|
return Cartesian3.fromDegrees(point.longitude, point.latitude, point.altitude);
|
|
3367
3367
|
}
|
|
@@ -3417,7 +3417,7 @@ var EntityUtils;
|
|
|
3417
3417
|
catch (e) {
|
|
3418
3418
|
console.error(e);
|
|
3419
3419
|
}
|
|
3420
|
-
if (entity && (isNaN(lat) || isNaN(lon) || (lat == 0
|
|
3420
|
+
if (entity && (isNaN(lat) || isNaN(lon) || (lat == 0 || lon == 0))) {
|
|
3421
3421
|
try {
|
|
3422
3422
|
entity = (await Entity$1.Get({
|
|
3423
3423
|
api,
|
|
@@ -14314,8 +14314,11 @@ var EntitiesIdsRenderManager;
|
|
|
14314
14314
|
return;
|
|
14315
14315
|
}
|
|
14316
14316
|
let entitiesHistoric = {};
|
|
14317
|
+
let changed = false;
|
|
14317
14318
|
if ((this.item.BruceEntity.historic || this.item.BruceEntity.historicAttrKey) && entities.length) {
|
|
14318
|
-
|
|
14319
|
+
const res = await this.getHistoricInfo(entities);
|
|
14320
|
+
changed = res[0];
|
|
14321
|
+
entitiesHistoric = res[1];
|
|
14319
14322
|
}
|
|
14320
14323
|
const { updated, entities: cEntities } = await EntityRenderEngine.Render({
|
|
14321
14324
|
viewer: this.viewer,
|
|
@@ -14326,7 +14329,7 @@ var EntitiesIdsRenderManager;
|
|
|
14326
14329
|
entitiesHistoric: entitiesHistoric,
|
|
14327
14330
|
entityHistoricDrawTrack: this.item.historicDrawTrack,
|
|
14328
14331
|
zoomControl: this.item.CameraZoomSettings,
|
|
14329
|
-
force
|
|
14332
|
+
force: force || changed
|
|
14330
14333
|
});
|
|
14331
14334
|
for (let i = 0; i < entities.length; i++) {
|
|
14332
14335
|
if (this.disposed) {
|
|
@@ -14406,7 +14409,7 @@ var EntitiesIdsRenderManager;
|
|
|
14406
14409
|
const newStop = stopTmp.getTime();
|
|
14407
14410
|
// Complete overlap - we already have all the data.
|
|
14408
14411
|
if (newStart >= cachedStart && newStop <= cachedStop) {
|
|
14409
|
-
return this.entitiesHistoric;
|
|
14412
|
+
return [false, this.entitiesHistoric];
|
|
14410
14413
|
}
|
|
14411
14414
|
// Calculate missing ranges.
|
|
14412
14415
|
rangesToRequest = [];
|
|
@@ -14481,7 +14484,7 @@ var EntitiesIdsRenderManager;
|
|
|
14481
14484
|
this.lastHistoricMax = stopTmp.toISOString();
|
|
14482
14485
|
this.entitiesHistoric = combined;
|
|
14483
14486
|
}
|
|
14484
|
-
return combined;
|
|
14487
|
+
return [rangesToRequest.length > 0, combined];
|
|
14485
14488
|
}
|
|
14486
14489
|
viewerDateTimeSub() {
|
|
14487
14490
|
var _a, _b;
|
|
@@ -30641,7 +30644,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
30641
30644
|
}
|
|
30642
30645
|
}
|
|
30643
30646
|
|
|
30644
|
-
const VERSION = "5.4.
|
|
30647
|
+
const VERSION = "5.4.5";
|
|
30645
30648
|
|
|
30646
30649
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, 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, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_FORWARD_KEY, CESIUM_TIMELINE_LIVE_PADDING_BACKWARD_KEY, CESIUM_TIMELINE_INTERVAL_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, 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 };
|
|
30647
30650
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|