bruce-cesium 1.1.7 → 1.1.8
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 +36 -19
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +35 -18
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +1 -0
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/data-source/data-source-static-kml-manager.js +34 -18
- package/dist/lib/rendering/render-managers/data-source/data-source-static-kml-manager.js.map +1 -1
- package/dist/types/rendering/render-managers/data-source/data-source-static-kml-manager.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Geometry, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, DelayQueue, Entity as Entity$1, BatchedDataGetter, EntityRelationType, ObjectUtils, Tileset, EntityCoords, EntityFilterGetter, EntitySource, EntityRelation, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
|
|
2
|
-
import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature,
|
|
2
|
+
import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, OrthographicFrustum, JulianDate, Cesium3DTileColorBlendMode, HeadingPitchRange, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Matrix4, Cesium3DTileStyle, Cesium3DTileset, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ColorMaterialProperty, Rectangle, Matrix3, EasingFunction, GeometryInstance, CallbackProperty, createOsmBuildings, KmlDataSource } from 'cesium';
|
|
3
3
|
|
|
4
4
|
var TIME_LAG = 300;
|
|
5
5
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -5483,7 +5483,7 @@ var DataSourceStaticKmlManager;
|
|
|
5483
5483
|
var Manager = /** @class */ (function () {
|
|
5484
5484
|
function Manager(params) {
|
|
5485
5485
|
this.disposed = false;
|
|
5486
|
-
this.
|
|
5486
|
+
this.dataSources = [];
|
|
5487
5487
|
var viewer = params.viewer, apiGetter = params.apiGetter, item = params.item;
|
|
5488
5488
|
this.viewer = viewer;
|
|
5489
5489
|
this.apiGetter = apiGetter;
|
|
@@ -5497,22 +5497,33 @@ var DataSourceStaticKmlManager;
|
|
|
5497
5497
|
configurable: true
|
|
5498
5498
|
});
|
|
5499
5499
|
Manager.prototype.Init = function () {
|
|
5500
|
-
var _a
|
|
5500
|
+
var _a;
|
|
5501
5501
|
return __awaiter(this, void 0, void 0, function () {
|
|
5502
|
-
var fileId, api, fileUrl;
|
|
5503
|
-
return __generator(this, function (
|
|
5504
|
-
|
|
5505
|
-
if (!
|
|
5502
|
+
var files, i, file, fileId, api, fileUrl, source;
|
|
5503
|
+
return __generator(this, function (_b) {
|
|
5504
|
+
files = this.item.KML;
|
|
5505
|
+
if (!files) {
|
|
5506
5506
|
return [2 /*return*/];
|
|
5507
5507
|
}
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5508
|
+
if (!Array.isArray(files)) {
|
|
5509
|
+
files = [files];
|
|
5510
|
+
}
|
|
5511
|
+
for (i = 0; i < files.length; i++) {
|
|
5512
|
+
file = files[i];
|
|
5513
|
+
fileId = (_a = file === null || file === void 0 ? void 0 : file.ClientFile) === null || _a === void 0 ? void 0 : _a.ID;
|
|
5514
|
+
if (!fileId) {
|
|
5515
|
+
continue;
|
|
5516
|
+
}
|
|
5517
|
+
api = this.apiGetter.getApi();
|
|
5518
|
+
fileUrl = ClientFile.GetUrl({
|
|
5519
|
+
api: api,
|
|
5520
|
+
fileId: fileId
|
|
5521
|
+
});
|
|
5522
|
+
source = new KmlDataSource();
|
|
5523
|
+
source.load(fileUrl);
|
|
5524
|
+
this.viewer.dataSources.add(source);
|
|
5525
|
+
this.dataSources.push(source);
|
|
5526
|
+
}
|
|
5516
5527
|
return [2 /*return*/];
|
|
5517
5528
|
});
|
|
5518
5529
|
});
|
|
@@ -5523,11 +5534,16 @@ var DataSourceStaticKmlManager;
|
|
|
5523
5534
|
return;
|
|
5524
5535
|
}
|
|
5525
5536
|
this.disposed = true;
|
|
5526
|
-
if (this.
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5537
|
+
if (!((_a = this.viewer) === null || _a === void 0 ? void 0 : _a.isDestroyed())) {
|
|
5538
|
+
for (var i = 0; i < this.dataSources.length; i++) {
|
|
5539
|
+
var source = this.dataSources[i];
|
|
5540
|
+
if (source &&
|
|
5541
|
+
this.viewer.dataSources.contains(source)) {
|
|
5542
|
+
this.viewer.dataSources.remove(source);
|
|
5543
|
+
}
|
|
5544
|
+
}
|
|
5530
5545
|
}
|
|
5546
|
+
this.dataSources = [];
|
|
5531
5547
|
};
|
|
5532
5548
|
Manager.prototype.ReRender = function (entityIds) {
|
|
5533
5549
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -6093,6 +6109,7 @@ var MenuItemManager;
|
|
|
6093
6109
|
item: params.item
|
|
6094
6110
|
});
|
|
6095
6111
|
break;
|
|
6112
|
+
case MenuItem.EType.IonTileset:
|
|
6096
6113
|
case MenuItem.EType.ArbTileset:
|
|
6097
6114
|
rItem.renderManager = new TilesetArbRenderManager.Manager({
|
|
6098
6115
|
apiGetter: params.apiGetter,
|