@itwin/ecschema-rpcinterface-tests 3.6.0-dev.55 → 3.6.0-dev.59
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/lib/dist/_cb67.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +273 -155
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/object-storage.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_4_0_node_modules_itwin_obj-3576c6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_12_node_modules_loaders_gl_draco_d-b19815.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -54142,14 +54142,15 @@ var CodeScopeSpec;
|
|
|
54142
54142
|
/** The Code value must be unique among other elements also scoped by the same element */
|
|
54143
54143
|
Type[Type["RelatedElement"] = 4] = "RelatedElement";
|
|
54144
54144
|
})(Type = CodeScopeSpec.Type || (CodeScopeSpec.Type = {}));
|
|
54145
|
-
/**
|
|
54145
|
+
/**
|
|
54146
|
+
* Requirements for how the CodeScope Element is identified.
|
|
54146
54147
|
* @public
|
|
54147
54148
|
*/
|
|
54148
54149
|
let ScopeRequirement;
|
|
54149
54150
|
(function (ScopeRequirement) {
|
|
54150
|
-
/** The
|
|
54151
|
+
/** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */
|
|
54151
54152
|
ScopeRequirement[ScopeRequirement["ElementId"] = 1] = "ElementId";
|
|
54152
|
-
/** The
|
|
54153
|
+
/** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */
|
|
54153
54154
|
ScopeRequirement[ScopeRequirement["FederationGuid"] = 2] = "FederationGuid";
|
|
54154
54155
|
})(ScopeRequirement = CodeScopeSpec.ScopeRequirement || (CodeScopeSpec.ScopeRequirement = {}));
|
|
54155
54156
|
})(CodeScopeSpec || (CodeScopeSpec = {}));
|
|
@@ -104764,11 +104765,6 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
104764
104765
|
* @beta
|
|
104765
104766
|
*/
|
|
104766
104767
|
this.onClose = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
104767
|
-
/** Event called immediately after *this* IModelConnection has its displayed extents expanded.
|
|
104768
|
-
* @note This event is called only for this IModelConnection.
|
|
104769
|
-
* @internal
|
|
104770
|
-
*/
|
|
104771
|
-
this.onDisplayedExtentsExpansion = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
104772
104768
|
this._snapRpc = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.OneAtATimeAction(async (props) => _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this.routingContext.token).requestSnap(this.getRpcProps(), _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.sessionId, props));
|
|
104773
104769
|
this._toolTipRpc = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.OneAtATimeAction(async (id) => _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this.routingContext.token).getToolTipMessage(this.getRpcProps(), id));
|
|
104774
104770
|
/** Event called immediately after map elevation request is completed. This occurs only in the case where background map terrain is displayed
|
|
@@ -104787,9 +104783,11 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
104787
104783
|
this.hilited = new _SelectionSet__WEBPACK_IMPORTED_MODULE_8__.HiliteSet(this);
|
|
104788
104784
|
this.tiles = new _Tiles__WEBPACK_IMPORTED_MODULE_11__.Tiles(this);
|
|
104789
104785
|
this.geoServices = new _GeoServices__WEBPACK_IMPORTED_MODULE_4__.GeoServices(this);
|
|
104786
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
104790
104787
|
this.displayedExtents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(this.projectExtents);
|
|
104791
104788
|
this.onProjectExtentsChanged.addListener(() => {
|
|
104792
104789
|
// Compute new displayed extents as the union of the ranges we previously expanded by with the new project extents.
|
|
104790
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
104793
104791
|
this.expandDisplayedExtents(this._extentsExpansion);
|
|
104794
104792
|
});
|
|
104795
104793
|
this.hilited.onModelSubCategoryModeChanged.addListener(() => {
|
|
@@ -105100,12 +105098,14 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
105100
105098
|
/** Expand this iModel's [[displayedExtents]] to include the specified range.
|
|
105101
105099
|
* This is done automatically when reality models are added to a spatial view. In some cases a [[TiledGraphicsProvider]] may wish to expand
|
|
105102
105100
|
* the extents explicitly to include its geometry.
|
|
105101
|
+
* @deprecated in 3.6. See [[displayedExtents]].
|
|
105103
105102
|
*/
|
|
105104
105103
|
expandDisplayedExtents(range) {
|
|
105105
105104
|
this._extentsExpansion.extendRange(range);
|
|
105105
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
105106
105106
|
this.displayedExtents.setFrom(this.projectExtents);
|
|
105107
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
105107
105108
|
this.displayedExtents.extendRange(this._extentsExpansion);
|
|
105108
|
-
this.onDisplayedExtentsExpansion.raiseEvent();
|
|
105109
105109
|
}
|
|
105110
105110
|
/** @internal */
|
|
105111
105111
|
getMapEcefToDb(bimElevationBias) {
|
|
@@ -110513,28 +110513,42 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState
|
|
|
110513
110513
|
markModelSelectorChanged() {
|
|
110514
110514
|
this._treeRefs.update();
|
|
110515
110515
|
}
|
|
110516
|
-
/** Get world-space viewed extents based on the iModel's project extents.
|
|
110516
|
+
/** Get world-space viewed extents based on the iModel's project extents.
|
|
110517
|
+
* @deprecated in 3.6. These extents are based on [[IModelConnection.displayedExtents]], which is deprecated. Consider using [[computeFitRange]] or [[getViewedExtents]] instead.
|
|
110518
|
+
*/
|
|
110517
110519
|
getDisplayedExtents() {
|
|
110520
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
110518
110521
|
const extents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.fromJSON(this.iModel.displayedExtents);
|
|
110519
110522
|
extents.scaleAboutCenterInPlace(1.0001); // projectExtents. lying smack up against the extents is not excluded by frustum...
|
|
110520
110523
|
extents.extendRange(this.getGroundExtents());
|
|
110521
110524
|
return extents;
|
|
110522
110525
|
}
|
|
110526
|
+
computeBaseExtents() {
|
|
110527
|
+
const extents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.fromJSON(this.iModel.projectExtents);
|
|
110528
|
+
// Ensure geometry coincident with planes of the project extents is not clipped.
|
|
110529
|
+
extents.scaleAboutCenterInPlace(1.0001);
|
|
110530
|
+
// Ensure ground plane is not clipped, if it's being drawn.
|
|
110531
|
+
extents.extendRange(this.getGroundExtents());
|
|
110532
|
+
return extents;
|
|
110533
|
+
}
|
|
110523
110534
|
/** Compute world-space range appropriate for fitting the view. If that range is null, use the displayed extents. */
|
|
110524
110535
|
computeFitRange() {
|
|
110525
|
-
//
|
|
110536
|
+
// Fit to the union of the ranges of all loaded tile trees.
|
|
110526
110537
|
const range = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
|
|
110527
110538
|
this.forEachTileTreeRef((ref) => {
|
|
110528
110539
|
ref.unionFitRange(range);
|
|
110529
110540
|
});
|
|
110541
|
+
// Fall back to the project extents if necessary.
|
|
110530
110542
|
if (range.isNull)
|
|
110531
|
-
range.setFrom(this.
|
|
110543
|
+
range.setFrom(this.computeBaseExtents());
|
|
110544
|
+
// Avoid ridiculously small extents.
|
|
110532
110545
|
range.ensureMinLengths(1.0);
|
|
110533
110546
|
return range;
|
|
110534
110547
|
}
|
|
110535
110548
|
getViewedExtents() {
|
|
110536
|
-
|
|
110537
|
-
|
|
110549
|
+
// Encompass the project extents and ground plane.
|
|
110550
|
+
const extents = this.computeBaseExtents();
|
|
110551
|
+
// Include any tile trees that extend outside the project extents.
|
|
110538
110552
|
extents.extendRange(this.computeFitRange());
|
|
110539
110553
|
return extents;
|
|
110540
110554
|
}
|
|
@@ -116744,9 +116758,6 @@ class Viewport {
|
|
|
116744
116758
|
removals.push(this.iModel.onMapElevationLoaded.addListener((_iModel) => {
|
|
116745
116759
|
this.synchWithView();
|
|
116746
116760
|
}));
|
|
116747
|
-
removals.push(this.iModel.onDisplayedExtentsExpansion.addListener(() => {
|
|
116748
|
-
this.invalidateController();
|
|
116749
|
-
}));
|
|
116750
116761
|
}
|
|
116751
116762
|
}
|
|
116752
116763
|
registerDisplayStyleListeners(style) {
|
|
@@ -160914,14 +160925,16 @@ class GltfReader {
|
|
|
160914
160925
|
}
|
|
160915
160926
|
let nMap;
|
|
160916
160927
|
if (normalMap) {
|
|
160928
|
+
const greenUp = true;
|
|
160917
160929
|
if (texture) {
|
|
160918
160930
|
nMap = {
|
|
160919
160931
|
normalMap,
|
|
160932
|
+
greenUp,
|
|
160920
160933
|
};
|
|
160921
160934
|
}
|
|
160922
160935
|
else {
|
|
160923
160936
|
texture = normalMap;
|
|
160924
|
-
nMap = {};
|
|
160937
|
+
nMap = { greenUp };
|
|
160925
160938
|
}
|
|
160926
160939
|
}
|
|
160927
160940
|
if (!texture)
|
|
@@ -163602,6 +163615,7 @@ class OrbitGtTileTree extends _internal__WEBPACK_IMPORTED_MODULE_8__.TileTree {
|
|
|
163602
163615
|
this.viewFlagOverrides = {};
|
|
163603
163616
|
this._tileGraphics = new Map();
|
|
163604
163617
|
const worldContentRange = this.iModelTransform.multiplyRange(cloudRange);
|
|
163618
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
163605
163619
|
this.iModel.expandDisplayedExtents(worldContentRange);
|
|
163606
163620
|
this._tileParams = { contentId: "0", range: cloudRange, maximumSize: 256 };
|
|
163607
163621
|
this.rootTile = new OrbitGtRootTile(this._tileParams, this);
|
|
@@ -165104,6 +165118,7 @@ class RealityModelTileTree extends _internal__WEBPACK_IMPORTED_MODULE_7__.Realit
|
|
|
165104
165118
|
this._isContentUnbounded = this.rootTile.contentRange.diagonal().magnitude() > 2 * _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Constant.earthRadiusWGS84.equator;
|
|
165105
165119
|
if (!this.isContentUnbounded && !this.rootTile.contentRange.isNull) {
|
|
165106
165120
|
const worldContentRange = this.iModelTransform.multiplyRange(this.rootTile.contentRange);
|
|
165121
|
+
/* eslint-disable-next-line deprecation/deprecation */
|
|
165107
165122
|
this.iModel.expandDisplayedExtents(worldContentRange);
|
|
165108
165123
|
}
|
|
165109
165124
|
}
|
|
@@ -167358,12 +167373,20 @@ class TileAdmin {
|
|
|
167358
167373
|
this.contextPreloadParentDepth = Math.max(0, Math.min((options.contextPreloadParentDepth === undefined ? 2 : options.contextPreloadParentDepth), 8));
|
|
167359
167374
|
// If unspecified skip one level before preloading of parents of context tiles.
|
|
167360
167375
|
this.contextPreloadParentSkip = Math.max(0, Math.min((options.contextPreloadParentSkip === undefined ? 1 : options.contextPreloadParentSkip), 5));
|
|
167361
|
-
|
|
167362
|
-
this.
|
|
167363
|
-
|
|
167364
|
-
|
|
167365
|
-
|
|
167366
|
-
|
|
167376
|
+
const removals = [
|
|
167377
|
+
this.onTileLoad.addListener(() => this.invalidateAllScenes()),
|
|
167378
|
+
this.onTileChildrenLoad.addListener(() => this.invalidateAllScenes()),
|
|
167379
|
+
this.onTileTreeLoad.addListener(() => {
|
|
167380
|
+
// A reality model tile tree's range may extend outside of the project extents - we'll want to recompute the extents
|
|
167381
|
+
// of any spatial view's that may be displaying the reality model.
|
|
167382
|
+
for (const user of this.tileUsers)
|
|
167383
|
+
if (user instanceof _Viewport__WEBPACK_IMPORTED_MODULE_5__.Viewport && user.view.isSpatialView())
|
|
167384
|
+
user.invalidateController();
|
|
167385
|
+
}),
|
|
167386
|
+
];
|
|
167387
|
+
this._cleanup = () => {
|
|
167388
|
+
removals.forEach((removal) => removal());
|
|
167389
|
+
};
|
|
167367
167390
|
}
|
|
167368
167391
|
/** Create a TileAdmin suitable for passing to [[IModelApp.startup]] via [[IModelAppOptions.tileAdmin]] to customize aspects of
|
|
167369
167392
|
* its behavior.
|
|
@@ -170611,7 +170634,8 @@ class ArcGisUtilities {
|
|
|
170611
170634
|
* @return Validation Status. If successful, a list of available sub-layers will also be returned.
|
|
170612
170635
|
*/
|
|
170613
170636
|
static async validateSource(url, formatId, capabilitiesFilter, userName, password, ignoreCache) {
|
|
170614
|
-
const
|
|
170637
|
+
const metadata = await this.getServiceJson(url, formatId, userName, password, ignoreCache);
|
|
170638
|
+
const json = metadata === null || metadata === void 0 ? void 0 : metadata.content;
|
|
170615
170639
|
if (json === undefined) {
|
|
170616
170640
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidUrl };
|
|
170617
170641
|
}
|
|
@@ -170627,18 +170651,20 @@ class ArcGisUtilities {
|
|
|
170627
170651
|
}
|
|
170628
170652
|
// Check this service support the expected queries
|
|
170629
170653
|
let hasCapabilities = false;
|
|
170630
|
-
|
|
170631
|
-
|
|
170632
|
-
|
|
170633
|
-
|
|
170634
|
-
|
|
170635
|
-
|
|
170636
|
-
}
|
|
170654
|
+
let capsArray = [];
|
|
170655
|
+
if (json.capabilities && typeof json.capabilities === "string") {
|
|
170656
|
+
const capabilities = json.capabilities;
|
|
170657
|
+
capsArray = capabilities.split(",").map((entry) => entry.toLowerCase());
|
|
170658
|
+
const filtered = capsArray.filter((element, _index, _array) => capabilitiesFilter.includes(element));
|
|
170659
|
+
hasCapabilities = (filtered.length === capabilitiesFilter.length);
|
|
170637
170660
|
}
|
|
170638
|
-
catch { }
|
|
170639
170661
|
if (!hasCapabilities) {
|
|
170640
170662
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidFormat };
|
|
170641
170663
|
}
|
|
170664
|
+
// Only EPSG:3857 is supported with pre-rendered tiles.
|
|
170665
|
+
if (json.tileInfo && capsArray.includes("tilesonly") && !ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {
|
|
170666
|
+
return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCoordinateSystem };
|
|
170667
|
+
}
|
|
170642
170668
|
let subLayers;
|
|
170643
170669
|
if (json.layers) {
|
|
170644
170670
|
subLayers = new Array();
|
|
@@ -170650,35 +170676,62 @@ class ArcGisUtilities {
|
|
|
170650
170676
|
}
|
|
170651
170677
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.Valid, subLayers };
|
|
170652
170678
|
}
|
|
170679
|
+
/**
|
|
170680
|
+
* Validate MapService tiling metadata and checks if the tile tree is 'Google Maps' compatible.
|
|
170681
|
+
*/
|
|
170682
|
+
static isEpsg3857Compatible(tileInfo) {
|
|
170683
|
+
var _a;
|
|
170684
|
+
if (((_a = tileInfo.spatialReference) === null || _a === void 0 ? void 0 : _a.latestWkid) !== 3857 || !Array.isArray(tileInfo.lods))
|
|
170685
|
+
return false;
|
|
170686
|
+
const zeroLod = tileInfo.lods[0];
|
|
170687
|
+
return zeroLod.level === 0 && Math.abs(zeroLod.resolution - 156543.03392800014) < .001;
|
|
170688
|
+
}
|
|
170653
170689
|
/**
|
|
170654
170690
|
* Fetch an ArcGIS service metadata, and returns its JSON representation.
|
|
170655
170691
|
* If an access client has been configured for the specified formatId,
|
|
170656
170692
|
* it will be used to apply required security token.
|
|
170657
170693
|
* By default, response for each URL are cached.
|
|
170658
170694
|
*/
|
|
170659
|
-
static async getServiceJson(url, formatId, userName, password, ignoreCache) {
|
|
170695
|
+
static async getServiceJson(url, formatId, userName, password, ignoreCache, requireToken) {
|
|
170660
170696
|
if (!ignoreCache) {
|
|
170661
170697
|
const cached = ArcGisUtilities._serviceCache.get(url);
|
|
170662
170698
|
if (cached !== undefined)
|
|
170663
170699
|
return cached;
|
|
170664
170700
|
}
|
|
170701
|
+
let accessTokenRequired = false;
|
|
170665
170702
|
try {
|
|
170666
|
-
|
|
170703
|
+
let tmpUrl = new URL(url);
|
|
170667
170704
|
tmpUrl.searchParams.append("f", "json");
|
|
170668
|
-
|
|
170669
|
-
if (
|
|
170670
|
-
|
|
170705
|
+
// In some cases, caller might already know token is required, so append it immediately
|
|
170706
|
+
if (requireToken) {
|
|
170707
|
+
const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
|
|
170708
|
+
if (accessClient) {
|
|
170709
|
+
accessTokenRequired = true;
|
|
170710
|
+
await ArcGisUtilities.appendSecurityToken(tmpUrl, accessClient, { mapLayerUrl: new URL(url), userName, password });
|
|
170711
|
+
}
|
|
170712
|
+
}
|
|
170713
|
+
let response = await fetch(tmpUrl.toString(), { method: "GET" });
|
|
170714
|
+
// Append security token when corresponding error code is returned by ArcGIS service
|
|
170715
|
+
let errorCode = await ArcGisUtilities.checkForResponseErrorCode(response);
|
|
170716
|
+
if (!accessTokenRequired
|
|
170717
|
+
&& errorCode !== undefined
|
|
170718
|
+
&& errorCode === ArcGisErrorCode.TokenRequired) {
|
|
170719
|
+
accessTokenRequired = true;
|
|
170720
|
+
// If token required
|
|
170721
|
+
const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
|
|
170722
|
+
if (accessClient) {
|
|
170723
|
+
tmpUrl = new URL(url);
|
|
170724
|
+
tmpUrl.searchParams.append("f", "json");
|
|
170725
|
+
await ArcGisUtilities.appendSecurityToken(tmpUrl, accessClient, { mapLayerUrl: new URL(url), userName, password });
|
|
170726
|
+
response = await fetch(tmpUrl.toString(), { method: "GET" });
|
|
170727
|
+
errorCode = await ArcGisUtilities.checkForResponseErrorCode(response);
|
|
170728
|
+
}
|
|
170671
170729
|
}
|
|
170672
|
-
const response = await fetch(tmpUrl.toString(), { method: "GET" });
|
|
170673
|
-
const errorCode = await ArcGisUtilities.checkForResponseErrorCode(response);
|
|
170674
170730
|
const json = await response.json();
|
|
170675
|
-
|
|
170676
|
-
|
|
170677
|
-
|
|
170678
|
-
|
|
170679
|
-
ArcGisUtilities._serviceCache.set(url, undefined);
|
|
170680
|
-
}
|
|
170681
|
-
return json; // Always return json, even though it contains an error code.
|
|
170731
|
+
const info = { content: json, accessTokenRequired };
|
|
170732
|
+
// Cache the response only if it doesn't contain any error.
|
|
170733
|
+
ArcGisUtilities._serviceCache.set(url, (errorCode === undefined ? info : undefined));
|
|
170734
|
+
return info; // Always return json, even though it contains an error code.
|
|
170682
170735
|
}
|
|
170683
170736
|
catch (_error) {
|
|
170684
170737
|
ArcGisUtilities._serviceCache.set(url, undefined);
|
|
@@ -170689,19 +170742,19 @@ class ArcGisUtilities {
|
|
|
170689
170742
|
*/
|
|
170690
170743
|
static async checkForResponseErrorCode(response) {
|
|
170691
170744
|
var _a, _b, _c;
|
|
170692
|
-
|
|
170745
|
+
const tmpResponse = response;
|
|
170746
|
+
if (response.headers && ((_a = tmpResponse.headers.get("content-type")) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes("json"))) {
|
|
170693
170747
|
try {
|
|
170694
170748
|
// Note:
|
|
170695
170749
|
// Since response stream can only be read once (i.e. calls to .json() method)
|
|
170696
170750
|
// we have to clone the response object in order to check for potential error code,
|
|
170697
170751
|
// but still keep the response stream as unread.
|
|
170698
|
-
const clonedResponse =
|
|
170752
|
+
const clonedResponse = tmpResponse.clone();
|
|
170699
170753
|
const json = await clonedResponse.json();
|
|
170700
170754
|
if (((_b = json === null || json === void 0 ? void 0 : json.error) === null || _b === void 0 ? void 0 : _b.code) !== undefined)
|
|
170701
170755
|
return (_c = json === null || json === void 0 ? void 0 : json.error) === null || _c === void 0 ? void 0 : _c.code;
|
|
170702
170756
|
}
|
|
170703
|
-
catch {
|
|
170704
|
-
}
|
|
170757
|
+
catch { }
|
|
170705
170758
|
}
|
|
170706
170759
|
return undefined;
|
|
170707
170760
|
}
|
|
@@ -171545,8 +171598,53 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
|
|
|
171545
171598
|
constructor(settings, usesCachedTiles) {
|
|
171546
171599
|
var _a;
|
|
171547
171600
|
super(settings, usesCachedTiles);
|
|
171601
|
+
/** Flag indicating if access token should be added to request.
|
|
171602
|
+
* @note We assume a service to require access token for the entire viewing session.
|
|
171603
|
+
*/
|
|
171604
|
+
this._accessTokenRequired = false;
|
|
171548
171605
|
this._accessClient = (_a = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.mapLayerFormatRegistry) === null || _a === void 0 ? void 0 : _a.getAccessClient(settings.formatId);
|
|
171549
171606
|
}
|
|
171607
|
+
/** Updates the accessClient token state whenever the status of the provider change.
|
|
171608
|
+
* @internal
|
|
171609
|
+
* */
|
|
171610
|
+
onStatusUpdated(status) {
|
|
171611
|
+
var _a;
|
|
171612
|
+
if (status === _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerImageryProviderStatus.RequireAuth) {
|
|
171613
|
+
// Invalidate the token, so a new one get generated
|
|
171614
|
+
if (((_a = this._accessClient) === null || _a === void 0 ? void 0 : _a.invalidateToken) !== undefined && this._lastAccessToken !== undefined) {
|
|
171615
|
+
this._accessClient.invalidateToken(this._lastAccessToken);
|
|
171616
|
+
}
|
|
171617
|
+
// Make sure we don't re-use this token again (i.e force login process)
|
|
171618
|
+
this._lastAccessToken = undefined;
|
|
171619
|
+
}
|
|
171620
|
+
}
|
|
171621
|
+
/**
|
|
171622
|
+
* Fetch an ArcGIS service metadata, and returns its JSON representation.
|
|
171623
|
+
* This wrapper maintains token state and should be used instead of the the ArcGisUtilities version.
|
|
171624
|
+
*/
|
|
171625
|
+
async getServiceJson() {
|
|
171626
|
+
let metadata;
|
|
171627
|
+
try {
|
|
171628
|
+
metadata = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.getServiceJson(this._settings.url, this._settings.formatId, this._settings.userName, this._settings.password);
|
|
171629
|
+
}
|
|
171630
|
+
catch (_e) {
|
|
171631
|
+
}
|
|
171632
|
+
if (metadata && metadata.accessTokenRequired) {
|
|
171633
|
+
const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.mapLayerFormatRegistry.getAccessClient(this._settings.formatId);
|
|
171634
|
+
if (accessClient) {
|
|
171635
|
+
try {
|
|
171636
|
+
// Keep track of last used access token, so we can invalidate it later when an errors occurs
|
|
171637
|
+
const accessToken = await accessClient.getAccessToken({ mapLayerUrl: new URL(this._settings.url) });
|
|
171638
|
+
this._lastAccessToken = accessToken;
|
|
171639
|
+
}
|
|
171640
|
+
catch {
|
|
171641
|
+
}
|
|
171642
|
+
}
|
|
171643
|
+
// By turning this ON, tiles requests will include security token
|
|
171644
|
+
this._accessTokenRequired = metadata.accessTokenRequired;
|
|
171645
|
+
}
|
|
171646
|
+
return metadata;
|
|
171647
|
+
}
|
|
171550
171648
|
/**
|
|
171551
171649
|
* Make a request to an ArcGIS service using the provided URL and init parameters.
|
|
171552
171650
|
* @param url URL to query
|
|
@@ -171555,28 +171653,35 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
|
|
|
171555
171653
|
*/
|
|
171556
171654
|
async fetch(url, options) {
|
|
171557
171655
|
var _a, _b;
|
|
171656
|
+
let errorCode;
|
|
171558
171657
|
const urlObj = new URL(url);
|
|
171559
|
-
|
|
171560
|
-
|
|
171561
|
-
|
|
171562
|
-
|
|
171563
|
-
|
|
171564
|
-
|
|
171565
|
-
});
|
|
171566
|
-
}
|
|
171567
|
-
}
|
|
171568
|
-
catch {
|
|
171658
|
+
if (this._accessTokenRequired && this._accessClient) {
|
|
171659
|
+
this._lastAccessToken = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
|
|
171660
|
+
mapLayerUrl: new URL(this._settings.url),
|
|
171661
|
+
userName: this._settings.userName,
|
|
171662
|
+
password: this._settings.password
|
|
171663
|
+
});
|
|
171569
171664
|
}
|
|
171570
171665
|
let response = await fetch(urlObj.toString(), options);
|
|
171571
|
-
|
|
171666
|
+
if ((this._lastAccessToken && response.status === 400)
|
|
171667
|
+
|| ((_a = response.headers.get("content-type")) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes("htm"))) {
|
|
171668
|
+
// For some reasons when we make a request with the fetch() api and there is a token error
|
|
171669
|
+
// we receive a status 400 instead of proper json response. (i.e doing the same request in the browser gives a different response)
|
|
171670
|
+
// For some other request, we also seen error message in html.
|
|
171671
|
+
// When it occurs, we fall back to root service request so we get a proper JSON response with error code.
|
|
171672
|
+
const tmpUrl = new URL(this._settings.url);
|
|
171673
|
+
if (this._lastAccessToken && this._accessTokenRequired)
|
|
171674
|
+
tmpUrl.searchParams.append("token", this._lastAccessToken.token);
|
|
171675
|
+
tmpUrl.searchParams.append("f", "json");
|
|
171676
|
+
response = await fetch(tmpUrl.toString(), options);
|
|
171677
|
+
}
|
|
171678
|
+
errorCode = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.checkForResponseErrorCode(response.clone());
|
|
171572
171679
|
if (errorCode !== undefined &&
|
|
171573
171680
|
(errorCode === _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisErrorCode.TokenRequired || errorCode === _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisErrorCode.InvalidToken)) {
|
|
171574
|
-
let hasTokenError = true;
|
|
171575
|
-
// **** Legacy token ONLY ***
|
|
171576
|
-
// Token might have expired, make a second attempt by forcing new token.
|
|
171577
171681
|
if (this._settings.userName && this._settings.userName.length > 0 && this._lastAccessToken) {
|
|
171578
|
-
//
|
|
171579
|
-
|
|
171682
|
+
// **** Legacy token ONLY ***
|
|
171683
|
+
// Token might have expired, make a second attempt by forcing new token.
|
|
171684
|
+
if (((_b = this._accessClient) === null || _b === void 0 ? void 0 : _b.invalidateToken) !== undefined && this._lastAccessToken !== undefined)
|
|
171580
171685
|
this._accessClient.invalidateToken(this._lastAccessToken);
|
|
171581
171686
|
const urlObj2 = new URL(url);
|
|
171582
171687
|
if (this._accessClient) {
|
|
@@ -171589,32 +171694,21 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
|
|
|
171589
171694
|
// Make a second attempt with refreshed token
|
|
171590
171695
|
response = await fetch(urlObj2.toString(), options);
|
|
171591
171696
|
errorCode = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.checkForResponseErrorCode(response.clone());
|
|
171592
|
-
if (errorCode !== undefined &&
|
|
171593
|
-
(errorCode === _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisErrorCode.TokenRequired || errorCode === _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisErrorCode.InvalidToken)) {
|
|
171594
|
-
// OK at this point, if response still contain a token error, we assume end-user will
|
|
171595
|
-
// have to provide credentials again. Change the layer status so we
|
|
171596
|
-
// don't make additional invalid requests..
|
|
171597
|
-
if (((_b = this._accessClient) === null || _b === void 0 ? void 0 : _b.invalidateToken) !== undefined && this._lastAccessToken !== undefined) {
|
|
171598
|
-
this._accessClient.invalidateToken(this._lastAccessToken);
|
|
171599
|
-
this._lastAccessToken = undefined;
|
|
171600
|
-
}
|
|
171601
|
-
}
|
|
171602
|
-
else {
|
|
171603
|
-
hasTokenError = false;
|
|
171604
|
-
}
|
|
171605
171697
|
}
|
|
171606
|
-
if (
|
|
171607
|
-
|
|
171608
|
-
|
|
171609
|
-
|
|
171610
|
-
|
|
171611
|
-
|
|
171698
|
+
if (errorCode === _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisErrorCode.TokenRequired || errorCode === _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisErrorCode.InvalidToken) {
|
|
171699
|
+
// Looks like the initially generated token has expired.
|
|
171700
|
+
if (this.status === _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerImageryProviderStatus.Valid) {
|
|
171701
|
+
// Only report new status change to avoid spamming the UI
|
|
171702
|
+
this.setStatus(_internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerImageryProviderStatus.RequireAuth);
|
|
171703
|
+
this.onStatusChanged.raiseEvent(this);
|
|
171704
|
+
const msg = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.localization.getLocalizedString("iModelJs:MapLayers.Messages.FetchTooltipTokenError", { layerName: this._settings.name });
|
|
171705
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.notifications.outputMessage(new _NotificationManager__WEBPACK_IMPORTED_MODULE_2__.NotifyMessageDetails(_NotificationManager__WEBPACK_IMPORTED_MODULE_2__.OutputMessagePriority.Warning, msg));
|
|
171706
|
+
}
|
|
171612
171707
|
}
|
|
171613
171708
|
}
|
|
171614
171709
|
return response;
|
|
171615
171710
|
}
|
|
171616
171711
|
}
|
|
171617
|
-
ArcGISImageryProvider._serviceCache = new Map();
|
|
171618
171712
|
|
|
171619
171713
|
|
|
171620
171714
|
/***/ }),
|
|
@@ -171637,6 +171731,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
171637
171731
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
171638
171732
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ "../../common/temp/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");
|
|
171639
171733
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);
|
|
171734
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
171640
171735
|
/*---------------------------------------------------------------------------------------------
|
|
171641
171736
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
171642
171737
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -171650,6 +171745,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
171650
171745
|
|
|
171651
171746
|
|
|
171652
171747
|
|
|
171748
|
+
|
|
171749
|
+
const loggerCategory = "MapLayerImageryProvider.ArcGISMapLayerImageryProvider";
|
|
171653
171750
|
/** @internal */
|
|
171654
171751
|
class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISImageryProvider {
|
|
171655
171752
|
constructor(settings) {
|
|
@@ -171659,6 +171756,8 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
171659
171756
|
this._copyrightText = "Copyright";
|
|
171660
171757
|
this._querySupported = false;
|
|
171661
171758
|
this._tileMapSupported = false;
|
|
171759
|
+
this._mapSupported = false;
|
|
171760
|
+
this._tilesOnly = false;
|
|
171662
171761
|
this._accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.mapLayerFormatRegistry.getAccessClient(settings.formatId);
|
|
171663
171762
|
}
|
|
171664
171763
|
get _filterByCartoRange() { return false; } // Can't trust footprint ranges (USGS Hydro)
|
|
@@ -171687,6 +171786,7 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
171687
171786
|
return await this.getImageFromTileResponse(tileResponse, zoomLevel);
|
|
171688
171787
|
}
|
|
171689
171788
|
catch (error) {
|
|
171789
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_6__.Logger.logError(loggerCategory, `Error occurred when loading tile(${row},${column},${zoomLevel}) : ${error}`);
|
|
171690
171790
|
return undefined;
|
|
171691
171791
|
}
|
|
171692
171792
|
}
|
|
@@ -171723,18 +171823,12 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
171723
171823
|
resolveChildren(childIds); // Resolve all children
|
|
171724
171824
|
}
|
|
171725
171825
|
}
|
|
171726
|
-
isEpsg3857Compatible(tileInfo) {
|
|
171727
|
-
var _a;
|
|
171728
|
-
if (((_a = tileInfo.spatialReference) === null || _a === void 0 ? void 0 : _a.latestWkid) !== 3857 || !Array.isArray(tileInfo.lods))
|
|
171729
|
-
return false;
|
|
171730
|
-
const zeroLod = tileInfo.lods[0];
|
|
171731
|
-
return zeroLod.level === 0 && Math.abs(zeroLod.resolution - 156543.03392800014) < .001;
|
|
171732
|
-
}
|
|
171733
171826
|
async initialize() {
|
|
171734
171827
|
var _a, _b, _c, _d, _e;
|
|
171735
|
-
const
|
|
171736
|
-
if (
|
|
171828
|
+
const metadata = await this.getServiceJson();
|
|
171829
|
+
if ((metadata === null || metadata === void 0 ? void 0 : metadata.content) === undefined)
|
|
171737
171830
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.ServerError(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.ValidationFailed, "");
|
|
171831
|
+
const json = metadata.content;
|
|
171738
171832
|
if (((_a = json === null || json === void 0 ? void 0 : json.error) === null || _a === void 0 ? void 0 : _a.code) === _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisErrorCode.TokenRequired || ((_b = json === null || json === void 0 ? void 0 : json.error) === null || _b === void 0 ? void 0 : _b.code) === _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisErrorCode.InvalidToken) {
|
|
171739
171833
|
// Check again layer status, it might have change during await.
|
|
171740
171834
|
if (this.status === _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerImageryProviderStatus.Valid) {
|
|
@@ -171742,54 +171836,68 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
171742
171836
|
return; // By returning (i.e not throwing), we ensure the tileTree get created and current provider is preserved to report status.
|
|
171743
171837
|
}
|
|
171744
171838
|
}
|
|
171745
|
-
|
|
171746
|
-
|
|
171747
|
-
|
|
171748
|
-
|
|
171749
|
-
|
|
171750
|
-
|
|
171751
|
-
|
|
171752
|
-
|
|
171753
|
-
|
|
171754
|
-
|
|
171755
|
-
|
|
171756
|
-
|
|
171839
|
+
this.serviceJson = json;
|
|
171840
|
+
if (json.capabilities) {
|
|
171841
|
+
const capabilities = json.capabilities.split(",");
|
|
171842
|
+
this._querySupported = capabilities.includes("Query");
|
|
171843
|
+
this._tileMapSupported = capabilities.includes("Tilemap");
|
|
171844
|
+
this._mapSupported = capabilities.includes("Map");
|
|
171845
|
+
this._tilesOnly = capabilities.includes("TilesOnly");
|
|
171846
|
+
}
|
|
171847
|
+
if (json.copyrightText)
|
|
171848
|
+
this._copyrightText = json.copyrightText;
|
|
171849
|
+
this._usesCachedTiles = !!json.tileInfo;
|
|
171850
|
+
if (this._usesCachedTiles) {
|
|
171851
|
+
// Only EPSG:3857 is supported with pre-rendered tiles. Fall back to 'Export' queries if possible otherwise throw.
|
|
171852
|
+
if (!_internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisUtilities.isEpsg3857Compatible(json.tileInfo)) {
|
|
171853
|
+
if (this._mapSupported && !this._tilesOnly) {
|
|
171854
|
+
this._usesCachedTiles = false;
|
|
171855
|
+
}
|
|
171856
|
+
else {
|
|
171857
|
+
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.ServerError(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.ValidationFailed, "Invalid coordinate system");
|
|
171757
171858
|
}
|
|
171758
171859
|
}
|
|
171860
|
+
}
|
|
171861
|
+
if (this._usesCachedTiles) {
|
|
171862
|
+
// Read max LOD
|
|
171863
|
+
if (json.maxScale !== undefined && json.maxScale !== 0 && Array.isArray(json.tileInfo.lods)) {
|
|
171864
|
+
for (; this._maxDepthFromLod < json.tileInfo.lods.length && json.tileInfo.lods[this._maxDepthFromLod].scale > json.maxScale; this._maxDepthFromLod++)
|
|
171865
|
+
;
|
|
171866
|
+
}
|
|
171759
171867
|
// Create tile map object only if we are going to request tiles from this server and it support tilemap requests.
|
|
171760
|
-
if (this.
|
|
171868
|
+
if (this._tileMapSupported) {
|
|
171761
171869
|
this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISTileMap(this._settings.url, this._settings, (_d = (_c = json.tileInfo) === null || _c === void 0 ? void 0 : _c.lods) === null || _d === void 0 ? void 0 : _d.length, this._accessClient);
|
|
171762
171870
|
}
|
|
171763
|
-
|
|
171764
|
-
|
|
171765
|
-
|
|
171766
|
-
|
|
171767
|
-
|
|
171768
|
-
|
|
171769
|
-
}
|
|
171770
|
-
|
|
171771
|
-
|
|
171772
|
-
|
|
171773
|
-
|
|
171774
|
-
|
|
171775
|
-
|
|
171776
|
-
}
|
|
171777
|
-
|
|
171778
|
-
|
|
171779
|
-
|
|
171780
|
-
|
|
171781
|
-
|
|
171782
|
-
|
|
171783
|
-
}
|
|
171784
|
-
|
|
171785
|
-
|
|
171786
|
-
|
|
171787
|
-
|
|
171788
|
-
|
|
171789
|
-
|
|
171790
|
-
|
|
171791
|
-
|
|
171792
|
-
|
|
171871
|
+
}
|
|
171872
|
+
// Read range using fullextent from service metadata
|
|
171873
|
+
if (json.fullExtent) {
|
|
171874
|
+
if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {
|
|
171875
|
+
const range3857 = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_4__.Range2d.createFrom({
|
|
171876
|
+
low: { x: json.fullExtent.xmin, y: json.fullExtent.ymin },
|
|
171877
|
+
high: { x: json.fullExtent.xmax, y: json.fullExtent.ymax }
|
|
171878
|
+
});
|
|
171879
|
+
const west = this.getEPSG4326Lon(range3857.xLow);
|
|
171880
|
+
const south = this.getEPSG4326Lat(range3857.yLow);
|
|
171881
|
+
const east = this.getEPSG4326Lon(range3857.xHigh);
|
|
171882
|
+
const north = this.getEPSG4326Lat(range3857.yHigh);
|
|
171883
|
+
this.cartoRange = _internal__WEBPACK_IMPORTED_MODULE_2__.MapCartoRectangle.fromDegrees(west, south, east, north);
|
|
171884
|
+
}
|
|
171885
|
+
}
|
|
171886
|
+
// Read minLOD if available
|
|
171887
|
+
if (json.minLOD !== undefined) {
|
|
171888
|
+
const minLod = parseInt(json.minLOD, 10);
|
|
171889
|
+
if (!Number.isNaN(minLod)) {
|
|
171890
|
+
this._minDepthFromLod = minLod;
|
|
171891
|
+
}
|
|
171892
|
+
}
|
|
171893
|
+
else if (json.minScale) {
|
|
171894
|
+
// Read min LOD using minScale
|
|
171895
|
+
const minScale = json.minScale;
|
|
171896
|
+
if (((_e = json.tileInfo) === null || _e === void 0 ? void 0 : _e.lods) !== undefined && (0,lodash__WEBPACK_IMPORTED_MODULE_5__.isArray)(json.tileInfo.lods)) {
|
|
171897
|
+
for (const lod of json.tileInfo.lods) {
|
|
171898
|
+
if (lod.scale < minScale) {
|
|
171899
|
+
this._minDepthFromLod = lod.level;
|
|
171900
|
+
break;
|
|
171793
171901
|
}
|
|
171794
171902
|
}
|
|
171795
171903
|
}
|
|
@@ -173376,7 +173484,7 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
|
|
|
173376
173484
|
}
|
|
173377
173485
|
if (supportedTms.length === 0) {
|
|
173378
173486
|
// This WMTS server doesn't support either GoogleMaps or WSG84
|
|
173379
|
-
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.
|
|
173487
|
+
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidCoordinateSystem };
|
|
173380
173488
|
}
|
|
173381
173489
|
let subLayerId = 0;
|
|
173382
173490
|
(_c = capabilities === null || capabilities === void 0 ? void 0 : capabilities.contents) === null || _c === void 0 ? void 0 : _c.layers.forEach((layer) => {
|
|
@@ -173409,7 +173517,8 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
|
|
|
173409
173517
|
WmtsMapLayerFormat.formatId = "WMTS";
|
|
173410
173518
|
class ArcGISMapLayerFormat extends ImageryMapLayerFormat {
|
|
173411
173519
|
static async validateSource(url, userName, password, ignoreCache) {
|
|
173412
|
-
|
|
173520
|
+
// Some Map service supporting only tiles don't include the 'Map' capabilities, thus we can't make it mandatory.
|
|
173521
|
+
return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource(url, this.formatId, [], userName, password, ignoreCache);
|
|
173413
173522
|
}
|
|
173414
173523
|
static createImageryProvider(settings) {
|
|
173415
173524
|
return new _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGISMapLayerImageryProvider(settings);
|
|
@@ -173509,13 +173618,6 @@ class MapLayerImageryProvider {
|
|
|
173509
173618
|
this._mercatorTilingScheme = new _internal__WEBPACK_IMPORTED_MODULE_5__.WebMercatorTilingScheme();
|
|
173510
173619
|
this._geographicTilingScheme = new _internal__WEBPACK_IMPORTED_MODULE_5__.GeographicTilingScheme(2, 1, true);
|
|
173511
173620
|
}
|
|
173512
|
-
/** @internal */
|
|
173513
|
-
setStatus(status) {
|
|
173514
|
-
if (this.status !== status) {
|
|
173515
|
-
this._status = status;
|
|
173516
|
-
this.onStatusChanged.raiseEvent(this);
|
|
173517
|
-
}
|
|
173518
|
-
}
|
|
173519
173621
|
get status() { return this._status; }
|
|
173520
173622
|
resetStatus() { this.setStatus(MapLayerImageryProviderStatus.Valid); }
|
|
173521
173623
|
get tileSize() { return this._usesCachedTiles ? tileImageSize : untiledImageSize; }
|
|
@@ -173587,6 +173689,21 @@ class MapLayerImageryProvider {
|
|
|
173587
173689
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Invalid tile content type");
|
|
173588
173690
|
return undefined;
|
|
173589
173691
|
}
|
|
173692
|
+
/** Change the status of this provider.
|
|
173693
|
+
* Sub-classes should override 'onStatusUpdated' instead of this method.
|
|
173694
|
+
* @internal */
|
|
173695
|
+
setStatus(status) {
|
|
173696
|
+
if (this._status !== status) {
|
|
173697
|
+
this.onStatusUpdated(status);
|
|
173698
|
+
this._status = status;
|
|
173699
|
+
this.onStatusChanged.raiseEvent(this);
|
|
173700
|
+
}
|
|
173701
|
+
}
|
|
173702
|
+
/** Method called whenever the status changes, giving the opportunity to sub-classes to have a custom behavior.
|
|
173703
|
+
* @internal
|
|
173704
|
+
* */
|
|
173705
|
+
onStatusUpdated(_newStatus) {
|
|
173706
|
+
}
|
|
173590
173707
|
/** @internal */
|
|
173591
173708
|
setRequestAuthorization(headers) {
|
|
173592
173709
|
if (this._settings.userName && this._settings.password) {
|
|
@@ -173774,6 +173891,8 @@ var MapLayerSourceStatus;
|
|
|
173774
173891
|
MapLayerSourceStatus[MapLayerSourceStatus["InvalidUrl"] = 4] = "InvalidUrl";
|
|
173775
173892
|
/** Authorization is required to access this map layer source. */
|
|
173776
173893
|
MapLayerSourceStatus[MapLayerSourceStatus["RequireAuth"] = 5] = "RequireAuth";
|
|
173894
|
+
/** Map-layer coordinate system is not supported */
|
|
173895
|
+
MapLayerSourceStatus[MapLayerSourceStatus["InvalidCoordinateSystem"] = 6] = "InvalidCoordinateSystem";
|
|
173777
173896
|
})(MapLayerSourceStatus || (MapLayerSourceStatus = {}));
|
|
173778
173897
|
/** A source for map layers. These may be catalogued for convenient use by users or applications.
|
|
173779
173898
|
* @public
|
|
@@ -174436,7 +174555,6 @@ class MapTile extends _internal__WEBPACK_IMPORTED_MODULE_7__.RealityTile {
|
|
|
174436
174555
|
if (undefined !== this._graphic && this.imageryIsReady)
|
|
174437
174556
|
return this._graphic;
|
|
174438
174557
|
const geometry = this.renderGeometry;
|
|
174439
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== geometry);
|
|
174440
174558
|
if (undefined === geometry)
|
|
174441
174559
|
return undefined;
|
|
174442
174560
|
const textures = this.getDrapeTextures();
|
|
@@ -293264,7 +293382,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293264
293382
|
|
|
293265
293383
|
|
|
293266
293384
|
/** Action taken by the application on item provided by a UiItemsProvider
|
|
293267
|
-
* @public @deprecated
|
|
293385
|
+
* @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.
|
|
293268
293386
|
*/
|
|
293269
293387
|
var UiItemsApplicationAction;
|
|
293270
293388
|
(function (UiItemsApplicationAction) {
|
|
@@ -295883,7 +296001,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
295883
296001
|
class IconSpecUtilities {
|
|
295884
296002
|
/** Create an IconSpec for an SVG loaded into web component with sprite loader
|
|
295885
296003
|
* This method is deprecated -- use createWebComponentIconSpec()
|
|
295886
|
-
* @public @deprecated
|
|
296004
|
+
* @public @deprecated in 3.2.
|
|
295887
296005
|
*/
|
|
295888
296006
|
static createSvgIconSpec(svgSrc) {
|
|
295889
296007
|
return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;
|
|
@@ -295896,7 +296014,7 @@ class IconSpecUtilities {
|
|
|
295896
296014
|
}
|
|
295897
296015
|
/** Get the SVG Source from an sprite IconSpec
|
|
295898
296016
|
* This method is deprecated -- use getWebComponentSource()
|
|
295899
|
-
* @public @deprecated
|
|
296017
|
+
* @public @deprecated in 3.2.
|
|
295900
296018
|
*/
|
|
295901
296019
|
static getSvgSource(iconSpec) {
|
|
295902
296020
|
if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {
|
|
@@ -297531,7 +297649,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
297531
297649
|
* @module Widget
|
|
297532
297650
|
*/
|
|
297533
297651
|
/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].
|
|
297534
|
-
* @public @deprecated
|
|
297652
|
+
* @public @deprecated in 3.0.
|
|
297535
297653
|
*/
|
|
297536
297654
|
var AbstractZoneLocation;
|
|
297537
297655
|
(function (AbstractZoneLocation) {
|
|
@@ -297558,7 +297676,7 @@ var StagePanelLocation;
|
|
|
297558
297676
|
var StagePanelSection;
|
|
297559
297677
|
(function (StagePanelSection) {
|
|
297560
297678
|
StagePanelSection[StagePanelSection["Start"] = 0] = "Start";
|
|
297561
|
-
/** @deprecated - all widgets that a targeted for Middle will be placed in `End` section */
|
|
297679
|
+
/** @deprecated in 3.2. - all widgets that a targeted for Middle will be placed in `End` section */
|
|
297562
297680
|
StagePanelSection[StagePanelSection["Middle"] = 1] = "Middle";
|
|
297563
297681
|
StagePanelSection[StagePanelSection["End"] = 2] = "End";
|
|
297564
297682
|
})(StagePanelSection || (StagePanelSection = {}));
|
|
@@ -302966,7 +303084,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
302966
303084
|
/***/ ((module) => {
|
|
302967
303085
|
|
|
302968
303086
|
"use strict";
|
|
302969
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.6.0-dev.
|
|
303087
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.6.0-dev.59","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.6.0-dev.59","@itwin/core-bentley":"workspace:^3.6.0-dev.59","@itwin/core-common":"workspace:^3.6.0-dev.59","@itwin/core-geometry":"workspace:^3.6.0-dev.59","@itwin/core-orbitgt":"workspace:^3.6.0-dev.59","@itwin/core-quantity":"workspace:^3.6.0-dev.59","@itwin/webgl-compatibility":"workspace:^3.6.0-dev.59"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
302970
303088
|
|
|
302971
303089
|
/***/ })
|
|
302972
303090
|
|