bruce-cesium 4.1.3 → 4.1.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 +41 -26
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +40 -25
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/other/google-search-render-manager.js +39 -24
- package/dist/lib/rendering/render-managers/other/google-search-render-manager.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, 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, 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, JulianDate,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, Primitive, Cesium3DTileFeature, SceneMode, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, 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';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -18276,20 +18276,23 @@ var GoogleSearchRenderManager;
|
|
|
18276
18276
|
this.getterLoopId += 1;
|
|
18277
18277
|
var loopId = this.getterLoopId;
|
|
18278
18278
|
return new Promise(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
18279
|
-
var MAX_HEIGHT, MIN_HEIGHT, target, bounds, alt, cells, curCellIndex, curCell, bounds_1, location_1, result, e_2;
|
|
18279
|
+
var MAX_HEIGHT, MIN_HEIGHT, target, bounds, alt, cells, curCellIndex, curCell, bounds_1, location_1, result, e_2, e_3;
|
|
18280
18280
|
return __generator(this, function (_a) {
|
|
18281
18281
|
switch (_a.label) {
|
|
18282
18282
|
case 0:
|
|
18283
18283
|
MAX_HEIGHT = 100000;
|
|
18284
|
-
MIN_HEIGHT =
|
|
18284
|
+
MIN_HEIGHT = 0;
|
|
18285
18285
|
_a.label = 1;
|
|
18286
18286
|
case 1:
|
|
18287
|
-
if (!((!this.monitor.GetTarget() || !this.monitor.GetBounds()) && this.getterLoopId == loopId
|
|
18287
|
+
if (!((!this.monitor.GetTarget() || !this.monitor.GetBounds()) && this.getterLoopId == loopId && !this.Disposed)) return [3 /*break*/, 3];
|
|
18288
18288
|
return [4 /*yield*/, delay$1(500)];
|
|
18289
18289
|
case 2:
|
|
18290
18290
|
_a.sent();
|
|
18291
18291
|
return [3 /*break*/, 1];
|
|
18292
18292
|
case 3:
|
|
18293
|
+
if (this.Disposed || this.getterLoopId != loopId) {
|
|
18294
|
+
return [2 /*return*/];
|
|
18295
|
+
}
|
|
18293
18296
|
target = this.monitor.GetTarget();
|
|
18294
18297
|
bounds = this.monitor.GetBounds();
|
|
18295
18298
|
if (!target || !bounds) {
|
|
@@ -18303,13 +18306,13 @@ var GoogleSearchRenderManager;
|
|
|
18303
18306
|
curCellIndex = cells.length > 0 ? 0 : null;
|
|
18304
18307
|
_a.label = 4;
|
|
18305
18308
|
case 4:
|
|
18306
|
-
if (!(curCellIndex != null)) return [3 /*break*/,
|
|
18309
|
+
if (!(curCellIndex != null)) return [3 /*break*/, 14];
|
|
18307
18310
|
return [4 /*yield*/, delay$1(500)];
|
|
18308
18311
|
case 5:
|
|
18309
18312
|
_a.sent();
|
|
18310
18313
|
// New loop started, break the old one.
|
|
18311
18314
|
if (this.getterLoopId != loopId || this.Disposed) {
|
|
18312
|
-
return [3 /*break*/,
|
|
18315
|
+
return [3 /*break*/, 14];
|
|
18313
18316
|
}
|
|
18314
18317
|
curCell = cells[curCellIndex];
|
|
18315
18318
|
if (curCell.IsFetched()) {
|
|
@@ -18325,10 +18328,10 @@ var GoogleSearchRenderManager;
|
|
|
18325
18328
|
}
|
|
18326
18329
|
_a.label = 6;
|
|
18327
18330
|
case 6:
|
|
18328
|
-
_a.trys.push([6,
|
|
18331
|
+
_a.trys.push([6, 12, , 13]);
|
|
18329
18332
|
// New loop started, break the old one.
|
|
18330
18333
|
if (this.getterLoopId != loopId) {
|
|
18331
|
-
return [3 /*break*/,
|
|
18334
|
+
return [3 /*break*/, 14];
|
|
18332
18335
|
}
|
|
18333
18336
|
bounds_1 = curCell.GetBounds();
|
|
18334
18337
|
location_1 = {
|
|
@@ -18336,29 +18339,41 @@ var GoogleSearchRenderManager;
|
|
|
18336
18339
|
latitude: bounds_1.south + ((bounds_1.north - bounds_1.south) / 2),
|
|
18337
18340
|
longitude: bounds_1.west + ((bounds_1.east - bounds_1.west) / 2)
|
|
18338
18341
|
};
|
|
18342
|
+
result = [];
|
|
18343
|
+
_a.label = 7;
|
|
18344
|
+
case 7:
|
|
18345
|
+
_a.trys.push([7, 9, , 10]);
|
|
18339
18346
|
return [4 /*yield*/, getPlaces({
|
|
18340
18347
|
location: location_1,
|
|
18341
18348
|
bounds: bounds_1,
|
|
18342
18349
|
keyword: this.item.keyword,
|
|
18343
18350
|
accessToken: this.accessToken
|
|
18344
18351
|
})];
|
|
18345
|
-
case 7:
|
|
18346
|
-
result = _a.sent();
|
|
18347
|
-
return [4 /*yield*/, this.renderPlaces(result)];
|
|
18348
18352
|
case 8:
|
|
18353
|
+
result = _a.sent();
|
|
18354
|
+
return [3 /*break*/, 10];
|
|
18355
|
+
case 9:
|
|
18356
|
+
e_2 = _a.sent();
|
|
18357
|
+
if (e_2 !== "ZERO_RESULTS") {
|
|
18358
|
+
console.error(e_2);
|
|
18359
|
+
throw e_2;
|
|
18360
|
+
}
|
|
18361
|
+
return [3 /*break*/, 10];
|
|
18362
|
+
case 10: return [4 /*yield*/, this.renderPlaces(result)];
|
|
18363
|
+
case 11:
|
|
18349
18364
|
_a.sent();
|
|
18350
18365
|
if (this.getterLoopId != loopId || this.Disposed) {
|
|
18351
|
-
return [3 /*break*/,
|
|
18366
|
+
return [3 /*break*/, 14];
|
|
18352
18367
|
}
|
|
18353
18368
|
curCell.Fetched = true;
|
|
18354
18369
|
curCell.Fetching = false;
|
|
18355
|
-
return [3 /*break*/,
|
|
18356
|
-
case
|
|
18357
|
-
|
|
18358
|
-
console.error(
|
|
18359
|
-
return [3 /*break*/,
|
|
18360
|
-
case
|
|
18361
|
-
case
|
|
18370
|
+
return [3 /*break*/, 13];
|
|
18371
|
+
case 12:
|
|
18372
|
+
e_3 = _a.sent();
|
|
18373
|
+
console.error(e_3);
|
|
18374
|
+
return [3 /*break*/, 14];
|
|
18375
|
+
case 13: return [3 /*break*/, 4];
|
|
18376
|
+
case 14: return [2 /*return*/];
|
|
18362
18377
|
}
|
|
18363
18378
|
});
|
|
18364
18379
|
}); });
|
|
@@ -18622,7 +18637,7 @@ function validateKeyForSearches(apiKey) {
|
|
|
18622
18637
|
return [2 /*return*/, _validateKeyCache.get(apiKey)];
|
|
18623
18638
|
}
|
|
18624
18639
|
prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
18625
|
-
var url, response, data,
|
|
18640
|
+
var url, response, data, e_4;
|
|
18626
18641
|
return __generator(this, function (_a) {
|
|
18627
18642
|
switch (_a.label) {
|
|
18628
18643
|
case 0:
|
|
@@ -18647,8 +18662,8 @@ function validateKeyForSearches(apiKey) {
|
|
|
18647
18662
|
res(true);
|
|
18648
18663
|
return [2 /*return*/];
|
|
18649
18664
|
case 4:
|
|
18650
|
-
|
|
18651
|
-
console.error(
|
|
18665
|
+
e_4 = _a.sent();
|
|
18666
|
+
console.error(e_4);
|
|
18652
18667
|
return [3 /*break*/, 5];
|
|
18653
18668
|
case 5:
|
|
18654
18669
|
res(false);
|
|
@@ -18702,7 +18717,7 @@ function createBillboardImage(url, bgColor, size) {
|
|
|
18702
18717
|
}
|
|
18703
18718
|
IMAGE_PADDING = 8;
|
|
18704
18719
|
prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
18705
|
-
var response, blob, image_1,
|
|
18720
|
+
var response, blob, image_1, e_5;
|
|
18706
18721
|
return __generator(this, function (_a) {
|
|
18707
18722
|
switch (_a.label) {
|
|
18708
18723
|
case 0:
|
|
@@ -18744,8 +18759,8 @@ function createBillboardImage(url, bgColor, size) {
|
|
|
18744
18759
|
image_1.src = URL.createObjectURL(blob);
|
|
18745
18760
|
return [3 /*break*/, 4];
|
|
18746
18761
|
case 3:
|
|
18747
|
-
|
|
18748
|
-
rej(
|
|
18762
|
+
e_5 = _a.sent();
|
|
18763
|
+
rej(e_5);
|
|
18749
18764
|
return [3 /*break*/, 4];
|
|
18750
18765
|
case 4: return [2 /*return*/];
|
|
18751
18766
|
}
|
|
@@ -25308,7 +25323,7 @@ var ViewRenderEngine;
|
|
|
25308
25323
|
ViewRenderEngine.Render = Render;
|
|
25309
25324
|
})(ViewRenderEngine || (ViewRenderEngine = {}));
|
|
25310
25325
|
|
|
25311
|
-
var VERSION = "4.1.
|
|
25326
|
+
var VERSION = "4.1.5";
|
|
25312
25327
|
|
|
25313
25328
|
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 };
|
|
25314
25329
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|