bruce-cesium 4.3.7 → 4.3.9

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, 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, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
1
+ import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, Camera, ProjectView, ProjectViewBookmark, 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, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
3
+ import { Cartographic, JulianDate, Color, HeightReference, Cartesian3, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, CallbackProperty, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Math as Math$1, Transforms, Primitive, Cesium3DTileFeature, Cartesian2, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, Rectangle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, CzmlDataSource, Quaternion } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2420,13 +2420,12 @@ var EntityUtils;
2420
2420
  });
2421
2421
  }); };
2422
2422
  getEntityPositions = function (sample) { return __awaiter(_this, void 0, void 0, function () {
2423
- var entityId, entity, tileset, tilesetId, disallowRendered, evaluateRendered, evaluateRecord, renderedPosses, e_1, recordPosses, e_2, tilesetIds, tSettings, pos3d, eLocation, alt, alt, worldPosition, eTransform, heading, pitch, roll, matrix4, offset, worldPivot, m1, hpr, transform, transformedOffset, geometryRadius, sphere;
2423
+ var entityId, entity, disallowRendered, evaluateRendered, evaluateRecord, renderedPosses, e_1, recordPosses, e_2, pos3d, eLocation, geometryRadius, sphere;
2424
2424
  var _this = this;
2425
- var _a, _b, _c, _d;
2426
- return __generator(this, function (_e) {
2427
- switch (_e.label) {
2425
+ return __generator(this, function (_a) {
2426
+ switch (_a.label) {
2428
2427
  case 0:
2429
- entityId = sample.entityId, entity = sample.entity, tileset = sample.tileset, tilesetId = sample.tilesetId, disallowRendered = sample.disallowRendered;
2428
+ entityId = sample.entityId, entity = sample.entity, disallowRendered = sample.disallowRendered;
2430
2429
  evaluateRendered = function () { return __awaiter(_this, void 0, void 0, function () {
2431
2430
  var rego, posses, parts, i, part, visualHeightRef, hierarchy, hPosses, hPossesSample, step, i_1, pPosses, pPossesSample, step, i_2, pPosses, pPossesSample, step, i_3, pos3d_1, toAdjust, modelExt, sphere, semiMajorAxis, semiMinorAxis, height, radius, sphere, data_1, pos3d_2, toAdjust, sphere;
2432
2431
  return __generator(this, function (_a) {
@@ -2662,18 +2661,18 @@ var EntityUtils;
2662
2661
  if (!(disallowRendered != true)) return [3 /*break*/, 2];
2663
2662
  return [4 /*yield*/, evaluateRendered()];
2664
2663
  case 1:
2665
- renderedPosses = _e.sent();
2664
+ renderedPosses = _a.sent();
2666
2665
  if (renderedPosses === null || renderedPosses === void 0 ? void 0 : renderedPosses.length) {
2667
2666
  return [2 /*return*/, renderedPosses];
2668
2667
  }
2669
- _e.label = 2;
2668
+ _a.label = 2;
2670
2669
  case 2:
2671
2670
  if (!!entity) return [3 /*break*/, 6];
2672
2671
  if (!(apiCalls < MAX_API_CALLS)) return [3 /*break*/, 6];
2673
2672
  apiCalls += 1;
2674
- _e.label = 3;
2673
+ _a.label = 3;
2675
2674
  case 3:
2676
- _e.trys.push([3, 5, , 6]);
2675
+ _a.trys.push([3, 5, , 6]);
2677
2676
  return [4 /*yield*/, Entity$1.Get({
2678
2677
  api: api,
2679
2678
  entityId: entityId,
@@ -2682,10 +2681,10 @@ var EntityUtils;
2682
2681
  migrated: true
2683
2682
  })];
2684
2683
  case 4:
2685
- entity = (_e.sent()).entity;
2684
+ entity = (_a.sent()).entity;
2686
2685
  return [3 /*break*/, 6];
2687
2686
  case 5:
2688
- e_1 = _e.sent();
2687
+ e_1 = _a.sent();
2689
2688
  console.error(e_1);
2690
2689
  return [3 /*break*/, 6];
2691
2690
  case 6:
@@ -2694,132 +2693,43 @@ var EntityUtils;
2694
2693
  }
2695
2694
  return [4 /*yield*/, evaluateRecord()];
2696
2695
  case 7:
2697
- recordPosses = _e.sent();
2696
+ recordPosses = _a.sent();
2698
2697
  if (recordPosses === null || recordPosses === void 0 ? void 0 : recordPosses.length) {
2699
2698
  return [2 /*return*/, recordPosses];
2700
2699
  }
2701
2700
  if (!(apiCalls < MAX_API_CALLS)) return [3 /*break*/, 11];
2702
- _e.label = 8;
2701
+ _a.label = 8;
2703
2702
  case 8:
2704
- _e.trys.push([8, 10, , 11]);
2703
+ _a.trys.push([8, 10, , 11]);
2705
2704
  apiCalls += 1;
2706
2705
  return [4 /*yield*/, Entity$1.Get({
2707
2706
  api: api,
2708
2707
  entityId: entityId,
2709
- // We'll be expanding relative positioning and related tilesets now.
2708
+ // We'll be expanding relative positioning and related assemblies now.
2710
2709
  expandLocation: true,
2711
2710
  migrated: true
2712
2711
  })];
2713
2712
  case 9:
2714
- entity = (_e.sent()).entity;
2713
+ entity = (_a.sent()).entity;
2715
2714
  return [3 /*break*/, 11];
2716
2715
  case 10:
2717
- e_2 = _e.sent();
2716
+ e_2 = _a.sent();
2718
2717
  console.warn(e_2);
2719
2718
  return [3 /*break*/, 11];
2720
2719
  case 11:
2721
- if (!tilesetId) {
2722
- tilesetIds = Entity$1.GetValue({
2723
- entity: entity,
2724
- path: ["Bruce", "TilesetIDs"]
2725
- });
2726
- tilesetId = (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) ? tilesetIds[0] : tilesetId;
2727
- }
2728
- if (!!tileset) return [3 /*break*/, 13];
2729
- if (!(tilesetId && apiCalls < MAX_API_CALLS)) return [3 /*break*/, 13];
2730
- apiCalls += 1;
2731
- return [4 /*yield*/, Tileset.Get({
2732
- api: api,
2733
- tilesetId: tilesetId
2734
- })];
2735
- case 12:
2736
- tileset = (_e.sent()).tileset;
2737
- _e.label = 13;
2738
- case 13:
2739
- tSettings = tileset === null || tileset === void 0 ? void 0 : tileset.settings;
2740
2720
  pos3d = null;
2741
2721
  eLocation = Entity$1.GetValue({
2742
2722
  entity: entity,
2743
2723
  path: ["Bruce", "Location"]
2744
2724
  });
2745
- if (!((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) || ((_a = tSettings === null || tSettings === void 0 ? void 0 : tSettings.location) === null || _a === void 0 ? void 0 : _a.longitude))) return [3 /*break*/, 16];
2746
- if (eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) {
2747
- alt = +eLocation.altitude;
2748
- if (isNaN(alt)) {
2749
- alt = 0;
2750
- }
2751
- pos3d = Cartesian3.fromDegrees(+eLocation.longitude, +eLocation.latitude, alt);
2752
- }
2753
- else {
2754
- alt = +tSettings.location.altitude;
2755
- if (isNaN(alt)) {
2756
- alt = 0;
2757
- }
2758
- pos3d = Cartesian3.fromDegrees(+tSettings.location.longitude, +tSettings.location.latitude, alt);
2759
- }
2760
- worldPosition = Entity$1.GetValue({
2761
- entity: entity,
2762
- path: ["Bruce", "AssemblyWorldPosition"]
2763
- });
2764
- if (!worldPosition) return [3 /*break*/, 16];
2765
- eTransform = Entity$1.GetValue({
2766
- entity: entity,
2767
- path: ["Bruce", "Transform"]
2768
- });
2769
- heading = 0;
2770
- pitch = 0;
2771
- roll = 0;
2772
- if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.heading) {
2773
- heading = eTransform.heading;
2774
- }
2775
- else if ((_b = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _b === void 0 ? void 0 : _b.heading) {
2776
- heading = tSettings.transform.heading;
2777
- }
2778
- if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.pitch) {
2779
- pitch = eTransform.pitch;
2780
- }
2781
- else if ((_c = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _c === void 0 ? void 0 : _c.pitch) {
2782
- pitch = tSettings.transform.pitch;
2783
- }
2784
- if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.roll) {
2785
- roll = eTransform.roll;
2786
- }
2787
- else if ((_d = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _d === void 0 ? void 0 : _d.roll) {
2788
- roll = tSettings.transform.roll;
2789
- }
2790
- heading = +heading;
2791
- if (isNaN(heading)) {
2792
- heading = 0;
2793
- }
2794
- pitch = +pitch;
2795
- if (isNaN(pitch)) {
2796
- pitch = 0;
2797
- }
2798
- roll = +roll;
2799
- if (isNaN(roll)) {
2800
- roll = 0;
2801
- }
2802
- matrix4 = worldPosition;
2803
- offset = new Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
2804
- worldPivot = Entity$1.GetValue({
2805
- entity: entity,
2806
- path: ["Bruce", "GeometryWorldPivot"]
2807
- });
2808
- if (worldPivot) //the position from worldMatrix + center of geometry offset
2809
- {
2810
- offset = new Cartesian3(worldPivot[0], worldPivot[1], worldPivot[2]);
2811
- }
2812
- m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
2813
- hpr = HeadingPitchRoll.fromDegrees(heading, pitch, roll, new HeadingPitchRoll());
2814
- transform = Matrix3.fromHeadingPitchRoll(hpr);
2815
- transformedOffset = Matrix3.multiplyByVector(transform, offset, new Cartesian3());
2816
- pos3d = Matrix4.multiplyByPoint(m1, transformedOffset, new Cartesian3());
2817
- if (!(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) return [3 /*break*/, 15];
2725
+ if (!(eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude)) return [3 /*break*/, 14];
2726
+ pos3d = Cartesian3.fromDegrees(EnsureNumber(eLocation.longitude), EnsureNumber(eLocation.latitude), EnsureNumber(eLocation.altitude));
2727
+ if (!(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) return [3 /*break*/, 13];
2818
2728
  return [4 /*yield*/, processPosHeight(pos3d, HeightReference.NONE)];
2819
- case 14:
2820
- pos3d = _e.sent();
2821
- _e.label = 15;
2822
- case 15:
2729
+ case 12:
2730
+ pos3d = _a.sent();
2731
+ _a.label = 13;
2732
+ case 13:
2823
2733
  geometryRadius = Entity$1.GetValue({
2824
2734
  entity: entity,
2825
2735
  path: ["Bruce", "GeometryRadius"]
@@ -2832,8 +2742,8 @@ var EntityUtils;
2832
2742
  spheres.push(sphere);
2833
2743
  }
2834
2744
  }
2835
- _e.label = 16;
2836
- case 16:
2745
+ _a.label = 14;
2746
+ case 14:
2837
2747
  if (pos3d) {
2838
2748
  return [2 /*return*/, [pos3d]];
2839
2749
  }
@@ -3086,25 +2996,24 @@ var EntityUtils;
3086
2996
  EntityUtils.GetPos = GetPos;
3087
2997
  /**
3088
2998
  * Returns the position of the entity.
3089
- * This is an async variant that checks for related tilesets.
2999
+ * This is an async variant that checks for related assemblies.
3090
3000
  * @param params
3091
3001
  * @deprecated use GetLocation instead.
3092
3002
  * @returns
3093
3003
  */
3094
3004
  function GetPosAsync(params) {
3095
- var _a, _b, _c, _d;
3096
3005
  return __awaiter(this, void 0, void 0, function () {
3097
- var viewer, entityId, entity, tileset, tilesetId, visualRegister, returnHeightRef, recordHeightRef, api, lat, lon, location_1, e_3, e_4, tilesetIds, pos3d, tSettings, eLocation, alt, alt, worldPosition, heading, pitch, roll, eTransform, matrix4, offset, worldPivot, m1, hpr, transform, transformedOffset;
3098
- return __generator(this, function (_e) {
3099
- switch (_e.label) {
3006
+ var viewer, entityId, entity, visualRegister, returnHeightRef, recordHeightRef, api, lat, lon, location_1, e_3, e_4, pos3d, eLocation;
3007
+ return __generator(this, function (_a) {
3008
+ switch (_a.label) {
3100
3009
  case 0:
3101
- viewer = params.viewer, entityId = params.entityId, entity = params.entity, tileset = params.tileset, tilesetId = params.tilesetId, visualRegister = params.visualRegister, returnHeightRef = params.returnHeightRef, recordHeightRef = params.recordHeightRef, api = params.api;
3010
+ viewer = params.viewer, entityId = params.entityId, entity = params.entity, visualRegister = params.visualRegister, returnHeightRef = params.returnHeightRef, recordHeightRef = params.recordHeightRef, api = params.api;
3102
3011
  if (!!entity) return [3 /*break*/, 9];
3103
3012
  lat = 0;
3104
3013
  lon = 0;
3105
- _e.label = 1;
3014
+ _a.label = 1;
3106
3015
  case 1:
3107
- _e.trys.push([1, 3, , 4]);
3016
+ _a.trys.push([1, 3, , 4]);
3108
3017
  return [4 /*yield*/, Entity$1.Get({
3109
3018
  api: api,
3110
3019
  entityId: entityId,
@@ -3112,7 +3021,7 @@ var EntityUtils;
3112
3021
  migrated: true
3113
3022
  })];
3114
3023
  case 2:
3115
- entity = (_e.sent()).entity;
3024
+ entity = (_a.sent()).entity;
3116
3025
  if (entity) {
3117
3026
  location_1 = Entity$1.GetValue({
3118
3027
  entity: entity,
@@ -3123,14 +3032,14 @@ var EntityUtils;
3123
3032
  }
3124
3033
  return [3 /*break*/, 4];
3125
3034
  case 3:
3126
- e_3 = _e.sent();
3035
+ e_3 = _a.sent();
3127
3036
  console.error(e_3);
3128
3037
  return [3 /*break*/, 4];
3129
3038
  case 4:
3130
3039
  if (!(entity && (isNaN(lat) || isNaN(lon) || (lat == 0 && lon == 0)))) return [3 /*break*/, 9];
3131
- _e.label = 5;
3040
+ _a.label = 5;
3132
3041
  case 5:
3133
- _e.trys.push([5, 7, , 9]);
3042
+ _a.trys.push([5, 7, , 9]);
3134
3043
  return [4 /*yield*/, Entity$1.Get({
3135
3044
  api: api,
3136
3045
  entityId: entityId,
@@ -3138,10 +3047,10 @@ var EntityUtils;
3138
3047
  migrated: true
3139
3048
  })];
3140
3049
  case 6:
3141
- entity = (_e.sent()).entity;
3050
+ entity = (_a.sent()).entity;
3142
3051
  return [3 /*break*/, 9];
3143
3052
  case 7:
3144
- e_4 = _e.sent();
3053
+ e_4 = _a.sent();
3145
3054
  console.warn(e_4);
3146
3055
  return [4 /*yield*/, Entity$1.Get({
3147
3056
  api: api,
@@ -3150,20 +3059,13 @@ var EntityUtils;
3150
3059
  migrated: true
3151
3060
  })];
3152
3061
  case 8:
3153
- entity = (_e.sent()).entity;
3062
+ entity = (_a.sent()).entity;
3154
3063
  return [3 /*break*/, 9];
3155
3064
  case 9:
3156
3065
  if (!entity) {
3157
3066
  return [2 /*return*/, null];
3158
3067
  }
3159
- if (!tilesetId) {
3160
- tilesetIds = Entity$1.GetValue({
3161
- entity: entity,
3162
- path: ["Bruce", "TilesetIDs"]
3163
- });
3164
- tilesetId = (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) ? tilesetIds[0] : tilesetId;
3165
- }
3166
- pos3d = tilesetId ? null : GetPos({
3068
+ pos3d = GetPos({
3167
3069
  viewer: viewer,
3168
3070
  entity: entity,
3169
3071
  visualRegister: visualRegister,
@@ -3173,94 +3075,12 @@ var EntityUtils;
3173
3075
  if (Cartes.ValidateCartes3(pos3d)) {
3174
3076
  return [2 /*return*/, pos3d];
3175
3077
  }
3176
- if (!!tileset) return [3 /*break*/, 11];
3177
- if (!tilesetId) return [3 /*break*/, 11];
3178
- return [4 /*yield*/, Tileset.Get({
3179
- api: api,
3180
- tilesetId: tilesetId
3181
- })];
3182
- case 10:
3183
- tileset = (_e.sent()).tileset;
3184
- _e.label = 11;
3185
- case 11:
3186
- tSettings = tileset === null || tileset === void 0 ? void 0 : tileset.settings;
3187
3078
  eLocation = Entity$1.GetValue({
3188
3079
  entity: entity,
3189
3080
  path: ["Bruce", "Location"]
3190
3081
  });
3191
- if ((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) || ((_a = tSettings === null || tSettings === void 0 ? void 0 : tSettings.location) === null || _a === void 0 ? void 0 : _a.longitude)) {
3192
- if (eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) {
3193
- alt = +eLocation.altitude;
3194
- if (isNaN(alt)) {
3195
- alt = 0;
3196
- }
3197
- pos3d = Cartesian3.fromDegrees(+eLocation.longitude, +eLocation.latitude, alt);
3198
- }
3199
- else {
3200
- alt = +tSettings.location.altitude;
3201
- if (isNaN(alt)) {
3202
- alt = 0;
3203
- }
3204
- pos3d = Cartesian3.fromDegrees(+tSettings.location.longitude, +tSettings.location.latitude, alt);
3205
- }
3206
- worldPosition = Entity$1.GetValue({
3207
- entity: entity,
3208
- path: ["Bruce", "AssemblyWorldPosition"]
3209
- });
3210
- if (worldPosition) {
3211
- heading = 0;
3212
- pitch = 0;
3213
- roll = 0;
3214
- eTransform = Entity$1.GetValue({
3215
- entity: entity,
3216
- path: ["Bruce", "Transform"]
3217
- });
3218
- if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.heading) {
3219
- heading = eTransform.heading;
3220
- }
3221
- else if ((_b = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _b === void 0 ? void 0 : _b.heading) {
3222
- heading = tSettings.transform.heading;
3223
- }
3224
- if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.pitch) {
3225
- pitch = eTransform.pitch;
3226
- }
3227
- else if ((_c = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _c === void 0 ? void 0 : _c.pitch) {
3228
- pitch = tSettings.transform.pitch;
3229
- }
3230
- if (eTransform === null || eTransform === void 0 ? void 0 : eTransform.roll) {
3231
- roll = eTransform.roll;
3232
- }
3233
- else if ((_d = tSettings === null || tSettings === void 0 ? void 0 : tSettings.transform) === null || _d === void 0 ? void 0 : _d.roll) {
3234
- roll = tSettings.transform.roll;
3235
- }
3236
- heading = +heading;
3237
- if (isNaN(heading)) {
3238
- heading = 0;
3239
- }
3240
- pitch = +pitch;
3241
- if (isNaN(pitch)) {
3242
- pitch = 0;
3243
- }
3244
- roll = +roll;
3245
- if (isNaN(roll)) {
3246
- roll = 0;
3247
- }
3248
- matrix4 = worldPosition;
3249
- offset = new Cartesian3(+matrix4[0][3], +matrix4[1][3], +matrix4[2][3]);
3250
- worldPivot = Entity$1.GetValue({
3251
- entity: entity,
3252
- path: ["Bruce", "GeometryWorldPivot"]
3253
- });
3254
- if (worldPivot) //the position from worldMatrix + center of geometry offset
3255
- {
3256
- offset = new Cartesian3(worldPivot[0], worldPivot[1], worldPivot[2]);
3257
- }
3258
- m1 = Transforms.eastNorthUpToFixedFrame(pos3d);
3259
- hpr = HeadingPitchRoll.fromDegrees(heading, pitch, roll, new HeadingPitchRoll());
3260
- transform = Matrix3.fromHeadingPitchRoll(hpr);
3261
- transformedOffset = Matrix3.multiplyByVector(transform, offset, new Cartesian3());
3262
- pos3d = Matrix4.multiplyByPoint(m1, transformedOffset, new Cartesian3());
3263
- }
3082
+ if (+(eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude)) {
3083
+ pos3d = Cartesian3.fromDegrees(EnsureNumber(eLocation.longitude), EnsureNumber(eLocation.latitude), EnsureNumber(eLocation.altitude));
3264
3084
  }
3265
3085
  return [2 /*return*/, DrawingUtils.EnsurePosHeight({
3266
3086
  desiredHeightRef: params.returnHeightRef,
@@ -8761,7 +8581,7 @@ var EntityLabel;
8761
8581
  // If we're pre-positioned that means the user is hovering over the entity.
8762
8582
  // We will keep the height low to avoid looking goofy.
8763
8583
  if (_this.prePositioned) {
8764
- addHeight = distance / 12;
8584
+ addHeight = distance / 24;
8765
8585
  }
8766
8586
  else {
8767
8587
  // If known then calculate based on size.
@@ -26517,7 +26337,7 @@ var ViewerUtils;
26517
26337
  ViewerUtils.AssertIonToken = AssertIonToken;
26518
26338
  })(ViewerUtils || (ViewerUtils = {}));
26519
26339
 
26520
- var VERSION = "4.3.7";
26340
+ var VERSION = "4.3.9";
26521
26341
 
26522
26342
  export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, 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 };
26523
26343
  //# sourceMappingURL=bruce-cesium.es5.js.map