bruce-cesium 3.4.5 → 3.4.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 +187 -94
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +185 -92
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/internal/limited-log.js +17 -0
- package/dist/lib/internal/limited-log.js.map +1 -0
- package/dist/lib/rendering/entity-render-engine.js +171 -88
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/internal/limited-log.d.ts +6 -0
- package/dist/types/rendering/entity-render-engine.d.ts +2 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, EntityRelationType, ENVIRONMENT, BruceEvent, EntityCoords,
|
|
1
|
+
import { Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, BruceEvent, 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,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, GeoJsonDataSource, ColorMaterialProperty, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, PolygonPipeline, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3350,6 +3350,19 @@ var VisualRegisterCuller;
|
|
|
3350
3350
|
VisualRegisterCuller.MarkShouldRecheck = MarkShouldRecheck;
|
|
3351
3351
|
})(VisualRegisterCuller || (VisualRegisterCuller = {}));
|
|
3352
3352
|
|
|
3353
|
+
var _logErrorCache = {};
|
|
3354
|
+
/**
|
|
3355
|
+
* Will only log the error once matching the key.
|
|
3356
|
+
* @param key
|
|
3357
|
+
* @param message
|
|
3358
|
+
*/
|
|
3359
|
+
function OneTimeError(key, message) {
|
|
3360
|
+
if (!_logErrorCache[key]) {
|
|
3361
|
+
console.error(message);
|
|
3362
|
+
_logErrorCache[key] = true;
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3353
3366
|
function colorToCColor(color) {
|
|
3354
3367
|
return new Color(color.red ? color.red / 255 : 0, color.green ? color.green / 255 : 0, color.blue ? color.blue / 255 : 0, color.alpha);
|
|
3355
3368
|
}
|
|
@@ -3621,8 +3634,6 @@ function getRenderGroupId(zoomItem, terrain) {
|
|
|
3621
3634
|
}
|
|
3622
3635
|
return zoomItem.MinZoom + "-" + zoomItem.MaxZoom + "-" + shouldApplyFlatFix(terrain);
|
|
3623
3636
|
}
|
|
3624
|
-
var _fileValidationCache = {};
|
|
3625
|
-
var _fileHeightCache = {};
|
|
3626
3637
|
// Key = url + scale.
|
|
3627
3638
|
var _fileRadiusCache = new LRUCache(1000);
|
|
3628
3639
|
/**
|
|
@@ -3719,7 +3730,7 @@ function getSizeOfPolygonEntity(entity) {
|
|
|
3719
3730
|
}
|
|
3720
3731
|
return length;
|
|
3721
3732
|
}
|
|
3722
|
-
var _billboardCache = new LRUCache(
|
|
3733
|
+
var _billboardCache = new LRUCache(150);
|
|
3723
3734
|
var POINT_BILLBOARD_PADDING = 1;
|
|
3724
3735
|
var createCircleBillboard = function (size, colorCss) {
|
|
3725
3736
|
var key = size + "-" + colorCss;
|
|
@@ -3747,6 +3758,53 @@ var createCircleBillboard = function (size, colorCss) {
|
|
|
3747
3758
|
_billboardCache.Set(key, data);
|
|
3748
3759
|
return data;
|
|
3749
3760
|
};
|
|
3761
|
+
var createImageBillboard = function (url) {
|
|
3762
|
+
var cacheKey = "image-" + url;
|
|
3763
|
+
var cacheData = _billboardCache.Get(cacheKey);
|
|
3764
|
+
if (cacheData) {
|
|
3765
|
+
return cacheData;
|
|
3766
|
+
}
|
|
3767
|
+
var prom = new Promise(function (res, rej) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3768
|
+
var response, blob, canvas_1, image_1, e_4;
|
|
3769
|
+
return __generator(this, function (_a) {
|
|
3770
|
+
switch (_a.label) {
|
|
3771
|
+
case 0:
|
|
3772
|
+
_a.trys.push([0, 3, , 4]);
|
|
3773
|
+
return [4 /*yield*/, fetch(url)];
|
|
3774
|
+
case 1:
|
|
3775
|
+
response = _a.sent();
|
|
3776
|
+
return [4 /*yield*/, response.blob()];
|
|
3777
|
+
case 2:
|
|
3778
|
+
blob = _a.sent();
|
|
3779
|
+
canvas_1 = document.createElement("canvas");
|
|
3780
|
+
image_1 = new Image();
|
|
3781
|
+
image_1.onload = function () {
|
|
3782
|
+
canvas_1.width = image_1.width;
|
|
3783
|
+
canvas_1.height = image_1.height;
|
|
3784
|
+
var context = canvas_1.getContext("2d");
|
|
3785
|
+
context.drawImage(image_1, 0, 0);
|
|
3786
|
+
var data = {
|
|
3787
|
+
canvas: canvas_1,
|
|
3788
|
+
height: image_1.height
|
|
3789
|
+
};
|
|
3790
|
+
res(data);
|
|
3791
|
+
};
|
|
3792
|
+
image_1.onerror = function () {
|
|
3793
|
+
rej(null);
|
|
3794
|
+
};
|
|
3795
|
+
image_1.src = URL.createObjectURL(blob);
|
|
3796
|
+
return [3 /*break*/, 4];
|
|
3797
|
+
case 3:
|
|
3798
|
+
e_4 = _a.sent();
|
|
3799
|
+
rej(null);
|
|
3800
|
+
return [3 /*break*/, 4];
|
|
3801
|
+
case 4: return [2 /*return*/];
|
|
3802
|
+
}
|
|
3803
|
+
});
|
|
3804
|
+
}); });
|
|
3805
|
+
_billboardCache.Set(cacheKey, prom);
|
|
3806
|
+
return prom;
|
|
3807
|
+
};
|
|
3750
3808
|
/**
|
|
3751
3809
|
* Removes duplicate points in a row and returns a new array.
|
|
3752
3810
|
* Passed array is not mutated.
|
|
@@ -3797,6 +3855,48 @@ function getModelEntity(url, scale) {
|
|
|
3797
3855
|
});
|
|
3798
3856
|
});
|
|
3799
3857
|
}
|
|
3858
|
+
/**
|
|
3859
|
+
* Turns a hard-coded file url into pieces so we can properly load it using our libraries rather than directly.
|
|
3860
|
+
* @param url eg: https://demoplantprocess.api.nextspace-uat.net/file/4c29bdf8-1f0b-4739-b0ee-421ea07ba4e5.png
|
|
3861
|
+
*/
|
|
3862
|
+
function extractMetadataFromFileUrl(url) {
|
|
3863
|
+
var _a;
|
|
3864
|
+
url = url.toLowerCase();
|
|
3865
|
+
// Bzzt, invalid url format for our purposes.
|
|
3866
|
+
if (!url.includes(".api.") || !url.includes("/file/")) {
|
|
3867
|
+
return null;
|
|
3868
|
+
}
|
|
3869
|
+
url = url.replace("https://", "").replace("http://", "");
|
|
3870
|
+
var envId = Api.EEnv.PROD;
|
|
3871
|
+
if (url.includes("-dev.net")) {
|
|
3872
|
+
envId = Api.EEnv.DEV;
|
|
3873
|
+
}
|
|
3874
|
+
else if (url.includes("-stg.net")) {
|
|
3875
|
+
envId = Api.EEnv.STG;
|
|
3876
|
+
}
|
|
3877
|
+
else if (url.includes("-uat.net")) {
|
|
3878
|
+
envId = Api.EEnv.UAT;
|
|
3879
|
+
}
|
|
3880
|
+
var parts = url.split("/");
|
|
3881
|
+
var host = parts[0];
|
|
3882
|
+
var hostParts = host.split(".");
|
|
3883
|
+
var accountId = hostParts[0];
|
|
3884
|
+
var fileId = (_a = parts[2]) !== null && _a !== void 0 ? _a : "";
|
|
3885
|
+
if (fileId.includes("?")) {
|
|
3886
|
+
fileId = fileId.split("?")[0];
|
|
3887
|
+
}
|
|
3888
|
+
if (fileId.includes(".")) {
|
|
3889
|
+
fileId = fileId.split(".")[0];
|
|
3890
|
+
}
|
|
3891
|
+
if (!fileId || !accountId) {
|
|
3892
|
+
return null;
|
|
3893
|
+
}
|
|
3894
|
+
return {
|
|
3895
|
+
accountId: accountId,
|
|
3896
|
+
fileId: fileId,
|
|
3897
|
+
envId: envId
|
|
3898
|
+
};
|
|
3899
|
+
}
|
|
3800
3900
|
var EntityRenderEngine;
|
|
3801
3901
|
(function (EntityRenderEngine) {
|
|
3802
3902
|
function Render(params) {
|
|
@@ -4070,10 +4170,11 @@ var EntityRenderEngine;
|
|
|
4070
4170
|
}
|
|
4071
4171
|
Point.CreateCircleBillboard = CreateCircleBillboard;
|
|
4072
4172
|
function Render(params) {
|
|
4173
|
+
var _a, _b;
|
|
4073
4174
|
return __awaiter(this, void 0, void 0, function () {
|
|
4074
|
-
var entity, style, type, cEntity, siblings, iconUrlRows, icon,
|
|
4075
|
-
return __generator(this, function (
|
|
4076
|
-
switch (
|
|
4175
|
+
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, metadata, api, image, e_5, iconScale, disableDepthTest, bColor, cColor, heightRef, radius, bFill, cFill, outline, cOutline, outlineWidth, bOutline, heightRef, pos3d, extrusion, outlineExtrusion, bColor, cColor, size, heightRef, circleBillboard;
|
|
4176
|
+
return __generator(this, function (_c) {
|
|
4177
|
+
switch (_c.label) {
|
|
4077
4178
|
case 0:
|
|
4078
4179
|
entity = params.entity;
|
|
4079
4180
|
style = params.style;
|
|
@@ -4086,7 +4187,7 @@ var EntityRenderEngine;
|
|
|
4086
4187
|
}
|
|
4087
4188
|
cEntity = null;
|
|
4088
4189
|
siblings = [];
|
|
4089
|
-
if (!(type == Style.EPointType.Icon)) return [3 /*break*/,
|
|
4190
|
+
if (!(type == Style.EPointType.Icon)) return [3 /*break*/, 9];
|
|
4090
4191
|
iconUrlRows = style.iconUrl == null ? [] : style.iconUrl;
|
|
4091
4192
|
iconUrlRows.forEach(function (row) {
|
|
4092
4193
|
if (row.type == Calculator.EValueType.Color) {
|
|
@@ -4094,67 +4195,55 @@ var EntityRenderEngine;
|
|
|
4094
4195
|
}
|
|
4095
4196
|
});
|
|
4096
4197
|
icon = Calculator.GetString(iconUrlRows, entity, params.tags);
|
|
4097
|
-
|
|
4098
|
-
if (typeof icon == "string")
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
if (!
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
fileId: style.iconId,
|
|
4105
|
-
viaCdn: true
|
|
4106
|
-
});
|
|
4107
|
-
}
|
|
4108
|
-
if (!iconUrl_1) return [3 /*break*/, 11];
|
|
4109
|
-
_a.label = 1;
|
|
4198
|
+
iconUrl = null;
|
|
4199
|
+
if (!(typeof icon == "string")) return [3 /*break*/, 2];
|
|
4200
|
+
iconUrl = icon;
|
|
4201
|
+
metadata = extractMetadataFromFileUrl(iconUrl);
|
|
4202
|
+
if (!metadata) return [3 /*break*/, 2];
|
|
4203
|
+
api = params.apiGetter.getApi(metadata.accountId);
|
|
4204
|
+
return [4 /*yield*/, api.Loading];
|
|
4110
4205
|
case 1:
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4206
|
+
_c.sent();
|
|
4207
|
+
iconUrl = ClientFile.GetUrl({
|
|
4208
|
+
api: api,
|
|
4209
|
+
fileId: metadata.fileId,
|
|
4210
|
+
viaCdn: true
|
|
4211
|
+
});
|
|
4212
|
+
_c.label = 2;
|
|
4114
4213
|
case 2:
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
iconUrl_1 = null;
|
|
4118
|
-
return [3 /*break*/, 7];
|
|
4214
|
+
if (!(!iconUrl && style.iconId)) return [3 /*break*/, 4];
|
|
4215
|
+
return [4 /*yield*/, params.api.Loading];
|
|
4119
4216
|
case 3:
|
|
4120
|
-
|
|
4121
|
-
|
|
4217
|
+
_c.sent();
|
|
4218
|
+
iconUrl = ClientFile.GetUrl({
|
|
4219
|
+
api: params.api,
|
|
4220
|
+
fileId: style.iconId,
|
|
4221
|
+
viaCdn: true
|
|
4222
|
+
});
|
|
4223
|
+
_c.label = 4;
|
|
4122
4224
|
case 4:
|
|
4123
|
-
|
|
4124
|
-
return [
|
|
4125
|
-
|
|
4126
|
-
img.onload = function () {
|
|
4127
|
-
_fileHeightCache[iconUrl_1] = img.height;
|
|
4128
|
-
res(null);
|
|
4129
|
-
};
|
|
4130
|
-
img.onerror = function () {
|
|
4131
|
-
_fileHeightCache[iconUrl_1] = undefined;
|
|
4132
|
-
res(null);
|
|
4133
|
-
};
|
|
4134
|
-
img.src = URL.createObjectURL(blob_1);
|
|
4135
|
-
})];
|
|
4225
|
+
image = null;
|
|
4226
|
+
if (!iconUrl) return [3 /*break*/, 8];
|
|
4227
|
+
_c.label = 5;
|
|
4136
4228
|
case 5:
|
|
4137
|
-
|
|
4138
|
-
return [
|
|
4229
|
+
_c.trys.push([5, 7, , 8]);
|
|
4230
|
+
return [4 /*yield*/, createImageBillboard(iconUrl)];
|
|
4139
4231
|
case 6:
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
return [3 /*break*/, 7];
|
|
4232
|
+
image = _c.sent();
|
|
4233
|
+
return [3 /*break*/, 8];
|
|
4143
4234
|
case 7:
|
|
4144
|
-
|
|
4145
|
-
|
|
4235
|
+
e_5 = _c.sent();
|
|
4236
|
+
// Expanding the logging here so we can figure out why this is happening.
|
|
4237
|
+
// 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.
|
|
4238
|
+
OneTimeError("ENTITY_RENDER_ENGINE_ICON_URL_ERROR_" + iconUrl, {
|
|
4239
|
+
error: e_5,
|
|
4240
|
+
iconUrl: iconUrl,
|
|
4241
|
+
apiUrl: (_a = params.api) === null || _a === void 0 ? void 0 : _a.GetBaseUrl(),
|
|
4242
|
+
apiAccountId: (_b = params.api) === null || _b === void 0 ? void 0 : _b.AccountId
|
|
4243
|
+
});
|
|
4244
|
+
return [3 /*break*/, 8];
|
|
4146
4245
|
case 8:
|
|
4147
|
-
if (
|
|
4148
|
-
iconUrl_1 = null;
|
|
4149
|
-
}
|
|
4150
|
-
_a.label = 9;
|
|
4151
|
-
case 9: return [3 /*break*/, 11];
|
|
4152
|
-
case 10:
|
|
4153
|
-
e_5 = _a.sent();
|
|
4154
|
-
iconUrl_1 = null;
|
|
4155
|
-
return [3 /*break*/, 11];
|
|
4156
|
-
case 11:
|
|
4157
|
-
if (iconUrl_1) {
|
|
4246
|
+
if (image) {
|
|
4158
4247
|
iconScale = EnsureNumber(Calculator.GetNumber(style.iconScale, entity, params.tags));
|
|
4159
4248
|
if (!iconScale && iconScale != 0) {
|
|
4160
4249
|
iconScale = 1;
|
|
@@ -4169,7 +4258,7 @@ var EntityRenderEngine;
|
|
|
4169
4258
|
billboard: {
|
|
4170
4259
|
horizontalOrigin: HorizontalOrigin.CENTER,
|
|
4171
4260
|
verticalOrigin: VerticalOrigin.BOTTOM,
|
|
4172
|
-
image:
|
|
4261
|
+
image: image.canvas,
|
|
4173
4262
|
heightReference: getHeightRef(style),
|
|
4174
4263
|
scale: iconScale,
|
|
4175
4264
|
disableDepthTestDistance: disableDepthTest ? Number.POSITIVE_INFINITY : undefined,
|
|
@@ -4186,11 +4275,11 @@ var EntityRenderEngine;
|
|
|
4186
4275
|
}),
|
|
4187
4276
|
show: true
|
|
4188
4277
|
});
|
|
4189
|
-
cEntity.billboard._billboardSize =
|
|
4278
|
+
cEntity.billboard._billboardSize = image.height;
|
|
4190
4279
|
}
|
|
4191
4280
|
}
|
|
4192
|
-
|
|
4193
|
-
case
|
|
4281
|
+
_c.label = 9;
|
|
4282
|
+
case 9:
|
|
4194
4283
|
if (type == Style.EPointType.Cylinder) {
|
|
4195
4284
|
radius = EnsureNumber(Calculator.GetNumber(style.CylinderRadius, entity, params.tags));
|
|
4196
4285
|
if (radius <= 0) {
|
|
@@ -4349,6 +4438,7 @@ var EntityRenderEngine;
|
|
|
4349
4438
|
tags: tags,
|
|
4350
4439
|
viewer: params.viewer,
|
|
4351
4440
|
api: api,
|
|
4441
|
+
apiGetter: params.apiGetter,
|
|
4352
4442
|
maxDistance: zoomItem.MaxZoom,
|
|
4353
4443
|
minDistance: zoomItem.MinZoom
|
|
4354
4444
|
})];
|
|
@@ -4948,6 +5038,9 @@ var EntityRenderEngine;
|
|
|
4948
5038
|
switch (_g.label) {
|
|
4949
5039
|
case 0:
|
|
4950
5040
|
api = params.apiGetter.getApi();
|
|
5041
|
+
return [4 /*yield*/, api.Loading];
|
|
5042
|
+
case 1:
|
|
5043
|
+
_g.sent();
|
|
4951
5044
|
cEntities = {};
|
|
4952
5045
|
reqBody = {
|
|
4953
5046
|
"strict": false,
|
|
@@ -4955,32 +5048,32 @@ var EntityRenderEngine;
|
|
|
4955
5048
|
"Items": []
|
|
4956
5049
|
};
|
|
4957
5050
|
i = 0;
|
|
4958
|
-
_g.label =
|
|
4959
|
-
case
|
|
4960
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
5051
|
+
_g.label = 2;
|
|
5052
|
+
case 2:
|
|
5053
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
4961
5054
|
entity = params.entities[i];
|
|
4962
5055
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
4963
|
-
if (!(zoomItem.StyleID != -1)) return [3 /*break*/,
|
|
5056
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 4];
|
|
4964
5057
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
4965
|
-
case 2:
|
|
4966
|
-
_f = (_a = (_g.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
4967
|
-
return [3 /*break*/, 4];
|
|
4968
5058
|
case 3:
|
|
4969
|
-
_f =
|
|
4970
|
-
|
|
5059
|
+
_f = (_a = (_g.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
5060
|
+
return [3 /*break*/, 5];
|
|
4971
5061
|
case 4:
|
|
5062
|
+
_f = zoomItem.Style;
|
|
5063
|
+
_g.label = 5;
|
|
5064
|
+
case 5:
|
|
4972
5065
|
style = _f;
|
|
4973
5066
|
tagIds = entity.Bruce["Layer.ID"];
|
|
4974
5067
|
tags = [];
|
|
4975
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
5068
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 7];
|
|
4976
5069
|
return [4 /*yield*/, EntityTag.GetListByIds({
|
|
4977
5070
|
api: api,
|
|
4978
5071
|
tagIds: tagIds
|
|
4979
5072
|
})];
|
|
4980
|
-
case 5:
|
|
4981
|
-
tags = (_g.sent()).tags;
|
|
4982
|
-
_g.label = 6;
|
|
4983
5073
|
case 6:
|
|
5074
|
+
tags = (_g.sent()).tags;
|
|
5075
|
+
_g.label = 7;
|
|
5076
|
+
case 7:
|
|
4984
5077
|
mStyle = (_b = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _b !== void 0 ? _b : {};
|
|
4985
5078
|
group = mStyle.lodGroup ? Calculator.GetString(mStyle.lodGroup, entity, tags) : null;
|
|
4986
5079
|
if (!group) {
|
|
@@ -5000,15 +5093,15 @@ var EntityRenderEngine;
|
|
|
5000
5093
|
"group": group,
|
|
5001
5094
|
"level": level
|
|
5002
5095
|
});
|
|
5003
|
-
_g.label =
|
|
5004
|
-
case
|
|
5096
|
+
_g.label = 8;
|
|
5097
|
+
case 8:
|
|
5005
5098
|
i++;
|
|
5006
|
-
return [3 /*break*/,
|
|
5007
|
-
case
|
|
5099
|
+
return [3 /*break*/, 2];
|
|
5100
|
+
case 9: return [4 /*yield*/, EntityLod.GetLods({
|
|
5008
5101
|
api: api,
|
|
5009
5102
|
filter: reqBody
|
|
5010
5103
|
})];
|
|
5011
|
-
case
|
|
5104
|
+
case 10:
|
|
5012
5105
|
lodData = (_g.sent()).lods;
|
|
5013
5106
|
_loop_2 = function (i) {
|
|
5014
5107
|
var entity, zoomItem, style, _h, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
@@ -5070,17 +5163,17 @@ var EntityRenderEngine;
|
|
|
5070
5163
|
});
|
|
5071
5164
|
};
|
|
5072
5165
|
i = 0;
|
|
5073
|
-
_g.label =
|
|
5074
|
-
case 10:
|
|
5075
|
-
if (!(i < params.entities.length)) return [3 /*break*/, 13];
|
|
5076
|
-
return [5 /*yield**/, _loop_2(i)];
|
|
5166
|
+
_g.label = 11;
|
|
5077
5167
|
case 11:
|
|
5078
|
-
|
|
5079
|
-
|
|
5168
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 14];
|
|
5169
|
+
return [5 /*yield**/, _loop_2(i)];
|
|
5080
5170
|
case 12:
|
|
5171
|
+
_g.sent();
|
|
5172
|
+
_g.label = 13;
|
|
5173
|
+
case 13:
|
|
5081
5174
|
i++;
|
|
5082
|
-
return [3 /*break*/,
|
|
5083
|
-
case
|
|
5175
|
+
return [3 /*break*/, 11];
|
|
5176
|
+
case 14: return [2 /*return*/, cEntities];
|
|
5084
5177
|
}
|
|
5085
5178
|
});
|
|
5086
5179
|
});
|
|
@@ -8291,7 +8384,7 @@ var EntitiesRenderManager;
|
|
|
8291
8384
|
}
|
|
8292
8385
|
];
|
|
8293
8386
|
}
|
|
8294
|
-
if (this.
|
|
8387
|
+
if (this.useGeojson && this.item.CameraZoomSettings.length > 1) {
|
|
8295
8388
|
console.warn("Geojson rendering does not support multiple zoom controls. Only the first one will be used.");
|
|
8296
8389
|
this.item.CameraZoomSettings = [this.item.CameraZoomSettings[0]];
|
|
8297
8390
|
}
|
|
@@ -21508,7 +21601,7 @@ var CesiumViewMonitor;
|
|
|
21508
21601
|
CesiumViewMonitor$$1.Monitor = Monitor;
|
|
21509
21602
|
})(CesiumViewMonitor || (CesiumViewMonitor = {}));
|
|
21510
21603
|
|
|
21511
|
-
var VERSION$1 = "3.4.
|
|
21604
|
+
var VERSION$1 = "3.4.7";
|
|
21512
21605
|
|
|
21513
21606
|
export { VERSION$1 as 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, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, Draw3dPolygon, Draw3dPolyline };
|
|
21514
21607
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|