bruce-cesium 6.0.7 → 6.0.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.
- package/dist/bruce-cesium.es5.js +59 -48
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +58 -47
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js +57 -46
- package/dist/lib/rendering/entity-render-engine-point.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, 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, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, IonResource, EllipsoidGeodesic, EllipsoidTerrainProvider, sampleTerrainMostDetailed, defined, CesiumInspector, ClockRange, PolygonPipeline, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
const TIME_LAG = 300;
|
|
6
6
|
const POSITION_CHECK_TIMER = 950;
|
|
@@ -5556,56 +5556,67 @@ var EntityRenderEnginePoint;
|
|
|
5556
5556
|
}
|
|
5557
5557
|
};
|
|
5558
5558
|
if (type == Style.EPointType.Icon) {
|
|
5559
|
-
|
|
5560
|
-
let
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5559
|
+
let image = null;
|
|
5560
|
+
let imageKey = null;
|
|
5561
|
+
// Let's our apps/plugins generate images themselves.
|
|
5562
|
+
// Need a better documented process than this in the future.
|
|
5563
|
+
if (style["imageBillboard"]) {
|
|
5564
|
+
image = style["imageBillboard"];
|
|
5565
|
+
imageKey = image ? image.canvasDataUri : null;
|
|
5566
|
+
}
|
|
5567
|
+
// Typical process.
|
|
5568
|
+
else {
|
|
5569
|
+
// Fixing poor data.
|
|
5570
|
+
let iconUrlRows = style.iconUrl == null ? [] : style.iconUrl;
|
|
5571
|
+
iconUrlRows.forEach((row) => {
|
|
5572
|
+
if (row.type == Calculator.EValueType.Color) {
|
|
5573
|
+
row.type = Calculator.EValueType.Input;
|
|
5574
|
+
}
|
|
5575
|
+
});
|
|
5576
|
+
const icon = Calculator.GetString(iconUrlRows, entity, params.tags);
|
|
5577
|
+
let iconUrl = null;
|
|
5578
|
+
if (typeof icon == "string") {
|
|
5579
|
+
iconUrl = icon;
|
|
5580
|
+
const metadata = extractMetadataFromFileUrl(iconUrl);
|
|
5581
|
+
// If we're able to determine the Nextspace metadata from the url then we can use that to load the file.
|
|
5582
|
+
// Warning, if this is cross-env, eg: UAT -> DEV then it will RIGHTLY fail to load the file.
|
|
5583
|
+
if (metadata) {
|
|
5584
|
+
const api = params.apiGetter.getApi(metadata.accountId);
|
|
5585
|
+
await api.Loading;
|
|
5586
|
+
iconUrl = ClientFile.GetUrl({
|
|
5587
|
+
api: api,
|
|
5588
|
+
fileId: metadata.fileId,
|
|
5589
|
+
viaCdn: true
|
|
5590
|
+
});
|
|
5591
|
+
}
|
|
5564
5592
|
}
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
let iconUrl = null;
|
|
5568
|
-
if (typeof icon == "string") {
|
|
5569
|
-
iconUrl = icon;
|
|
5570
|
-
const metadata = extractMetadataFromFileUrl(iconUrl);
|
|
5571
|
-
// If we're able to determine the Nextspace metadata from the url then we can use that to load the file.
|
|
5572
|
-
// Warning, if this is cross-env, eg: UAT -> DEV then it will RIGHTLY fail to load the file.
|
|
5573
|
-
if (metadata) {
|
|
5574
|
-
const api = params.apiGetter.getApi(metadata.accountId);
|
|
5575
|
-
await api.Loading;
|
|
5593
|
+
if (!iconUrl && style.iconId) {
|
|
5594
|
+
await params.api.Loading;
|
|
5576
5595
|
iconUrl = ClientFile.GetUrl({
|
|
5577
|
-
api: api,
|
|
5578
|
-
fileId:
|
|
5596
|
+
api: params.api,
|
|
5597
|
+
fileId: style.iconId,
|
|
5579
5598
|
viaCdn: true
|
|
5580
5599
|
});
|
|
5581
5600
|
}
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
iconUrl
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
catch (e) {
|
|
5600
|
-
// Expanding the logging here so we can figure out why this is happening.
|
|
5601
|
-
// Most of the time the file is missing but we're getting some strange errors so I am including logging on the API settings as well.
|
|
5602
|
-
OneTimeError("ENTITY_RENDER_ENGINE_ICON_URL_ERROR_" + iconUrl, {
|
|
5603
|
-
error: e,
|
|
5604
|
-
iconUrl,
|
|
5605
|
-
apiUrl: (_a = params.api) === null || _a === void 0 ? void 0 : _a.GetBaseUrl(),
|
|
5606
|
-
apiAccountId: (_b = params.api) === null || _b === void 0 ? void 0 : _b.AccountId
|
|
5607
|
-
});
|
|
5601
|
+
// ND-1640 - Tags not appearing.
|
|
5602
|
+
// Validate file, else user will see nothing.
|
|
5603
|
+
// Pray we aren't loading some giant file.
|
|
5604
|
+
if (iconUrl) {
|
|
5605
|
+
try {
|
|
5606
|
+
image = await createImageBillboard(iconUrl);
|
|
5607
|
+
}
|
|
5608
|
+
catch (e) {
|
|
5609
|
+
// Expanding the logging here so we can figure out why this is happening.
|
|
5610
|
+
// Most of the time the file is missing but we're getting some strange errors so I am including logging on the API settings as well.
|
|
5611
|
+
OneTimeError("ENTITY_RENDER_ENGINE_ICON_URL_ERROR_" + iconUrl, {
|
|
5612
|
+
error: e,
|
|
5613
|
+
iconUrl,
|
|
5614
|
+
apiUrl: (_a = params.api) === null || _a === void 0 ? void 0 : _a.GetBaseUrl(),
|
|
5615
|
+
apiAccountId: (_b = params.api) === null || _b === void 0 ? void 0 : _b.AccountId
|
|
5616
|
+
});
|
|
5617
|
+
}
|
|
5608
5618
|
}
|
|
5619
|
+
imageKey = image ? iconUrl : null;
|
|
5609
5620
|
}
|
|
5610
5621
|
if (image) {
|
|
5611
5622
|
let iconScale = EnsureNumber(Calculator.GetNumber(style.iconScale, entity, params.tags));
|
|
@@ -5681,7 +5692,7 @@ var EntityRenderEnginePoint;
|
|
|
5681
5692
|
prepareExistingGraphic(params.rendered, shouldShowTrack ? 1 : 0);
|
|
5682
5693
|
cEntity = params.rendered;
|
|
5683
5694
|
const currentImgKey = cEntity.billboard._billboardImgKey;
|
|
5684
|
-
if (currentImgKey !=
|
|
5695
|
+
if (currentImgKey != imageKey) {
|
|
5685
5696
|
cEntity.billboard.image = new ConstantProperty(image.canvasDataUri);
|
|
5686
5697
|
}
|
|
5687
5698
|
cEntity.billboard.scale = new ConstantProperty(iconScale);
|
|
@@ -5767,7 +5778,7 @@ var EntityRenderEnginePoint;
|
|
|
5767
5778
|
cEntity.show = true;
|
|
5768
5779
|
}
|
|
5769
5780
|
cEntity.billboard._billboardSize = image.height;
|
|
5770
|
-
cEntity.billboard._billboardImgKey =
|
|
5781
|
+
cEntity.billboard._billboardImgKey = imageKey;
|
|
5771
5782
|
}
|
|
5772
5783
|
}
|
|
5773
5784
|
}
|
|
@@ -33517,7 +33528,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
33517
33528
|
}
|
|
33518
33529
|
}
|
|
33519
33530
|
|
|
33520
|
-
const VERSION = "6.0.
|
|
33531
|
+
const VERSION = "6.0.9";
|
|
33521
33532
|
|
|
33522
33533
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, 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 };
|
|
33523
33534
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|