@itwin/core-common 5.0.0-dev.90 → 5.0.0-dev.92
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/cjs/MapLayerSettings.d.ts +18 -1
- package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
- package/lib/cjs/MapLayerSettings.js +21 -3
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts +18 -1
- package/lib/esm/MapLayerSettings.d.ts.map +1 -1
- package/lib/esm/MapLayerSettings.js +20 -2
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/package.json +6 -6
|
@@ -124,6 +124,15 @@ export interface ImageMapLayerProps extends CommonMapLayerProps {
|
|
|
124
124
|
*/
|
|
125
125
|
properties?: MapLayerProviderProperties;
|
|
126
126
|
}
|
|
127
|
+
/** The target onto which to drape a model map layer.
|
|
128
|
+
* @beta
|
|
129
|
+
*/
|
|
130
|
+
export declare enum ModelMapLayerDrapeTarget {
|
|
131
|
+
/** Drape only onto the globe. */
|
|
132
|
+
Globe = 0,
|
|
133
|
+
/** Drape only onto all attached reality data. */
|
|
134
|
+
RealityData = 1
|
|
135
|
+
}
|
|
127
136
|
/** JSON representation of a [[ModelMapLayerSettings]].
|
|
128
137
|
* @see [[MapImagerySettings]].
|
|
129
138
|
* @public
|
|
@@ -131,6 +140,10 @@ export interface ImageMapLayerProps extends CommonMapLayerProps {
|
|
|
131
140
|
export interface ModelMapLayerProps extends CommonMapLayerProps {
|
|
132
141
|
/** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */
|
|
133
142
|
modelId: Id64String;
|
|
143
|
+
/** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
|
|
144
|
+
* @beta
|
|
145
|
+
*/
|
|
146
|
+
drapeTarget?: ModelMapLayerDrapeTarget;
|
|
134
147
|
/** @internal */
|
|
135
148
|
url?: never;
|
|
136
149
|
/** @internal */
|
|
@@ -255,10 +268,14 @@ export declare class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
255
268
|
* @public
|
|
256
269
|
*/
|
|
257
270
|
export declare class ModelMapLayerSettings extends MapLayerSettings {
|
|
271
|
+
/** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
|
|
272
|
+
* @beta
|
|
273
|
+
*/
|
|
274
|
+
readonly drapeTarget: ModelMapLayerDrapeTarget;
|
|
258
275
|
readonly modelId: Id64String;
|
|
259
276
|
get source(): string;
|
|
260
277
|
/** @internal */
|
|
261
|
-
protected constructor(modelId: Id64String, name: string, visible?: boolean, transparency?: number, transparentBackground?: boolean);
|
|
278
|
+
protected constructor(modelId: Id64String, name: string, visible?: boolean, transparency?: number, transparentBackground?: boolean, drapeTarget?: ModelMapLayerDrapeTarget);
|
|
262
279
|
/** Construct from JSON, performing validation and applying default values for undefined fields. */
|
|
263
280
|
static fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings;
|
|
264
281
|
/** return JSON representation of this MapLayerSettings object */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSettings.d.ts","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAI,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5G,cAAc;AACd,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,G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IACA,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAOhE,0GAA0G;IAC1G,IAAW,qBAAqB,IAAI,OAAO,CAE1C;CACF;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,qBAAqB;IAC7D,OAAO,CAAC,SAAS,CAAC,CAAwB;IAE1C,sEAAsE;IACtE,IAAW,QAAQ,IAAI,qBAAqB,GAAG,SAAS,CAA2B;IAEnF;;;;OAIG;WACoB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,oBAAoB;IAS/E,qDAAqD;IACrC,MAAM,IAAI,iBAAiB;IAQ3C,gBAAgB;IACA,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB;IAWvF,mCAAmC;IACnB,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,oBAAoB;IAUrF,wDAAwD;WAC1C,YAAY,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,oBAAoB;IA2D3I,gBAAgB;WACF,sBAAsB,CAAC,KAAK,EAAE,4BAA4B,GAAG,oBAAoB;IAI/F,aAAa;IACN,iBAAiB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,oBAAoB;CAGhF"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module MapLayers
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.BaseMapLayerSettings = exports.ModelMapLayerSettings = exports.ImageMapLayerSettings = exports.MapLayerSettings = exports.MapSubLayerSettings = void 0;
|
|
10
|
+
exports.BaseMapLayerSettings = exports.ModelMapLayerSettings = exports.ImageMapLayerSettings = exports.MapLayerSettings = exports.ModelMapLayerDrapeTarget = exports.MapSubLayerSettings = void 0;
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
const BackgroundMapProvider_1 = require("./BackgroundMapProvider");
|
|
13
13
|
;
|
|
@@ -84,6 +84,16 @@ class MapSubLayerSettings {
|
|
|
84
84
|
get idString() { return (typeof this.id === "number") ? this.id.toString(10) : this.id; }
|
|
85
85
|
}
|
|
86
86
|
exports.MapSubLayerSettings = MapSubLayerSettings;
|
|
87
|
+
/** The target onto which to drape a model map layer.
|
|
88
|
+
* @beta
|
|
89
|
+
*/
|
|
90
|
+
var ModelMapLayerDrapeTarget;
|
|
91
|
+
(function (ModelMapLayerDrapeTarget) {
|
|
92
|
+
/** Drape only onto the globe. */
|
|
93
|
+
ModelMapLayerDrapeTarget[ModelMapLayerDrapeTarget["Globe"] = 0] = "Globe";
|
|
94
|
+
/** Drape only onto all attached reality data. */
|
|
95
|
+
ModelMapLayerDrapeTarget[ModelMapLayerDrapeTarget["RealityData"] = 1] = "RealityData";
|
|
96
|
+
})(ModelMapLayerDrapeTarget || (exports.ModelMapLayerDrapeTarget = ModelMapLayerDrapeTarget = {}));
|
|
87
97
|
/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
|
|
88
98
|
* This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.
|
|
89
99
|
* One or more map layers may be included within [[MapImagerySettings]] object.
|
|
@@ -327,22 +337,29 @@ exports.ImageMapLayerSettings = ImageMapLayerSettings;
|
|
|
327
337
|
* @public
|
|
328
338
|
*/
|
|
329
339
|
class ModelMapLayerSettings extends MapLayerSettings {
|
|
340
|
+
/** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
|
|
341
|
+
* @beta
|
|
342
|
+
*/
|
|
343
|
+
drapeTarget;
|
|
330
344
|
modelId;
|
|
331
345
|
get source() { return this.modelId; }
|
|
332
346
|
/** @internal */
|
|
333
|
-
constructor(modelId, name, visible = true, transparency = 0, transparentBackground = true) {
|
|
347
|
+
constructor(modelId, name, visible = true, transparency = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {
|
|
334
348
|
super(name, visible, transparency, transparentBackground);
|
|
335
349
|
this.modelId = modelId;
|
|
350
|
+
this.drapeTarget = drapeTarget;
|
|
336
351
|
}
|
|
337
352
|
/** Construct from JSON, performing validation and applying default values for undefined fields. */
|
|
338
353
|
static fromJSON(json) {
|
|
339
354
|
const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;
|
|
340
|
-
return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground);
|
|
355
|
+
return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);
|
|
341
356
|
}
|
|
342
357
|
/** return JSON representation of this MapLayerSettings object */
|
|
343
358
|
toJSON() {
|
|
344
359
|
const props = super._toJSON();
|
|
345
360
|
props.modelId = this.modelId;
|
|
361
|
+
if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)
|
|
362
|
+
props.drapeTarget = this.drapeTarget;
|
|
346
363
|
return props;
|
|
347
364
|
}
|
|
348
365
|
/** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
|
|
@@ -356,6 +373,7 @@ class ModelMapLayerSettings extends MapLayerSettings {
|
|
|
356
373
|
cloneProps(changedProps) {
|
|
357
374
|
const props = super.cloneProps(changedProps);
|
|
358
375
|
props.modelId = changedProps.modelId ?? this.modelId;
|
|
376
|
+
props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;
|
|
359
377
|
return props;
|
|
360
378
|
}
|
|
361
379
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH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GAAG,sEAAsE,CAAC;wBAC7E,MAAM;gBACV,CAAC;gBAED,MAAM;QACV,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC9B,IAAI;YACJ,QAAQ;YACR,GAAG;YACH,qBAAqB,EAAE,KAAK;YAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS;YAC5B,YAAY,EAAE,OAAO,EAAE,YAAY;SACpC,CAAC,CAAC;QAEH,IAAA,qBAAM,EAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;QAC/B,IAAA,qBAAM,EAAC,QAAQ,YAAY,oBAAoB,CAAC,CAAC;QAEjD,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,OAAO,IAAI,CAAC,YAAY,CAAC,6CAAqB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,aAAa;IACN,iBAAiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF;AAzHD,oDAyHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** The current set of supported map layer formats.\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\n * @public\n */\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\n\n/** @public */\nexport type SubLayerId = string | number;\n\n/**\n * Type for map layer provider array property.\n * @beta\n */\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\n\n/**\n * Type for map layer provider properties.\n * @beta\n */\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\n\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * @see [[MapLayerProps]]\n * @public\n */\nexport interface MapSubLayerProps {\n name: string;\n title?: string;\n visible?: boolean;\n id?: SubLayerId;\n parent?: SubLayerId;\n children?: SubLayerId[];\n}\n\n/** Normalized representation of a [[MapSubLayerProps]] for which values\n * have been validated and default values have been applied where explicit values not defined.\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\n * @see [[MapLayerSettings]]\n * @public\n */\nexport class MapSubLayerSettings {\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\n public readonly name: string;\n /** Title. */\n public readonly title?: string;\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\n public readonly visible: boolean;\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\n public readonly id: SubLayerId;\n /** One or more sublayer children */\n public readonly children?: SubLayerId[];\n /** sublayer parent. */\n public readonly parent?: SubLayerId;\n\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\n this.name = name;\n this.title = title;\n this.visible = visible !== undefined && visible;\n this.id = (id === undefined) ? this.name : id;\n this.parent = parent;\n this.children = children;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\n }\n\n public toJSON(): MapSubLayerProps {\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\n\n if (undefined !== this.id && this.id !== this.name)\n props.id = this.id;\n\n if (undefined !== this.title)\n props.title = this.title;\n\n if (this.children)\n props.children = [...this.children];\n\n if (undefined !== this.parent)\n props.parent = this.parent;\n\n return props;\n }\n\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n id: undefined !== changedProps.id ? changedProps.id : this.id,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\n title: undefined !== changedProps.title ? changedProps.title : this.title,\n };\n return MapSubLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n public displayMatches(other: MapSubLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible;\n }\n\n /** return true if this sublayer is named. */\n public get isNamed(): boolean { return this.name.length > 0; }\n\n /** return true if this sublayer is a leaf (has no children) */\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\n\n /** return true if this sublayer is an unnamed group */\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\n\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\n}\n\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\n * @see [[MapImageryProps]]\n * @public\n */\nexport interface CommonMapLayerProps {\n /** Controls visibility of layer. Defaults to 'true'. */\n visible?: boolean;\n\n /** A user-friendly name for the layer. */\n name: string;\n\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\n * or false to indicate the transparency should not be overridden.\n * Default value: 0.\n */\n\n transparency?: number;\n /** True to indicate background is transparent.\n * Default: true.\n */\n transparentBackground?: boolean;\n}\n\n/** JSON representation of an [[ImageMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @see [[ImageryMapLayerFormatId]].\n * @public\n */\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\n /** URL */\n url: string;\n /** Identifies the map layers source.*/\n formatId: string;\n /** Source layers. If undefined all layers are displayed. */\n subLayers?: MapSubLayerProps[];\n /** Access Key for the Layer, like a subscription key or access token.\n * ###TODO This does not belong in the props object. It should never be persisted.\n */\n /** @internal */\n accessKey?: MapLayerKey;\n\n /** @internal */\n modelId?: never;\n\n /** List of query parameters that will get appended to the source.\n * @beta\n */\n queryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n properties?: MapLayerProviderProperties;\n\n}\n\n/** JSON representation of a [[ModelMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\n modelId: Id64String;\n\n /** @internal */\n url?: never;\n /** @internal */\n formatId?: never;\n /** @internal */\n subLayers?: never;\n /** @internal */\n accessKey?: never;\n}\n\n/** JSON representation of a [[MapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\n\n/**\n * stores key-value pair to be added to all requests made involving map layer.\n * @public\n */\nexport interface MapLayerKey {\n key: string;\n value: string;\n}\n\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @public\n */\nexport abstract class MapLayerSettings {\n public readonly visible: boolean;\n\n public readonly name: string;\n public readonly transparency: number;\n public readonly transparentBackground: boolean;\n public abstract get allSubLayersInvisible(): boolean;\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\n public abstract toJSON(): MapLayerProps;\n\n /** @internal */\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\n this.name = name;\n this.visible = visible;\n this.transparentBackground = transparentBackground;\n this.transparency = transparency;\n }\n\n /** Create a map layer settings from its JSON representation. */\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n protected _toJSON(): CommonMapLayerProps {\n const props: CommonMapLayerProps = {\n name: this.name,\n visible: this.visible,\n };\n\n if (0 !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.transparentBackground === false)\n props.transparentBackground = this.transparentBackground;\n\n return props;\n }\n\n /** @internal */\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\n return {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\n };\n }\n\n /** @internal */\n public displayMatches(other: MapLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\n }\n\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\n public abstract get source(): string;\n\n /** @internal */\n public matchesNameAndSource(name: string, source: string): boolean {\n return this.name === name && this.source === source;\n }\n}\n\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\n * @public\n */\nexport class ImageMapLayerSettings extends MapLayerSettings {\n public readonly formatId: string;\n public readonly url: string;\n public userName?: string;\n public password?: string;\n public accessKey?: MapLayerKey;\n\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\n * @beta\n */\n public savedQueryParams?: { [key: string]: string };\n\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\n * @beta\n */\n public unsavedQueryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n public readonly properties?: MapLayerProviderProperties;\n\n public readonly subLayers: MapSubLayerSettings[];\n public override get source(): string { return this.url; }\n\n /** @internal */\n protected constructor(props: ImageMapLayerProps) {\n const transparentBackground = props.transparentBackground ?? true;\n super(props.name, props.visible, props.transparency, transparentBackground);\n\n this.formatId = props.formatId;\n this.url = props.url;\n this.accessKey = props.accessKey;\n if (props.queryParams) {\n this.savedQueryParams = {...props.queryParams};\n }\n\n if (props.properties) {\n this.properties = {...props.properties}\n }\n\n this.subLayers = [];\n if (!props.subLayers)\n return;\n\n for (const subLayerProps of props.subLayers) {\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\n if (subLayer)\n this.subLayers.push(subLayer);\n }\n }\n\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\n return new this(props);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ImageMapLayerProps {\n const props = super._toJSON() as ImageMapLayerProps;\n props.url = this.url;\n props.formatId = this.formatId;\n\n if (this.subLayers.length > 0)\n props.subLayers = this.subLayers.map((x) => x.toJSON());\n\n if (this.savedQueryParams)\n props.queryParams = {...this.savedQueryParams};\n\n if (this.properties) {\n props.properties = structuredClone(this.properties);\n }\n\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n // Clone members not part of MapLayerProps\n clone.userName = this.userName;\n clone.password = this.password;\n if (this.unsavedQueryParams)\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\n if (this.savedQueryParams)\n clone.savedQueryParams = {...this.savedQueryParams};\n\n return clone;\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\n\n props.formatId = changedProps.formatId ?? this.formatId;\n props.url = changedProps.url ?? this.url;\n props.accessKey = changedProps.accessKey ?? this.accessKey;\n props.subLayers = changedProps.subLayers ?? this.subLayers;\n if (changedProps.queryParams) {\n props.queryParams = {...changedProps.queryParams};\n } else if (this.savedQueryParams) {\n props.queryParams = {...this.savedQueryParams};\n }\n\n if (changedProps.properties) {\n props.properties = {...changedProps.properties}\n } else if (this.properties) {\n props.properties = {...this.properties}\n }\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\n return false;\n }\n\n for (let i = 0; i < this.subLayers.length; i++)\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\n return false;\n\n return true;\n }\n\n /** Return a sublayer matching id -- or undefined if not found */\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\n }\n\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\n if (!subLayer || !subLayer.parent)\n return false;\n\n const parent = this.subLayerById(subLayer.parent);\n if (!parent)\n return false;\n\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\n }\n\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\n if (!subLayer.visible)\n return false;\n\n return !this.hasInvisibleAncestors(subLayer);\n }\n\n /** Return true if all sublayers are invisible. */\n public get allSubLayersInvisible(): boolean {\n if (this.subLayers.length === 0)\n return false;\n\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\n }\n\n /** Return the children for a sublayer */\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\n if (!subLayer.children)\n return undefined;\n\n const children = new Array<MapSubLayerSettings>();\n subLayer.children.forEach((childId) => {\n const child = this.subLayerById(childId);\n if (child !== undefined)\n children.push(child);\n });\n\n return children;\n }\n\n /** @internal */\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\n switch (type) {\n case BackgroundMapType.Aerial:\n return \"Aerial Imagery\";\n default:\n case BackgroundMapType.Hybrid:\n return \"Aerial Imagery with labels\";\n case BackgroundMapType.Street:\n return \"Streets\";\n }\n }\n\n public setCredentials(userName?: string, password?: string) {\n this.userName = userName;\n this.password = password;\n }\n\n /** Collect all query parameters\n * @beta\n */\n public collectQueryParams() {\n let queryParams: {[key: string]: string} = {};\n if (this.savedQueryParams)\n queryParams = {...this.savedQueryParams};\n\n if (this.unsavedQueryParams)\n queryParams = {...queryParams, ...this.unsavedQueryParams};\n\n return queryParams;\n }\n}\n\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\n * @public\n */\nexport class ModelMapLayerSettings extends MapLayerSettings {\n public readonly modelId: Id64String;\n public override get source(): string { return this.modelId; }\n\n /** @internal */\n protected constructor(modelId: Id64String, name: string, visible = true,\n transparency: number = 0, transparentBackground = true) {\n super(name, visible, transparency, transparentBackground);\n this.modelId = modelId;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ModelMapLayerProps {\n const props = super._toJSON() as ModelMapLayerProps;\n props.modelId = this.modelId;\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\n props.modelId = changedProps.modelId ?? this.modelId;\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n return this.modelId === other.modelId;\n }\n\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\n public get allSubLayersInvisible(): boolean {\n return false;\n }\n}\n\n/** JSON representation of a [[BaseMapLayerSettings]].\n * @public\n */\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\n provider?: BackgroundMapProviderProps;\n}\n\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\n * the imagery provider and/or type to be easily modified.\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\n private _provider?: BackgroundMapProvider;\n\n /** The provider from which this base layer was configured, if any. */\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\n\n /** Create a base layer from its JSON representation.\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\n * That means they should not accept undefined for props and should define props such that it fully describes the\n * layer - e.g., url and name must be defined.\n */\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\n const settings = super.fromJSON(props);\n assert(settings instanceof BaseMapLayerSettings);\n if (props.provider)\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\n\n return settings;\n }\n\n /** Convert this layer to its JSON representation. */\n public override toJSON(): BaseMapLayerProps {\n const props = super.toJSON() as BaseMapLayerProps;\n if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** @internal */\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\n\n if (changedProps.provider)\n props.provider = changedProps.provider;\n else if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** Create a copy of this layer. */\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\n const prevUrl = this.url;\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n if (this.provider && prevUrl !== this.url)\n clone._provider = undefined;\n\n return clone;\n }\n\n /** Create a base layer from a BackgroundMapProvider. */\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\n let formatId: string, url: string, name: string;\n switch (provider.name) {\n case \"BingProvider\":\n default:\n formatId = \"BingMaps\";\n\n let imagerySet;\n switch (provider.type) {\n case BackgroundMapType.Street:\n imagerySet = \"Road\";\n break;\n case BackgroundMapType.Aerial:\n imagerySet = \"Aerial\";\n break;\n case BackgroundMapType.Hybrid:\n default:\n imagerySet = \"AerialWithLabels\";\n break;\n }\n\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\n break;\n\n case \"MapBoxProvider\":\n formatId = \"MapboxImagery\";\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n switch (provider.type) {\n case BackgroundMapType.Street:\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\n break;\n case BackgroundMapType.Aerial:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\n break;\n case BackgroundMapType.Hybrid:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\n break;\n }\n\n break;\n }\n\n const settings = super.fromJSON({\n name,\n formatId,\n url,\n transparentBackground: false,\n visible: !options?.invisible,\n transparency: options?.transparency,\n });\n\n assert(undefined !== settings);\n assert(settings instanceof BaseMapLayerSettings);\n\n settings._provider = provider;\n return settings;\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\n }\n\n /** @alpha */\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AACzD,mEAA+G;AAsBS,CAAC;AAiBzH;;;;;;;GAOG;AACH,MAAa,mBAAmB;IA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ACpH,CAAC;CACF;AAzHD,oDAyHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** The current set of supported map layer formats.\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\n * @public\n */\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\n\n/** @public */\nexport type SubLayerId = string | number;\n\n/**\n * Type for map layer provider array property.\n * @beta\n */\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\n\n/**\n * Type for map layer provider properties.\n * @beta\n */\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\n\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * @see [[MapLayerProps]]\n * @public\n */\nexport interface MapSubLayerProps {\n name: string;\n title?: string;\n visible?: boolean;\n id?: SubLayerId;\n parent?: SubLayerId;\n children?: SubLayerId[];\n}\n\n/** Normalized representation of a [[MapSubLayerProps]] for which values\n * have been validated and default values have been applied where explicit values not defined.\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\n * @see [[MapLayerSettings]]\n * @public\n */\nexport class MapSubLayerSettings {\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\n public readonly name: string;\n /** Title. */\n public readonly title?: string;\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\n public readonly visible: boolean;\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\n public readonly id: SubLayerId;\n /** One or more sublayer children */\n public readonly children?: SubLayerId[];\n /** sublayer parent. */\n public readonly parent?: SubLayerId;\n\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\n this.name = name;\n this.title = title;\n this.visible = visible !== undefined && visible;\n this.id = (id === undefined) ? this.name : id;\n this.parent = parent;\n this.children = children;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\n }\n\n public toJSON(): MapSubLayerProps {\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\n\n if (undefined !== this.id && this.id !== this.name)\n props.id = this.id;\n\n if (undefined !== this.title)\n props.title = this.title;\n\n if (this.children)\n props.children = [...this.children];\n\n if (undefined !== this.parent)\n props.parent = this.parent;\n\n return props;\n }\n\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n id: undefined !== changedProps.id ? changedProps.id : this.id,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\n title: undefined !== changedProps.title ? changedProps.title : this.title,\n };\n return MapSubLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n public displayMatches(other: MapSubLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible;\n }\n\n /** return true if this sublayer is named. */\n public get isNamed(): boolean { return this.name.length > 0; }\n\n /** return true if this sublayer is a leaf (has no children) */\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\n\n /** return true if this sublayer is an unnamed group */\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\n\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\n}\n\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\n * @see [[MapImageryProps]]\n * @public\n */\nexport interface CommonMapLayerProps {\n /** Controls visibility of layer. Defaults to 'true'. */\n visible?: boolean;\n\n /** A user-friendly name for the layer. */\n name: string;\n\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\n * or false to indicate the transparency should not be overridden.\n * Default value: 0.\n */\n\n transparency?: number;\n /** True to indicate background is transparent.\n * Default: true.\n */\n transparentBackground?: boolean;\n}\n\n/** JSON representation of an [[ImageMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @see [[ImageryMapLayerFormatId]].\n * @public\n */\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\n /** URL */\n url: string;\n /** Identifies the map layers source.*/\n formatId: string;\n /** Source layers. If undefined all layers are displayed. */\n subLayers?: MapSubLayerProps[];\n /** Access Key for the Layer, like a subscription key or access token.\n * ###TODO This does not belong in the props object. It should never be persisted.\n */\n /** @internal */\n accessKey?: MapLayerKey;\n\n /** @internal */\n modelId?: never;\n\n /** List of query parameters that will get appended to the source.\n * @beta\n */\n queryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n properties?: MapLayerProviderProperties;\n\n}\n\n/** The target onto which to drape a model map layer.\n * @beta\n */\nexport enum ModelMapLayerDrapeTarget {\n /** Drape only onto the globe. */\n Globe = 0,\n /** Drape only onto all attached reality data. */\n RealityData = 1,\n}\n\n/** JSON representation of a [[ModelMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\n modelId: Id64String;\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n drapeTarget?: ModelMapLayerDrapeTarget;\n\n /** @internal */\n url?: never;\n /** @internal */\n formatId?: never;\n /** @internal */\n subLayers?: never;\n /** @internal */\n accessKey?: never;\n}\n\n/** JSON representation of a [[MapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\n\n/**\n * stores key-value pair to be added to all requests made involving map layer.\n * @public\n */\nexport interface MapLayerKey {\n key: string;\n value: string;\n}\n\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @public\n */\nexport abstract class MapLayerSettings {\n public readonly visible: boolean;\n\n public readonly name: string;\n public readonly transparency: number;\n public readonly transparentBackground: boolean;\n public abstract get allSubLayersInvisible(): boolean;\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\n public abstract toJSON(): MapLayerProps;\n\n /** @internal */\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\n this.name = name;\n this.visible = visible;\n this.transparentBackground = transparentBackground;\n this.transparency = transparency;\n }\n\n /** Create a map layer settings from its JSON representation. */\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n protected _toJSON(): CommonMapLayerProps {\n const props: CommonMapLayerProps = {\n name: this.name,\n visible: this.visible,\n };\n\n if (0 !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.transparentBackground === false)\n props.transparentBackground = this.transparentBackground;\n\n return props;\n }\n\n /** @internal */\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\n return {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\n };\n }\n\n /** @internal */\n public displayMatches(other: MapLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\n }\n\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\n public abstract get source(): string;\n\n /** @internal */\n public matchesNameAndSource(name: string, source: string): boolean {\n return this.name === name && this.source === source;\n }\n}\n\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\n * @public\n */\nexport class ImageMapLayerSettings extends MapLayerSettings {\n public readonly formatId: string;\n public readonly url: string;\n public userName?: string;\n public password?: string;\n public accessKey?: MapLayerKey;\n\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\n * @beta\n */\n public savedQueryParams?: { [key: string]: string };\n\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\n * @beta\n */\n public unsavedQueryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n public readonly properties?: MapLayerProviderProperties;\n\n public readonly subLayers: MapSubLayerSettings[];\n public override get source(): string { return this.url; }\n\n /** @internal */\n protected constructor(props: ImageMapLayerProps) {\n const transparentBackground = props.transparentBackground ?? true;\n super(props.name, props.visible, props.transparency, transparentBackground);\n\n this.formatId = props.formatId;\n this.url = props.url;\n this.accessKey = props.accessKey;\n if (props.queryParams) {\n this.savedQueryParams = {...props.queryParams};\n }\n\n if (props.properties) {\n this.properties = {...props.properties}\n }\n\n this.subLayers = [];\n if (!props.subLayers)\n return;\n\n for (const subLayerProps of props.subLayers) {\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\n if (subLayer)\n this.subLayers.push(subLayer);\n }\n }\n\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\n return new this(props);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ImageMapLayerProps {\n const props = super._toJSON() as ImageMapLayerProps;\n props.url = this.url;\n props.formatId = this.formatId;\n\n if (this.subLayers.length > 0)\n props.subLayers = this.subLayers.map((x) => x.toJSON());\n\n if (this.savedQueryParams)\n props.queryParams = {...this.savedQueryParams};\n\n if (this.properties) {\n props.properties = structuredClone(this.properties);\n }\n\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n // Clone members not part of MapLayerProps\n clone.userName = this.userName;\n clone.password = this.password;\n if (this.unsavedQueryParams)\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\n if (this.savedQueryParams)\n clone.savedQueryParams = {...this.savedQueryParams};\n\n return clone;\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\n\n props.formatId = changedProps.formatId ?? this.formatId;\n props.url = changedProps.url ?? this.url;\n props.accessKey = changedProps.accessKey ?? this.accessKey;\n props.subLayers = changedProps.subLayers ?? this.subLayers;\n if (changedProps.queryParams) {\n props.queryParams = {...changedProps.queryParams};\n } else if (this.savedQueryParams) {\n props.queryParams = {...this.savedQueryParams};\n }\n\n if (changedProps.properties) {\n props.properties = {...changedProps.properties}\n } else if (this.properties) {\n props.properties = {...this.properties}\n }\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\n return false;\n }\n\n for (let i = 0; i < this.subLayers.length; i++)\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\n return false;\n\n return true;\n }\n\n /** Return a sublayer matching id -- or undefined if not found */\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\n }\n\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\n if (!subLayer || !subLayer.parent)\n return false;\n\n const parent = this.subLayerById(subLayer.parent);\n if (!parent)\n return false;\n\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\n }\n\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\n if (!subLayer.visible)\n return false;\n\n return !this.hasInvisibleAncestors(subLayer);\n }\n\n /** Return true if all sublayers are invisible. */\n public get allSubLayersInvisible(): boolean {\n if (this.subLayers.length === 0)\n return false;\n\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\n }\n\n /** Return the children for a sublayer */\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\n if (!subLayer.children)\n return undefined;\n\n const children = new Array<MapSubLayerSettings>();\n subLayer.children.forEach((childId) => {\n const child = this.subLayerById(childId);\n if (child !== undefined)\n children.push(child);\n });\n\n return children;\n }\n\n /** @internal */\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\n switch (type) {\n case BackgroundMapType.Aerial:\n return \"Aerial Imagery\";\n default:\n case BackgroundMapType.Hybrid:\n return \"Aerial Imagery with labels\";\n case BackgroundMapType.Street:\n return \"Streets\";\n }\n }\n\n public setCredentials(userName?: string, password?: string) {\n this.userName = userName;\n this.password = password;\n }\n\n /** Collect all query parameters\n * @beta\n */\n public collectQueryParams() {\n let queryParams: {[key: string]: string} = {};\n if (this.savedQueryParams)\n queryParams = {...this.savedQueryParams};\n\n if (this.unsavedQueryParams)\n queryParams = {...queryParams, ...this.unsavedQueryParams};\n\n return queryParams;\n }\n}\n\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\n * @public\n */\nexport class ModelMapLayerSettings extends MapLayerSettings {\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n public readonly drapeTarget: ModelMapLayerDrapeTarget;\n public readonly modelId: Id64String;\n public override get source(): string { return this.modelId; }\n\n /** @internal */\n protected constructor(modelId: Id64String, name: string, visible = true,\n transparency: number = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {\n super(name, visible, transparency, transparentBackground);\n this.modelId = modelId;\n this.drapeTarget = drapeTarget;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ModelMapLayerProps {\n const props = super._toJSON() as ModelMapLayerProps;\n props.modelId = this.modelId;\n if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)\n props.drapeTarget = this.drapeTarget;\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\n props.modelId = changedProps.modelId ?? this.modelId;\n props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n return this.modelId === other.modelId;\n }\n\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\n public get allSubLayersInvisible(): boolean {\n return false;\n }\n}\n\n/** JSON representation of a [[BaseMapLayerSettings]].\n * @public\n */\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\n provider?: BackgroundMapProviderProps;\n}\n\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\n * the imagery provider and/or type to be easily modified.\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\n private _provider?: BackgroundMapProvider;\n\n /** The provider from which this base layer was configured, if any. */\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\n\n /** Create a base layer from its JSON representation.\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\n * That means they should not accept undefined for props and should define props such that it fully describes the\n * layer - e.g., url and name must be defined.\n */\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\n const settings = super.fromJSON(props);\n assert(settings instanceof BaseMapLayerSettings);\n if (props.provider)\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\n\n return settings;\n }\n\n /** Convert this layer to its JSON representation. */\n public override toJSON(): BaseMapLayerProps {\n const props = super.toJSON() as BaseMapLayerProps;\n if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** @internal */\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\n\n if (changedProps.provider)\n props.provider = changedProps.provider;\n else if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** Create a copy of this layer. */\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\n const prevUrl = this.url;\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n if (this.provider && prevUrl !== this.url)\n clone._provider = undefined;\n\n return clone;\n }\n\n /** Create a base layer from a BackgroundMapProvider. */\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\n let formatId: string, url: string, name: string;\n switch (provider.name) {\n case \"BingProvider\":\n default:\n formatId = \"BingMaps\";\n\n let imagerySet;\n switch (provider.type) {\n case BackgroundMapType.Street:\n imagerySet = \"Road\";\n break;\n case BackgroundMapType.Aerial:\n imagerySet = \"Aerial\";\n break;\n case BackgroundMapType.Hybrid:\n default:\n imagerySet = \"AerialWithLabels\";\n break;\n }\n\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\n break;\n\n case \"MapBoxProvider\":\n formatId = \"MapboxImagery\";\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n switch (provider.type) {\n case BackgroundMapType.Street:\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\n break;\n case BackgroundMapType.Aerial:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\n break;\n case BackgroundMapType.Hybrid:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\n break;\n }\n\n break;\n }\n\n const settings = super.fromJSON({\n name,\n formatId,\n url,\n transparentBackground: false,\n visible: !options?.invisible,\n transparency: options?.transparency,\n });\n\n assert(undefined !== settings);\n assert(settings instanceof BaseMapLayerSettings);\n\n settings._provider = provider;\n return settings;\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\n }\n\n /** @alpha */\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\n }\n}\n"]}
|
|
@@ -124,6 +124,15 @@ export interface ImageMapLayerProps extends CommonMapLayerProps {
|
|
|
124
124
|
*/
|
|
125
125
|
properties?: MapLayerProviderProperties;
|
|
126
126
|
}
|
|
127
|
+
/** The target onto which to drape a model map layer.
|
|
128
|
+
* @beta
|
|
129
|
+
*/
|
|
130
|
+
export declare enum ModelMapLayerDrapeTarget {
|
|
131
|
+
/** Drape only onto the globe. */
|
|
132
|
+
Globe = 0,
|
|
133
|
+
/** Drape only onto all attached reality data. */
|
|
134
|
+
RealityData = 1
|
|
135
|
+
}
|
|
127
136
|
/** JSON representation of a [[ModelMapLayerSettings]].
|
|
128
137
|
* @see [[MapImagerySettings]].
|
|
129
138
|
* @public
|
|
@@ -131,6 +140,10 @@ export interface ImageMapLayerProps extends CommonMapLayerProps {
|
|
|
131
140
|
export interface ModelMapLayerProps extends CommonMapLayerProps {
|
|
132
141
|
/** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */
|
|
133
142
|
modelId: Id64String;
|
|
143
|
+
/** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
|
|
144
|
+
* @beta
|
|
145
|
+
*/
|
|
146
|
+
drapeTarget?: ModelMapLayerDrapeTarget;
|
|
134
147
|
/** @internal */
|
|
135
148
|
url?: never;
|
|
136
149
|
/** @internal */
|
|
@@ -255,10 +268,14 @@ export declare class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
255
268
|
* @public
|
|
256
269
|
*/
|
|
257
270
|
export declare class ModelMapLayerSettings extends MapLayerSettings {
|
|
271
|
+
/** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
|
|
272
|
+
* @beta
|
|
273
|
+
*/
|
|
274
|
+
readonly drapeTarget: ModelMapLayerDrapeTarget;
|
|
258
275
|
readonly modelId: Id64String;
|
|
259
276
|
get source(): string;
|
|
260
277
|
/** @internal */
|
|
261
|
-
protected constructor(modelId: Id64String, name: string, visible?: boolean, transparency?: number, transparentBackground?: boolean);
|
|
278
|
+
protected constructor(modelId: Id64String, name: string, visible?: boolean, transparency?: number, transparentBackground?: boolean, drapeTarget?: ModelMapLayerDrapeTarget);
|
|
262
279
|
/** Construct from JSON, performing validation and applying default values for undefined fields. */
|
|
263
280
|
static fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings;
|
|
264
281
|
/** return JSON representation of this MapLayerSettings object */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSettings.d.ts","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,O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BAAiB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,oBAAoB;CAGhF"}
|
|
@@ -80,6 +80,16 @@ export class MapSubLayerSettings {
|
|
|
80
80
|
/** return a string representing this sublayer id (converting to string if underlying id is number) */
|
|
81
81
|
get idString() { return (typeof this.id === "number") ? this.id.toString(10) : this.id; }
|
|
82
82
|
}
|
|
83
|
+
/** The target onto which to drape a model map layer.
|
|
84
|
+
* @beta
|
|
85
|
+
*/
|
|
86
|
+
export var ModelMapLayerDrapeTarget;
|
|
87
|
+
(function (ModelMapLayerDrapeTarget) {
|
|
88
|
+
/** Drape only onto the globe. */
|
|
89
|
+
ModelMapLayerDrapeTarget[ModelMapLayerDrapeTarget["Globe"] = 0] = "Globe";
|
|
90
|
+
/** Drape only onto all attached reality data. */
|
|
91
|
+
ModelMapLayerDrapeTarget[ModelMapLayerDrapeTarget["RealityData"] = 1] = "RealityData";
|
|
92
|
+
})(ModelMapLayerDrapeTarget || (ModelMapLayerDrapeTarget = {}));
|
|
83
93
|
/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
|
|
84
94
|
* This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.
|
|
85
95
|
* One or more map layers may be included within [[MapImagerySettings]] object.
|
|
@@ -321,22 +331,29 @@ export class ImageMapLayerSettings extends MapLayerSettings {
|
|
|
321
331
|
* @public
|
|
322
332
|
*/
|
|
323
333
|
export class ModelMapLayerSettings extends MapLayerSettings {
|
|
334
|
+
/** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).
|
|
335
|
+
* @beta
|
|
336
|
+
*/
|
|
337
|
+
drapeTarget;
|
|
324
338
|
modelId;
|
|
325
339
|
get source() { return this.modelId; }
|
|
326
340
|
/** @internal */
|
|
327
|
-
constructor(modelId, name, visible = true, transparency = 0, transparentBackground = true) {
|
|
341
|
+
constructor(modelId, name, visible = true, transparency = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {
|
|
328
342
|
super(name, visible, transparency, transparentBackground);
|
|
329
343
|
this.modelId = modelId;
|
|
344
|
+
this.drapeTarget = drapeTarget;
|
|
330
345
|
}
|
|
331
346
|
/** Construct from JSON, performing validation and applying default values for undefined fields. */
|
|
332
347
|
static fromJSON(json) {
|
|
333
348
|
const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;
|
|
334
|
-
return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground);
|
|
349
|
+
return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);
|
|
335
350
|
}
|
|
336
351
|
/** return JSON representation of this MapLayerSettings object */
|
|
337
352
|
toJSON() {
|
|
338
353
|
const props = super._toJSON();
|
|
339
354
|
props.modelId = this.modelId;
|
|
355
|
+
if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)
|
|
356
|
+
props.drapeTarget = this.drapeTarget;
|
|
340
357
|
return props;
|
|
341
358
|
}
|
|
342
359
|
/** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
|
|
@@ -350,6 +367,7 @@ export class ModelMapLayerSettings extends MapLayerSettings {
|
|
|
350
367
|
cloneProps(changedProps) {
|
|
351
368
|
const props = super.cloneProps(changedProps);
|
|
352
369
|
props.modelId = changedProps.modelId ?? this.modelId;
|
|
370
|
+
props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;
|
|
353
371
|
return props;
|
|
354
372
|
}
|
|
355
373
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAA8B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAsBS,CAAC;AAiBzH;;;;;;;GAOG;A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K,CAAC,QAAQ,CAAC;YAC9B,IAAI;YACJ,QAAQ;YACR,GAAG;YACH,qBAAqB,EAAE,KAAK;YAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS;YAC5B,YAAY,EAAE,OAAO,EAAE,YAAY;SACpC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;QAC/B,MAAM,CAAC,QAAQ,YAAY,oBAAoB,CAAC,CAAC;QAEjD,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,OAAO,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,aAAa;IACN,iBAAiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** The current set of supported map layer formats.\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\n * @public\n */\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\n\n/** @public */\nexport type SubLayerId = string | number;\n\n/**\n * Type for map layer provider array property.\n * @beta\n */\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\n\n/**\n * Type for map layer provider properties.\n * @beta\n */\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\n\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * @see [[MapLayerProps]]\n * @public\n */\nexport interface MapSubLayerProps {\n name: string;\n title?: string;\n visible?: boolean;\n id?: SubLayerId;\n parent?: SubLayerId;\n children?: SubLayerId[];\n}\n\n/** Normalized representation of a [[MapSubLayerProps]] for which values\n * have been validated and default values have been applied where explicit values not defined.\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\n * @see [[MapLayerSettings]]\n * @public\n */\nexport class MapSubLayerSettings {\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\n public readonly name: string;\n /** Title. */\n public readonly title?: string;\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\n public readonly visible: boolean;\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\n public readonly id: SubLayerId;\n /** One or more sublayer children */\n public readonly children?: SubLayerId[];\n /** sublayer parent. */\n public readonly parent?: SubLayerId;\n\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\n this.name = name;\n this.title = title;\n this.visible = visible !== undefined && visible;\n this.id = (id === undefined) ? this.name : id;\n this.parent = parent;\n this.children = children;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\n }\n\n public toJSON(): MapSubLayerProps {\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\n\n if (undefined !== this.id && this.id !== this.name)\n props.id = this.id;\n\n if (undefined !== this.title)\n props.title = this.title;\n\n if (this.children)\n props.children = [...this.children];\n\n if (undefined !== this.parent)\n props.parent = this.parent;\n\n return props;\n }\n\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n id: undefined !== changedProps.id ? changedProps.id : this.id,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\n title: undefined !== changedProps.title ? changedProps.title : this.title,\n };\n return MapSubLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n public displayMatches(other: MapSubLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible;\n }\n\n /** return true if this sublayer is named. */\n public get isNamed(): boolean { return this.name.length > 0; }\n\n /** return true if this sublayer is a leaf (has no children) */\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\n\n /** return true if this sublayer is an unnamed group */\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\n\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\n}\n\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\n * @see [[MapImageryProps]]\n * @public\n */\nexport interface CommonMapLayerProps {\n /** Controls visibility of layer. Defaults to 'true'. */\n visible?: boolean;\n\n /** A user-friendly name for the layer. */\n name: string;\n\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\n * or false to indicate the transparency should not be overridden.\n * Default value: 0.\n */\n\n transparency?: number;\n /** True to indicate background is transparent.\n * Default: true.\n */\n transparentBackground?: boolean;\n}\n\n/** JSON representation of an [[ImageMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @see [[ImageryMapLayerFormatId]].\n * @public\n */\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\n /** URL */\n url: string;\n /** Identifies the map layers source.*/\n formatId: string;\n /** Source layers. If undefined all layers are displayed. */\n subLayers?: MapSubLayerProps[];\n /** Access Key for the Layer, like a subscription key or access token.\n * ###TODO This does not belong in the props object. It should never be persisted.\n */\n /** @internal */\n accessKey?: MapLayerKey;\n\n /** @internal */\n modelId?: never;\n\n /** List of query parameters that will get appended to the source.\n * @beta\n */\n queryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n properties?: MapLayerProviderProperties;\n\n}\n\n/** JSON representation of a [[ModelMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\n modelId: Id64String;\n\n /** @internal */\n url?: never;\n /** @internal */\n formatId?: never;\n /** @internal */\n subLayers?: never;\n /** @internal */\n accessKey?: never;\n}\n\n/** JSON representation of a [[MapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\n\n/**\n * stores key-value pair to be added to all requests made involving map layer.\n * @public\n */\nexport interface MapLayerKey {\n key: string;\n value: string;\n}\n\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @public\n */\nexport abstract class MapLayerSettings {\n public readonly visible: boolean;\n\n public readonly name: string;\n public readonly transparency: number;\n public readonly transparentBackground: boolean;\n public abstract get allSubLayersInvisible(): boolean;\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\n public abstract toJSON(): MapLayerProps;\n\n /** @internal */\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\n this.name = name;\n this.visible = visible;\n this.transparentBackground = transparentBackground;\n this.transparency = transparency;\n }\n\n /** Create a map layer settings from its JSON representation. */\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n protected _toJSON(): CommonMapLayerProps {\n const props: CommonMapLayerProps = {\n name: this.name,\n visible: this.visible,\n };\n\n if (0 !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.transparentBackground === false)\n props.transparentBackground = this.transparentBackground;\n\n return props;\n }\n\n /** @internal */\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\n return {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\n };\n }\n\n /** @internal */\n public displayMatches(other: MapLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\n }\n\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\n public abstract get source(): string;\n\n /** @internal */\n public matchesNameAndSource(name: string, source: string): boolean {\n return this.name === name && this.source === source;\n }\n}\n\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\n * @public\n */\nexport class ImageMapLayerSettings extends MapLayerSettings {\n public readonly formatId: string;\n public readonly url: string;\n public userName?: string;\n public password?: string;\n public accessKey?: MapLayerKey;\n\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\n * @beta\n */\n public savedQueryParams?: { [key: string]: string };\n\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\n * @beta\n */\n public unsavedQueryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n public readonly properties?: MapLayerProviderProperties;\n\n public readonly subLayers: MapSubLayerSettings[];\n public override get source(): string { return this.url; }\n\n /** @internal */\n protected constructor(props: ImageMapLayerProps) {\n const transparentBackground = props.transparentBackground ?? true;\n super(props.name, props.visible, props.transparency, transparentBackground);\n\n this.formatId = props.formatId;\n this.url = props.url;\n this.accessKey = props.accessKey;\n if (props.queryParams) {\n this.savedQueryParams = {...props.queryParams};\n }\n\n if (props.properties) {\n this.properties = {...props.properties}\n }\n\n this.subLayers = [];\n if (!props.subLayers)\n return;\n\n for (const subLayerProps of props.subLayers) {\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\n if (subLayer)\n this.subLayers.push(subLayer);\n }\n }\n\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\n return new this(props);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ImageMapLayerProps {\n const props = super._toJSON() as ImageMapLayerProps;\n props.url = this.url;\n props.formatId = this.formatId;\n\n if (this.subLayers.length > 0)\n props.subLayers = this.subLayers.map((x) => x.toJSON());\n\n if (this.savedQueryParams)\n props.queryParams = {...this.savedQueryParams};\n\n if (this.properties) {\n props.properties = structuredClone(this.properties);\n }\n\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n // Clone members not part of MapLayerProps\n clone.userName = this.userName;\n clone.password = this.password;\n if (this.unsavedQueryParams)\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\n if (this.savedQueryParams)\n clone.savedQueryParams = {...this.savedQueryParams};\n\n return clone;\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\n\n props.formatId = changedProps.formatId ?? this.formatId;\n props.url = changedProps.url ?? this.url;\n props.accessKey = changedProps.accessKey ?? this.accessKey;\n props.subLayers = changedProps.subLayers ?? this.subLayers;\n if (changedProps.queryParams) {\n props.queryParams = {...changedProps.queryParams};\n } else if (this.savedQueryParams) {\n props.queryParams = {...this.savedQueryParams};\n }\n\n if (changedProps.properties) {\n props.properties = {...changedProps.properties}\n } else if (this.properties) {\n props.properties = {...this.properties}\n }\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\n return false;\n }\n\n for (let i = 0; i < this.subLayers.length; i++)\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\n return false;\n\n return true;\n }\n\n /** Return a sublayer matching id -- or undefined if not found */\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\n }\n\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\n if (!subLayer || !subLayer.parent)\n return false;\n\n const parent = this.subLayerById(subLayer.parent);\n if (!parent)\n return false;\n\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\n }\n\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\n if (!subLayer.visible)\n return false;\n\n return !this.hasInvisibleAncestors(subLayer);\n }\n\n /** Return true if all sublayers are invisible. */\n public get allSubLayersInvisible(): boolean {\n if (this.subLayers.length === 0)\n return false;\n\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\n }\n\n /** Return the children for a sublayer */\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\n if (!subLayer.children)\n return undefined;\n\n const children = new Array<MapSubLayerSettings>();\n subLayer.children.forEach((childId) => {\n const child = this.subLayerById(childId);\n if (child !== undefined)\n children.push(child);\n });\n\n return children;\n }\n\n /** @internal */\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\n switch (type) {\n case BackgroundMapType.Aerial:\n return \"Aerial Imagery\";\n default:\n case BackgroundMapType.Hybrid:\n return \"Aerial Imagery with labels\";\n case BackgroundMapType.Street:\n return \"Streets\";\n }\n }\n\n public setCredentials(userName?: string, password?: string) {\n this.userName = userName;\n this.password = password;\n }\n\n /** Collect all query parameters\n * @beta\n */\n public collectQueryParams() {\n let queryParams: {[key: string]: string} = {};\n if (this.savedQueryParams)\n queryParams = {...this.savedQueryParams};\n\n if (this.unsavedQueryParams)\n queryParams = {...queryParams, ...this.unsavedQueryParams};\n\n return queryParams;\n }\n}\n\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\n * @public\n */\nexport class ModelMapLayerSettings extends MapLayerSettings {\n public readonly modelId: Id64String;\n public override get source(): string { return this.modelId; }\n\n /** @internal */\n protected constructor(modelId: Id64String, name: string, visible = true,\n transparency: number = 0, transparentBackground = true) {\n super(name, visible, transparency, transparentBackground);\n this.modelId = modelId;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ModelMapLayerProps {\n const props = super._toJSON() as ModelMapLayerProps;\n props.modelId = this.modelId;\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\n props.modelId = changedProps.modelId ?? this.modelId;\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n return this.modelId === other.modelId;\n }\n\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\n public get allSubLayersInvisible(): boolean {\n return false;\n }\n}\n\n/** JSON representation of a [[BaseMapLayerSettings]].\n * @public\n */\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\n provider?: BackgroundMapProviderProps;\n}\n\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\n * the imagery provider and/or type to be easily modified.\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\n private _provider?: BackgroundMapProvider;\n\n /** The provider from which this base layer was configured, if any. */\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\n\n /** Create a base layer from its JSON representation.\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\n * That means they should not accept undefined for props and should define props such that it fully describes the\n * layer - e.g., url and name must be defined.\n */\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\n const settings = super.fromJSON(props);\n assert(settings instanceof BaseMapLayerSettings);\n if (props.provider)\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\n\n return settings;\n }\n\n /** Convert this layer to its JSON representation. */\n public override toJSON(): BaseMapLayerProps {\n const props = super.toJSON() as BaseMapLayerProps;\n if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** @internal */\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\n\n if (changedProps.provider)\n props.provider = changedProps.provider;\n else if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** Create a copy of this layer. */\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\n const prevUrl = this.url;\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n if (this.provider && prevUrl !== this.url)\n clone._provider = undefined;\n\n return clone;\n }\n\n /** Create a base layer from a BackgroundMapProvider. */\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\n let formatId: string, url: string, name: string;\n switch (provider.name) {\n case \"BingProvider\":\n default:\n formatId = \"BingMaps\";\n\n let imagerySet;\n switch (provider.type) {\n case BackgroundMapType.Street:\n imagerySet = \"Road\";\n break;\n case BackgroundMapType.Aerial:\n imagerySet = \"Aerial\";\n break;\n case BackgroundMapType.Hybrid:\n default:\n imagerySet = \"AerialWithLabels\";\n break;\n }\n\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\n break;\n\n case \"MapBoxProvider\":\n formatId = \"MapboxImagery\";\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n switch (provider.type) {\n case BackgroundMapType.Street:\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\n break;\n case BackgroundMapType.Aerial:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\n break;\n case BackgroundMapType.Hybrid:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\n break;\n }\n\n break;\n }\n\n const settings = super.fromJSON({\n name,\n formatId,\n url,\n transparentBackground: false,\n visible: !options?.invisible,\n transparency: options?.transparency,\n });\n\n assert(undefined !== settings);\n assert(settings instanceof BaseMapLayerSettings);\n\n settings._provider = provider;\n return settings;\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\n }\n\n /** @alpha */\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MapLayerSettings.js","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAA8B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAsBS,CAAC;AAiBzH;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAmB;IAC9B,mIAAmI;IACnH,IAAI,CAAS;IA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gBAC3B,IAAI,GAAG,WAAW,qBAAqB,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrE,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;oBACtB,KAAK,iBAAiB,CAAC,MAAM;wBAC3B,GAAG,GAAG,4DAA4D,CAAC;wBACnE,MAAM;oBACR,KAAK,iBAAiB,CAAC,MAAM;wBAC3B,GAAG,GAAG,6DAA6D,CAAC;wBACpE,MAAM;oBACR,KAAK,iBAAiB,CAAC,MAAM;wBAC3B,GAAG,GAAG,sEAAsE,CAAC;wBAC7E,MAAM;gBACV,CAAC;gBAED,MAAM;QACV,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC9B,IAAI;YACJ,QAAQ;YACR,GAAG;YACH,qBAAqB,EAAE,KAAK;YAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS;YAC5B,YAAY,EAAE,OAAO,EAAE,YAAY;SACpC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;QAC/B,MAAM,CAAC,QAAQ,YAAY,oBAAoB,CAAC,CAAC;QAEjD,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,sBAAsB,CAAC,KAAmC;QACtE,OAAO,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,aAAa;IACN,iBAAiB,CAAC,QAA+B;QACtD,OAAO,oBAAoB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACpH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module MapLayers\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\n\n/** The current set of supported map layer formats.\n * In order to be displayed, a corresponding format must have been registered in the [MapLayerFormatRegistry]($frontend)\n * @public\n */\nexport type ImageryMapLayerFormatId = \"ArcGIS\" | \"BingMaps\" | \"MapboxImagery\" | \"TileURL\" | \"WMS\" | \"WMTS\";\n\n/** @public */\nexport type SubLayerId = string | number;\n\n/**\n * Type for map layer provider array property.\n * @beta\n */\nexport type MapLayerProviderArrayProperty = number[] | string[] | boolean[];\n\n/**\n * Type for map layer provider properties.\n * @beta\n */\nexport interface MapLayerProviderProperties { [key: string]: number | string | boolean | MapLayerProviderArrayProperty };\n\n/** JSON representation of the settings associated with a map sublayer included within a [[MapLayerProps]].\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * @see [[MapLayerProps]]\n * @public\n */\nexport interface MapSubLayerProps {\n name: string;\n title?: string;\n visible?: boolean;\n id?: SubLayerId;\n parent?: SubLayerId;\n children?: SubLayerId[];\n}\n\n/** Normalized representation of a [[MapSubLayerProps]] for which values\n * have been validated and default values have been applied where explicit values not defined.\n * A map sub layer represents a set of objects within the layer that can be controlled separately. These\n * are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers.\n * This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.\n * @see [[MapLayerSettings]]\n * @public\n */\nexport class MapSubLayerSettings {\n /** Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) */\n public readonly name: string;\n /** Title. */\n public readonly title?: string;\n /** If true the sub layer is visible. If part of a hierarchy, a sub layer is visible only if its ancestors are also visible. */\n public readonly visible: boolean;\n /** A unique string or number that may be used to identify the sub layer (ArcGIS) */\n public readonly id: SubLayerId;\n /** One or more sublayer children */\n public readonly children?: SubLayerId[];\n /** sublayer parent. */\n public readonly parent?: SubLayerId;\n\n constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]) {\n this.name = name;\n this.title = title;\n this.visible = visible !== undefined && visible;\n this.id = (id === undefined) ? this.name : id;\n this.parent = parent;\n this.children = children;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static fromJSON(json: MapSubLayerProps): MapSubLayerSettings {\n return new MapSubLayerSettings(json.name, json.title, json.visible, (json.id === json.name) ? undefined : json.id, json.parent, json.children);\n }\n\n public toJSON(): MapSubLayerProps {\n const props: MapSubLayerProps = { name: this.name, visible: this.visible };\n\n if (undefined !== this.id && this.id !== this.name)\n props.id = this.id;\n\n if (undefined !== this.title)\n props.title = this.title;\n\n if (this.children)\n props.children = [...this.children];\n\n if (undefined !== this.parent)\n props.parent = this.parent;\n\n return props;\n }\n\n /** Creating a copy of this MapSubLayer, optionally modifying some if its properties */\n public clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n id: undefined !== changedProps.id ? changedProps.id : this.id,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n parent: undefined !== changedProps.parent ? changedProps.parent : this.parent,\n children: undefined !== changedProps.children ? changedProps.children.slice() : this.children?.slice(),\n title: undefined !== changedProps.title ? changedProps.title : this.title,\n };\n return MapSubLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n public displayMatches(other: MapSubLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible;\n }\n\n /** return true if this sublayer is named. */\n public get isNamed(): boolean { return this.name.length > 0; }\n\n /** return true if this sublayer is a leaf (has no children) */\n public get isLeaf(): boolean { return this.children === undefined || this.children.length === 0; }\n\n /** return true if this sublayer is an unnamed group */\n public get isUnnamedGroup(): boolean { return !this.isLeaf && !this.isNamed; }\n\n /** return a string representing this sublayer id (converting to string if underlying id is number) */\n public get idString(): string { return (typeof this.id === \"number\") ? this.id.toString(10) : this.id; }\n}\n\n/** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].\n * @see [[MapImageryProps]]\n * @public\n */\nexport interface CommonMapLayerProps {\n /** Controls visibility of layer. Defaults to 'true'. */\n visible?: boolean;\n\n /** A user-friendly name for the layer. */\n name: string;\n\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,\n * or false to indicate the transparency should not be overridden.\n * Default value: 0.\n */\n\n transparency?: number;\n /** True to indicate background is transparent.\n * Default: true.\n */\n transparentBackground?: boolean;\n}\n\n/** JSON representation of an [[ImageMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @see [[ImageryMapLayerFormatId]].\n * @public\n */\nexport interface ImageMapLayerProps extends CommonMapLayerProps {\n /** URL */\n url: string;\n /** Identifies the map layers source.*/\n formatId: string;\n /** Source layers. If undefined all layers are displayed. */\n subLayers?: MapSubLayerProps[];\n /** Access Key for the Layer, like a subscription key or access token.\n * ###TODO This does not belong in the props object. It should never be persisted.\n */\n /** @internal */\n accessKey?: MapLayerKey;\n\n /** @internal */\n modelId?: never;\n\n /** List of query parameters that will get appended to the source.\n * @beta\n */\n queryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n properties?: MapLayerProviderProperties;\n\n}\n\n/** The target onto which to drape a model map layer.\n * @beta\n */\nexport enum ModelMapLayerDrapeTarget {\n /** Drape only onto the globe. */\n Globe = 0,\n /** Drape only onto all attached reality data. */\n RealityData = 1,\n}\n\n/** JSON representation of a [[ModelMapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport interface ModelMapLayerProps extends CommonMapLayerProps {\n /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */\n modelId: Id64String;\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n drapeTarget?: ModelMapLayerDrapeTarget;\n\n /** @internal */\n url?: never;\n /** @internal */\n formatId?: never;\n /** @internal */\n subLayers?: never;\n /** @internal */\n accessKey?: never;\n}\n\n/** JSON representation of a [[MapLayerSettings]].\n * @see [[MapImagerySettings]].\n * @public\n */\nexport type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;\n\n/**\n * stores key-value pair to be added to all requests made involving map layer.\n * @public\n */\nexport interface MapLayerKey {\n key: string;\n value: string;\n}\n\n/** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @public\n */\nexport abstract class MapLayerSettings {\n public readonly visible: boolean;\n\n public readonly name: string;\n public readonly transparency: number;\n public readonly transparentBackground: boolean;\n public abstract get allSubLayersInvisible(): boolean;\n public abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;\n public abstract toJSON(): MapLayerProps;\n\n /** @internal */\n protected constructor(name: string, visible = true, transparency: number = 0, transparentBackground = true) {\n this.name = name;\n this.visible = visible;\n this.transparentBackground = transparentBackground;\n this.transparency = transparency;\n }\n\n /** Create a map layer settings from its JSON representation. */\n public static fromJSON(props: MapLayerProps): MapLayerSettings {\n return undefined !== props.modelId ? ModelMapLayerSettings.fromJSON(props) : ImageMapLayerSettings.fromJSON(props);\n }\n\n /** @internal */\n protected _toJSON(): CommonMapLayerProps {\n const props: CommonMapLayerProps = {\n name: this.name,\n visible: this.visible,\n };\n\n if (0 !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.transparentBackground === false)\n props.transparentBackground = this.transparentBackground;\n\n return props;\n }\n\n /** @internal */\n protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps {\n return {\n name: undefined !== changedProps.name ? changedProps.name : this.name,\n visible: undefined !== changedProps.visible ? changedProps.visible : this.visible,\n transparency: undefined !== changedProps.transparency ? changedProps.transparency : this.transparency,\n transparentBackground: undefined !== changedProps.transparentBackground ? changedProps.transparentBackground : this.transparentBackground,\n };\n }\n\n /** @internal */\n public displayMatches(other: MapLayerSettings): boolean {\n return this.name === other.name && this.visible === other.visible && this.transparency === other.transparency && this.transparentBackground === other.transparentBackground;\n }\n\n /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */\n public abstract get source(): string;\n\n /** @internal */\n public matchesNameAndSource(name: string, source: string): boolean {\n return this.name === name && this.source === source;\n }\n}\n\n/** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ModelMapLayerSettings]] for model based map layer settings.\n * @public\n */\nexport class ImageMapLayerSettings extends MapLayerSettings {\n public readonly formatId: string;\n public readonly url: string;\n public userName?: string;\n public password?: string;\n public accessKey?: MapLayerKey;\n\n /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.\n * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.\n * @beta\n */\n public savedQueryParams?: { [key: string]: string };\n\n /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.\n * @beta\n */\n public unsavedQueryParams?: { [key: string]: string };\n\n /** Properties specific to the map layer provider.\n * @beta\n */\n public readonly properties?: MapLayerProviderProperties;\n\n public readonly subLayers: MapSubLayerSettings[];\n public override get source(): string { return this.url; }\n\n /** @internal */\n protected constructor(props: ImageMapLayerProps) {\n const transparentBackground = props.transparentBackground ?? true;\n super(props.name, props.visible, props.transparency, transparentBackground);\n\n this.formatId = props.formatId;\n this.url = props.url;\n this.accessKey = props.accessKey;\n if (props.queryParams) {\n this.savedQueryParams = {...props.queryParams};\n }\n\n if (props.properties) {\n this.properties = {...props.properties}\n }\n\n this.subLayers = [];\n if (!props.subLayers)\n return;\n\n for (const subLayerProps of props.subLayers) {\n const subLayer = MapSubLayerSettings.fromJSON(subLayerProps);\n if (subLayer)\n this.subLayers.push(subLayer);\n }\n }\n\n public static override fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings {\n return new this(props);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ImageMapLayerProps {\n const props = super._toJSON() as ImageMapLayerProps;\n props.url = this.url;\n props.formatId = this.formatId;\n\n if (this.subLayers.length > 0)\n props.subLayers = this.subLayers.map((x) => x.toJSON());\n\n if (this.savedQueryParams)\n props.queryParams = {...this.savedQueryParams};\n\n if (this.properties) {\n props.properties = structuredClone(this.properties);\n }\n\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings {\n const clone = ImageMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n // Clone members not part of MapLayerProps\n clone.userName = this.userName;\n clone.password = this.password;\n if (this.unsavedQueryParams)\n clone.unsavedQueryParams = {...this.unsavedQueryParams};\n if (this.savedQueryParams)\n clone.savedQueryParams = {...this.savedQueryParams};\n\n return clone;\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps {\n const props = super.cloneProps(changedProps) as ImageMapLayerProps;\n\n props.formatId = changedProps.formatId ?? this.formatId;\n props.url = changedProps.url ?? this.url;\n props.accessKey = changedProps.accessKey ?? this.accessKey;\n props.subLayers = changedProps.subLayers ?? this.subLayers;\n if (changedProps.queryParams) {\n props.queryParams = {...changedProps.queryParams};\n } else if (this.savedQueryParams) {\n props.queryParams = {...this.savedQueryParams};\n }\n\n if (changedProps.properties) {\n props.properties = {...changedProps.properties}\n } else if (this.properties) {\n props.properties = {...this.properties}\n }\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (! (other instanceof ImageMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n if (this.userName !== other.userName || this.password !== other.password || this.subLayers.length !== other.subLayers.length) {\n return false;\n }\n\n for (let i = 0; i < this.subLayers.length; i++)\n if (!this.subLayers[i].displayMatches(other.subLayers[i]))\n return false;\n\n return true;\n }\n\n /** Return a sublayer matching id -- or undefined if not found */\n public subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined {\n return id === undefined ? undefined : this.subLayers.find((subLayer) => subLayer.id === id);\n }\n\n private hasInvisibleAncestors(subLayer?: MapSubLayerSettings): boolean {\n if (!subLayer || !subLayer.parent)\n return false;\n\n const parent = this.subLayerById(subLayer.parent);\n if (!parent)\n return false;\n\n // Visibility of named group has no impact on the visibility of children (only unnamed group does)\n // i.e For WMS, its should be possible to request a child layer when its parent is not visible (if the parent is also named)\n return (!parent.visible && !parent.isNamed) || this.hasInvisibleAncestors(parent);\n }\n\n /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */\n public isSubLayerVisible(subLayer: MapSubLayerSettings): boolean {\n if (!subLayer.visible)\n return false;\n\n return !this.hasInvisibleAncestors(subLayer);\n }\n\n /** Return true if all sublayers are invisible. */\n public get allSubLayersInvisible(): boolean {\n if (this.subLayers.length === 0)\n return false;\n\n return this.subLayers.every((subLayer) => (subLayer.isUnnamedGroup || !this.isSubLayerVisible(subLayer)));\n }\n\n /** Return the children for a sublayer */\n public getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined {\n if (!subLayer.children)\n return undefined;\n\n const children = new Array<MapSubLayerSettings>();\n subLayer.children.forEach((childId) => {\n const child = this.subLayerById(childId);\n if (child !== undefined)\n children.push(child);\n });\n\n return children;\n }\n\n /** @internal */\n protected static mapTypeName(type: BackgroundMapType) { // TBD.. Localization.\n switch (type) {\n case BackgroundMapType.Aerial:\n return \"Aerial Imagery\";\n default:\n case BackgroundMapType.Hybrid:\n return \"Aerial Imagery with labels\";\n case BackgroundMapType.Street:\n return \"Streets\";\n }\n }\n\n public setCredentials(userName?: string, password?: string) {\n this.userName = userName;\n this.password = password;\n }\n\n /** Collect all query parameters\n * @beta\n */\n public collectQueryParams() {\n let queryParams: {[key: string]: string} = {};\n if (this.savedQueryParams)\n queryParams = {...this.savedQueryParams};\n\n if (this.unsavedQueryParams)\n queryParams = {...queryParams, ...this.unsavedQueryParams};\n\n return queryParams;\n }\n}\n\n/** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.\n * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.\n * One or more map layers may be included within [[MapImagerySettings]] object.\n * @see [[MapImagerySettings]]\n * @see [[ImageMapLayerSettings]] for image based map layer settings.\n * @public\n */\nexport class ModelMapLayerSettings extends MapLayerSettings {\n /** Specifies the target onto which to drape this model map layer. Defaults to [ModelMapLayerDrapeTarget.Globe]($common).\n * @beta\n */\n public readonly drapeTarget: ModelMapLayerDrapeTarget;\n public readonly modelId: Id64String;\n public override get source(): string { return this.modelId; }\n\n /** @internal */\n protected constructor(modelId: Id64String, name: string, visible = true,\n transparency: number = 0, transparentBackground = true, drapeTarget = ModelMapLayerDrapeTarget.Globe) {\n super(name, visible, transparency, transparentBackground);\n this.modelId = modelId;\n this.drapeTarget = drapeTarget;\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\n public static override fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings {\n const transparentBackground = (json.transparentBackground === undefined) ? true : json.transparentBackground;\n return new this(json.modelId, json.name, json.visible, json.transparency, transparentBackground, json.drapeTarget);\n }\n\n /** return JSON representation of this MapLayerSettings object */\n public override toJSON(): ModelMapLayerProps {\n const props = super._toJSON() as ModelMapLayerProps;\n props.modelId = this.modelId;\n if (this.drapeTarget !== ModelMapLayerDrapeTarget.Globe)\n props.drapeTarget = this.drapeTarget;\n return props;\n }\n\n /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings {\n return ModelMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n }\n\n /** @internal */\n protected override cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps {\n const props = super.cloneProps(changedProps) as ModelMapLayerProps;\n props.modelId = changedProps.modelId ?? this.modelId;\n props.drapeTarget = changedProps.drapeTarget ?? this.drapeTarget;\n return props;\n }\n\n /** @internal */\n public override displayMatches(other: MapLayerSettings): boolean {\n if (!(other instanceof ModelMapLayerSettings) || !super.displayMatches(other))\n return false;\n\n return this.modelId === other.modelId;\n }\n\n /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */\n public get allSubLayersInvisible(): boolean {\n return false;\n }\n}\n\n/** JSON representation of a [[BaseMapLayerSettings]].\n * @public\n */\nexport interface BaseMapLayerProps extends ImageMapLayerProps {\n provider?: BackgroundMapProviderProps;\n}\n\n/** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].\n * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based\n * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).\n * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows\n * the imagery provider and/or type to be easily modified.\n * @see [[MapImagerySettings.backgroundBase]].\n * @public\n */\nexport class BaseMapLayerSettings extends ImageMapLayerSettings {\n private _provider?: BackgroundMapProvider;\n\n /** The provider from which this base layer was configured, if any. */\n public get provider(): BackgroundMapProvider | undefined { return this._provider; }\n\n /** Create a base layer from its JSON representation.\n * TODO: This, MapLayerSettings.fromJSON, and MapSubLayerSettings.fromJSON should never return undefined.\n * That means they should not accept undefined for props and should define props such that it fully describes the\n * layer - e.g., url and name must be defined.\n */\n public static override fromJSON(props: BaseMapLayerProps): BaseMapLayerSettings {\n const settings = super.fromJSON(props);\n assert(settings instanceof BaseMapLayerSettings);\n if (props.provider)\n settings._provider = BackgroundMapProvider.fromJSON(props.provider);\n\n return settings;\n }\n\n /** Convert this layer to its JSON representation. */\n public override toJSON(): BaseMapLayerProps {\n const props = super.toJSON() as BaseMapLayerProps;\n if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** @internal */\n public override cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps {\n const props = super.cloneProps(changedProps) as BaseMapLayerProps;\n\n if (changedProps.provider)\n props.provider = changedProps.provider;\n else if (this.provider)\n props.provider = this.provider.toJSON();\n\n return props;\n }\n\n /** Create a copy of this layer. */\n public override clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings {\n const prevUrl = this.url;\n const clone = BaseMapLayerSettings.fromJSON(this.cloneProps(changedProps));\n\n if (this.provider && prevUrl !== this.url)\n clone._provider = undefined;\n\n return clone;\n }\n\n /** Create a base layer from a BackgroundMapProvider. */\n public static fromProvider(provider: BackgroundMapProvider, options?: { invisible?: boolean, transparency?: number }): BaseMapLayerSettings {\n let formatId: string, url: string, name: string;\n switch (provider.name) {\n case \"BingProvider\":\n default:\n formatId = \"BingMaps\";\n\n let imagerySet;\n switch (provider.type) {\n case BackgroundMapType.Street:\n imagerySet = \"Road\";\n break;\n case BackgroundMapType.Aerial:\n imagerySet = \"Aerial\";\n break;\n case BackgroundMapType.Hybrid:\n default:\n imagerySet = \"AerialWithLabels\";\n break;\n }\n\n name = `Bing Maps: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n url = `https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${imagerySet}?o=json&incl=ImageryProviders&key={bingKey}`;\n break;\n\n case \"MapBoxProvider\":\n formatId = \"MapboxImagery\";\n name = `MapBox: ${ImageMapLayerSettings.mapTypeName(provider.type)}`;\n switch (provider.type) {\n case BackgroundMapType.Street:\n url = \"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/\";\n break;\n case BackgroundMapType.Aerial:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/\";\n break;\n case BackgroundMapType.Hybrid:\n url = \"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/\";\n break;\n }\n\n break;\n }\n\n const settings = super.fromJSON({\n name,\n formatId,\n url,\n transparentBackground: false,\n visible: !options?.invisible,\n transparency: options?.transparency,\n });\n\n assert(undefined !== settings);\n assert(settings instanceof BaseMapLayerSettings);\n\n settings._provider = provider;\n return settings;\n }\n\n /** @internal */\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BaseMapLayerSettings {\n return this.fromProvider(BackgroundMapProvider.fromBackgroundMapProps(props));\n }\n\n /** @alpha */\n public cloneWithProvider(provider: BackgroundMapProvider): BaseMapLayerSettings {\n return BaseMapLayerSettings.fromProvider(provider, { invisible: !this.visible, transparency: this.transparency });\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-common",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.92",
|
|
4
4
|
"description": "iTwin.js components common to frontend and backend",
|
|
5
5
|
"main": "lib/cjs/core-common.js",
|
|
6
6
|
"module": "lib/esm/core-common.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"js-base64": "^3.6.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
31
|
-
"@itwin/core-geometry": "5.0.0-dev.
|
|
30
|
+
"@itwin/core-bentley": "5.0.0-dev.92",
|
|
31
|
+
"@itwin/core-geometry": "5.0.0-dev.92"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@itwin/eslint-plugin": "5.0.0-dev.1",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"rimraf": "^6.0.1",
|
|
43
43
|
"typescript": "~5.6.2",
|
|
44
44
|
"vitest": "^3.0.6",
|
|
45
|
-
"@itwin/build-tools": "5.0.0-dev.
|
|
46
|
-
"@itwin/core-
|
|
47
|
-
"@itwin/core-
|
|
45
|
+
"@itwin/build-tools": "5.0.0-dev.92",
|
|
46
|
+
"@itwin/core-bentley": "5.0.0-dev.92",
|
|
47
|
+
"@itwin/core-geometry": "5.0.0-dev.92"
|
|
48
48
|
},
|
|
49
49
|
"nyc": {
|
|
50
50
|
"extends": "./node_modules/@itwin/build-tools/.nycrc",
|