@itwin/rpcinterface-full-stack-tests 4.3.0-dev.33 → 4.3.0-dev.34
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/bundled-tests.js +341 -120
- 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/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_4_14_node_modules_loaders_gl_draco_d-aa4ff5.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -42527,6 +42527,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42527
42527
|
/* harmony export */ });
|
|
42528
42528
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
42529
42529
|
/* harmony import */ var _BackgroundMapProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BackgroundMapProvider */ "../../core/common/lib/esm/BackgroundMapProvider.js");
|
|
42530
|
+
/* eslint-disable deprecation/deprecation */
|
|
42530
42531
|
/*---------------------------------------------------------------------------------------------
|
|
42531
42532
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
42532
42533
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -42660,6 +42661,9 @@ class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
42660
42661
|
this.formatId = props.formatId;
|
|
42661
42662
|
this.url = props.url;
|
|
42662
42663
|
this.accessKey = props.accessKey;
|
|
42664
|
+
if (props.queryParams) {
|
|
42665
|
+
this.savedQueryParams = { ...props.queryParams };
|
|
42666
|
+
}
|
|
42663
42667
|
this.subLayers = [];
|
|
42664
42668
|
if (!props.subLayers)
|
|
42665
42669
|
return;
|
|
@@ -42679,6 +42683,8 @@ class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
42679
42683
|
props.formatId = this.formatId;
|
|
42680
42684
|
if (this.subLayers.length > 0)
|
|
42681
42685
|
props.subLayers = this.subLayers.map((x) => x.toJSON());
|
|
42686
|
+
if (this.savedQueryParams)
|
|
42687
|
+
props.queryParams = { ...this.savedQueryParams };
|
|
42682
42688
|
return props;
|
|
42683
42689
|
}
|
|
42684
42690
|
/** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
|
|
@@ -42691,6 +42697,10 @@ class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
42691
42697
|
clone.userName = this.userName;
|
|
42692
42698
|
clone.password = this.password;
|
|
42693
42699
|
clone.accessKey = this.accessKey;
|
|
42700
|
+
if (this.unsavedQueryParams)
|
|
42701
|
+
clone.unsavedQueryParams = { ...this.unsavedQueryParams };
|
|
42702
|
+
if (this.savedQueryParams)
|
|
42703
|
+
clone.savedQueryParams = { ...this.savedQueryParams };
|
|
42694
42704
|
return clone;
|
|
42695
42705
|
}
|
|
42696
42706
|
/** @internal */
|
|
@@ -42700,6 +42710,12 @@ class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
42700
42710
|
props.url = changedProps.url ?? this.url;
|
|
42701
42711
|
props.accessKey = changedProps.accessKey ?? this.accessKey;
|
|
42702
42712
|
props.subLayers = changedProps.subLayers ?? this.subLayers;
|
|
42713
|
+
if (changedProps.queryParams) {
|
|
42714
|
+
props.queryParams = { ...changedProps.queryParams };
|
|
42715
|
+
}
|
|
42716
|
+
else if (this.savedQueryParams) {
|
|
42717
|
+
props.queryParams = { ...this.savedQueryParams };
|
|
42718
|
+
}
|
|
42703
42719
|
return props;
|
|
42704
42720
|
}
|
|
42705
42721
|
/** @internal */
|
|
@@ -42768,6 +42784,17 @@ class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
42768
42784
|
this.userName = userName;
|
|
42769
42785
|
this.password = password;
|
|
42770
42786
|
}
|
|
42787
|
+
/** Collect all query parameters
|
|
42788
|
+
* @beta
|
|
42789
|
+
*/
|
|
42790
|
+
collectQueryParams() {
|
|
42791
|
+
let queryParams = {};
|
|
42792
|
+
if (this.savedQueryParams)
|
|
42793
|
+
queryParams = { ...this.savedQueryParams };
|
|
42794
|
+
if (this.unsavedQueryParams)
|
|
42795
|
+
queryParams = { ...queryParams, ...this.unsavedQueryParams };
|
|
42796
|
+
return queryParams;
|
|
42797
|
+
}
|
|
42771
42798
|
}
|
|
42772
42799
|
/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
|
|
42773
42800
|
* Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.
|
|
@@ -47837,12 +47864,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47837
47864
|
/* harmony export */ ThematicDisplaySensorSettings: () => (/* binding */ ThematicDisplaySensorSettings),
|
|
47838
47865
|
/* harmony export */ ThematicGradientColorScheme: () => (/* binding */ ThematicGradientColorScheme),
|
|
47839
47866
|
/* harmony export */ ThematicGradientMode: () => (/* binding */ ThematicGradientMode),
|
|
47840
|
-
/* harmony export */ ThematicGradientSettings: () => (/* binding */ ThematicGradientSettings)
|
|
47867
|
+
/* harmony export */ ThematicGradientSettings: () => (/* binding */ ThematicGradientSettings),
|
|
47868
|
+
/* harmony export */ ThematicGradientTransparencyMode: () => (/* binding */ ThematicGradientTransparencyMode)
|
|
47841
47869
|
/* harmony export */ });
|
|
47842
47870
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
47843
47871
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
47844
47872
|
/* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ColorDef */ "../../core/common/lib/esm/ColorDef.js");
|
|
47845
47873
|
/* harmony import */ var _Gradient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Gradient */ "../../core/common/lib/esm/Gradient.js");
|
|
47874
|
+
/* harmony import */ var _TextureProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TextureProps */ "../../core/common/lib/esm/TextureProps.js");
|
|
47846
47875
|
/*---------------------------------------------------------------------------------------------
|
|
47847
47876
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
47848
47877
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -47854,6 +47883,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47854
47883
|
|
|
47855
47884
|
|
|
47856
47885
|
|
|
47886
|
+
|
|
47857
47887
|
/** A thematic gradient mode used to generate and apply a thematic effect to a scene.
|
|
47858
47888
|
* @see [[ThematicGradientSettings.mode]]
|
|
47859
47889
|
* @public
|
|
@@ -47870,6 +47900,24 @@ var ThematicGradientMode;
|
|
|
47870
47900
|
/** Apply isolines to the scene to achieve an effect similar to a contour map. Can only be used with [[ThematicDisplayMode.Height]]. */
|
|
47871
47901
|
ThematicGradientMode[ThematicGradientMode["IsoLines"] = 3] = "IsoLines";
|
|
47872
47902
|
})(ThematicGradientMode || (ThematicGradientMode = {}));
|
|
47903
|
+
/** Describes how transparency is computed when applying a thematic gradient to a surface.
|
|
47904
|
+
* Each [[Gradient.KeyColor]] in [[ThematicGradientSettings.customKeys]] has a transparency value.
|
|
47905
|
+
* Each surface to which the gradient is applied has its own transparency.
|
|
47906
|
+
* The transparency mode determines how these two values are combined to compute the final transparency.
|
|
47907
|
+
* @see [[ThematicGradientSettings.transparencyMode]].
|
|
47908
|
+
* @public
|
|
47909
|
+
* @extensions
|
|
47910
|
+
*/
|
|
47911
|
+
var ThematicGradientTransparencyMode;
|
|
47912
|
+
(function (ThematicGradientTransparencyMode) {
|
|
47913
|
+
/** Ignore the gradient's transparency, applying only the surface's own transparency. */
|
|
47914
|
+
ThematicGradientTransparencyMode[ThematicGradientTransparencyMode["SurfaceOnly"] = 0] = "SurfaceOnly";
|
|
47915
|
+
/** The final transparency is computed from the product of the surface and gradient alpha channels.
|
|
47916
|
+
* (Alpha is the inverse of transparency, where `alpha = (255 - transparency) / 255`).
|
|
47917
|
+
* If the gradient color is opaque, this produces the same result as [[SurfaceOnly]].
|
|
47918
|
+
*/
|
|
47919
|
+
ThematicGradientTransparencyMode[ThematicGradientTransparencyMode["MultiplySurfaceAndGradient"] = 1] = "MultiplySurfaceAndGradient";
|
|
47920
|
+
})(ThematicGradientTransparencyMode || (ThematicGradientTransparencyMode = {}));
|
|
47873
47921
|
/** A color scheme used to generate the colors of a thematic gradient within an applied range.
|
|
47874
47922
|
* @see [[ThematicGradientSettings.colorScheme]]
|
|
47875
47923
|
* @see [[ThematicDisplay.range]]
|
|
@@ -47900,24 +47948,32 @@ class ThematicGradientSettings {
|
|
|
47900
47948
|
static get margin() { return .001; } // A fixed portion of the gradient for out of range values.
|
|
47901
47949
|
static get contentRange() { return 1.0 - 2.0 * ThematicGradientSettings.margin; }
|
|
47902
47950
|
static get contentMax() { return 1.0 - ThematicGradientSettings.margin; }
|
|
47951
|
+
/** @alpha */
|
|
47952
|
+
get textureTransparency() {
|
|
47953
|
+
let transp = _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Opaque;
|
|
47954
|
+
if (ThematicGradientColorScheme.Custom === this.colorScheme) {
|
|
47955
|
+
let haveOpaque = false;
|
|
47956
|
+
let haveTransparent = false;
|
|
47957
|
+
for (const key of this.customKeys) {
|
|
47958
|
+
const isOpaque = key.color.isOpaque;
|
|
47959
|
+
haveOpaque = haveOpaque || isOpaque;
|
|
47960
|
+
haveTransparent = haveTransparent || !isOpaque;
|
|
47961
|
+
}
|
|
47962
|
+
if (haveTransparent)
|
|
47963
|
+
transp = haveOpaque ? _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed : _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Translucent;
|
|
47964
|
+
}
|
|
47965
|
+
if (transp !== _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed)
|
|
47966
|
+
if (this.marginColor.isOpaque !== (transp === _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Opaque))
|
|
47967
|
+
transp = _TextureProps__WEBPACK_IMPORTED_MODULE_4__.TextureTransparency.Mixed;
|
|
47968
|
+
return transp;
|
|
47969
|
+
}
|
|
47903
47970
|
equals(other) {
|
|
47904
|
-
if (this.mode !== other.mode)
|
|
47905
|
-
|
|
47906
|
-
|
|
47907
|
-
return false;
|
|
47908
|
-
if (!this.marginColor.equals(other.marginColor))
|
|
47909
|
-
return false;
|
|
47910
|
-
if (this.colorScheme !== other.colorScheme)
|
|
47971
|
+
if (this.mode !== other.mode || this.stepCount !== other.stepCount || !this.marginColor.equals(other.marginColor)
|
|
47972
|
+
|| this.colorScheme !== other.colorScheme || this.customKeys.length !== other.customKeys.length
|
|
47973
|
+
|| this.colorMix !== other.colorMix || this.transparencyMode !== other.transparencyMode) {
|
|
47911
47974
|
return false;
|
|
47912
|
-
if (this.customKeys.length !== other.customKeys.length)
|
|
47913
|
-
return false;
|
|
47914
|
-
if (this.colorMix !== other.colorMix)
|
|
47915
|
-
return false;
|
|
47916
|
-
for (let i = 0; i < this.customKeys.length; i++) {
|
|
47917
|
-
if (!_Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.keyColorEquals(this.customKeys[i], other.customKeys[i]))
|
|
47918
|
-
return false;
|
|
47919
47975
|
}
|
|
47920
|
-
return
|
|
47976
|
+
return this.customKeys.every((key, index) => _Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.keyColorEquals(key, other.customKeys[index]));
|
|
47921
47977
|
}
|
|
47922
47978
|
/** Compares two sets of thematic gradient settings.
|
|
47923
47979
|
* @param lhs First set of thematic gradient settings to compare
|
|
@@ -47938,10 +47994,11 @@ class ThematicGradientSettings {
|
|
|
47938
47994
|
return diff;
|
|
47939
47995
|
if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.customKeys.length, rhs.customKeys.length)) !== 0)
|
|
47940
47996
|
return diff;
|
|
47941
|
-
|
|
47997
|
+
if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.transparencyMode, rhs.transparencyMode)) !== 0)
|
|
47998
|
+
return diff;
|
|
47999
|
+
for (let i = 0; i < lhs.customKeys.length; i++)
|
|
47942
48000
|
if ((diff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.customKeys[i].color.tbgr, rhs.customKeys[i].color.tbgr)) !== 0)
|
|
47943
48001
|
return diff;
|
|
47944
|
-
}
|
|
47945
48002
|
return diff;
|
|
47946
48003
|
}
|
|
47947
48004
|
constructor(json) {
|
|
@@ -47952,6 +48009,7 @@ class ThematicGradientSettings {
|
|
|
47952
48009
|
this.marginColor = _ColorDef__WEBPACK_IMPORTED_MODULE_2__.ColorDef.fromJSON();
|
|
47953
48010
|
this.colorScheme = ThematicGradientColorScheme.BlueRed;
|
|
47954
48011
|
this.colorMix = 0.0;
|
|
48012
|
+
this.transparencyMode = ThematicGradientTransparencyMode.SurfaceOnly;
|
|
47955
48013
|
}
|
|
47956
48014
|
else {
|
|
47957
48015
|
this.mode = (json.mode !== undefined && json.mode !== null) ? json.mode : ThematicGradientMode.Smooth;
|
|
@@ -47973,6 +48031,7 @@ class ThematicGradientSettings {
|
|
|
47973
48031
|
this.customKeys.push(new _Gradient__WEBPACK_IMPORTED_MODULE_3__.Gradient.KeyColor({ value: keyValue[0], color: _ColorDef__WEBPACK_IMPORTED_MODULE_2__.ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));
|
|
47974
48032
|
}
|
|
47975
48033
|
this.colorMix = json.colorMix ?? 0.0;
|
|
48034
|
+
this.transparencyMode = json.transparencyMode ?? ThematicGradientTransparencyMode.SurfaceOnly;
|
|
47976
48035
|
}
|
|
47977
48036
|
}
|
|
47978
48037
|
static fromJSON(json) {
|
|
@@ -47991,6 +48050,8 @@ class ThematicGradientSettings {
|
|
|
47991
48050
|
props.colorScheme = this.colorScheme;
|
|
47992
48051
|
if (0 !== this.colorMix)
|
|
47993
48052
|
props.colorMix = this.colorMix;
|
|
48053
|
+
if (ThematicGradientTransparencyMode.SurfaceOnly !== this.transparencyMode)
|
|
48054
|
+
props.transparencyMode = this.transparencyMode;
|
|
47994
48055
|
if (this.customKeys.length > 0)
|
|
47995
48056
|
props.customKeys = this.customKeys.map((key) => { return { value: key.value, color: key.color.toJSON() }; });
|
|
47996
48057
|
return props;
|
|
@@ -48009,6 +48070,7 @@ class ThematicGradientSettings {
|
|
|
48009
48070
|
colorScheme: undefined !== changedProps.colorScheme ? changedProps.colorScheme : this.colorScheme,
|
|
48010
48071
|
customKeys: undefined !== changedProps.customKeys ? changedProps.customKeys : this.customKeys.map((key) => ({ value: key.value, color: key.color.tbgr })),
|
|
48011
48072
|
colorMix: undefined !== changedProps.colorMix ? changedProps.colorMix : this.colorMix,
|
|
48073
|
+
transparencyMode: changedProps.transparencyMode ?? this.transparencyMode,
|
|
48012
48074
|
};
|
|
48013
48075
|
return ThematicGradientSettings.fromJSON(props);
|
|
48014
48076
|
}
|
|
@@ -49838,6 +49900,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
49838
49900
|
/* harmony export */ ThematicGradientColorScheme: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientColorScheme),
|
|
49839
49901
|
/* harmony export */ ThematicGradientMode: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientMode),
|
|
49840
49902
|
/* harmony export */ ThematicGradientSettings: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientSettings),
|
|
49903
|
+
/* harmony export */ ThematicGradientTransparencyMode: () => (/* reexport safe */ _ThematicDisplay__WEBPACK_IMPORTED_MODULE_106__.ThematicGradientTransparencyMode),
|
|
49841
49904
|
/* harmony export */ TileContentSource: () => (/* reexport safe */ _TileProps__WEBPACK_IMPORTED_MODULE_108__.TileContentSource),
|
|
49842
49905
|
/* harmony export */ TileFormat: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_149__.TileFormat),
|
|
49843
49906
|
/* harmony export */ TileHeader: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_149__.TileHeader),
|
|
@@ -105194,6 +105257,7 @@ const extensionExports = {
|
|
|
105194
105257
|
ThematicDisplayMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicDisplayMode,
|
|
105195
105258
|
ThematicGradientColorScheme: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientColorScheme,
|
|
105196
105259
|
ThematicGradientMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientMode,
|
|
105260
|
+
ThematicGradientTransparencyMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ThematicGradientTransparencyMode,
|
|
105197
105261
|
Tile: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.Tile,
|
|
105198
105262
|
TileAdmin: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TileAdmin,
|
|
105199
105263
|
TileBoundingBoxes: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.TileBoundingBoxes,
|
|
@@ -128437,7 +128501,8 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
|
|
|
128437
128501
|
return target.isReadPixelsInProgress ? opaquePass : "translucent";
|
|
128438
128502
|
const vf = target.currentViewFlags;
|
|
128439
128503
|
// When rendering thematic isolines, we need translucency because they have anti-aliasing.
|
|
128440
|
-
|
|
128504
|
+
const thematic = target.wantThematicDisplay && this.supportsThematicDisplay ? target.uniforms.thematic.thematicDisplay : undefined;
|
|
128505
|
+
if (thematic && target.uniforms.thematic.wantIsoLines)
|
|
128441
128506
|
return "translucent";
|
|
128442
128507
|
// In wireframe, unless fill is explicitly enabled for planar region, surface does not draw
|
|
128443
128508
|
if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.Wireframe === vf.renderMode && !this.mesh.isTextureAlwaysDisplayed) {
|
|
@@ -128449,6 +128514,18 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
|
|
|
128449
128514
|
// If transparency disabled by render mode or view flag, always draw opaque.
|
|
128450
128515
|
if (!vf.transparency || _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SolidFill === vf.renderMode || _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.HiddenLine === vf.renderMode)
|
|
128451
128516
|
return opaquePass;
|
|
128517
|
+
// A gradient texture applied by analysis style always fully determines the transparency of the surface.
|
|
128518
|
+
if (this.hasScalarAnimation && undefined !== target.analysisTexture) {
|
|
128519
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== target.analysisStyle?.thematic);
|
|
128520
|
+
switch (target.analysisStyle.thematic.thematicSettings.textureTransparency) {
|
|
128521
|
+
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
|
|
128522
|
+
return "translucent";
|
|
128523
|
+
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Opaque:
|
|
128524
|
+
return opaquePass;
|
|
128525
|
+
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Mixed:
|
|
128526
|
+
return `${opaquePass}-translucent`;
|
|
128527
|
+
}
|
|
128528
|
+
}
|
|
128452
128529
|
// We have 3 sources of alpha: the material, the texture, and the color.
|
|
128453
128530
|
// Base alpha comes from the material if it overrides it; otherwise from the color.
|
|
128454
128531
|
// The texture's alpha is multiplied by the base alpha.
|
|
@@ -128459,8 +128536,21 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
|
|
|
128459
128536
|
hasAlpha = mat.hasTranslucency;
|
|
128460
128537
|
else
|
|
128461
128538
|
hasAlpha = this.getColor(target).hasTranslucency;
|
|
128539
|
+
// Thematic gradient can optionally multiply gradient alpha with surface alpha.
|
|
128540
|
+
if (thematic && thematic.gradientSettings.transparencyMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicGradientTransparencyMode.MultiplySurfaceAndGradient) {
|
|
128541
|
+
switch (thematic.gradientSettings.textureTransparency) {
|
|
128542
|
+
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Opaque:
|
|
128543
|
+
// This surface's alpha gets multiplied by 1 - gradient colors are all opaque.
|
|
128544
|
+
return hasAlpha ? "translucent" : opaquePass;
|
|
128545
|
+
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
|
|
128546
|
+
// This surface's alpha gets multiplied by < 1 - gradient colors are all translucent.
|
|
128547
|
+
return "translucent";
|
|
128548
|
+
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Mixed:
|
|
128549
|
+
// The gradient contains a mix of translucent and opaque colors.
|
|
128550
|
+
return hasAlpha ? "translucent" : `${opaquePass}-translucent`;
|
|
128551
|
+
}
|
|
128552
|
+
}
|
|
128462
128553
|
if (!hasAlpha) {
|
|
128463
|
-
// ###TODO handle TextureTransparency.Mixed; remove Texture.hasTranslucency.
|
|
128464
128554
|
const tex = this.wantTextures(target, true) ? this.texture : undefined;
|
|
128465
128555
|
switch (tex?.transparency) {
|
|
128466
128556
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.TextureTransparency.Translucent:
|
|
@@ -132943,9 +133033,9 @@ class ThematicUniforms {
|
|
|
132943
133033
|
this._colorMix = 0.0;
|
|
132944
133034
|
this._axis = new Float32Array(3);
|
|
132945
133035
|
this._sunDirection = new Float32Array(3);
|
|
132946
|
-
this._marginColor = new
|
|
133036
|
+
this._marginColor = new _FloatRGBA__WEBPACK_IMPORTED_MODULE_8__.FloatRgba();
|
|
132947
133037
|
this._displayMode = new Float32Array(1);
|
|
132948
|
-
this._fragSettings = new Float32Array(
|
|
133038
|
+
this._fragSettings = new Float32Array(4); // gradientMode, distanceCutoff, stepCount, > 0.0 if multiply gradient alpha
|
|
132949
133039
|
this._numSensors = 0;
|
|
132950
133040
|
this._gradientDimension = _getGradientDimension();
|
|
132951
133041
|
this.syncKey = 0;
|
|
@@ -133019,15 +133109,13 @@ class ThematicUniforms {
|
|
|
133019
133109
|
this._updateAxis(this.thematicDisplay.axis, (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicDisplayMode.Slope === this.thematicDisplay.displayMode) ? target.uniforms.frustum.viewMatrix : undefined);
|
|
133020
133110
|
if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicDisplayMode.HillShade === this.thematicDisplay.displayMode)
|
|
133021
133111
|
this._updateSunDirection(this.thematicDisplay.sunDirection, target.uniforms.frustum.viewMatrix);
|
|
133022
|
-
|
|
133023
|
-
this._marginColor[0] = marginRgb.red;
|
|
133024
|
-
this._marginColor[1] = marginRgb.green;
|
|
133025
|
-
this._marginColor[2] = marginRgb.blue;
|
|
133112
|
+
this._marginColor.setColorDef(this.thematicDisplay.gradientSettings.marginColor);
|
|
133026
133113
|
this._displayMode[0] = this.thematicDisplay.displayMode;
|
|
133027
133114
|
this._fragSettings[0] = this.thematicDisplay.gradientSettings.mode;
|
|
133028
133115
|
const sensorSettings = this.thematicDisplay.sensorSettings;
|
|
133029
133116
|
this._fragSettings[1] = (undefined === sensorSettings) ? 0 : this.thematicDisplay.sensorSettings.distanceCutoff;
|
|
133030
133117
|
this._fragSettings[2] = Math.min(this.thematicDisplay.gradientSettings.stepCount, this._gradientDimension);
|
|
133118
|
+
this._fragSettings[3] = this.thematicDisplay.gradientSettings.transparencyMode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ThematicGradientTransparencyMode.SurfaceOnly ? 0.0 : 1.0;
|
|
133031
133119
|
// If we want sensors and have no distance cutoff, then create a global shared sensor texture.
|
|
133032
133120
|
if (target.wantThematicSensors && !(this._distanceCutoff > 0)) {
|
|
133033
133121
|
this._numSensors = sensorSettings.sensors.length;
|
|
@@ -133052,7 +133140,7 @@ class ThematicUniforms {
|
|
|
133052
133140
|
}
|
|
133053
133141
|
bindMarginColor(uniform) {
|
|
133054
133142
|
if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
|
|
133055
|
-
|
|
133143
|
+
this._marginColor.bind(uniform);
|
|
133056
133144
|
}
|
|
133057
133145
|
bindDisplayMode(uniform) {
|
|
133058
133146
|
if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
|
|
@@ -133060,7 +133148,7 @@ class ThematicUniforms {
|
|
|
133060
133148
|
}
|
|
133061
133149
|
bindFragSettings(uniform) {
|
|
133062
133150
|
if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_3__.sync)(this, uniform))
|
|
133063
|
-
uniform.
|
|
133151
|
+
uniform.setUniform4fv(this._fragSettings);
|
|
133064
133152
|
}
|
|
133065
133153
|
bindTexture(uniform, unit) {
|
|
133066
133154
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._texture);
|
|
@@ -140620,16 +140708,12 @@ const discardClassifiedByAlpha = `
|
|
|
140620
140708
|
bool isTranslucentPass = kRenderPass_Translucent == u_renderPass;
|
|
140621
140709
|
return (isOpaquePass && hasAlpha) || (isTranslucentPass && !hasAlpha);
|
|
140622
140710
|
`;
|
|
140623
|
-
const
|
|
140624
|
-
|
|
140625
|
-
|
|
140626
|
-
|
|
140627
|
-
|
|
140628
|
-
|
|
140629
|
-
return alpha < cutoff;
|
|
140630
|
-
}
|
|
140631
|
-
|
|
140632
|
-
return false;
|
|
140711
|
+
const discardByAlphaCutoff = `
|
|
140712
|
+
float cutoff = abs(u_alphaCutoff);
|
|
140713
|
+
if (kRenderPass_Translucent == u_renderPass)
|
|
140714
|
+
return u_alphaCutoff > 0.0 && alpha >= cutoff;
|
|
140715
|
+
else
|
|
140716
|
+
return alpha < cutoff;
|
|
140633
140717
|
`;
|
|
140634
140718
|
function addTransparencyDiscard(frag) {
|
|
140635
140719
|
(0,_RenderPass__WEBPACK_IMPORTED_MODULE_16__.addRenderPass)(frag);
|
|
@@ -140644,7 +140728,7 @@ function addTransparencyDiscard(frag) {
|
|
|
140644
140728
|
uniform.setUniform1f(cutoff);
|
|
140645
140729
|
});
|
|
140646
140730
|
});
|
|
140647
|
-
frag.set(5 /* FragmentShaderComponent.DiscardByAlpha */,
|
|
140731
|
+
frag.set(5 /* FragmentShaderComponent.DiscardByAlpha */, discardByAlphaCutoff);
|
|
140648
140732
|
}
|
|
140649
140733
|
/** @internal */
|
|
140650
140734
|
function createSurfaceBuilder(flags) {
|
|
@@ -140802,11 +140886,11 @@ vec4 getSensor(int index) {
|
|
|
140802
140886
|
// A stepped gradient texture is arranged with single unique color pixels for each step. The dimension of a stepped gradient texture is stepCount.
|
|
140803
140887
|
// A smooth gradient texture is arranged with blended color pixels across the entire span of the texture. The dimension of a smooth gradient texture is the system's maximum texture size.
|
|
140804
140888
|
const getColor = `
|
|
140805
|
-
|
|
140889
|
+
vec4 getColor(float ndx) {
|
|
140806
140890
|
if (ndx < 0.0 || ndx > 1.0)
|
|
140807
140891
|
return u_marginColor;
|
|
140808
140892
|
|
|
140809
|
-
return TEXTURE(s_texture, vec2(0.0, ndx))
|
|
140893
|
+
return TEXTURE(s_texture, vec2(0.0, ndx));
|
|
140810
140894
|
}
|
|
140811
140895
|
`;
|
|
140812
140896
|
// Access a stepped gradient texture at the specified index taking into account isolines.
|
|
@@ -140814,12 +140898,12 @@ vec3 getColor(float ndx) {
|
|
|
140814
140898
|
// specifically to ensure that the texels sampled result in lines of overall singular colors - no stepping into the
|
|
140815
140899
|
// neighboring bands.
|
|
140816
140900
|
const getIsoLineColor = `
|
|
140817
|
-
|
|
140901
|
+
vec4 getIsoLineColor(float ndx, float stepCount) {
|
|
140818
140902
|
if (ndx < 0.01 || ndx > 0.99)
|
|
140819
140903
|
return u_marginColor;
|
|
140820
140904
|
|
|
140821
140905
|
ndx += 0.5 / stepCount; // center on step pixels
|
|
140822
|
-
return TEXTURE(s_texture, vec2(0.0, ndx))
|
|
140906
|
+
return TEXTURE(s_texture, vec2(0.0, ndx));
|
|
140823
140907
|
}
|
|
140824
140908
|
`;
|
|
140825
140909
|
const fwidth = `\nfloat _universal_fwidth(float coord) { return fwidth(coord); }\n`;
|
|
@@ -140885,7 +140969,8 @@ const applyThematicColorPostlude = `
|
|
|
140885
140969
|
float gradientMode = u_thematicSettings.x;
|
|
140886
140970
|
float stepCount = u_thematicSettings.z;
|
|
140887
140971
|
|
|
140888
|
-
vec4 rgba =
|
|
140972
|
+
vec4 rgba = (kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx);
|
|
140973
|
+
rgba.a = baseColor.a * (u_thematicSettings.w > 0.0 ? rgba.a : 1.0);
|
|
140889
140974
|
rgba = mix(rgba, baseColor, u_thematicColorMix);
|
|
140890
140975
|
|
|
140891
140976
|
if (kThematicGradientMode_IsoLines == gradientMode) {
|
|
@@ -140910,7 +140995,8 @@ const applyThematicColorPostludeForPointClouds = `
|
|
|
140910
140995
|
float gradientMode = u_thematicSettings.x;
|
|
140911
140996
|
float stepCount = u_thematicSettings.z;
|
|
140912
140997
|
|
|
140913
|
-
vec4 rgba =
|
|
140998
|
+
vec4 rgba = (kThematicGradientMode_IsoLines == gradientMode) ? getIsoLineColor(ndx, stepCount) : getColor(ndx);
|
|
140999
|
+
rgba.a = baseColor.a * (u_thematicSettings.w > 0.0 ? rgba.a : 1.0);
|
|
140914
141000
|
rgba = mix(rgba, baseColor, u_thematicColorMix);
|
|
140915
141001
|
|
|
140916
141002
|
if (kThematicGradientMode_IsoLines == gradientMode) {
|
|
@@ -141013,13 +141099,13 @@ function addThematicDisplay(builder, isForPointClouds = false, isForTerrainMesh
|
|
|
141013
141099
|
params.target.uniforms.thematic.bindDisplayMode(uniform);
|
|
141014
141100
|
});
|
|
141015
141101
|
});
|
|
141016
|
-
frag.addUniform("u_marginColor",
|
|
141102
|
+
frag.addUniform("u_marginColor", 5 /* VariableType.Vec4 */, (prog) => {
|
|
141017
141103
|
prog.addGraphicUniform("u_marginColor", (uniform, params) => {
|
|
141018
141104
|
params.target.uniforms.thematic.bindMarginColor(uniform);
|
|
141019
141105
|
});
|
|
141020
141106
|
});
|
|
141021
141107
|
// gradientMode, distanceCutoff, stepCount
|
|
141022
|
-
builder.addUniform("u_thematicSettings",
|
|
141108
|
+
builder.addUniform("u_thematicSettings", 5 /* VariableType.Vec4 */, (prog) => {
|
|
141023
141109
|
prog.addGraphicUniform("u_thematicSettings", (uniform, params) => {
|
|
141024
141110
|
params.target.uniforms.thematic.bindFragSettings(uniform);
|
|
141025
141111
|
});
|
|
@@ -153398,9 +153484,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153398
153484
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
153399
153485
|
/* harmony export */ ArcGISTileMap: () => (/* binding */ ArcGISTileMap)
|
|
153400
153486
|
/* harmony export */ });
|
|
153401
|
-
/* harmony import */ var
|
|
153402
|
-
/* harmony import */ var
|
|
153403
|
-
/* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
153487
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
153488
|
+
/* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
153404
153489
|
/*---------------------------------------------------------------------------------------------
|
|
153405
153490
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
153406
153491
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -153410,16 +153495,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153410
153495
|
*/
|
|
153411
153496
|
|
|
153412
153497
|
|
|
153413
|
-
|
|
153414
153498
|
const nonVisibleChildren = [false, false, false, false];
|
|
153415
153499
|
/** @internal */
|
|
153416
153500
|
class ArcGISTileMap {
|
|
153417
|
-
constructor(restBaseUrl, settings,
|
|
153501
|
+
constructor(restBaseUrl, settings, fetchFunc, nbLods) {
|
|
153418
153502
|
this.tileMapRequestSize = 32;
|
|
153419
153503
|
this.fallbackTileMapRequestSize = 2;
|
|
153420
|
-
this._tilesCache = new
|
|
153504
|
+
this._tilesCache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary((lhs, rhs) => (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(lhs, rhs));
|
|
153421
153505
|
this._restBaseUrl = restBaseUrl;
|
|
153422
|
-
this.
|
|
153506
|
+
this._fetchFunc = fetchFunc;
|
|
153423
153507
|
this._settings = settings;
|
|
153424
153508
|
if (nbLods !== undefined && nbLods > 0) {
|
|
153425
153509
|
this._callQueues = new Array(nbLods).fill(Promise.resolve(nonVisibleChildren));
|
|
@@ -153427,19 +153511,8 @@ class ArcGISTileMap {
|
|
|
153427
153511
|
}
|
|
153428
153512
|
async fetchTileMapFromServer(level, row, column, width, height) {
|
|
153429
153513
|
const tmpUrl = `${this._restBaseUrl}/tilemap/${level}/${row}/${column}/${width}/${height}?f=json`;
|
|
153430
|
-
const
|
|
153431
|
-
|
|
153432
|
-
if (this._accessClient) {
|
|
153433
|
-
await _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
|
|
153434
|
-
mapLayerUrl: new URL(this._settings.url),
|
|
153435
|
-
userName: this._settings.userName,
|
|
153436
|
-
password: this._settings.password,
|
|
153437
|
-
});
|
|
153438
|
-
}
|
|
153439
|
-
}
|
|
153440
|
-
catch {
|
|
153441
|
-
}
|
|
153442
|
-
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_0__.request)(urlObj.toString(), "json");
|
|
153514
|
+
const response = await this._fetchFunc(new URL(tmpUrl));
|
|
153515
|
+
return response.json();
|
|
153443
153516
|
}
|
|
153444
153517
|
getAvailableTilesFromCache(tiles) {
|
|
153445
153518
|
let allTilesFound = true;
|
|
@@ -153512,7 +153585,7 @@ class ArcGISTileMap {
|
|
|
153512
153585
|
if (json.adjusted) {
|
|
153513
153586
|
// If tilemap size got adjusted, I'm expecting to get adjusted size...
|
|
153514
153587
|
// otherwise there is something really odd with this server.
|
|
153515
|
-
(0,
|
|
153588
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(json.location?.width !== undefined && json.location?.height !== undefined);
|
|
153516
153589
|
if (json.location?.width !== undefined && json.location?.height !== undefined) {
|
|
153517
153590
|
tileMapWidth = json.location?.width;
|
|
153518
153591
|
tileMapHeight = json.location?.height;
|
|
@@ -153525,7 +153598,7 @@ class ArcGISTileMap {
|
|
|
153525
153598
|
const curColumn = reqColumn + i;
|
|
153526
153599
|
const curRow = reqRow + j;
|
|
153527
153600
|
// console.log(`Tilemap tile:: ${level},${curRow},${curColumn} => ${avail}`);
|
|
153528
|
-
this._tilesCache.set(
|
|
153601
|
+
this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_1__.QuadId.getTileContentId(level, curColumn, curRow), avail);
|
|
153529
153602
|
// Check if actual tile is among the children we are looking for, if so update the availability array.
|
|
153530
153603
|
if (curColumn >= queryTiles[0].column && curColumn <= queryTiles[queryTiles.length - 1].column
|
|
153531
153604
|
&& curRow >= queryTiles[0].row && curRow <= queryTiles[queryTiles.length - 1].row) {
|
|
@@ -153540,7 +153613,7 @@ class ArcGISTileMap {
|
|
|
153540
153613
|
// Mark all tilemap tiles to non-available in the cache too
|
|
153541
153614
|
for (let j = 0; j < tileMapWidth; j++) {
|
|
153542
153615
|
for (let i = 0; i < tileMapHeight; i++) {
|
|
153543
|
-
this._tilesCache.set(
|
|
153616
|
+
this._tilesCache.set(_internal__WEBPACK_IMPORTED_MODULE_1__.QuadId.getTileContentId(level, reqColumn + i, reqRow + j), false);
|
|
153544
153617
|
}
|
|
153545
153618
|
}
|
|
153546
153619
|
}
|
|
@@ -153732,17 +153805,12 @@ class ArcGisUtilities {
|
|
|
153732
153805
|
}
|
|
153733
153806
|
/**
|
|
153734
153807
|
* Attempt to access an ArcGIS service, and validate its service metadata.
|
|
153735
|
-
* @param
|
|
153736
|
-
* @param
|
|
153737
|
-
|
|
153738
|
-
|
|
153739
|
-
|
|
153740
|
-
|
|
153741
|
-
* @param ignoreCache Flag to skip cache lookup (i.e. force a new server request)
|
|
153742
|
-
* @return Validation Status. If successful, a list of available sub-layers will also be returned.
|
|
153743
|
-
*/
|
|
153744
|
-
static async validateSource(url, formatId, capabilitiesFilter, userName, password, ignoreCache) {
|
|
153745
|
-
const metadata = await this.getServiceJson(url, formatId, userName, password, ignoreCache);
|
|
153808
|
+
* @param source Source to validate.
|
|
153809
|
+
* @param opts Validation options
|
|
153810
|
+
*/
|
|
153811
|
+
static async validateSource(args) {
|
|
153812
|
+
const { source, ignoreCache, capabilitiesFilter } = args;
|
|
153813
|
+
const metadata = await this.getServiceJson({ url: source.url, formatId: source.formatId, userName: source.userName, password: source.password, queryParams: source.collectQueryParams(), ignoreCache });
|
|
153746
153814
|
const json = metadata?.content;
|
|
153747
153815
|
if (json === undefined) {
|
|
153748
153816
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidUrl };
|
|
@@ -153752,7 +153820,7 @@ class ArcGisUtilities {
|
|
|
153752
153820
|
// and return information needed to initiate the authentification process... the end-user
|
|
153753
153821
|
// will have to provide his credentials before we can fully validate this source.
|
|
153754
153822
|
if (json.error.code === ArcGisErrorCode.TokenRequired) {
|
|
153755
|
-
return (userName || password) ? { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials } : { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.RequireAuth };
|
|
153823
|
+
return (source.userName || source.password) ? { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials } : { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.RequireAuth };
|
|
153756
153824
|
}
|
|
153757
153825
|
else if (json.error.code === ArcGisErrorCode.InvalidCredentials)
|
|
153758
153826
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_1__.MapLayerSourceStatus.InvalidCredentials };
|
|
@@ -153803,16 +153871,30 @@ class ArcGisUtilities {
|
|
|
153803
153871
|
* @param ignoreCache Flag to skip cache lookup (i.e. force a new server request)
|
|
153804
153872
|
* @param requireToken Flag to indicate if a token is required
|
|
153805
153873
|
*/
|
|
153806
|
-
static async getServiceJson(
|
|
153874
|
+
static async getServiceJson(args) {
|
|
153875
|
+
const { url, formatId, userName, password, queryParams, ignoreCache, requireToken } = args;
|
|
153807
153876
|
if (!ignoreCache) {
|
|
153808
153877
|
const cached = ArcGisUtilities._serviceCache.get(url);
|
|
153809
153878
|
if (cached !== undefined)
|
|
153810
153879
|
return cached;
|
|
153811
153880
|
}
|
|
153881
|
+
const appendParams = (urlObj, params) => {
|
|
153882
|
+
if (params) {
|
|
153883
|
+
Object.keys(params).forEach((paramKey) => {
|
|
153884
|
+
if (!urlObj.searchParams.has(paramKey))
|
|
153885
|
+
urlObj.searchParams.append(paramKey, params[paramKey]);
|
|
153886
|
+
});
|
|
153887
|
+
}
|
|
153888
|
+
};
|
|
153889
|
+
const createUrlObj = () => {
|
|
153890
|
+
const tmpUrl = new URL(url);
|
|
153891
|
+
tmpUrl.searchParams.append("f", "json");
|
|
153892
|
+
appendParams(tmpUrl, queryParams);
|
|
153893
|
+
return tmpUrl;
|
|
153894
|
+
};
|
|
153812
153895
|
let accessTokenRequired = false;
|
|
153813
153896
|
try {
|
|
153814
|
-
let tmpUrl =
|
|
153815
|
-
tmpUrl.searchParams.append("f", "json");
|
|
153897
|
+
let tmpUrl = createUrlObj();
|
|
153816
153898
|
// In some cases, caller might already know token is required, so append it immediately
|
|
153817
153899
|
if (requireToken) {
|
|
153818
153900
|
const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
|
|
@@ -153831,8 +153913,7 @@ class ArcGisUtilities {
|
|
|
153831
153913
|
// If token required
|
|
153832
153914
|
const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_2__.IModelApp.mapLayerFormatRegistry.getAccessClient(formatId);
|
|
153833
153915
|
if (accessClient) {
|
|
153834
|
-
tmpUrl =
|
|
153835
|
-
tmpUrl.searchParams.append("f", "json");
|
|
153916
|
+
tmpUrl = createUrlObj();
|
|
153836
153917
|
await ArcGisUtilities.appendSecurityToken(tmpUrl, accessClient, { mapLayerUrl: new URL(url), userName, password });
|
|
153837
153918
|
response = await fetch(tmpUrl.toString(), { method: "GET" });
|
|
153838
153919
|
errorCode = await ArcGisUtilities.checkForResponseErrorCode(response);
|
|
@@ -154732,7 +154813,7 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
|
|
|
154732
154813
|
async getServiceJson() {
|
|
154733
154814
|
let metadata;
|
|
154734
154815
|
try {
|
|
154735
|
-
metadata = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.getServiceJson(this._settings.url, this._settings.formatId, this._settings.userName, this._settings.password);
|
|
154816
|
+
metadata = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.getServiceJson({ url: this._settings.url, formatId: this._settings.formatId, userName: this._settings.userName, password: this._settings.password, queryParams: this._settings.collectQueryParams() });
|
|
154736
154817
|
}
|
|
154737
154818
|
catch (_e) {
|
|
154738
154819
|
}
|
|
@@ -154761,6 +154842,11 @@ class ArcGISImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapLa
|
|
|
154761
154842
|
async fetch(url, options) {
|
|
154762
154843
|
let errorCode;
|
|
154763
154844
|
const urlObj = new URL(url);
|
|
154845
|
+
const queryParams = this._settings.collectQueryParams();
|
|
154846
|
+
Object.keys(queryParams).forEach((paramKey) => {
|
|
154847
|
+
if (!urlObj.searchParams.has(paramKey))
|
|
154848
|
+
urlObj.searchParams.append(paramKey, queryParams[paramKey]);
|
|
154849
|
+
});
|
|
154764
154850
|
if (this._accessTokenRequired && this._accessClient) {
|
|
154765
154851
|
this._lastAccessToken = await _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.appendSecurityToken(urlObj, this._accessClient, {
|
|
154766
154852
|
mapLayerUrl: new URL(this._settings.url),
|
|
@@ -155006,7 +155092,10 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2
|
|
|
155006
155092
|
}
|
|
155007
155093
|
// Create tile map object only if we are going to request tiles from this server and it support tilemap requests.
|
|
155008
155094
|
if (this._tileMapSupported) {
|
|
155009
|
-
|
|
155095
|
+
const fetch = async (url, options) => {
|
|
155096
|
+
return this.fetch(url, options);
|
|
155097
|
+
};
|
|
155098
|
+
this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_2__.ArcGISTileMap(this._settings.url, this._settings, fetch, json.tileInfo?.lods?.length);
|
|
155010
155099
|
}
|
|
155011
155100
|
}
|
|
155012
155101
|
// Read range using fullextent from service metadata
|
|
@@ -155857,7 +155946,8 @@ class TileUrlImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_0__.MapL
|
|
|
155857
155946
|
url = `${url}/`;
|
|
155858
155947
|
url = `${url}{level}/{column}/{row}.png`;
|
|
155859
155948
|
}
|
|
155860
|
-
|
|
155949
|
+
const tmpUrl = url.replace(levelToken, level.toString()).replace(columnToken, column.toString()).replace(rowToken, row.toString());
|
|
155950
|
+
return this.appendCustomParams(tmpUrl);
|
|
155861
155951
|
}
|
|
155862
155952
|
}
|
|
155863
155953
|
|
|
@@ -156055,7 +156145,8 @@ class WmsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_3__.
|
|
|
156055
156145
|
if (bboxString.length === 0 || crsString.length === 0 || layerString.length === 0)
|
|
156056
156146
|
return "";
|
|
156057
156147
|
const crsParamName = this._capabilities?.isVersion13 ? "CRS" : "SRS";
|
|
156058
|
-
|
|
156148
|
+
const tmpUrl = `${this._baseUrl}?SERVICE=WMS&VERSION=${this._capabilities?.version}&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=${this.transparentBackgroundString}&LAYERS=${layerString}&WIDTH=${this.tileSize}&HEIGHT=${this.tileSize}&${crsParamName}=${crsString}&STYLES=&BBOX=${bboxString}`;
|
|
156149
|
+
return this.appendCustomParams(tmpUrl);
|
|
156059
156150
|
}
|
|
156060
156151
|
async getToolTip(strings, quadId, carto, tree) {
|
|
156061
156152
|
await super.getToolTip(strings, quadId, carto, tree);
|
|
@@ -156075,7 +156166,8 @@ class WmsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_3__.
|
|
|
156075
156166
|
const y = Math.floor(.5 + (1.0 - fraction.y) * this.tileSize);
|
|
156076
156167
|
const coordinateString = this._capabilities?.isVersion13 ? `&i=${x}&j=${y}` : `&x=${x}&y=${y}`;
|
|
156077
156168
|
const crsParamName = this._capabilities?.isVersion13 ? "CRS" : "SRS";
|
|
156078
|
-
|
|
156169
|
+
let getFeatureUrl = `${this._baseUrl}?SERVICE=WMS&VERSION=${this._capabilities?.version}&REQUEST=GetFeatureInfo&LAYERS=${layerString}&WIDTH=${this.tileSize}&HEIGHT=${this.tileSize}&${crsParamName}=EPSG%3A3857&BBOX=${bboxString}&QUERY_LAYERS=${layerString}${coordinateString}&info_format=${formatString}`;
|
|
156170
|
+
getFeatureUrl = this.appendCustomParams(getFeatureUrl);
|
|
156079
156171
|
return this.toolTipFromUrl(strings, getFeatureUrl);
|
|
156080
156172
|
}
|
|
156081
156173
|
}
|
|
@@ -156243,10 +156335,11 @@ class WmtsMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_2__
|
|
|
156243
156335
|
if (matrixSetAndLimits && matrixSetAndLimits.tileMatrixSet.tileMatrix.length > zoomLevel)
|
|
156244
156336
|
tileMatrix = matrixSetAndLimits.tileMatrixSet.tileMatrix[zoomLevel].identifier;
|
|
156245
156337
|
const styleParam = (style?.identifier === undefined ? "" : `&style=${style.identifier}`);
|
|
156246
|
-
if (tileMatrix !== undefined && matrixSetAndLimits !== undefined)
|
|
156247
|
-
|
|
156248
|
-
|
|
156249
|
-
|
|
156338
|
+
if (tileMatrix !== undefined && matrixSetAndLimits !== undefined) {
|
|
156339
|
+
const tmpUrl = `${this._baseUrl}?Service=WMTS&Version=1.0.0&Request=GetTile&Format=image%2Fpng&layer=${this.displayedLayerName}${styleParam}&TileMatrixSet=${matrixSetAndLimits.tileMatrixSet.identifier}&TileMatrix=${tileMatrix}&TileCol=${column}&TileRow=${row}`;
|
|
156340
|
+
return this.appendCustomParams(tmpUrl);
|
|
156341
|
+
}
|
|
156342
|
+
return "";
|
|
156250
156343
|
}
|
|
156251
156344
|
}
|
|
156252
156345
|
|
|
@@ -156903,17 +156996,20 @@ class MapLayerFormat {
|
|
|
156903
156996
|
* @param _ignoreCache Flag to skip cache lookup (i.e. force a new server request).
|
|
156904
156997
|
* @returns Validation Status. If successful, a list of available sub-layers may also be returned.
|
|
156905
156998
|
*/
|
|
156906
|
-
static async validateSource(_url, _userName, _password, _ignoreCache) { return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.Valid }; }
|
|
156999
|
+
static async validateSource(_url, _userName, _password, _ignoreCache, _accesKey) { return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.Valid }; }
|
|
157000
|
+
/** Allow a source object to be validated before being attached as a map-layer.
|
|
157001
|
+
* @beta
|
|
157002
|
+
*/
|
|
157003
|
+
static async validate(args) {
|
|
157004
|
+
return this.validateSource(args.source.url, args.source.userName, args.source.password, args.ignoreCache);
|
|
157005
|
+
}
|
|
156907
157006
|
/**
|
|
156908
157007
|
* Create a [[MapLayerImageryProvider]] that will be used to feed data in a map-layer tile tree.
|
|
156909
157008
|
* @param _settings The map layer settings to be applied to the imagery provider.
|
|
156910
157009
|
* @returns Returns the new imagery provider.
|
|
156911
157010
|
* @beta
|
|
156912
157011
|
*/
|
|
156913
|
-
static createImageryProvider(_settings) {
|
|
156914
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false, "Subclasses must override this method.");
|
|
156915
|
-
return undefined;
|
|
156916
|
-
}
|
|
157012
|
+
static createImageryProvider(_settings) { (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false); }
|
|
156917
157013
|
/**
|
|
156918
157014
|
* Creates a MapLayerTileTreeReference for this map layer format.
|
|
156919
157015
|
* @param _layerSettings Map layer settings that are applied to the MapLayerTileTreeReference.
|
|
@@ -156923,7 +157019,7 @@ class MapLayerFormat {
|
|
|
156923
157019
|
* @beta
|
|
156924
157020
|
*/
|
|
156925
157021
|
static createMapLayerTree(_layerSettings, _layerIndex, _iModel) {
|
|
156926
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false
|
|
157022
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false);
|
|
156927
157023
|
return undefined;
|
|
156928
157024
|
}
|
|
156929
157025
|
}
|
|
@@ -156985,10 +157081,30 @@ class MapLayerFormatRegistry {
|
|
|
156985
157081
|
}
|
|
156986
157082
|
return (format === undefined) ? undefined : format.createImageryProvider(layerSettings);
|
|
156987
157083
|
}
|
|
156988
|
-
|
|
156989
|
-
|
|
156990
|
-
|
|
156991
|
-
|
|
157084
|
+
/** @internal*/
|
|
157085
|
+
async validateSource(formatIdOrArgs, url, userName, password, ignoreCache) {
|
|
157086
|
+
let format;
|
|
157087
|
+
let args;
|
|
157088
|
+
if (typeof formatIdOrArgs == "string" && url !== undefined) {
|
|
157089
|
+
const formatId = formatIdOrArgs;
|
|
157090
|
+
const entry = this._formats.get(formatId);
|
|
157091
|
+
format = entry?.type;
|
|
157092
|
+
if (format !== undefined) {
|
|
157093
|
+
const source = _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSource.fromJSON({ name: "", formatId, url });
|
|
157094
|
+
if (source !== undefined) {
|
|
157095
|
+
args = { source, ignoreCache };
|
|
157096
|
+
source.userName = userName;
|
|
157097
|
+
source.password = password;
|
|
157098
|
+
}
|
|
157099
|
+
}
|
|
157100
|
+
}
|
|
157101
|
+
else if (typeof formatIdOrArgs !== "string") {
|
|
157102
|
+
const entry = this._formats.get(formatIdOrArgs.source.formatId);
|
|
157103
|
+
format = entry?.type;
|
|
157104
|
+
}
|
|
157105
|
+
if (!args || !format)
|
|
157106
|
+
return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.InvalidFormat };
|
|
157107
|
+
return format.validate(args);
|
|
156992
157108
|
}
|
|
156993
157109
|
}
|
|
156994
157110
|
|
|
@@ -157025,10 +157141,20 @@ class WmsMapLayerFormat extends ImageryMapLayerFormat {
|
|
|
157025
157141
|
return new _internal__WEBPACK_IMPORTED_MODULE_0__.WmsMapLayerImageryProvider(settings);
|
|
157026
157142
|
}
|
|
157027
157143
|
static async validateSource(url, userName, password, ignoreCache) {
|
|
157144
|
+
const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmsMapLayerFormat.formatId, url });
|
|
157145
|
+
if (source === undefined)
|
|
157146
|
+
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
|
|
157147
|
+
source.userName = userName;
|
|
157148
|
+
source.password = password;
|
|
157149
|
+
return WmsMapLayerFormat.validate({ source, ignoreCache });
|
|
157150
|
+
}
|
|
157151
|
+
static async validate(args) {
|
|
157152
|
+
const { source, ignoreCache } = args;
|
|
157153
|
+
const { url, userName, password } = source;
|
|
157028
157154
|
try {
|
|
157029
157155
|
let subLayers;
|
|
157030
157156
|
const maxVisibleSubLayers = 50;
|
|
157031
|
-
const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache);
|
|
157157
|
+
const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache, source.collectQueryParams());
|
|
157032
157158
|
if (capabilities !== undefined) {
|
|
157033
157159
|
subLayers = capabilities.getSubLayers(false);
|
|
157034
157160
|
const rootsSubLayer = subLayers?.find((sublayer) => sublayer.parent === undefined);
|
|
@@ -157083,9 +157209,19 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
|
|
|
157083
157209
|
return new _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsMapLayerImageryProvider(settings);
|
|
157084
157210
|
}
|
|
157085
157211
|
static async validateSource(url, userName, password, ignoreCache) {
|
|
157212
|
+
const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmtsMapLayerFormat.formatId, url });
|
|
157213
|
+
if (source === undefined)
|
|
157214
|
+
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
|
|
157215
|
+
source.userName = userName;
|
|
157216
|
+
source.password = password;
|
|
157217
|
+
return WmtsMapLayerFormat.validate({ source, ignoreCache });
|
|
157218
|
+
}
|
|
157219
|
+
static async validate(args) {
|
|
157220
|
+
const { source, ignoreCache } = args;
|
|
157221
|
+
const { url, userName, password } = source;
|
|
157086
157222
|
try {
|
|
157087
157223
|
const subLayers = [];
|
|
157088
|
-
const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache);
|
|
157224
|
+
const capabilities = await _internal__WEBPACK_IMPORTED_MODULE_0__.WmtsCapabilities.create(url, (userName && password ? { user: userName, password } : undefined), ignoreCache, source.collectQueryParams());
|
|
157089
157225
|
if (!capabilities)
|
|
157090
157226
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidUrl };
|
|
157091
157227
|
// Only returns layer that can be published in the Google maps or WGS84 aligned tile trees.
|
|
@@ -157132,11 +157268,19 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
|
|
|
157132
157268
|
WmtsMapLayerFormat.formatId = "WMTS";
|
|
157133
157269
|
class ArcGISMapLayerFormat extends ImageryMapLayerFormat {
|
|
157134
157270
|
static async validateSource(url, userName, password, ignoreCache) {
|
|
157135
|
-
const
|
|
157271
|
+
const source = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSource.fromJSON({ name: "", formatId: WmtsMapLayerFormat.formatId, url });
|
|
157272
|
+
if (source === undefined)
|
|
157273
|
+
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidFormat };
|
|
157274
|
+
source.userName = userName;
|
|
157275
|
+
source.password = password;
|
|
157276
|
+
return WmtsMapLayerFormat.validate({ source, ignoreCache });
|
|
157277
|
+
}
|
|
157278
|
+
static async validate(args) {
|
|
157279
|
+
const urlValidation = _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateUrl(args.source.url, "MapServer");
|
|
157136
157280
|
if (urlValidation !== _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.Valid)
|
|
157137
157281
|
return { status: urlValidation };
|
|
157138
157282
|
// Some Map service supporting only tiles don't include the 'Map' capabilities, thus we can't make it mandatory.
|
|
157139
|
-
return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource(
|
|
157283
|
+
return _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGisUtilities.validateSource({ ...args, capabilitiesFilter: [] });
|
|
157140
157284
|
}
|
|
157141
157285
|
static createImageryProvider(settings) {
|
|
157142
157286
|
return new _internal__WEBPACK_IMPORTED_MODULE_0__.ArcGISMapLayerImageryProvider(settings);
|
|
@@ -157522,6 +157666,47 @@ class MapLayerImageryProvider {
|
|
|
157522
157666
|
${tileExtent.longitudeRight.toFixed(8)},${tileExtent.latitudeTop.toFixed(8)}`;
|
|
157523
157667
|
}
|
|
157524
157668
|
}
|
|
157669
|
+
/** Append custom parameters for settings to provided URL object.
|
|
157670
|
+
* Make sure custom parameters do no override query parameters already part of the URL (lower case comparison)
|
|
157671
|
+
* @internal
|
|
157672
|
+
*/
|
|
157673
|
+
appendCustomParams(url) {
|
|
157674
|
+
if (!this._settings.savedQueryParams && !this._settings.unsavedQueryParams)
|
|
157675
|
+
return url;
|
|
157676
|
+
// create a lower-case array of keys
|
|
157677
|
+
const currentParams = [];
|
|
157678
|
+
const currentUrl = new URL(url);
|
|
157679
|
+
currentUrl.searchParams.forEach((_value, key, _parent) => {
|
|
157680
|
+
currentParams.push(key.toLowerCase());
|
|
157681
|
+
});
|
|
157682
|
+
const urlParamsFromIndexArray = (indexArray, result) => {
|
|
157683
|
+
const urlParams = (result ? result : new URLSearchParams());
|
|
157684
|
+
if (!indexArray)
|
|
157685
|
+
return urlParams;
|
|
157686
|
+
Object.keys(indexArray).forEach((key) => {
|
|
157687
|
+
if (!currentParams.includes(key.toLowerCase()))
|
|
157688
|
+
urlParams.append(key, indexArray[key]);
|
|
157689
|
+
});
|
|
157690
|
+
return urlParams;
|
|
157691
|
+
};
|
|
157692
|
+
const params = urlParamsFromIndexArray(this._settings.savedQueryParams);
|
|
157693
|
+
urlParamsFromIndexArray(this._settings.unsavedQueryParams, params);
|
|
157694
|
+
const getSeparator = (u) => {
|
|
157695
|
+
let separator = "&";
|
|
157696
|
+
if (u.includes("?")) {
|
|
157697
|
+
if (u.endsWith("?"))
|
|
157698
|
+
separator = "";
|
|
157699
|
+
}
|
|
157700
|
+
else {
|
|
157701
|
+
separator = "?";
|
|
157702
|
+
}
|
|
157703
|
+
return separator;
|
|
157704
|
+
};
|
|
157705
|
+
if (params.size > 0) {
|
|
157706
|
+
url = `${url}${getSeparator(url)}${params.toString()}`;
|
|
157707
|
+
}
|
|
157708
|
+
return url;
|
|
157709
|
+
}
|
|
157525
157710
|
}
|
|
157526
157711
|
|
|
157527
157712
|
|
|
@@ -157586,21 +157771,22 @@ var MapLayerSourceStatus;
|
|
|
157586
157771
|
* @public
|
|
157587
157772
|
*/
|
|
157588
157773
|
class MapLayerSource {
|
|
157589
|
-
constructor(formatId = "WMS", name, url, baseMap = false, transparentBackground = true) {
|
|
157774
|
+
constructor(formatId = "WMS", name, url, baseMap = false, transparentBackground = true, savedQueryParams) {
|
|
157590
157775
|
this.baseMap = false;
|
|
157591
157776
|
this.formatId = formatId;
|
|
157592
157777
|
this.name = name;
|
|
157593
157778
|
this.url = url;
|
|
157594
157779
|
this.baseMap = baseMap;
|
|
157595
157780
|
this.transparentBackground = transparentBackground;
|
|
157781
|
+
this.savedQueryParams = savedQueryParams;
|
|
157596
157782
|
}
|
|
157597
157783
|
static fromJSON(json) {
|
|
157598
157784
|
if (json === undefined)
|
|
157599
157785
|
return undefined;
|
|
157600
|
-
return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground);
|
|
157786
|
+
return new MapLayerSource(json.formatId, json.name, json.url, json.baseMap, json.transparentBackground, json.queryParams);
|
|
157601
157787
|
}
|
|
157602
157788
|
async validateSource(ignoreCache) {
|
|
157603
|
-
return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.validateSource(
|
|
157789
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.validateSource({ source: this, ignoreCache });
|
|
157604
157790
|
}
|
|
157605
157791
|
/** @internal*/
|
|
157606
157792
|
static fromBackgroundMapProps(props) {
|
|
@@ -157616,7 +157802,7 @@ class MapLayerSource {
|
|
|
157616
157802
|
return undefined;
|
|
157617
157803
|
}
|
|
157618
157804
|
toJSON() {
|
|
157619
|
-
return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground };
|
|
157805
|
+
return { url: this.url, name: this.name, formatId: this.formatId, transparentBackground: this.transparentBackground, queryParams: this.savedQueryParams };
|
|
157620
157806
|
}
|
|
157621
157807
|
toLayerSettings(subLayers) {
|
|
157622
157808
|
// When MapLayerSetting is created from a MapLayerSource, sub-layers and credentials need to be set separately.
|
|
@@ -157624,11 +157810,28 @@ class MapLayerSource {
|
|
|
157624
157810
|
if (this.userName !== undefined || this.password !== undefined) {
|
|
157625
157811
|
layerSettings?.setCredentials(this.userName, this.password);
|
|
157626
157812
|
}
|
|
157813
|
+
if (this.savedQueryParams) {
|
|
157814
|
+
layerSettings.savedQueryParams = { ...this.savedQueryParams };
|
|
157815
|
+
}
|
|
157816
|
+
if (this.unsavedQueryParams) {
|
|
157817
|
+
layerSettings.unsavedQueryParams = { ...this.unsavedQueryParams };
|
|
157818
|
+
}
|
|
157627
157819
|
return layerSettings;
|
|
157628
157820
|
}
|
|
157629
157821
|
getCredentials() {
|
|
157630
157822
|
return this.userName && this.password ? { user: this.userName, password: this.password } : undefined;
|
|
157631
157823
|
}
|
|
157824
|
+
/** Collect all query parameters
|
|
157825
|
+
* @beta
|
|
157826
|
+
*/
|
|
157827
|
+
collectQueryParams() {
|
|
157828
|
+
let queryParams = {};
|
|
157829
|
+
if (this.savedQueryParams)
|
|
157830
|
+
queryParams = { ...this.savedQueryParams };
|
|
157831
|
+
if (this.unsavedQueryParams)
|
|
157832
|
+
queryParams = { ...queryParams, ...this.unsavedQueryParams };
|
|
157833
|
+
return queryParams;
|
|
157834
|
+
}
|
|
157632
157835
|
}
|
|
157633
157836
|
/** A collection of [[MapLayerSource]] objects.
|
|
157634
157837
|
* @beta
|
|
@@ -160705,13 +160908,22 @@ class WmsCapabilities {
|
|
|
160705
160908
|
if (_json.Capability)
|
|
160706
160909
|
this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);
|
|
160707
160910
|
}
|
|
160708
|
-
static async create(url, credentials, ignoreCache) {
|
|
160911
|
+
static async create(url, credentials, ignoreCache, queryParams) {
|
|
160709
160912
|
if (!ignoreCache) {
|
|
160710
160913
|
const cached = WmsCapabilities._capabilitiesCache.get(url);
|
|
160711
160914
|
if (cached !== undefined)
|
|
160712
160915
|
return cached;
|
|
160713
160916
|
}
|
|
160714
|
-
const
|
|
160917
|
+
const tmpUrl = new URL(_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url));
|
|
160918
|
+
tmpUrl.searchParams.append("request", "GetCapabilities");
|
|
160919
|
+
tmpUrl.searchParams.append("service", "WMS");
|
|
160920
|
+
if (queryParams) {
|
|
160921
|
+
Object.keys(queryParams).forEach((paramKey) => {
|
|
160922
|
+
if (!tmpUrl.searchParams.has(paramKey))
|
|
160923
|
+
tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);
|
|
160924
|
+
});
|
|
160925
|
+
}
|
|
160926
|
+
const xmlCapabilities = await getXml(tmpUrl.toString(), credentials);
|
|
160715
160927
|
if (!xmlCapabilities)
|
|
160716
160928
|
return undefined;
|
|
160717
160929
|
const capabilities = new WmsCapabilities(new (wms_capabilities__WEBPACK_IMPORTED_MODULE_1___default())().parse(xmlCapabilities));
|
|
@@ -161204,13 +161416,22 @@ class WmtsCapabilities {
|
|
|
161204
161416
|
const xmlDoc = parser.parseFromString(xmlCapabilities, "text/xml");
|
|
161205
161417
|
return new WmtsCapabilities(xmlDoc);
|
|
161206
161418
|
}
|
|
161207
|
-
static async create(url, credentials, ignoreCache) {
|
|
161419
|
+
static async create(url, credentials, ignoreCache, queryParams) {
|
|
161208
161420
|
if (!ignoreCache) {
|
|
161209
161421
|
const cached = WmtsCapabilities._capabilitiesCache.get(url);
|
|
161210
161422
|
if (cached !== undefined)
|
|
161211
161423
|
return cached;
|
|
161212
161424
|
}
|
|
161213
|
-
const
|
|
161425
|
+
const tmpUrl = new URL(_internal__WEBPACK_IMPORTED_MODULE_2__.WmsUtilities.getBaseUrl(url));
|
|
161426
|
+
tmpUrl.searchParams.append("request", "GetCapabilities");
|
|
161427
|
+
tmpUrl.searchParams.append("service", "WMTS");
|
|
161428
|
+
if (queryParams) {
|
|
161429
|
+
Object.keys(queryParams).forEach((paramKey) => {
|
|
161430
|
+
if (!tmpUrl.searchParams.has(paramKey))
|
|
161431
|
+
tmpUrl.searchParams.append(paramKey, queryParams[paramKey]);
|
|
161432
|
+
});
|
|
161433
|
+
}
|
|
161434
|
+
const xmlCapabilities = await getXml(tmpUrl.toString(), credentials);
|
|
161214
161435
|
if (!xmlCapabilities)
|
|
161215
161436
|
return undefined;
|
|
161216
161437
|
const capabilities = WmtsCapabilities.createFromXml(xmlCapabilities);
|
|
@@ -284669,7 +284890,7 @@ class TestContext {
|
|
|
284669
284890
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
284670
284891
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
284671
284892
|
await core_frontend_1.NoRenderApp.startup({
|
|
284672
|
-
applicationVersion: "4.3.0-dev.
|
|
284893
|
+
applicationVersion: "4.3.0-dev.34",
|
|
284673
284894
|
applicationId: this.settings.gprid,
|
|
284674
284895
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
284675
284896
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -303427,7 +303648,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
303427
303648
|
/***/ ((module) => {
|
|
303428
303649
|
|
|
303429
303650
|
"use strict";
|
|
303430
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
303651
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.34","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 && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","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","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/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 -c extraction.eslint.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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.3.0-dev.34","@itwin/core-bentley":"workspace:^4.3.0-dev.34","@itwin/core-common":"workspace:^4.3.0-dev.34","@itwin/core-geometry":"workspace:^4.3.0-dev.34","@itwin/core-orbitgt":"workspace:^4.3.0-dev.34","@itwin/core-quantity":"workspace:^4.3.0-dev.34"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
303431
303652
|
|
|
303432
303653
|
/***/ }),
|
|
303433
303654
|
|