@itwin/core-frontend 4.0.0-dev.73 → 4.0.0-dev.75
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/DisplayStyleState.d.ts +35 -53
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +51 -101
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/DrawingViewState.d.ts.map +1 -1
- package/lib/cjs/DrawingViewState.js +1 -2
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +1 -3
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +1 -3
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +4 -6
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/SheetViewState.d.ts.map +1 -1
- package/lib/cjs/SheetViewState.js +1 -2
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/ViewCreator2d.d.ts.map +1 -1
- package/lib/cjs/ViewCreator2d.js +2 -4
- package/lib/cjs/ViewCreator2d.js.map +1 -1
- package/lib/cjs/ViewCreator3d.d.ts.map +1 -1
- package/lib/cjs/ViewCreator3d.js +1 -2
- package/lib/cjs/ViewCreator3d.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +22 -11
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +60 -12
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/tile/map/MapFeatureInfo.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapFeatureInfo.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerAuthentication.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerAuthentication.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +15 -8
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js +12 -7
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +23 -6
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +24 -8
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts +4 -5
- package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +3 -4
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.d.ts +4 -3
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.js +4 -4
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.js.map +1 -1
- package/lib/cjs/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/cjs/tools/ElementSetTool.js +1 -2
- package/lib/cjs/tools/ElementSetTool.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +35 -53
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +54 -104
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/DrawingViewState.d.ts.map +1 -1
- package/lib/esm/DrawingViewState.js +1 -2
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +1 -3
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +1 -3
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +4 -6
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/SheetViewState.d.ts.map +1 -1
- package/lib/esm/SheetViewState.js +1 -2
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/ViewCreator2d.d.ts.map +1 -1
- package/lib/esm/ViewCreator2d.js +2 -4
- package/lib/esm/ViewCreator2d.js.map +1 -1
- package/lib/esm/ViewCreator3d.d.ts.map +1 -1
- package/lib/esm/ViewCreator3d.js +1 -2
- package/lib/esm/ViewCreator3d.js.map +1 -1
- package/lib/esm/Viewport.d.ts +22 -11
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +63 -15
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/tile/map/MapFeatureInfo.d.ts.map +1 -1
- package/lib/esm/tile/map/MapFeatureInfo.js.map +1 -1
- package/lib/esm/tile/map/MapLayerAuthentication.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerAuthentication.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +15 -8
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js +12 -7
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +23 -6
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +24 -8
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts +4 -5
- package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +3 -4
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tile/map/MapTiledGraphicsProvider.d.ts +4 -3
- package/lib/esm/tile/map/MapTiledGraphicsProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTiledGraphicsProvider.js +4 -4
- package/lib/esm/tile/map/MapTiledGraphicsProvider.js.map +1 -1
- package/lib/esm/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/esm/tools/ElementSetTool.js +1 -2
- package/lib/esm/tools/ElementSetTool.js.map +1 -1
- package/package.json +19 -19
|
@@ -9,8 +9,7 @@ import { ContextRealityModelState } from "./ContextRealityModelState";
|
|
|
9
9
|
import { ElementState } from "./EntityState";
|
|
10
10
|
import { IModelConnection } from "./IModelConnection";
|
|
11
11
|
import { PlanarClipMaskState } from "./PlanarClipMaskState";
|
|
12
|
-
import {
|
|
13
|
-
import { ScreenViewport } from "./Viewport";
|
|
12
|
+
import { MapLayerIndex, TileTreeReference } from "./tile/internal";
|
|
14
13
|
/** @internal */
|
|
15
14
|
export declare class TerrainDisplayOverrides {
|
|
16
15
|
wantSkirts?: boolean;
|
|
@@ -75,10 +74,6 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
75
74
|
*/
|
|
76
75
|
get backgroundMapBase(): BaseLayerSettings;
|
|
77
76
|
set backgroundMapBase(base: BaseLayerSettings);
|
|
78
|
-
/** @internal */
|
|
79
|
-
get backgroundMapLayers(): MapLayerSettings[];
|
|
80
|
-
/** @internal */
|
|
81
|
-
get overlayMapLayers(): MapLayerSettings[];
|
|
82
77
|
/** The settings controlling how a background map is displayed within a view.
|
|
83
78
|
* @see [[ViewFlags.backgroundMap]] for toggling display of the map on or off.
|
|
84
79
|
*/
|
|
@@ -150,40 +145,38 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
150
145
|
* The options [[OsmBuildingDisplayOptions]] control the display and appearance overrides.
|
|
151
146
|
*/
|
|
152
147
|
setOSMBuildingDisplay(options: OsmBuildingDisplayOptions): boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Return if a context reality model is attached.
|
|
148
|
+
/** Return if a context reality model is attached.
|
|
155
149
|
* @see [[ContextRealityModelProps]].
|
|
156
|
-
|
|
150
|
+
*/
|
|
157
151
|
hasAttachedRealityModel(name: string, url: string): boolean;
|
|
158
152
|
/** @internal */
|
|
159
153
|
getMapLayers(isOverlay: boolean): MapLayerSettings[];
|
|
160
|
-
/**
|
|
161
|
-
* Attach a map layer to display style.
|
|
154
|
+
/** Attach a map layer to display style.
|
|
162
155
|
* @param Settings representing the map layer.
|
|
163
|
-
* @param
|
|
164
|
-
* @param index where the layer should be inserted. Defaults to -1, appended to end.
|
|
156
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be attached.
|
|
165
157
|
* @public
|
|
166
|
-
*
|
|
167
158
|
*/
|
|
168
159
|
attachMapLayer(options: {
|
|
169
160
|
settings: MapLayerSettings;
|
|
170
|
-
|
|
171
|
-
insertIndex?: number;
|
|
161
|
+
mapLayerIndex: MapLayerIndex;
|
|
172
162
|
}): void;
|
|
173
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be attached.
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
174
167
|
attachMapLayerProps(options: {
|
|
175
168
|
props: MapLayerProps;
|
|
176
|
-
|
|
177
|
-
insertIndex?: number;
|
|
169
|
+
mapLayerIndex: MapLayerIndex;
|
|
178
170
|
}): void;
|
|
179
171
|
/** @internal */
|
|
180
172
|
hasAttachedMapLayer(name: string, source: string, isOverlay: boolean): boolean;
|
|
181
173
|
/** @internal */
|
|
182
174
|
detachMapLayerByNameAndSource(name: string, source: string, isOverlay: boolean): void;
|
|
183
175
|
/** Detach map layer at index (-1 to remove all layers)
|
|
176
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to detach.
|
|
184
177
|
* @public
|
|
185
178
|
*/
|
|
186
|
-
detachMapLayerByIndex(
|
|
179
|
+
detachMapLayerByIndex(mapLayerIndex: MapLayerIndex): void;
|
|
187
180
|
/**
|
|
188
181
|
* Lookup a maplayer index by name and source.
|
|
189
182
|
* @param name Name of of the layer.
|
|
@@ -193,8 +186,11 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
193
186
|
*
|
|
194
187
|
*/
|
|
195
188
|
findMapLayerIndexByNameAndSource(name: string, source: string, isOverlay: boolean): number;
|
|
196
|
-
/**
|
|
197
|
-
|
|
189
|
+
/** Return the map layer settings for a map layer at the provided index.
|
|
190
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
191
|
+
* @public
|
|
192
|
+
*/
|
|
193
|
+
mapLayerAtIndex(mapLayerIndex: MapLayerIndex): MapLayerSettings | undefined;
|
|
198
194
|
/** Return map base transparency as a number between 0 and 1.
|
|
199
195
|
* @public
|
|
200
196
|
*/
|
|
@@ -205,8 +201,7 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
205
201
|
changeBaseMapTransparency(transparency: number): void;
|
|
206
202
|
/** Modify a subset of a map layer settings.
|
|
207
203
|
* @param props props JSON representation of the properties to change. Any properties not present will retain their current values.
|
|
208
|
-
* @param
|
|
209
|
-
* @param isOverlay true if layer is overlay, otherwise layer is background.
|
|
204
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be inserted.
|
|
210
205
|
*
|
|
211
206
|
* Example that changes only the visibility of the first overlay map layer.
|
|
212
207
|
* ``` ts
|
|
@@ -214,49 +209,36 @@ export declare abstract class DisplayStyleState extends ElementState implements
|
|
|
214
209
|
* ```
|
|
215
210
|
* @public
|
|
216
211
|
*/
|
|
217
|
-
changeMapLayerProps(props: Partial<MapLayerProps>,
|
|
218
|
-
/**
|
|
219
|
-
|
|
212
|
+
changeMapLayerProps(props: Partial<MapLayerProps>, mapLayerIndex: MapLayerIndex): void;
|
|
213
|
+
/** Change the credentials for a map layer.
|
|
214
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to change the credentials of.
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
changeMapLayerCredentials(mapLayerIndex: MapLayerIndex, userName?: string, password?: string): void;
|
|
220
218
|
/** Modify a subset of a sub-layer settings.
|
|
221
219
|
* @param props props JSON representation of the properties to change. Any properties not present will retain their current values.
|
|
222
220
|
* @param subLayerId Id of the sub-layer that should be modified.
|
|
223
|
-
* @param
|
|
224
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
221
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer that contains the sub-layer to be modified.
|
|
225
222
|
*
|
|
226
223
|
* @public
|
|
227
224
|
*/
|
|
228
|
-
changeMapSubLayerProps(props: Partial<MapSubLayerProps>, subLayerId: SubLayerId,
|
|
229
|
-
/** Returns the cartographic range of map layer.
|
|
230
|
-
* @param layerIndex of the map layer.
|
|
231
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
232
|
-
*
|
|
233
|
-
* @internal
|
|
234
|
-
*/
|
|
235
|
-
getMapLayerRange(layerIndex: number, isOverlay: boolean): Promise<MapCartoRectangle | undefined>;
|
|
236
|
-
/** change viewport to include range of map layer.
|
|
237
|
-
* @internal
|
|
238
|
-
*/
|
|
239
|
-
viewMapLayerRange(layerIndex: number, isOverlay: boolean, vp: ScreenViewport): Promise<boolean>;
|
|
225
|
+
changeMapSubLayerProps(props: Partial<MapSubLayerProps>, subLayerId: SubLayerId, mapLayerIndex: MapLayerIndex): void;
|
|
240
226
|
private _synchBackgroundMapImagery;
|
|
241
|
-
/**
|
|
242
|
-
*
|
|
243
|
-
* @param index index of layer to move.
|
|
244
|
-
* @param isOverlay true if layer is overlay.
|
|
227
|
+
/** Move map layer to top.
|
|
228
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to move.
|
|
245
229
|
* @public
|
|
246
230
|
*
|
|
247
231
|
*/
|
|
248
|
-
moveMapLayerToTop(
|
|
249
|
-
/**
|
|
250
|
-
*
|
|
251
|
-
* @param index index of layer to move.
|
|
252
|
-
* @param isOverlay true if layer is overlay.
|
|
232
|
+
moveMapLayerToTop(mapLayerIndex: MapLayerIndex): void;
|
|
233
|
+
/** Move map layer to bottom.
|
|
234
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to move.
|
|
253
235
|
* @public
|
|
254
236
|
*/
|
|
255
|
-
moveMapLayerToBottom(
|
|
256
|
-
/**
|
|
257
|
-
* Reorder map layers
|
|
237
|
+
moveMapLayerToBottom(mapLayerIndex: MapLayerIndex): void;
|
|
238
|
+
/** Reorder map layers
|
|
258
239
|
* @param fromIndex index of map layer to move
|
|
259
240
|
* @param toIndex insert index. If equal to length of map array the map layer is moved to end of array.
|
|
241
|
+
* @param isOverlay true if map-layer is part of the overlay map, otherwise it is part of the background map.
|
|
260
242
|
* @public
|
|
261
243
|
*/
|
|
262
244
|
moveMapLayerToIndex(fromIndex: number, toIndex: number, isOverlay: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayStyleState.d.ts","sourceRoot":"","sources":["../../src/DisplayStyleState.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAU,OAAO,EAAQ,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"DisplayStyleState.d.ts","sourceRoot":"","sources":["../../src/DisplayStyleState.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAU,OAAO,EAAQ,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,kBAAkB,EAAyB,0BAA0B,EAAE,qBAAqB,EAC5F,iBAAiB,EAAwB,QAAQ,EAAE,wBAAwB,EAAE,sBAAsB,EACnG,iBAAiB,EAAE,oBAAoB,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAyB,aAAa,EAAE,aAAa,EACvI,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,mBAAmB,EACvE,mBAAmB,EAAE,mBAAmB,EAAE,UAAU,EAAuF,SAAS,EACrJ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;A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AQ,IAAI,oBAAoB,CAA2B;IAEtE,gBAAgB;IACT,sBAAsB,IAAI,uBAAuB,GAAG,SAAS;gBAExD,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB;CAU/D;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,WAA2B,SAAS,WAA+B;IACnE,OAAO,CAAC,SAAS,CAAyB;IAE1C,IAAW,QAAQ,IAAI,sBAAsB,CAA2B;gBAErD,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,mBAAmB;IAWnG,IAAW,WAAW,IAAI,WAAW,CAEpC;IACD,IAAW,WAAW,CAAC,GAAG,EAAE,WAAW,EAEtC;IAED,IAAW,MAAM,IAAI,aAAa,CAAiC;IACnE,IAAW,MAAM,CAAC,MAAM,EAAE,aAAa,EAAoC;IAE3E,wCAAwC;IACxC,IAAW,YAAY,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAE5C;IAED;;;;OAIG;IACI,UAAU,CAAC,IAAI,EAAE,MAAM;IAI9B,2CAA2C;IAC3C,IAAW,YAAY,IAAI,mBAAmB,CAE7C;IACD,IAAW,YAAY,CAAC,QAAQ,EAAE,mBAAmB,EAEpD;IAED,gBAAgB;cACG,8BAA8B,IAAI,IAAI;IAezD,gBAAgB;IACT,sBAAsB,IAAI,uBAAuB,GAAG,SAAS;CAWrE"}
|
|
@@ -18,8 +18,6 @@ const EntityState_1 = require("./EntityState");
|
|
|
18
18
|
const IModelApp_1 = require("./IModelApp");
|
|
19
19
|
const PlanarClipMaskState_1 = require("./PlanarClipMaskState");
|
|
20
20
|
const internal_1 = require("./tile/internal");
|
|
21
|
-
const ViewGlobalLocation_1 = require("./ViewGlobalLocation");
|
|
22
|
-
const ModelState_1 = require("./ModelState");
|
|
23
21
|
/** @internal */
|
|
24
22
|
class TerrainDisplayOverrides {
|
|
25
23
|
}
|
|
@@ -149,10 +147,6 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
149
147
|
this.settings.mapImagery.backgroundBase = base;
|
|
150
148
|
this._synchBackgroundMapImagery();
|
|
151
149
|
}
|
|
152
|
-
/** @internal */
|
|
153
|
-
get backgroundMapLayers() { return this.settings.mapImagery.backgroundLayers; }
|
|
154
|
-
/** @internal */
|
|
155
|
-
get overlayMapLayers() { return this.settings.mapImagery.overlayLayers; }
|
|
156
150
|
/** The settings controlling how a background map is displayed within a view.
|
|
157
151
|
* @see [[ViewFlags.backgroundMap]] for toggling display of the map on or off.
|
|
158
152
|
*/
|
|
@@ -315,29 +309,25 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
315
309
|
model.appearanceOverrides = options.appearanceOverrides;
|
|
316
310
|
return true;
|
|
317
311
|
}
|
|
318
|
-
/**
|
|
319
|
-
* Return if a context reality model is attached.
|
|
312
|
+
/** Return if a context reality model is attached.
|
|
320
313
|
* @see [[ContextRealityModelProps]].
|
|
321
|
-
|
|
314
|
+
*/
|
|
322
315
|
hasAttachedRealityModel(name, url) {
|
|
323
316
|
return undefined !== this.settings.contextRealityModels.models.find((x) => x.matchesNameAndUrl(name, url));
|
|
324
317
|
}
|
|
325
318
|
/** @internal */
|
|
326
|
-
getMapLayers(isOverlay) { return isOverlay ? this.
|
|
327
|
-
/**
|
|
328
|
-
* Attach a map layer to display style.
|
|
319
|
+
getMapLayers(isOverlay) { return isOverlay ? this.settings.mapImagery.overlayLayers : this.settings.mapImagery.backgroundLayers; }
|
|
320
|
+
/** Attach a map layer to display style.
|
|
329
321
|
* @param Settings representing the map layer.
|
|
330
|
-
* @param
|
|
331
|
-
* @param index where the layer should be inserted. Defaults to -1, appended to end.
|
|
322
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be attached.
|
|
332
323
|
* @public
|
|
333
|
-
*
|
|
334
324
|
*/
|
|
335
325
|
attachMapLayer(options) {
|
|
336
326
|
const layerSettings = options.settings.clone({});
|
|
337
327
|
if (undefined === layerSettings)
|
|
338
328
|
return;
|
|
339
|
-
const isOverlay = options.isOverlay
|
|
340
|
-
const insertIndex = options.
|
|
329
|
+
const isOverlay = options.mapLayerIndex.isOverlay;
|
|
330
|
+
const insertIndex = options.mapLayerIndex.index;
|
|
341
331
|
const layers = this.getMapLayers(isOverlay);
|
|
342
332
|
if (insertIndex < 0 || insertIndex > (layers.length - 1)) {
|
|
343
333
|
this.getMapLayers(isOverlay).push(layerSettings);
|
|
@@ -347,12 +337,15 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
347
337
|
}
|
|
348
338
|
this._synchBackgroundMapImagery();
|
|
349
339
|
}
|
|
350
|
-
/**
|
|
340
|
+
/**
|
|
341
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be attached.
|
|
342
|
+
* @internal
|
|
343
|
+
*/
|
|
351
344
|
attachMapLayerProps(options) {
|
|
352
345
|
const settings = core_common_1.MapLayerSettings.fromJSON(options.props);
|
|
353
346
|
if (undefined === settings)
|
|
354
347
|
return;
|
|
355
|
-
this.attachMapLayer({ settings,
|
|
348
|
+
this.attachMapLayer({ settings, mapLayerIndex: options.mapLayerIndex });
|
|
356
349
|
}
|
|
357
350
|
/** @internal */
|
|
358
351
|
hasAttachedMapLayer(name, source, isOverlay) {
|
|
@@ -362,13 +355,15 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
362
355
|
detachMapLayerByNameAndSource(name, source, isOverlay) {
|
|
363
356
|
const index = this.findMapLayerIndexByNameAndSource(name, source, isOverlay);
|
|
364
357
|
if (-1 !== index)
|
|
365
|
-
this.detachMapLayerByIndex(index, isOverlay);
|
|
358
|
+
this.detachMapLayerByIndex({ index, isOverlay });
|
|
366
359
|
}
|
|
367
360
|
/** Detach map layer at index (-1 to remove all layers)
|
|
361
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to detach.
|
|
368
362
|
* @public
|
|
369
363
|
*/
|
|
370
|
-
detachMapLayerByIndex(
|
|
371
|
-
const layers = this.getMapLayers(isOverlay);
|
|
364
|
+
detachMapLayerByIndex(mapLayerIndex) {
|
|
365
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
366
|
+
const index = mapLayerIndex.index;
|
|
372
367
|
if (index < 0)
|
|
373
368
|
layers.length = 0;
|
|
374
369
|
else
|
|
@@ -386,9 +381,13 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
386
381
|
findMapLayerIndexByNameAndSource(name, source, isOverlay) {
|
|
387
382
|
return this.getMapLayers(isOverlay).findIndex((layer) => layer.matchesNameAndSource(name, source));
|
|
388
383
|
}
|
|
389
|
-
/**
|
|
390
|
-
|
|
391
|
-
|
|
384
|
+
/** Return the map layer settings for a map layer at the provided index.
|
|
385
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
388
|
+
mapLayerAtIndex(mapLayerIndex) {
|
|
389
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
390
|
+
const index = mapLayerIndex.index;
|
|
392
391
|
return (index < 0 || index >= layers.length) ? undefined : layers[index];
|
|
393
392
|
}
|
|
394
393
|
/** Return map base transparency as a number between 0 and 1.
|
|
@@ -411,8 +410,7 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
411
410
|
}
|
|
412
411
|
/** Modify a subset of a map layer settings.
|
|
413
412
|
* @param props props JSON representation of the properties to change. Any properties not present will retain their current values.
|
|
414
|
-
* @param
|
|
415
|
-
* @param isOverlay true if layer is overlay, otherwise layer is background.
|
|
413
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be inserted.
|
|
416
414
|
*
|
|
417
415
|
* Example that changes only the visibility of the first overlay map layer.
|
|
418
416
|
* ``` ts
|
|
@@ -420,16 +418,21 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
420
418
|
* ```
|
|
421
419
|
* @public
|
|
422
420
|
*/
|
|
423
|
-
changeMapLayerProps(props,
|
|
424
|
-
const
|
|
421
|
+
changeMapLayerProps(props, mapLayerIndex) {
|
|
422
|
+
const index = mapLayerIndex.index;
|
|
423
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
425
424
|
if (index < 0 || index >= layers.length)
|
|
426
425
|
return;
|
|
427
426
|
layers[index] = layers[index].clone(props);
|
|
428
427
|
this._synchBackgroundMapImagery();
|
|
429
428
|
}
|
|
430
|
-
/**
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
/** Change the credentials for a map layer.
|
|
430
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to change the credentials of.
|
|
431
|
+
* @public
|
|
432
|
+
*/
|
|
433
|
+
changeMapLayerCredentials(mapLayerIndex, userName, password) {
|
|
434
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
435
|
+
const index = mapLayerIndex.index;
|
|
433
436
|
if (index < 0 || index >= layers.length)
|
|
434
437
|
return;
|
|
435
438
|
const layer = layers[index];
|
|
@@ -441,13 +444,12 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
441
444
|
/** Modify a subset of a sub-layer settings.
|
|
442
445
|
* @param props props JSON representation of the properties to change. Any properties not present will retain their current values.
|
|
443
446
|
* @param subLayerId Id of the sub-layer that should be modified.
|
|
444
|
-
* @param
|
|
445
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
447
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer that contains the sub-layer to be modified.
|
|
446
448
|
*
|
|
447
449
|
* @public
|
|
448
450
|
*/
|
|
449
|
-
changeMapSubLayerProps(props, subLayerId,
|
|
450
|
-
const mapLayerSettings = this.mapLayerAtIndex(
|
|
451
|
+
changeMapSubLayerProps(props, subLayerId, mapLayerIndex) {
|
|
452
|
+
const mapLayerSettings = this.mapLayerAtIndex(mapLayerIndex);
|
|
451
453
|
if (undefined === mapLayerSettings)
|
|
452
454
|
return;
|
|
453
455
|
if (!(mapLayerSettings instanceof core_common_1.ImageMapLayerSettings)) {
|
|
@@ -458,95 +460,43 @@ class DisplayStyleState extends EntityState_1.ElementState {
|
|
|
458
460
|
for (const subLayer of mapLayerSettings.subLayers) {
|
|
459
461
|
subLayers.push((subLayerId === -1 || subLayer.id === subLayerId) ? subLayer.clone(props).toJSON() : subLayer.toJSON());
|
|
460
462
|
}
|
|
461
|
-
this.changeMapLayerProps({ subLayers },
|
|
462
|
-
}
|
|
463
|
-
/** Returns the cartographic range of map layer.
|
|
464
|
-
* @param layerIndex of the map layer.
|
|
465
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
466
|
-
*
|
|
467
|
-
* @internal
|
|
468
|
-
*/
|
|
469
|
-
async getMapLayerRange(layerIndex, isOverlay) {
|
|
470
|
-
const mapLayerSettings = this.mapLayerAtIndex(layerIndex, isOverlay);
|
|
471
|
-
if (undefined === mapLayerSettings)
|
|
472
|
-
return undefined;
|
|
473
|
-
if (mapLayerSettings instanceof core_common_1.ModelMapLayerSettings) {
|
|
474
|
-
const ecefTransform = this.iModel.ecefLocation?.getTransform();
|
|
475
|
-
if (!ecefTransform)
|
|
476
|
-
return undefined;
|
|
477
|
-
const model = this.iModel.models.getLoaded(mapLayerSettings.modelId);
|
|
478
|
-
if (!model || !(model instanceof ModelState_1.GeometricModelState))
|
|
479
|
-
return undefined;
|
|
480
|
-
const modelRange = await model.queryModelRange();
|
|
481
|
-
const cartoRange = new core_common_1.CartographicRange(modelRange, ecefTransform).getLongitudeLatitudeBoundingBox();
|
|
482
|
-
return internal_1.MapCartoRectangle.fromRadians(cartoRange.low.x, cartoRange.low.y, cartoRange.high.x, cartoRange.high.y);
|
|
483
|
-
}
|
|
484
|
-
if (!(mapLayerSettings instanceof core_common_1.ImageMapLayerSettings)) {
|
|
485
|
-
(0, core_bentley_1.assert)(false);
|
|
486
|
-
return undefined;
|
|
487
|
-
}
|
|
488
|
-
const imageryProvider = IModelApp_1.IModelApp.mapLayerFormatRegistry.createImageryProvider(mapLayerSettings);
|
|
489
|
-
if (undefined === imageryProvider)
|
|
490
|
-
return undefined;
|
|
491
|
-
try {
|
|
492
|
-
await imageryProvider.initialize();
|
|
493
|
-
return imageryProvider.cartoRange;
|
|
494
|
-
}
|
|
495
|
-
catch (_error) {
|
|
496
|
-
return undefined;
|
|
497
|
-
}
|
|
498
|
-
return undefined;
|
|
499
|
-
}
|
|
500
|
-
/** change viewport to include range of map layer.
|
|
501
|
-
* @internal
|
|
502
|
-
*/
|
|
503
|
-
async viewMapLayerRange(layerIndex, isOverlay, vp) {
|
|
504
|
-
const range = await this.getMapLayerRange(layerIndex, isOverlay);
|
|
505
|
-
if (!range)
|
|
506
|
-
return false;
|
|
507
|
-
if (range.xLength() > 1.5 * core_geometry_1.Angle.piRadians)
|
|
508
|
-
(0, ViewGlobalLocation_1.viewGlobalLocation)(vp, true, ViewGlobalLocation_1.ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters, undefined, undefined);
|
|
509
|
-
else
|
|
510
|
-
(0, ViewGlobalLocation_1.viewGlobalLocation)(vp, true, undefined, undefined, range.globalLocation);
|
|
511
|
-
return true;
|
|
463
|
+
this.changeMapLayerProps({ subLayers }, mapLayerIndex);
|
|
512
464
|
}
|
|
513
465
|
/* @internal */
|
|
514
466
|
_synchBackgroundMapImagery() {
|
|
515
467
|
this.settings.synchMapImagery();
|
|
516
468
|
}
|
|
517
|
-
/**
|
|
518
|
-
*
|
|
519
|
-
* @param index index of layer to move.
|
|
520
|
-
* @param isOverlay true if layer is overlay.
|
|
469
|
+
/** Move map layer to top.
|
|
470
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to move.
|
|
521
471
|
* @public
|
|
522
472
|
*
|
|
523
473
|
*/
|
|
524
|
-
moveMapLayerToTop(
|
|
525
|
-
const layers = this.getMapLayers(isOverlay);
|
|
474
|
+
moveMapLayerToTop(mapLayerIndex) {
|
|
475
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
476
|
+
const index = mapLayerIndex.index;
|
|
526
477
|
if (index >= 0 && index < layers.length - 1) {
|
|
527
478
|
const layer = layers.splice(index, 1);
|
|
528
479
|
layers.push(layer[0]);
|
|
529
480
|
this._synchBackgroundMapImagery();
|
|
530
481
|
}
|
|
531
482
|
}
|
|
532
|
-
/**
|
|
533
|
-
*
|
|
534
|
-
* @param index index of layer to move.
|
|
535
|
-
* @param isOverlay true if layer is overlay.
|
|
483
|
+
/** Move map layer to bottom.
|
|
484
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to move.
|
|
536
485
|
* @public
|
|
537
486
|
*/
|
|
538
|
-
moveMapLayerToBottom(
|
|
539
|
-
const layers = this.getMapLayers(isOverlay);
|
|
487
|
+
moveMapLayerToBottom(mapLayerIndex) {
|
|
488
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
489
|
+
const index = mapLayerIndex.index;
|
|
540
490
|
if (index > 0 && index < layers.length) {
|
|
541
491
|
const layer = layers.splice(index, 1);
|
|
542
492
|
layers.unshift(layer[0]);
|
|
543
493
|
this._synchBackgroundMapImagery();
|
|
544
494
|
}
|
|
545
495
|
}
|
|
546
|
-
/**
|
|
547
|
-
* Reorder map layers
|
|
496
|
+
/** Reorder map layers
|
|
548
497
|
* @param fromIndex index of map layer to move
|
|
549
498
|
* @param toIndex insert index. If equal to length of map array the map layer is moved to end of array.
|
|
499
|
+
* @param isOverlay true if map-layer is part of the overlay map, otherwise it is part of the background map.
|
|
550
500
|
* @public
|
|
551
501
|
*/
|
|
552
502
|
moveMapLayerToIndex(fromIndex, toIndex, isOverlay) {
|