bruce-cesium 4.1.4 → 4.1.6

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
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, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, HeadingPitchRange, Ion, Cesium3DTileStyle, Cesium3DTileColorBlendMode, 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, CzmlDataSource, Quaternion, Intersect } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, DistanceDisplayCondition, NearFarScalar, Model, ColorMaterialProperty, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorBlendMode, HeadingPitchRoll, Transforms, JulianDate, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, 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, BoundingSphere, GeometryInstance, PolygonPipeline, 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,7 +18276,7 @@ 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:
@@ -18284,13 +18284,13 @@ var GoogleSearchRenderManager;
18284
18284
  MIN_HEIGHT = 0;
18285
18285
  _a.label = 1;
18286
18286
  case 1:
18287
- if (!((!this.monitor.GetTarget() || !this.monitor.GetBounds()) && this.getterLoopId == loopId)) return [3 /*break*/, 3];
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) {
18293
+ if (this.Disposed || this.getterLoopId != loopId) {
18294
18294
  return [2 /*return*/];
18295
18295
  }
18296
18296
  target = this.monitor.GetTarget();
@@ -18306,13 +18306,13 @@ var GoogleSearchRenderManager;
18306
18306
  curCellIndex = cells.length > 0 ? 0 : null;
18307
18307
  _a.label = 4;
18308
18308
  case 4:
18309
- if (!(curCellIndex != null)) return [3 /*break*/, 11];
18309
+ if (!(curCellIndex != null)) return [3 /*break*/, 14];
18310
18310
  return [4 /*yield*/, delay$1(500)];
18311
18311
  case 5:
18312
18312
  _a.sent();
18313
18313
  // New loop started, break the old one.
18314
18314
  if (this.getterLoopId != loopId || this.Disposed) {
18315
- return [3 /*break*/, 11];
18315
+ return [3 /*break*/, 14];
18316
18316
  }
18317
18317
  curCell = cells[curCellIndex];
18318
18318
  if (curCell.IsFetched()) {
@@ -18328,10 +18328,10 @@ var GoogleSearchRenderManager;
18328
18328
  }
18329
18329
  _a.label = 6;
18330
18330
  case 6:
18331
- _a.trys.push([6, 9, , 10]);
18331
+ _a.trys.push([6, 12, , 13]);
18332
18332
  // New loop started, break the old one.
18333
18333
  if (this.getterLoopId != loopId) {
18334
- return [3 /*break*/, 11];
18334
+ return [3 /*break*/, 14];
18335
18335
  }
18336
18336
  bounds_1 = curCell.GetBounds();
18337
18337
  location_1 = {
@@ -18339,29 +18339,41 @@ var GoogleSearchRenderManager;
18339
18339
  latitude: bounds_1.south + ((bounds_1.north - bounds_1.south) / 2),
18340
18340
  longitude: bounds_1.west + ((bounds_1.east - bounds_1.west) / 2)
18341
18341
  };
18342
+ result = [];
18343
+ _a.label = 7;
18344
+ case 7:
18345
+ _a.trys.push([7, 9, , 10]);
18342
18346
  return [4 /*yield*/, getPlaces({
18343
18347
  location: location_1,
18344
18348
  bounds: bounds_1,
18345
18349
  keyword: this.item.keyword,
18346
18350
  accessToken: this.accessToken
18347
18351
  })];
18348
- case 7:
18349
- result = _a.sent();
18350
- return [4 /*yield*/, this.renderPlaces(result)];
18351
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:
18352
18364
  _a.sent();
18353
18365
  if (this.getterLoopId != loopId || this.Disposed) {
18354
- return [3 /*break*/, 11];
18366
+ return [3 /*break*/, 14];
18355
18367
  }
18356
18368
  curCell.Fetched = true;
18357
18369
  curCell.Fetching = false;
18358
- return [3 /*break*/, 10];
18359
- case 9:
18360
- e_2 = _a.sent();
18361
- console.error(e_2);
18362
- return [3 /*break*/, 11];
18363
- case 10: return [3 /*break*/, 4];
18364
- case 11: return [2 /*return*/];
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*/];
18365
18377
  }
18366
18378
  });
18367
18379
  }); });
@@ -18625,7 +18637,7 @@ function validateKeyForSearches(apiKey) {
18625
18637
  return [2 /*return*/, _validateKeyCache.get(apiKey)];
18626
18638
  }
18627
18639
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
18628
- var url, response, data, e_3;
18640
+ var url, response, data, e_4;
18629
18641
  return __generator(this, function (_a) {
18630
18642
  switch (_a.label) {
18631
18643
  case 0:
@@ -18650,8 +18662,8 @@ function validateKeyForSearches(apiKey) {
18650
18662
  res(true);
18651
18663
  return [2 /*return*/];
18652
18664
  case 4:
18653
- e_3 = _a.sent();
18654
- console.error(e_3);
18665
+ e_4 = _a.sent();
18666
+ console.error(e_4);
18655
18667
  return [3 /*break*/, 5];
18656
18668
  case 5:
18657
18669
  res(false);
@@ -18705,7 +18717,7 @@ function createBillboardImage(url, bgColor, size) {
18705
18717
  }
18706
18718
  IMAGE_PADDING = 8;
18707
18719
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
18708
- var response, blob, image_1, e_4;
18720
+ var response, blob, image_1, e_5;
18709
18721
  return __generator(this, function (_a) {
18710
18722
  switch (_a.label) {
18711
18723
  case 0:
@@ -18747,8 +18759,8 @@ function createBillboardImage(url, bgColor, size) {
18747
18759
  image_1.src = URL.createObjectURL(blob);
18748
18760
  return [3 /*break*/, 4];
18749
18761
  case 3:
18750
- e_4 = _a.sent();
18751
- rej(e_4);
18762
+ e_5 = _a.sent();
18763
+ rej(e_5);
18752
18764
  return [3 /*break*/, 4];
18753
18765
  case 4: return [2 /*return*/];
18754
18766
  }
@@ -22303,7 +22315,7 @@ var WidgetEmbeddedInfoView = /** @class */ (function (_super) {
22303
22315
  }
22304
22316
  this._lastSelectedId = firstId;
22305
22317
  try {
22306
- url = "https://embed.nextspace-dev.net/embed";
22318
+ url = "https://embed.nextspace.host/embed";
22307
22319
  urlParams = new URLSearchParams();
22308
22320
  urlParams.append("id", "info-view");
22309
22321
  urlParams.append("entityId", firstId);
@@ -25311,7 +25323,7 @@ var ViewRenderEngine;
25311
25323
  ViewRenderEngine.Render = Render;
25312
25324
  })(ViewRenderEngine || (ViewRenderEngine = {}));
25313
25325
 
25314
- var VERSION = "4.1.4";
25326
+ var VERSION = "4.1.6";
25315
25327
 
25316
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 };
25317
25329
  //# sourceMappingURL=bruce-cesium.es5.js.map