@itwin/core-frontend 3.0.0-dev.183 → 3.0.0-dev.184
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/CHANGELOG.md +89 -1
- package/lib/cjs/ApproximateTerrainHeights.d.ts.map +1 -1
- package/lib/cjs/ApproximateTerrainHeights.js +6 -2
- package/lib/cjs/ApproximateTerrainHeights.js.map +1 -1
- package/lib/cjs/BingLocation.js +2 -2
- package/lib/cjs/BingLocation.js.map +1 -1
- package/lib/cjs/DisplayStyleState.d.ts +9 -3
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +66 -41
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/FrontendLoggerCategory.d.ts +2 -8
- package/lib/cjs/FrontendLoggerCategory.d.ts.map +1 -1
- package/lib/cjs/FrontendLoggerCategory.js +2 -8
- package/lib/cjs/FrontendLoggerCategory.js.map +1 -1
- package/lib/cjs/NativeApp.d.ts +1 -1
- package/lib/cjs/NativeApp.d.ts.map +1 -1
- package/lib/cjs/NativeApp.js +3 -3
- package/lib/cjs/NativeApp.js.map +1 -1
- package/lib/cjs/RealityDataSource.js +8 -5
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/ViewCreator2d.js +1 -1
- package/lib/cjs/ViewCreator2d.js.map +1 -1
- package/lib/cjs/ViewCreator3d.js +1 -1
- package/lib/cjs/ViewCreator3d.js.map +1 -1
- package/lib/cjs/render/webgl/System.d.ts +1 -1
- package/lib/cjs/request/Request.d.ts +167 -0
- package/lib/cjs/request/Request.d.ts.map +1 -0
- package/lib/cjs/request/Request.js +315 -0
- package/lib/cjs/request/Request.js.map +1 -0
- package/lib/cjs/tile/map/ArcGISTileMap.d.ts.map +1 -1
- package/lib/cjs/tile/map/ArcGISTileMap.js +6 -2
- package/lib/cjs/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/cjs/tile/map/ArcGisTokenGenerator.js +3 -3
- package/lib/cjs/tile/map/ArcGisTokenGenerator.js.map +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.d.ts +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.js +11 -8
- package/lib/cjs/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/tile/map/BingElevation.js +4 -4
- package/lib/cjs/tile/map/BingElevation.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +3 -3
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +4 -4
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.js +2 -2
- package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +4 -4
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +2 -2
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tile/map/MapTileLoader.js +2 -2
- package/lib/cjs/tile/map/MapTileLoader.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/cjs/tile/map/WmsCapabilities.d.ts +1 -1
- package/lib/cjs/tile/map/WmsCapabilities.js +2 -2
- package/lib/cjs/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.d.ts +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js +2 -2
- package/lib/cjs/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/ApproximateTerrainHeights.d.ts.map +1 -1
- package/lib/esm/ApproximateTerrainHeights.js +6 -2
- package/lib/esm/ApproximateTerrainHeights.js.map +1 -1
- package/lib/esm/BingLocation.js +1 -1
- package/lib/esm/BingLocation.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +9 -3
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +66 -41
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/FrontendLoggerCategory.d.ts +2 -8
- package/lib/esm/FrontendLoggerCategory.d.ts.map +1 -1
- package/lib/esm/FrontendLoggerCategory.js +2 -8
- package/lib/esm/FrontendLoggerCategory.js.map +1 -1
- package/lib/esm/NativeApp.d.ts +1 -1
- package/lib/esm/NativeApp.d.ts.map +1 -1
- package/lib/esm/NativeApp.js +1 -1
- package/lib/esm/NativeApp.js.map +1 -1
- package/lib/esm/RealityDataSource.js +6 -3
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/ViewCreator2d.js +1 -1
- package/lib/esm/ViewCreator2d.js.map +1 -1
- package/lib/esm/ViewCreator3d.js +1 -1
- package/lib/esm/ViewCreator3d.js.map +1 -1
- package/lib/esm/render/webgl/System.d.ts +1 -1
- package/lib/esm/request/Request.d.ts +167 -0
- package/lib/esm/request/Request.d.ts.map +1 -0
- package/lib/esm/request/Request.js +289 -0
- package/lib/esm/request/Request.js.map +1 -0
- package/lib/esm/tile/map/ArcGISTileMap.d.ts.map +1 -1
- package/lib/esm/tile/map/ArcGISTileMap.js +6 -2
- package/lib/esm/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/esm/tile/map/ArcGisTokenGenerator.js +1 -1
- package/lib/esm/tile/map/ArcGisTokenGenerator.js.map +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.d.ts +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.d.ts.map +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.js +6 -3
- package/lib/esm/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/tile/map/BingElevation.js +1 -1
- package/lib/esm/tile/map/BingElevation.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +1 -1
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tile/map/MapTileLoader.js +1 -1
- package/lib/esm/tile/map/MapTileLoader.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/tile/map/WmsCapabilities.d.ts +1 -1
- package/lib/esm/tile/map/WmsCapabilities.js +1 -1
- package/lib/esm/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.d.ts +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js.map +1 -1
- package/package.json +28 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,94 @@
|
|
|
1
1
|
# Change Log - @itwin/core-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 12 Jan 2022 14:52:38 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 2.19.28
|
|
6
|
+
Wed, 12 Jan 2022 14:52:38 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 2.19.27
|
|
11
|
+
Wed, 05 Jan 2022 20:07:20 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 2.19.26
|
|
16
|
+
Wed, 08 Dec 2021 20:54:52 GMT
|
|
17
|
+
|
|
18
|
+
_Version update only_
|
|
19
|
+
|
|
20
|
+
## 2.19.25
|
|
21
|
+
Fri, 03 Dec 2021 20:05:49 GMT
|
|
22
|
+
|
|
23
|
+
_Version update only_
|
|
24
|
+
|
|
25
|
+
## 2.19.24
|
|
26
|
+
Mon, 29 Nov 2021 18:44:31 GMT
|
|
27
|
+
|
|
28
|
+
_Version update only_
|
|
29
|
+
|
|
30
|
+
## 2.19.23
|
|
31
|
+
Mon, 22 Nov 2021 20:41:40 GMT
|
|
32
|
+
|
|
33
|
+
_Version update only_
|
|
34
|
+
|
|
35
|
+
## 2.19.22
|
|
36
|
+
Wed, 17 Nov 2021 01:23:26 GMT
|
|
37
|
+
|
|
38
|
+
_Version update only_
|
|
39
|
+
|
|
40
|
+
## 2.19.21
|
|
41
|
+
Wed, 10 Nov 2021 10:58:24 GMT
|
|
42
|
+
|
|
43
|
+
_Version update only_
|
|
44
|
+
|
|
45
|
+
## 2.19.20
|
|
46
|
+
Fri, 29 Oct 2021 16:14:22 GMT
|
|
47
|
+
|
|
48
|
+
### Updates
|
|
49
|
+
|
|
50
|
+
- Viewport.pickDepthPoint and Viewport.pickNearestVisibleGeometry preserve model display transforms.
|
|
51
|
+
|
|
52
|
+
## 2.19.19
|
|
53
|
+
Mon, 25 Oct 2021 16:16:25 GMT
|
|
54
|
+
|
|
55
|
+
### Updates
|
|
56
|
+
|
|
57
|
+
- Fix display issues with transparency, shadows, hilite, and overlay decorations on iOS 15.
|
|
58
|
+
|
|
59
|
+
## 2.19.18
|
|
60
|
+
Thu, 21 Oct 2021 20:59:44 GMT
|
|
61
|
+
|
|
62
|
+
### Updates
|
|
63
|
+
|
|
64
|
+
- Fix failure to find any 3d models in ViewCreator3d.
|
|
65
|
+
- Backport from PR#2451 enable reprojection and merge
|
|
66
|
+
- Fix iOS>=15 missing hilite outlines by ensuring we do not write depth for hilite shaders.
|
|
67
|
+
|
|
68
|
+
## 2.19.17
|
|
69
|
+
Thu, 14 Oct 2021 21:19:43 GMT
|
|
70
|
+
|
|
71
|
+
### Updates
|
|
72
|
+
|
|
73
|
+
- Support Open City Planner (OCP) that stores orbit point clouds (OPC) in their own azure environment.
|
|
74
|
+
|
|
75
|
+
## 2.19.16
|
|
76
|
+
Mon, 11 Oct 2021 17:37:46 GMT
|
|
77
|
+
|
|
78
|
+
_Version update only_
|
|
79
|
+
|
|
80
|
+
## 2.19.15
|
|
81
|
+
Fri, 08 Oct 2021 16:44:23 GMT
|
|
82
|
+
|
|
83
|
+
### Updates
|
|
84
|
+
|
|
85
|
+
- Allow the same tile to be drawn repeatedly and efficiently in same Viewport with different symbology overrides
|
|
86
|
+
- Add a new property to ContextRealityModelState named rdSourecKey that provide a new way of attaching Reality Data that will resolve tilesetUrl at runtime.
|
|
87
|
+
|
|
88
|
+
## 2.19.14
|
|
89
|
+
Fri, 01 Oct 2021 13:07:03 GMT
|
|
90
|
+
|
|
91
|
+
_Version update only_
|
|
4
92
|
|
|
5
93
|
## 2.19.13
|
|
6
94
|
Tue, 21 Sep 2021 21:06:40 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApproximateTerrainHeights.d.ts","sourceRoot":"","sources":["../../src/ApproximateTerrainHeights.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAW,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGjE,OAAO,EAA0B,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKjE;;;GAGG;AACH,qBAAa,yBAAyB;IACpC,gBAAuB,QAAQ,KAAK;IACpC,SAAgB,iBAAiB,UAAiC;IAClE,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgH;IAChJ,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA0C;IACxE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAEvD,WAAkB,QAAQ,IAAI,yBAAyB,CAKtD;IAED;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ApproximateTerrainHeights.d.ts","sourceRoot":"","sources":["../../src/ApproximateTerrainHeights.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAW,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGjE,OAAO,EAA0B,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKjE;;;GAGG;AACH,qBAAa,yBAAyB;IACpC,gBAAuB,QAAQ,KAAK;IACpC,SAAgB,iBAAiB,UAAiC;IAClE,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgH;IAChJ,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA0C;IACxE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAEvD,WAAkB,QAAQ,IAAI,yBAAyB,CAKtD;IAED;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUjC,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;IAsB7D,wBAAwB,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;IAmB9E,OAAO,CAAC,eAAe;CA0CxB"}
|
|
@@ -11,7 +11,7 @@ exports.ApproximateTerrainHeights = void 0;
|
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
const core_geometry_1 = require("@itwin/core-geometry");
|
|
13
13
|
const core_common_1 = require("@itwin/core-common");
|
|
14
|
-
const
|
|
14
|
+
const Request_1 = require("./request/Request");
|
|
15
15
|
const internal_1 = require("./tile/internal");
|
|
16
16
|
const IModelApp_1 = require("./IModelApp");
|
|
17
17
|
let instance;
|
|
@@ -37,7 +37,11 @@ class ApproximateTerrainHeights {
|
|
|
37
37
|
*/
|
|
38
38
|
async initialize() {
|
|
39
39
|
if (undefined === this._terrainHeights) {
|
|
40
|
-
|
|
40
|
+
const data = await (0, Request_1.request)(`${IModelApp_1.IModelApp.publicPath}assets/approximateTerrainHeights.json`, {
|
|
41
|
+
method: "GET",
|
|
42
|
+
responseType: "json",
|
|
43
|
+
});
|
|
44
|
+
this._terrainHeights = data.body;
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
getTileHeightRange(quadId, result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApproximateTerrainHeights.js","sourceRoot":"","sources":["../../src/ApproximateTerrainHeights.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAiE;AACjE,oDAAkD;AAClD
|
|
1
|
+
{"version":3,"file":"ApproximateTerrainHeights.js","sourceRoot":"","sources":["../../src/ApproximateTerrainHeights.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAiE;AACjE,oDAAkD;AAClD,+CAA4C;AAC5C,8CAAiE;AACjE,2CAAwC;AAExC,IAAI,QAA+C,CAAC;AAEpD;;;GAGG;AACH,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AAE,CAAC,IAAI,QAAQ,EAAE,EAAE,CAAC,EAAE;YAC9B,IAAI,MAAM,GAAG,KAAK,CAAC;YACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;gBAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;gBACvC,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;gBACxE,IAAI,CAAC,KAAK,CAAC,EAAE;oBACX,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;oBACjC,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;iBAClC;qBAAM,IAAI,QAAQ,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,QAAQ,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE;oBACnF,MAAM,GAAG,IAAI,CAAC;oBACd,MAAM;iBACP;aACF;YAED,IAAI,MAAM;gBACR,MAAM;YAER,UAAU,GAAG,QAAQ,CAAC;YACtB,UAAU,GAAG,QAAQ,CAAC;SACvB;QAED,IAAI,CAAC,KAAK,CAAC,EAAE;YACX,OAAO,SAAS,CAAC;SAClB;QAED,OAAO;YACL,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,UAAU;YACb,KAAK,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SAC3C,CAAC;IACJ,CAAC;;AA/GH,8DAgHC;AA/GwB,kCAAQ,GAAG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { Point2d, Range1d, Range2d } from \"@itwin/core-geometry\";\r\nimport { Cartographic } from \"@itwin/core-common\";\r\nimport { request } from \"./request/Request\";\r\nimport { GeographicTilingScheme, QuadId } from \"./tile/internal\";\r\nimport { IModelApp } from \"./IModelApp\";\r\n\r\nlet instance: ApproximateTerrainHeights | undefined;\r\n\r\n/**\r\n * A collection of functions for approximating terrain height\r\n * @internal\r\n */\r\nexport class ApproximateTerrainHeights {\r\n public static readonly maxLevel = 6;\r\n public readonly globalHeightRange = Range1d.createXX(-400, 90000); // Dead Sea to Mount Everest.\r\n private _terrainHeights: any;\r\n private readonly _scratchCorners = [Cartographic.createZero(), Cartographic.createZero(), Cartographic.createZero(), Cartographic.createZero()];\r\n private readonly _tilingScheme = new GeographicTilingScheme(2, 1, true); // Y at top... ?\r\n private readonly _scratchTileXY = Point2d.createZero();\r\n\r\n public static get instance(): ApproximateTerrainHeights {\r\n if (undefined === instance)\r\n instance = new ApproximateTerrainHeights();\r\n\r\n return instance;\r\n }\r\n\r\n /**\r\n * Initializes the minimum and maximum terrain heights.\r\n * @return {Promise}\r\n */\r\n public async initialize(): Promise<void> {\r\n if (undefined === this._terrainHeights) {\r\n const data = await request(`${IModelApp.publicPath}assets/approximateTerrainHeights.json`, {\r\n method: \"GET\",\r\n responseType: \"json\",\r\n });\r\n this._terrainHeights = data.body;\r\n }\r\n }\r\n\r\n public getTileHeightRange(quadId: QuadId, result?: Range1d): Range1d {\r\n result = Range1d.createFrom(this.globalHeightRange, result);\r\n if (undefined === this._terrainHeights)\r\n return result; // Not initialized.\r\n\r\n let level = quadId.level, column = quadId.column, row = quadId.row;\r\n if (level > 6) {\r\n column = column >> (level - 6);\r\n row = row >> quadId.row >> ((level - 6));\r\n level = 6;\r\n }\r\n\r\n const key = `${level}-${column}-${row}`;\r\n const heights = this._terrainHeights[key];\r\n assert(undefined !== heights);\r\n\r\n result.low = heights[0];\r\n result.high = heights[1];\r\n\r\n return result;\r\n }\r\n\r\n public getMinimumMaximumHeights(rectangle: Range2d, result?: Range1d): Range1d {\r\n result = Range1d.createFrom(this.globalHeightRange, result);\r\n if (undefined === this._terrainHeights)\r\n return result; // Not initialized.\r\n\r\n const xyLevel = this._getTileXYLevel(rectangle);\r\n if (undefined !== xyLevel) {\r\n const key = `${xyLevel.level}-${xyLevel.x}-${xyLevel.y}`;\r\n const heights = this._terrainHeights[key];\r\n assert(undefined !== heights);\r\n if (undefined !== heights) {\r\n result.low = heights[0];\r\n result.high = heights[1];\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private _getTileXYLevel(rectangle: Range2d): { x: number, y: number, level: number } | undefined {\r\n Cartographic.fromRadians({ longitude: rectangle.low.x, latitude: rectangle.high.y, height: 0.0 }, this._scratchCorners[0]);\r\n Cartographic.fromRadians({ longitude: rectangle.high.x, latitude: rectangle.high.y, height: 0.0 }, this._scratchCorners[1]);\r\n Cartographic.fromRadians({ longitude: rectangle.low.x, latitude: rectangle.low.y, height: 0.0 }, this._scratchCorners[2]);\r\n Cartographic.fromRadians({ longitude: rectangle.high.x, latitude: rectangle.low.y, height: 0.0 }, this._scratchCorners[3]);\r\n\r\n // Determine which tile the bounding rectangle is in\r\n let lastLevelX = 0, lastLevelY = 0;\r\n let currentX = 0, currentY = 0;\r\n const maxLevel = ApproximateTerrainHeights.maxLevel;\r\n let i;\r\n for (i = 0; i <= maxLevel; ++i) {\r\n let failed = false;\r\n for (let j = 0; j < 4; ++j) {\r\n const corner = this._scratchCorners[j];\r\n this._tilingScheme.cartographicToTileXY(corner, i, this._scratchTileXY);\r\n if (j === 0) {\r\n currentX = this._scratchTileXY.x;\r\n currentY = this._scratchTileXY.y;\r\n } else if (currentX !== this._scratchTileXY.x || currentY !== this._scratchTileXY.y) {\r\n failed = true;\r\n break;\r\n }\r\n }\r\n\r\n if (failed)\r\n break;\r\n\r\n lastLevelX = currentX;\r\n lastLevelY = currentY;\r\n }\r\n\r\n if (i === 0) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n x: lastLevelX,\r\n y: lastLevelY,\r\n level: (i > maxLevel) ? maxLevel : (i - 1),\r\n };\r\n }\r\n}\r\n"]}
|
package/lib/cjs/BingLocation.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.BingLocationProvider = void 0;
|
|
11
11
|
const core_common_1 = require("@itwin/core-common");
|
|
12
|
-
const
|
|
12
|
+
const Request_1 = require("./request/Request");
|
|
13
13
|
const IModelApp_1 = require("./IModelApp");
|
|
14
14
|
/** Provides an interface to the [Bing Maps location services](https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/).
|
|
15
15
|
* @public
|
|
@@ -31,7 +31,7 @@ class BingLocationProvider {
|
|
|
31
31
|
const requestUrl = this._locationRequestTemplate.replace("{query}", query);
|
|
32
32
|
const requestOptions = { method: "GET", responseType: "json" };
|
|
33
33
|
try {
|
|
34
|
-
const locationResponse = await (0,
|
|
34
|
+
const locationResponse = await (0, Request_1.request)(requestUrl, requestOptions);
|
|
35
35
|
const point = locationResponse.body.resourceSets[0].resources[0].point;
|
|
36
36
|
const bbox = locationResponse.body.resourceSets[0].resources[0].bbox;
|
|
37
37
|
const southLatitude = bbox[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BingLocation.js","sourceRoot":"","sources":["../../src/BingLocation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAkD;AAClD
|
|
1
|
+
{"version":3,"file":"BingLocation.js","sourceRoot":"","sources":["../../src/BingLocation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAkD;AAClD,+CAAsE;AACtE,2CAAwC;AAGxC;;GAEG;AACH,MAAa,oBAAoB;IAG/B;QACE,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,qBAAS,CAAC,sBA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AE,0BAAY,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;oBAC1F,SAAS,EAAE,0BAAY,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;iBAC3F;aACF,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;CACF;AArCD,oDAqCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tiles\r\n */\r\n\r\nimport { Cartographic } from \"@itwin/core-common\";\r\nimport { request, RequestOptions, Response } from \"./request/Request\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { GlobalLocation } from \"./ViewGlobalLocation\";\r\n\r\n/** Provides an interface to the [Bing Maps location services](https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/).\r\n * @public\r\n */\r\nexport class BingLocationProvider {\r\n private _locationRequestTemplate: string;\r\n\r\n constructor() {\r\n let bingKey = \"\";\r\n if (IModelApp.mapLayerFormatRegistry.configOptions.BingMaps) {\r\n bingKey = IModelApp.mapLayerFormatRegistry.configOptions.BingMaps.value;\r\n }\r\n this._locationRequestTemplate = \"https://dev.virtualearth.net/REST/v1/Locations?query={query}&key={BingMapsAPIKey}\".replace(\"{BingMapsAPIKey}\", bingKey);\r\n }\r\n /** Return the location of a query (or undefined if not found). The strings \"Space Needle\" (a landmark) and \"1 Microsoft Way Redmond WA\" (an address) are examples of query strings with location information.\r\n * These strings can be specified as a structured URL parameter or as a query parameter value. See [Bing Location Services documentation](https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-query) for additional\r\n * information on queries.\r\n * @public\r\n */\r\n public async getLocation(query: string): Promise<GlobalLocation | undefined> {\r\n const requestUrl = this._locationRequestTemplate.replace(\"{query}\", query);\r\n const requestOptions: RequestOptions = { method: \"GET\", responseType: \"json\" };\r\n try {\r\n const locationResponse: Response = await request(requestUrl, requestOptions);\r\n const point = locationResponse.body.resourceSets[0].resources[0].point;\r\n const bbox = locationResponse.body.resourceSets[0].resources[0].bbox;\r\n const southLatitude = bbox[0];\r\n const westLongitude = bbox[1];\r\n const northLatitude = bbox[2];\r\n const eastLongitude = bbox[3];\r\n return {\r\n center: Cartographic.fromDegrees({ longitude: point.coordinates[1], latitude: point.coordinates[0] }),\r\n area: {\r\n southwest: Cartographic.fromDegrees({ longitude: westLongitude, latitude: southLatitude }),\r\n northeast: Cartographic.fromDegrees({ longitude: eastLongitude, latitude: northLatitude }),\r\n },\r\n };\r\n } catch (error) {\r\n return undefined;\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { BeEvent, Id64String } from "@itwin/core-bentley";
|
|
5
5
|
import { Range1d, Vector3d } from "@itwin/core-geometry";
|
|
6
|
-
import { BackgroundMapProps, BackgroundMapProviderProps, BackgroundMapSettings, BaseLayerSettings, ColorDef, ContextRealityModelProps, DisplayStyle3dSettings, DisplayStyleProps, DisplayStyleSettings, Environment, FeatureAppearance, GlobeMode, LightSettings, MapLayerProps, MapLayerSettings, MapSubLayerProps, RenderSchedule, SolarShadowSettings, SubCategoryOverride, SubLayerId, ViewFlags } from "@itwin/core-common";
|
|
6
|
+
import { BackgroundMapProps, BackgroundMapProviderProps, BackgroundMapSettings, BaseLayerSettings, ColorDef, ContextRealityModelProps, DisplayStyle3dSettings, DisplayStyleProps, DisplayStyleSettings, Environment, FeatureAppearance, GlobeMode, LightSettings, MapLayerProps, MapLayerSettings, MapSubLayerProps, RenderSchedule, RenderTimelineProps, SolarShadowSettings, SubCategoryOverride, SubLayerId, ViewFlags } from "@itwin/core-common";
|
|
7
7
|
import { BackgroundMapGeometry } from "./BackgroundMapGeometry";
|
|
8
8
|
import { ContextRealityModelState } from "./ContextRealityModelState";
|
|
9
9
|
import { ElementState } from "./EntityState";
|
|
@@ -36,6 +36,8 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
36
36
|
private _scheduleState?;
|
|
37
37
|
private _ellipsoidMapGeometry;
|
|
38
38
|
private _attachedRealityModelPlanarClipMasks;
|
|
39
|
+
/** @internal */
|
|
40
|
+
protected _queryRenderTimelinePropsPromise?: Promise<RenderTimelineProps | undefined>;
|
|
39
41
|
/** Event raised just before the [[scheduleScriptReference]] property is changed. */
|
|
40
42
|
readonly onScheduleScriptReferenceChanged: BeEvent<(newScriptReference: RenderSchedule.ScriptReference | undefined) => void>;
|
|
41
43
|
/** Event raised just after [[setOSMBuildingDisplay]] changes the enabled state of the OSM buildings. */
|
|
@@ -54,7 +56,10 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
54
56
|
* you obtain a display style by some other means you should `await` this method before using the display style.
|
|
55
57
|
*/
|
|
56
58
|
load(): Promise<void>;
|
|
57
|
-
private
|
|
59
|
+
private loadScheduleStateFromScript;
|
|
60
|
+
private loadScheduleStateFromTimeline;
|
|
61
|
+
/** @internal */
|
|
62
|
+
protected queryRenderTimelineProps(timelineId: Id64String): Promise<RenderTimelineProps | undefined>;
|
|
58
63
|
/** @internal */
|
|
59
64
|
get displayTerrain(): boolean;
|
|
60
65
|
/** @internal */
|
|
@@ -103,7 +108,8 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
103
108
|
/** The name of this DisplayStyle */
|
|
104
109
|
get name(): string;
|
|
105
110
|
/** Change the Id of the [RenderTimeline]($backend) element that hosts the [RenderSchedule.Script]($common) to be applied by this display style for
|
|
106
|
-
* animating the contents of the view.
|
|
111
|
+
* animating the contents of the view, and update [[scheduleScriptReference]] using the script associated with the [RenderTimeline]($backend) element.
|
|
112
|
+
* @see [DisplayStyleSettings.renderTimeline]($common).
|
|
107
113
|
*/
|
|
108
114
|
changeRenderTimeline(timelineId: Id64String | undefined): Promise<void>;
|
|
109
115
|
/** The [RenderSchedule.Script]($common) that animates the contents of the view, if any.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayStyleState.d.ts","sourceRoot":"","sources":["../../src/DisplayStyleState.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAU,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAS,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAAyB,0BAA0B,EAAE,qBAAqB,EAC5F,iBAAiB,EAAwB,QAAQ,EAAE,wBAAwB,EAAE,sBAAsB,EACnG,iBAAiB,EAAE,oBAAoB,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAChH,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"DisplayStyleState.d.ts","sourceRoot":"","sources":["../../src/DisplayStyleState.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAU,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAS,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAAyB,0BAA0B,EAAE,qBAAqB,EAC5F,iBAAiB,EAAwB,QAAQ,EAAE,wBAAwB,EAAE,sBAAsB,EACnG,iBAAiB,EAAE,oBAAoB,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAChH,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,mBAAmB,EACvE,mBAAmB,EAAE,mBAAmB,EAAE,UAAU,EAAuF,SAAS,EACrJ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,wBAAwB,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AgB;IACT,sBAAsB,IAAI,uBAAuB,GAAG,SAAS;CAWrE"}
|
|
@@ -70,29 +70,58 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
if (undefined !== this.settings.renderTimeline)
|
|
74
|
+
await this.loadScheduleStateFromTimeline(this.settings.renderTimeline);
|
|
75
|
+
else
|
|
76
|
+
this.loadScheduleStateFromScript(this.settings.scheduleScriptProps); // eslint-disable-line deprecation/deprecation
|
|
74
77
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
sourceId = this.settings.renderTimeline;
|
|
86
|
-
}
|
|
78
|
+
loadScheduleStateFromScript(scriptProps) {
|
|
79
|
+
let newState;
|
|
80
|
+
if (scriptProps) {
|
|
81
|
+
try {
|
|
82
|
+
const script = core_common_1.RenderSchedule.Script.fromJSON(scriptProps);
|
|
83
|
+
if (script)
|
|
84
|
+
newState = new RenderScheduleState_1.RenderScheduleState(this.id, script);
|
|
85
|
+
}
|
|
86
|
+
catch (_) {
|
|
87
|
+
// schedule state is undefined.
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
}
|
|
90
|
+
if (newState !== this._scheduleState) {
|
|
91
|
+
this.onScheduleScriptReferenceChanged.raiseEvent(newState);
|
|
92
|
+
this._scheduleState = newState;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async loadScheduleStateFromTimeline(timelineId) {
|
|
96
|
+
let newState;
|
|
97
|
+
try {
|
|
98
|
+
// If a subsequent call to loadScheduleStateFromTimeline is made while we're awaiting this one, we'll abort this one.
|
|
99
|
+
const promise = this._queryRenderTimelinePropsPromise = this.queryRenderTimelineProps(timelineId);
|
|
100
|
+
const timeline = await promise;
|
|
101
|
+
if (promise !== this._queryRenderTimelinePropsPromise)
|
|
102
|
+
return;
|
|
103
|
+
if (timeline) {
|
|
104
|
+
const scriptProps = JSON.parse(timeline.script);
|
|
105
|
+
const script = core_common_1.RenderSchedule.Script.fromJSON(scriptProps);
|
|
106
|
+
if (script)
|
|
107
|
+
newState = new RenderScheduleState_1.RenderScheduleState(timelineId, script);
|
|
92
108
|
}
|
|
93
|
-
return (script && sourceId) ? new RenderScheduleState_1.RenderScheduleState(sourceId, script) : undefined;
|
|
94
109
|
}
|
|
95
|
-
catch {
|
|
110
|
+
catch (_) {
|
|
111
|
+
// schedule state is undefined.
|
|
112
|
+
}
|
|
113
|
+
this._queryRenderTimelinePropsPromise = undefined;
|
|
114
|
+
if (newState !== this._scheduleState) {
|
|
115
|
+
this.onScheduleScriptReferenceChanged.raiseEvent(newState);
|
|
116
|
+
this._scheduleState = newState;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/** @internal */
|
|
120
|
+
async queryRenderTimelineProps(timelineId) {
|
|
121
|
+
try {
|
|
122
|
+
return await this.iModel.elements.loadProps(timelineId, { renderTimeline: { omitScriptElementIds: true } });
|
|
123
|
+
}
|
|
124
|
+
catch (_) {
|
|
96
125
|
return undefined;
|
|
97
126
|
}
|
|
98
127
|
}
|
|
@@ -178,14 +207,16 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
178
207
|
/** The name of this DisplayStyle */
|
|
179
208
|
get name() { return this.code.value; }
|
|
180
209
|
/** Change the Id of the [RenderTimeline]($backend) element that hosts the [RenderSchedule.Script]($common) to be applied by this display style for
|
|
181
|
-
* animating the contents of the view.
|
|
210
|
+
* animating the contents of the view, and update [[scheduleScriptReference]] using the script associated with the [RenderTimeline]($backend) element.
|
|
211
|
+
* @see [DisplayStyleSettings.renderTimeline]($common).
|
|
182
212
|
*/
|
|
183
213
|
async changeRenderTimeline(timelineId) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
214
|
+
// Potentially trigger async loading of new schedule state.
|
|
215
|
+
this.settings.renderTimeline = timelineId;
|
|
216
|
+
// Await async loading if necessary.
|
|
217
|
+
// Note the `await` in loadScheduleStateFromTimeline will resolve before this one [per the spec](https://262.ecma-international.org/6.0/#sec-triggerpromisereactions).
|
|
218
|
+
if (this._queryRenderTimelinePropsPromise)
|
|
219
|
+
await this._queryRenderTimelinePropsPromise;
|
|
189
220
|
}
|
|
190
221
|
/** The [RenderSchedule.Script]($common) that animates the contents of the view, if any.
|
|
191
222
|
* @see [[changeRenderTimeline]] to change the script.
|
|
@@ -210,6 +241,8 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
210
241
|
* @internal
|
|
211
242
|
*/
|
|
212
243
|
setScheduleState(state) {
|
|
244
|
+
if (state === this._scheduleState)
|
|
245
|
+
return;
|
|
213
246
|
this.onScheduleScriptReferenceChanged.raiseEvent(state);
|
|
214
247
|
this._scheduleState = state;
|
|
215
248
|
// eslint-disable-next-line deprecation/deprecation
|
|
@@ -555,24 +588,16 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
555
588
|
registerSettingsEventListeners() {
|
|
556
589
|
// eslint-disable-next-line deprecation/deprecation
|
|
557
590
|
this.settings.onScheduleScriptPropsChanged.addListener((scriptProps) => {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
const script = core_common_1.RenderSchedule.Script.fromJSON(scriptProps);
|
|
561
|
-
if (script)
|
|
562
|
-
newState = new RenderScheduleState_1.RenderScheduleState(this.id, script);
|
|
563
|
-
}
|
|
564
|
-
if (newState !== this._scheduleState) {
|
|
565
|
-
this.onScheduleScriptReferenceChanged.raiseEvent(newState);
|
|
566
|
-
this._scheduleState = newState;
|
|
567
|
-
}
|
|
591
|
+
if (undefined === this.settings.renderTimeline)
|
|
592
|
+
this.loadScheduleStateFromScript(scriptProps);
|
|
568
593
|
});
|
|
569
594
|
this.settings.onRenderTimelineChanged.addListener((newTimeline) => {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
this.
|
|
574
|
-
|
|
575
|
-
|
|
595
|
+
// Cancel any in-progress loading of script from timeline.
|
|
596
|
+
this._queryRenderTimelinePropsPromise = undefined;
|
|
597
|
+
if (undefined !== newTimeline)
|
|
598
|
+
this.loadScheduleStateFromTimeline(newTimeline); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
599
|
+
else
|
|
600
|
+
this.loadScheduleStateFromScript(this.settings.scheduleScriptProps); // eslint-disable-line deprecation/deprecation
|
|
576
601
|
});
|
|
577
602
|
this.settings.onPlanarClipMaskChanged.addListener((id, newSettings) => {
|
|
578
603
|
if (newSettings)
|