@itwin/frontend-devtools 5.0.0-dev.4 → 5.0.0-dev.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/lib/cjs/FrontEndDevTools.js +1 -1
- package/lib/cjs/FrontEndDevTools.js.map +1 -1
- package/lib/cjs/effects/Convolution.js +6 -6
- package/lib/cjs/effects/Convolution.js.map +1 -1
- package/lib/cjs/effects/EffectTools.js +2 -2
- package/lib/cjs/effects/EffectTools.js.map +1 -1
- package/lib/cjs/effects/Explosion.js +2 -2
- package/lib/cjs/effects/Explosion.js.map +1 -1
- package/lib/cjs/effects/FlipImage.js +2 -2
- package/lib/cjs/effects/FlipImage.js.map +1 -1
- package/lib/cjs/effects/LensDistortion.js +4 -4
- package/lib/cjs/effects/LensDistortion.js.map +1 -1
- package/lib/cjs/effects/Saturation.js +4 -4
- package/lib/cjs/effects/Saturation.js.map +1 -1
- package/lib/cjs/effects/Snow.js +2 -2
- package/lib/cjs/effects/Snow.js.map +1 -1
- package/lib/cjs/effects/Vignette.js +12 -12
- package/lib/cjs/effects/Vignette.js.map +1 -1
- package/lib/cjs/tools/AnimationIntervalTool.js +1 -1
- package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
- package/lib/cjs/tools/ChangeUnitsTool.js +1 -1
- package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
- package/lib/cjs/tools/ClipTools.js +4 -4
- package/lib/cjs/tools/ClipTools.js.map +1 -1
- package/lib/cjs/tools/DisplayStyleTools.js +10 -10
- package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
- package/lib/cjs/tools/EmphasizeElementsTool.js +5 -5
- package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
- package/lib/cjs/tools/FrustumDecoration.js +3 -3
- package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
- package/lib/cjs/tools/InspectElementTool.js +1 -1
- package/lib/cjs/tools/InspectElementTool.js.map +1 -1
- package/lib/cjs/tools/MapLayerTool.js +20 -20
- package/lib/cjs/tools/MapLayerTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTileLoadTime.js +1 -1
- package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
- package/lib/cjs/tools/ModelAppearanceTools.js +9 -9
- package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
- package/lib/cjs/tools/PlanProjectionTools.js +3 -3
- package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
- package/lib/cjs/tools/PlanarMaskTools.js +13 -13
- package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
- package/lib/cjs/tools/ProjectExtents.js +1 -1
- package/lib/cjs/tools/ProjectExtents.js.map +1 -1
- package/lib/cjs/tools/RealityModelTools.js +10 -10
- package/lib/cjs/tools/RealityModelTools.js.map +1 -1
- package/lib/cjs/tools/RealityTransitionTool.js +1 -1
- package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
- package/lib/cjs/tools/RenderSystemTools.js +3 -3
- package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
- package/lib/cjs/tools/RenderTargetTools.js +11 -11
- package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +1 -1
- package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
- package/lib/cjs/tools/SavedViews.js +3 -3
- package/lib/cjs/tools/SavedViews.js.map +1 -1
- package/lib/cjs/tools/ScheduleScriptTools.js +3 -3
- package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
- package/lib/cjs/tools/SelectionTools.js +2 -2
- package/lib/cjs/tools/SelectionTools.js.map +1 -1
- package/lib/cjs/tools/SetGpuMemoryLimitTool.js +1 -1
- package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
- package/lib/cjs/tools/SourceAspectIdTools.js +2 -2
- package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
- package/lib/cjs/tools/TileRequestDecoration.js +1 -1
- package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
- package/lib/cjs/tools/TileTreeBoundsDecoration.js +1 -1
- package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
- package/lib/cjs/tools/ToolTipProvider.js +1 -1
- package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
- package/lib/cjs/tools/ViewportTools.js +19 -19
- package/lib/cjs/tools/ViewportTools.js.map +1 -1
- package/lib/cjs/widgets/ToolSettingsTracker.js +1 -1
- package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
- package/lib/esm/FrontEndDevTools.js +1 -1
- package/lib/esm/FrontEndDevTools.js.map +1 -1
- package/lib/esm/effects/Convolution.js +6 -6
- package/lib/esm/effects/Convolution.js.map +1 -1
- package/lib/esm/effects/EffectTools.js +2 -2
- package/lib/esm/effects/EffectTools.js.map +1 -1
- package/lib/esm/effects/Explosion.js +2 -2
- package/lib/esm/effects/Explosion.js.map +1 -1
- package/lib/esm/effects/FlipImage.js +2 -2
- package/lib/esm/effects/FlipImage.js.map +1 -1
- package/lib/esm/effects/LensDistortion.js +4 -4
- package/lib/esm/effects/LensDistortion.js.map +1 -1
- package/lib/esm/effects/Saturation.js +4 -4
- package/lib/esm/effects/Saturation.js.map +1 -1
- package/lib/esm/effects/Snow.js +2 -2
- package/lib/esm/effects/Snow.js.map +1 -1
- package/lib/esm/effects/Vignette.js +12 -12
- package/lib/esm/effects/Vignette.js.map +1 -1
- package/lib/esm/tools/AnimationIntervalTool.js +1 -1
- package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
- package/lib/esm/tools/ChangeUnitsTool.js +1 -1
- package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
- package/lib/esm/tools/ClipTools.js +4 -4
- package/lib/esm/tools/ClipTools.js.map +1 -1
- package/lib/esm/tools/DisplayStyleTools.js +10 -10
- package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
- package/lib/esm/tools/EmphasizeElementsTool.js +5 -5
- package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
- package/lib/esm/tools/FrustumDecoration.js +3 -3
- package/lib/esm/tools/FrustumDecoration.js.map +1 -1
- package/lib/esm/tools/InspectElementTool.js +1 -1
- package/lib/esm/tools/InspectElementTool.js.map +1 -1
- package/lib/esm/tools/MapLayerTool.js +20 -20
- package/lib/esm/tools/MapLayerTool.js.map +1 -1
- package/lib/esm/tools/MeasureTileLoadTime.js +1 -1
- package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
- package/lib/esm/tools/ModelAppearanceTools.js +9 -9
- package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
- package/lib/esm/tools/PlanProjectionTools.js +3 -3
- package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
- package/lib/esm/tools/PlanarMaskTools.js +13 -13
- package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
- package/lib/esm/tools/ProjectExtents.js +1 -1
- package/lib/esm/tools/ProjectExtents.js.map +1 -1
- package/lib/esm/tools/RealityModelTools.js +10 -10
- package/lib/esm/tools/RealityModelTools.js.map +1 -1
- package/lib/esm/tools/RealityTransitionTool.js +1 -1
- package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
- package/lib/esm/tools/RenderSystemTools.js +3 -3
- package/lib/esm/tools/RenderSystemTools.js.map +1 -1
- package/lib/esm/tools/RenderTargetTools.js +11 -11
- package/lib/esm/tools/RenderTargetTools.js.map +1 -1
- package/lib/esm/tools/ReportWebGLCompatibilityTool.js +1 -1
- package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
- package/lib/esm/tools/SavedViews.js +3 -3
- package/lib/esm/tools/SavedViews.js.map +1 -1
- package/lib/esm/tools/ScheduleScriptTools.js +3 -3
- package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
- package/lib/esm/tools/SelectionTools.js +2 -2
- package/lib/esm/tools/SelectionTools.js.map +1 -1
- package/lib/esm/tools/SetGpuMemoryLimitTool.js +1 -1
- package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
- package/lib/esm/tools/SourceAspectIdTools.js +2 -2
- package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
- package/lib/esm/tools/TileRequestDecoration.js +1 -1
- package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
- package/lib/esm/tools/TileTreeBoundsDecoration.js +1 -1
- package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
- package/lib/esm/tools/ToolTipProvider.js +1 -1
- package/lib/esm/tools/ToolTipProvider.js.map +1 -1
- package/lib/esm/tools/ViewportTools.js +19 -19
- package/lib/esm/tools/ViewportTools.js.map +1 -1
- package/lib/esm/widgets/ToolSettingsTracker.js +1 -1
- package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
- package/package.json +8 -8
|
@@ -64,6 +64,7 @@ class AttachMapLayerBaseTool extends core_frontend_1.Tool {
|
|
|
64
64
|
class AttachModelMapLayerTool extends core_frontend_1.Tool {
|
|
65
65
|
static get minArgs() { return 0; }
|
|
66
66
|
static get maxArgs() { return 1; }
|
|
67
|
+
static { this.toolId = "AttachModelMapLayerTool"; }
|
|
67
68
|
constructor(_formatId) {
|
|
68
69
|
super();
|
|
69
70
|
this._formatId = _formatId;
|
|
@@ -93,7 +94,6 @@ class AttachModelMapLayerTool extends core_frontend_1.Tool {
|
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
exports.AttachModelMapLayerTool = AttachModelMapLayerTool;
|
|
96
|
-
AttachModelMapLayerTool.toolId = "AttachModelMapLayerTool";
|
|
97
97
|
/** Attach a map layer from URL base class. */
|
|
98
98
|
class AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {
|
|
99
99
|
static get minArgs() { return 1; }
|
|
@@ -119,6 +119,7 @@ class AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {
|
|
|
119
119
|
* @beta
|
|
120
120
|
*/
|
|
121
121
|
class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
122
|
+
static { this.toolId = "AttachWmsMapLayerTool"; }
|
|
122
123
|
constructor() { super("WMS"); }
|
|
123
124
|
/** This method runs the tool, attaching a WMS map layer from a given URL.
|
|
124
125
|
* @param args contains url, name, userName, password in array order
|
|
@@ -128,11 +129,11 @@ class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
exports.AttachWmsMapLayerByUrlTool = AttachWmsMapLayerByUrlTool;
|
|
131
|
-
AttachWmsMapLayerByUrlTool.toolId = "AttachWmsMapLayerTool";
|
|
132
132
|
/** This tool attaches a WMTS map layer from a given URL.
|
|
133
133
|
* @beta
|
|
134
134
|
*/
|
|
135
135
|
class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
136
|
+
static { this.toolId = "AttachWmtsMapLayerTool"; }
|
|
136
137
|
constructor() { super("WMTS"); }
|
|
137
138
|
/** This method runs the tool, attaching a WMTS map layer from a given URL.
|
|
138
139
|
* @param args contains url, name, userName, password in array order
|
|
@@ -142,43 +143,43 @@ class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
exports.AttachWmtsMapLayerByUrlTool = AttachWmtsMapLayerByUrlTool;
|
|
145
|
-
AttachWmtsMapLayerByUrlTool.toolId = "AttachWmtsMapLayerTool";
|
|
146
146
|
/** This tool attaches an ArcGIS map layer from a given URL.
|
|
147
147
|
* @beta
|
|
148
148
|
*/
|
|
149
149
|
class AttachArcGISMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
150
|
+
static { this.toolId = "AttachArcGISMapLayerTool"; }
|
|
150
151
|
constructor() { super("ArcGIS"); }
|
|
151
152
|
}
|
|
152
153
|
exports.AttachArcGISMapLayerByUrlTool = AttachArcGISMapLayerByUrlTool;
|
|
153
|
-
AttachArcGISMapLayerByUrlTool.toolId = "AttachArcGISMapLayerTool";
|
|
154
154
|
/** This tool attaches an ArcGIS map layer from a given URL.
|
|
155
155
|
* @beta
|
|
156
156
|
*/
|
|
157
157
|
class AttachArcGISFeatureMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
158
|
+
static { this.toolId = "AttachArcGISFeatureMapLayerTool"; }
|
|
158
159
|
constructor() { super("ArcGISFeature"); }
|
|
159
160
|
}
|
|
160
161
|
exports.AttachArcGISFeatureMapLayerByUrlTool = AttachArcGISFeatureMapLayerByUrlTool;
|
|
161
|
-
AttachArcGISFeatureMapLayerByUrlTool.toolId = "AttachArcGISFeatureMapLayerTool";
|
|
162
162
|
/** This tool attaches an ArcGIS map layer from a given URL.
|
|
163
163
|
* @beta
|
|
164
164
|
*/
|
|
165
165
|
class AttachOgcApiFeaturesMapLayerTool extends AttachMapLayerByURLBaseTool {
|
|
166
|
+
static { this.toolId = "AttachOgcApiFeaturesMapLayerTool"; }
|
|
166
167
|
constructor() { super("OgcApiFeatures"); }
|
|
167
168
|
}
|
|
168
169
|
exports.AttachOgcApiFeaturesMapLayerTool = AttachOgcApiFeaturesMapLayerTool;
|
|
169
|
-
AttachOgcApiFeaturesMapLayerTool.toolId = "AttachOgcApiFeaturesMapLayerTool";
|
|
170
170
|
/** This tool attaches a map layer from a given tile URL.
|
|
171
171
|
* @beta
|
|
172
172
|
*/
|
|
173
173
|
class AttachTileURLMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {
|
|
174
|
+
static { this.toolId = "AttachTileURLMapLayerTool"; }
|
|
174
175
|
constructor() { super("TileURL"); }
|
|
175
176
|
}
|
|
176
177
|
exports.AttachTileURLMapLayerByUrlTool = AttachTileURLMapLayerByUrlTool;
|
|
177
|
-
AttachTileURLMapLayerByUrlTool.toolId = "AttachTileURLMapLayerTool";
|
|
178
178
|
/** This tool add a Map Layer from a specified name (look up in MapLayerSources.json).
|
|
179
179
|
* @beta
|
|
180
180
|
*/
|
|
181
181
|
class AttachMapLayerTool extends AttachMapLayerBaseTool {
|
|
182
|
+
static { this.toolId = "AttachMapLayerTool"; }
|
|
182
183
|
static get minArgs() { return 1; }
|
|
183
184
|
static get maxArgs() { return 1; }
|
|
184
185
|
/** This method runs the tool, adding a map layer from a specified name in MayLayerSources.json.
|
|
@@ -205,33 +206,33 @@ class AttachMapLayerTool extends AttachMapLayerBaseTool {
|
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
exports.AttachMapLayerTool = AttachMapLayerTool;
|
|
208
|
-
AttachMapLayerTool.toolId = "AttachMapLayerTool";
|
|
209
209
|
/** This tool attaches a Overlay map layer.
|
|
210
210
|
* @beta
|
|
211
211
|
*/
|
|
212
212
|
class AttachMapOverlayTool extends AttachMapLayerTool {
|
|
213
|
+
static { this.toolId = "AttachMapOverlayTool"; }
|
|
213
214
|
constructor() {
|
|
214
215
|
super();
|
|
215
216
|
this._isBackground = false;
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
exports.AttachMapOverlayTool = AttachMapOverlayTool;
|
|
219
|
-
AttachMapOverlayTool.toolId = "AttachMapOverlayTool";
|
|
220
220
|
/** Sets map layer base tool.
|
|
221
221
|
* @beta
|
|
222
222
|
*/
|
|
223
223
|
class SetMapBaseTool extends AttachMapLayerTool {
|
|
224
|
+
static { this.toolId = "SetMapBaseTool"; }
|
|
224
225
|
constructor() {
|
|
225
226
|
super();
|
|
226
227
|
this._isBase = true;
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
230
|
exports.SetMapBaseTool = SetMapBaseTool;
|
|
230
|
-
SetMapBaseTool.toolId = "SetMapBaseTool";
|
|
231
231
|
/** Detach Map Layers Tool.
|
|
232
232
|
* @beta
|
|
233
233
|
*/
|
|
234
234
|
class DetachMapLayersTool extends core_frontend_1.Tool {
|
|
235
|
+
static { this.toolId = "DetachMapLayersTool"; }
|
|
235
236
|
static get minArgs() { return 0; }
|
|
236
237
|
static get maxArgs() { return 0; }
|
|
237
238
|
async parseAndRun(..._args) {
|
|
@@ -248,7 +249,6 @@ class DetachMapLayersTool extends core_frontend_1.Tool {
|
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
exports.DetachMapLayersTool = DetachMapLayersTool;
|
|
251
|
-
DetachMapLayersTool.toolId = "DetachMapLayersTool";
|
|
252
252
|
function parseLayerIndex(args) {
|
|
253
253
|
const layerIndex = args.length > 1 ? parseInt(args[1], 10) : 0;
|
|
254
254
|
return isNaN(layerIndex) ? 0 : layerIndex;
|
|
@@ -257,6 +257,7 @@ function parseLayerIndex(args) {
|
|
|
257
257
|
* @beta
|
|
258
258
|
*/
|
|
259
259
|
class MapLayerVisibilityTool extends core_frontend_1.Tool {
|
|
260
|
+
static { this.toolId = "SetMapLayerVisibility"; }
|
|
260
261
|
static get minArgs() { return 1; }
|
|
261
262
|
static get maxArgs() { return 2; }
|
|
262
263
|
/** This method runs the tool, setting the visibility of a map layer.
|
|
@@ -287,11 +288,11 @@ class MapLayerVisibilityTool extends core_frontend_1.Tool {
|
|
|
287
288
|
}
|
|
288
289
|
}
|
|
289
290
|
exports.MapLayerVisibilityTool = MapLayerVisibilityTool;
|
|
290
|
-
MapLayerVisibilityTool.toolId = "SetMapLayerVisibility";
|
|
291
291
|
/** This tool reorders map layers.
|
|
292
292
|
* @beta
|
|
293
293
|
*/
|
|
294
294
|
class ReorderMapLayers extends core_frontend_1.Tool {
|
|
295
|
+
static { this.toolId = "ReorderMapLayers"; }
|
|
295
296
|
static get minArgs() { return 0; }
|
|
296
297
|
static get maxArgs() { return 2; }
|
|
297
298
|
/** This method runs the tool, reordering the map layers.
|
|
@@ -317,11 +318,11 @@ class ReorderMapLayers extends core_frontend_1.Tool {
|
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
320
|
exports.ReorderMapLayers = ReorderMapLayers;
|
|
320
|
-
ReorderMapLayers.toolId = "ReorderMapLayers";
|
|
321
321
|
/** This tool sets the transparency of a map layer.
|
|
322
322
|
* @beta
|
|
323
323
|
*/
|
|
324
324
|
class MapLayerTransparencyTool extends core_frontend_1.Tool {
|
|
325
|
+
static { this.toolId = "SetMapLayerTransparency"; }
|
|
325
326
|
static get minArgs() { return 1; }
|
|
326
327
|
static get maxArgs() { return 2; }
|
|
327
328
|
/** This method runs the tool, setting the transparency of a map layer.
|
|
@@ -348,11 +349,11 @@ class MapLayerTransparencyTool extends core_frontend_1.Tool {
|
|
|
348
349
|
}
|
|
349
350
|
}
|
|
350
351
|
exports.MapLayerTransparencyTool = MapLayerTransparencyTool;
|
|
351
|
-
MapLayerTransparencyTool.toolId = "SetMapLayerTransparency";
|
|
352
352
|
/** This tool sets the visibility of the map sublayer.
|
|
353
353
|
* @beta
|
|
354
354
|
*/
|
|
355
355
|
class MapLayerSubLayerVisibilityTool extends core_frontend_1.Tool {
|
|
356
|
+
static { this.toolId = "SetMapSubLayerVisibility"; }
|
|
356
357
|
static get minArgs() { return 1; }
|
|
357
358
|
static get maxArgs() { return 2; }
|
|
358
359
|
/** This method runs the tool, setting the visibility of a map sublayer.
|
|
@@ -378,11 +379,11 @@ class MapLayerSubLayerVisibilityTool extends core_frontend_1.Tool {
|
|
|
378
379
|
}
|
|
379
380
|
}
|
|
380
381
|
exports.MapLayerSubLayerVisibilityTool = MapLayerSubLayerVisibilityTool;
|
|
381
|
-
MapLayerSubLayerVisibilityTool.toolId = "SetMapSubLayerVisibility";
|
|
382
382
|
/** This tool changes the viewport so it is zoomed to the range of a map layer.
|
|
383
383
|
* @beta
|
|
384
384
|
*/
|
|
385
385
|
class MapLayerZoomTool extends core_frontend_1.Tool {
|
|
386
|
+
static { this.toolId = "MapLayerZoom"; }
|
|
386
387
|
static get minArgs() { return 0; }
|
|
387
388
|
static get maxArgs() { return 1; }
|
|
388
389
|
/** This method runs the tool, changing the viewport so it is zoomed to the range of a map layer.
|
|
@@ -405,11 +406,11 @@ class MapLayerZoomTool extends core_frontend_1.Tool {
|
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
408
|
exports.MapLayerZoomTool = MapLayerZoomTool;
|
|
408
|
-
MapLayerZoomTool.toolId = "MapLayerZoom";
|
|
409
409
|
/** This tool toggles whether to apply terrain heights to the map.
|
|
410
410
|
* @beta
|
|
411
411
|
*/
|
|
412
412
|
class ToggleTerrainTool extends core_frontend_1.Tool {
|
|
413
|
+
static { this.toolId = "ToggleTerrain"; }
|
|
413
414
|
static get minArgs() { return 0; }
|
|
414
415
|
static get maxArgs() { return 1; }
|
|
415
416
|
/** This method runs the tool, changing whether to apply terrain heights to the map.
|
|
@@ -435,11 +436,11 @@ class ToggleTerrainTool extends core_frontend_1.Tool {
|
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
438
|
exports.ToggleTerrainTool = ToggleTerrainTool;
|
|
438
|
-
ToggleTerrainTool.toolId = "ToggleTerrain";
|
|
439
439
|
/** This tool changes the color of the base map.
|
|
440
440
|
* @beta
|
|
441
441
|
*/
|
|
442
442
|
class MapBaseColorTool extends core_frontend_1.Tool {
|
|
443
|
+
static { this.toolId = "SetMapBaseColorTool"; }
|
|
443
444
|
static get minArgs() { return 3; }
|
|
444
445
|
static get maxArgs() { return 3; }
|
|
445
446
|
/** This method runs the tool, changing the color of the base map.
|
|
@@ -464,11 +465,11 @@ class MapBaseColorTool extends core_frontend_1.Tool {
|
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
467
|
exports.MapBaseColorTool = MapBaseColorTool;
|
|
467
|
-
MapBaseColorTool.toolId = "SetMapBaseColorTool";
|
|
468
468
|
/** This tool changes the transparency of the base map.
|
|
469
469
|
* @beta
|
|
470
470
|
*/
|
|
471
471
|
class MapBaseTransparencyTool extends core_frontend_1.Tool {
|
|
472
|
+
static { this.toolId = "SetMapBaseTransparencyTool"; }
|
|
472
473
|
static get minArgs() { return 1; }
|
|
473
474
|
static get maxArgs() { return 1; }
|
|
474
475
|
/** This method runs the tool, changing the transparency of the base map.
|
|
@@ -491,11 +492,11 @@ class MapBaseTransparencyTool extends core_frontend_1.Tool {
|
|
|
491
492
|
}
|
|
492
493
|
}
|
|
493
494
|
exports.MapBaseTransparencyTool = MapBaseTransparencyTool;
|
|
494
|
-
MapBaseTransparencyTool.toolId = "SetMapBaseTransparencyTool";
|
|
495
495
|
/** This tool changes the visibility of the base map.
|
|
496
496
|
* @beta
|
|
497
497
|
*/
|
|
498
498
|
class MapBaseVisibilityTool extends core_frontend_1.Tool {
|
|
499
|
+
static { this.toolId = "SetMapBaseVisibilityTool"; }
|
|
499
500
|
static get minArgs() { return 1; }
|
|
500
501
|
static get maxArgs() { return 1; }
|
|
501
502
|
/** This method runs the tool, changing the visibility of the base map.
|
|
@@ -518,5 +519,4 @@ class MapBaseVisibilityTool extends core_frontend_1.Tool {
|
|
|
518
519
|
}
|
|
519
520
|
}
|
|
520
521
|
exports.MapBaseVisibilityTool = MapBaseVisibilityTool;
|
|
521
|
-
MapBaseVisibilityTool.toolId = "SetMapBaseVisibilityTool";
|
|
522
522
|
//# sourceMappingURL=MapLayerTool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerTool.js","sourceRoot":"","sources":["../../../src/tools/MapLayerTool.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,oDAA2F;AAC3F,wDAAyK;AACzK,iDAA8C;AAC9C,+CAA4C;AAE5C,+CAA+C;AAC/C,MAAM,sBAAuB,SAAQ,oBAAI;IACvC,YAAsB,gBAAgB,IAAI,EAAY,UAAU,KAAK;QACnE,KAAK,EAAE,CAAC;QADY,kBAAa,GAAb,aAAa,CAAO;QAAY,YAAO,GAAP,OAAO,CAAQ;IAErE,CAAC;IAES,QAAQ,CAAC,MAAuB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,EAAE,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;YAC1C,OAAO;QAET,MAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;YAC1C,IAAI,UAAU,CAAC,MAAM,KAAK,oCAAoB,CAAC,KAAK,IAAI,UAAU,CAAC,MAAM,K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IAAI,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACxG,CAAC;;AA1BH,0DA2BC;AA1BwB,8BAAM,GAAG,4BAA4B,CAAC;AA4B/D;;GAEG;AACH,MAAa,qBAAsB,SAAQ,oBAAI;IAEtC,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAElD;;OAEG;IACa,KAAK,CAAC,GAAG,CAAC,OAAgB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,SAAS,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,iBAAiB,YAAY,sBAAQ;YACvG,OAAO,KAAK,CAAC;QAEf,EAAE,CAAC,YAAY,CAAC,iBAAiB,GAAG,EAAE,CAAC,YAAY,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACzF,EAAE,CAAC,oBAAoB,EAAE,CAAC;QAE1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACa,KAAK,CAAC,WAAW,CAAC,GAAG,IAAc;QACjD,MAAM,OAAO,GAAG,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;;AA1BH,sDA2BC;AA1BwB,4BAAM,GAAG,0BAA0B,CAAC","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\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { BaseMapLayerSettings, ColorDef, ModelMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp, MapLayerSource, MapLayerSources, MapLayerSourceStatus, NotifyMessageDetails, OutputMessagePriority, Tool, WmsUtilities } from \"@itwin/core-frontend\";\nimport { parseBoolean } from \"./parseBoolean\";\nimport { parseToggle } from \"./parseToggle\";\n\n/** Base class for attaching map layer tool. */\nclass AttachMapLayerBaseTool extends Tool {\n constructor(protected _isBackground = true, protected _isBase = false) {\n super();\n }\n\n protected doAttach(source?: MapLayerSource) {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined || source === undefined)\n return;\n\n source.validateSource().then((validation) => {\n if (validation.status === MapLayerSourceStatus.Valid || validation.status === MapLayerSourceStatus.RequireAuth) {\n if (this._isBase) {\n vp.displayStyle.backgroundMapBase = BaseMapLayerSettings.fromJSON({ ...source, subLayers: validation.subLayers });\n vp.invalidateRenderPlan();\n } else {\n const settings = source.toLayerSettings(validation.subLayers);\n if (settings) {\n // Need to specify index in mapLayerIndex, so just use -1 to attach layer at the bottom\n // Previously, this was done within attachMapLayer if index was undefined.\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: !this._isBackground, index: -1 } });\n }\n }\n\n if (validation.status === MapLayerSourceStatus.Valid) {\n vp.invalidateRenderPlan();\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttached\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, msg));\n } else if (validation.status === MapLayerSourceStatus.RequireAuth) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachedRequiresAuth\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg));\n }\n\n } else if (validation.status === MapLayerSourceStatus.IncompatibleFormat) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayersIncompatibleFormat\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n } else {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerValidationFailed\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n }\n }).catch((error) => {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachError\", { error, sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n });\n }\n}\n\n/** Attach a map layer from URL base class. A layer is attached for each unique model in the selection\n * @beta\n */\nexport class AttachModelMapLayerTool extends Tool {\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n public static override toolId = \"AttachModelMapLayerTool\";\n constructor(protected _formatId: string) { super(); }\n\n public override async run(nameIn?: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (!vp)\n return false;\n\n const iModel = vp.iModel;\n const elements = await iModel.elements.getProps(iModel.selectionSet.elements);\n const modelIds = new Set<Id64String>();\n\n for (const element of elements)\n modelIds.add(element.model);\n\n for (const modelId of modelIds) {\n const modelProps = await iModel.models.getProps(modelId);\n const modelName = modelProps[0].name ? modelProps[0].name : modelId;\n const name = nameIn ? (modelIds.size > 1 ? `${nameIn}: ${modelName}` : nameIn) : modelName;\n const settings = ModelMapLayerSettings.fromJSON({ name, modelId });\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: false, index: -1 } });\n }\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n public async onRestartTool() {\n }\n}\n/** Attach a map layer from URL base class. */\nclass AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 4; }\n constructor(protected _formatId: string) { super(); }\n\n public override async run(url: string, name?: string, userName?: string, password?: string): Promise<boolean> {\n const source = MapLayerSource.fromJSON({ url, name: (name ? name : url), formatId: this._formatId });\n if (source) {\n source.userName = userName;\n source.password = password;\n }\n\n this.doAttach(source);\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0], args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMS map layer from a given URL.\n * @beta\n */\nexport class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmsMapLayerTool\";\n constructor() { super(\"WMS\"); }\n /** This method runs the tool, attaching a WMS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMTS map layer from a given URL.\n * @beta\n */\nexport class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmtsMapLayerTool\";\n constructor() { super(\"WMTS\"); }\n /** This method runs the tool, attaching a WMTS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISMapLayerTool\";\n constructor() { super(\"ArcGIS\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISFeatureMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISFeatureMapLayerTool\";\n constructor() { super(\"ArcGISFeature\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachOgcApiFeaturesMapLayerTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachOgcApiFeaturesMapLayerTool\";\n constructor() { super(\"OgcApiFeatures\"); }\n}\n\n/** This tool attaches a map layer from a given tile URL.\n * @beta\n */\nexport class AttachTileURLMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachTileURLMapLayerTool\";\n constructor() { super(\"TileURL\"); }\n}\n\n/** This tool add a Map Layer from a specified name (look up in MapLayerSources.json).\n * @beta\n */\nexport class AttachMapLayerTool extends AttachMapLayerBaseTool {\n public static override toolId = \"AttachMapLayerTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, adding a map layer from a specified name in MayLayerSources.json.\n * @param name the name of the map layer to add\n */\n public override async run(name: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n\n MapLayerSources.create().then((sources) => {\n if (sources !== undefined) {\n const source = sources.findByName(name, this._isBase);\n if (source !== undefined)\n this.doAttach(source);\n }\n }).catch((_err) => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `name`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n}\n/** This tool attaches a Overlay map layer.\n * @beta\n */\nexport class AttachMapOverlayTool extends AttachMapLayerTool {\n public static override toolId = \"AttachMapOverlayTool\";\n constructor() {\n super();\n this._isBackground = false;\n }\n}\n\n/** Sets map layer base tool.\n * @beta\n */\nexport class SetMapBaseTool extends AttachMapLayerTool {\n public static override toolId = \"SetMapBaseTool\";\n constructor() {\n super();\n this._isBase = true;\n }\n}\n\n/** Detach Map Layers Tool.\n * @beta\n */\nexport class DetachMapLayersTool extends Tool {\n public static override toolId = \"DetachMapLayersTool\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 0; }\n public override async parseAndRun(..._args: string[]): Promise<boolean> {\n return this.run();\n }\n\n public override async run(): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: true });\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: false });\n vp.invalidateRenderPlan();\n return true;\n }\n}\n\nfunction parseLayerIndex(args: string[]) {\n const layerIndex = args.length > 1 ? parseInt(args[1], 10) : 0;\n return isNaN(layerIndex) ? 0 : layerIndex;\n}\n\n/** This tool sets the visibility of the map layer.\n * @beta\n */\nexport class MapLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map layer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the layer should be visible\n */\n public override async run(layerIndex: number, enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const mapLayer = vp.displayStyle.mapLayerAtIndex({ index: layerIndex, isOverlay: false });\n if (undefined === mapLayer)\n return false;\n\n const visible = (enable === undefined) ? !mapLayer.visible : enable;\n\n vp.displayStyle.changeMapLayerProps({ visible }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (typeof enable !== \"string\")\n await this.run(layerIndex, enable);\n\n return true;\n }\n}\n/** This tool reorders map layers.\n * @beta\n */\nexport class ReorderMapLayers extends Tool {\n public static override toolId = \"ReorderMapLayers\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, reordering the map layers.\n * @param from a numeric value specifying the layer index that is being moved\n * @param from a numeric value specifying the layer index to move that layer to\n */\n public override async run(from: number, to: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.moveMapLayerToIndex(isNaN(from) ? 0 : from, isNaN(to) ? vp.displayStyle.settings.mapImagery.backgroundLayers.length : to, false);\n vp.invalidateRenderPlan();\n return true;\n }\n /** Executes this tool's run method with args[0] containing `from` and args[1] containing `to`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const from = parseInt(args[0], 10);\n const to = parseInt(args[1], 10);\n await this.run(from, to);\n return true;\n }\n\n}\n\n/** This tool sets the transparency of a map layer.\n * @beta\n */\nexport class MapLayerTransparencyTool extends Tool {\n public static override toolId = \"SetMapLayerTransparency\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, setting the transparency of a map layer.\n * @param layerIndex the index of the layer to change\n * @param transparency a numeric value in the range 0.0 (fully opaque) to 1.0 (fully transparent)\n */\n public override async run(layerIndex: number, transparency: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapLayerProps({ transparency }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (transparency >= 0 && transparency <= 1)\n await this.run(layerIndex, transparency);\n\n return true;\n }\n}\n/** This tool sets the visibility of the map sublayer.\n * @beta\n */\nexport class MapLayerSubLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapSubLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map sublayer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the sublayer should be visible\n */\n public override async run(layerIndex: number, visible: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapSubLayerProps({ visible }, -1, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const on = args[0] !== \"off\";\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex, on);\n\n return true;\n }\n}\n\n/** This tool changes the viewport so it is zoomed to the range of a map layer.\n * @beta\n */\nexport class MapLayerZoomTool extends Tool {\n public static override toolId = \"MapLayerZoom\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the viewport so it is zoomed to the range of a map layer.\n * @param layerIndex the index of the layer whose range to zoom to\n */\n public override async run(layerIndex: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.viewMapLayerRange({ index: layerIndex, isOverlay: false }, vp).then(() => { }).catch(() => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex);\n\n return true;\n }\n}\n\n/** This tool toggles whether to apply terrain heights to the map.\n * @beta\n */\nexport class ToggleTerrainTool extends Tool {\n public static override toolId = \"ToggleTerrain\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing whether to apply terrain heights to the map.\n * @param enable whether or not to enable terrain heights on the map\n */\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const applyTerrain = (enable === undefined) ? !vp.displayStyle.backgroundMapSettings.applyTerrain : enable;\n vp.displayStyle.changeBackgroundMapProps({ applyTerrain });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n\n/** This tool changes the color of the base map.\n * @beta\n */\nexport class MapBaseColorTool extends Tool {\n public static override toolId = \"SetMapBaseColorTool\";\n public static override get minArgs() { return 3; }\n public static override get maxArgs() { return 3; }\n\n /** This method runs the tool, changing the color of the base map.\n * @param color the color for the base map\n */\n public override async run(color: ColorDef) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const curTransparency = vp.displayStyle.backgroundMapBase instanceof ColorDef ? vp.displayStyle.backgroundMapBase.getTransparency() : 0;\n vp.displayStyle.backgroundMapBase = color.withTransparency(curTransparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing a 0 to 255 red component, args[1] containing a 0 to 255 green component, and args[2] containing a 0 to 255 blue component.\n * These rgb values will be used to construct the `color` parameter passed to this tool's run method.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const red = parseFloat(args[0]), green = parseFloat(args[1]), blue = parseFloat(args[2]);\n\n return (isNaN(red) || red < 0 || red > 255 || isNaN(green) || green < 0 || green > 255 || isNaN(blue) || blue < 0 || blue > 255) ? false : this.run(ColorDef.from(red, green, blue));\n }\n}\n/** This tool changes the transparency of the base map.\n * @beta\n */\nexport class MapBaseTransparencyTool extends Tool {\n public static override toolId = \"SetMapBaseTransparencyTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the transparency of the base map.\n * @param transparency a numeric value in range 0.0 to 1.0 whether 0.0 means fully opaque and 1.0 means fully transparent\n */\n public override async run(transparency: number) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeBaseMapTransparency(transparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n\n return (isNaN(transparency) || transparency < 0 || transparency > 1) ? false : this.run(transparency);\n }\n}\n\n/** This tool changes the visibility of the base map.\n * @beta\n */\nexport class MapBaseVisibilityTool extends Tool {\n public static override toolId = \"SetMapBaseVisibilityTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the visibility of the base map.\n * @param visible a boolean which specifies whether or not to make the base map visible\n */\n public override async run(visible: boolean) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView() || vp.displayStyle.backgroundMapBase instanceof ColorDef)\n return false;\n\n vp.displayStyle.backgroundMapBase = vp.displayStyle.backgroundMapBase.clone({ visible });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `visible`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const visible = parseBoolean(args[0]);\n\n return (visible !== undefined ? this.run(visible) : false);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MapLayerTool.js","sourceRoot":"","sources":["../../../src/tools/MapLayerTool.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,oDAA2F;AAC3F,wDAAyK;AACzK,iDAA8C;AAC9C,+CAA4C;AAE5C,+CAA+C;AAC/C,MAAM,sBAAuB,SAAQ,oBAAI;IACvC,YAAsB,gBAAgB,IAAI,EAAY,UAAU,KAAK;QACnE,KAAK,EAAE,CAAC;QADY,kBAAa,GAAb,aAAa,CAAO;QAAY,YAAO,GAAP,OAAO,C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AC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;;AA1BH,sDA2BC","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\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { BaseMapLayerSettings, ColorDef, ModelMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp, MapLayerSource, MapLayerSources, MapLayerSourceStatus, NotifyMessageDetails, OutputMessagePriority, Tool, WmsUtilities } from \"@itwin/core-frontend\";\nimport { parseBoolean } from \"./parseBoolean\";\nimport { parseToggle } from \"./parseToggle\";\n\n/** Base class for attaching map layer tool. */\nclass AttachMapLayerBaseTool extends Tool {\n constructor(protected _isBackground = true, protected _isBase = false) {\n super();\n }\n\n protected doAttach(source?: MapLayerSource) {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined || source === undefined)\n return;\n\n source.validateSource().then((validation) => {\n if (validation.status === MapLayerSourceStatus.Valid || validation.status === MapLayerSourceStatus.RequireAuth) {\n if (this._isBase) {\n vp.displayStyle.backgroundMapBase = BaseMapLayerSettings.fromJSON({ ...source, subLayers: validation.subLayers });\n vp.invalidateRenderPlan();\n } else {\n const settings = source.toLayerSettings(validation.subLayers);\n if (settings) {\n // Need to specify index in mapLayerIndex, so just use -1 to attach layer at the bottom\n // Previously, this was done within attachMapLayer if index was undefined.\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: !this._isBackground, index: -1 } });\n }\n }\n\n if (validation.status === MapLayerSourceStatus.Valid) {\n vp.invalidateRenderPlan();\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttached\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, msg));\n } else if (validation.status === MapLayerSourceStatus.RequireAuth) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachedRequiresAuth\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg));\n }\n\n } else if (validation.status === MapLayerSourceStatus.IncompatibleFormat) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayersIncompatibleFormat\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n } else {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerValidationFailed\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n }\n }).catch((error) => {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachError\", { error, sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n });\n }\n}\n\n/** Attach a map layer from URL base class. A layer is attached for each unique model in the selection\n * @beta\n */\nexport class AttachModelMapLayerTool extends Tool {\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n public static override toolId = \"AttachModelMapLayerTool\";\n constructor(protected _formatId: string) { super(); }\n\n public override async run(nameIn?: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (!vp)\n return false;\n\n const iModel = vp.iModel;\n const elements = await iModel.elements.getProps(iModel.selectionSet.elements);\n const modelIds = new Set<Id64String>();\n\n for (const element of elements)\n modelIds.add(element.model);\n\n for (const modelId of modelIds) {\n const modelProps = await iModel.models.getProps(modelId);\n const modelName = modelProps[0].name ? modelProps[0].name : modelId;\n const name = nameIn ? (modelIds.size > 1 ? `${nameIn}: ${modelName}` : nameIn) : modelName;\n const settings = ModelMapLayerSettings.fromJSON({ name, modelId });\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: false, index: -1 } });\n }\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n public async onRestartTool() {\n }\n}\n/** Attach a map layer from URL base class. */\nclass AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 4; }\n constructor(protected _formatId: string) { super(); }\n\n public override async run(url: string, name?: string, userName?: string, password?: string): Promise<boolean> {\n const source = MapLayerSource.fromJSON({ url, name: (name ? name : url), formatId: this._formatId });\n if (source) {\n source.userName = userName;\n source.password = password;\n }\n\n this.doAttach(source);\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0], args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMS map layer from a given URL.\n * @beta\n */\nexport class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmsMapLayerTool\";\n constructor() { super(\"WMS\"); }\n /** This method runs the tool, attaching a WMS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMTS map layer from a given URL.\n * @beta\n */\nexport class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmtsMapLayerTool\";\n constructor() { super(\"WMTS\"); }\n /** This method runs the tool, attaching a WMTS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISMapLayerTool\";\n constructor() { super(\"ArcGIS\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISFeatureMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISFeatureMapLayerTool\";\n constructor() { super(\"ArcGISFeature\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachOgcApiFeaturesMapLayerTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachOgcApiFeaturesMapLayerTool\";\n constructor() { super(\"OgcApiFeatures\"); }\n}\n\n/** This tool attaches a map layer from a given tile URL.\n * @beta\n */\nexport class AttachTileURLMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachTileURLMapLayerTool\";\n constructor() { super(\"TileURL\"); }\n}\n\n/** This tool add a Map Layer from a specified name (look up in MapLayerSources.json).\n * @beta\n */\nexport class AttachMapLayerTool extends AttachMapLayerBaseTool {\n public static override toolId = \"AttachMapLayerTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, adding a map layer from a specified name in MayLayerSources.json.\n * @param name the name of the map layer to add\n */\n public override async run(name: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n\n MapLayerSources.create().then((sources) => {\n if (sources !== undefined) {\n const source = sources.findByName(name, this._isBase);\n if (source !== undefined)\n this.doAttach(source);\n }\n }).catch((_err) => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `name`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n}\n/** This tool attaches a Overlay map layer.\n * @beta\n */\nexport class AttachMapOverlayTool extends AttachMapLayerTool {\n public static override toolId = \"AttachMapOverlayTool\";\n constructor() {\n super();\n this._isBackground = false;\n }\n}\n\n/** Sets map layer base tool.\n * @beta\n */\nexport class SetMapBaseTool extends AttachMapLayerTool {\n public static override toolId = \"SetMapBaseTool\";\n constructor() {\n super();\n this._isBase = true;\n }\n}\n\n/** Detach Map Layers Tool.\n * @beta\n */\nexport class DetachMapLayersTool extends Tool {\n public static override toolId = \"DetachMapLayersTool\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 0; }\n public override async parseAndRun(..._args: string[]): Promise<boolean> {\n return this.run();\n }\n\n public override async run(): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: true });\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: false });\n vp.invalidateRenderPlan();\n return true;\n }\n}\n\nfunction parseLayerIndex(args: string[]) {\n const layerIndex = args.length > 1 ? parseInt(args[1], 10) : 0;\n return isNaN(layerIndex) ? 0 : layerIndex;\n}\n\n/** This tool sets the visibility of the map layer.\n * @beta\n */\nexport class MapLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map layer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the layer should be visible\n */\n public override async run(layerIndex: number, enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const mapLayer = vp.displayStyle.mapLayerAtIndex({ index: layerIndex, isOverlay: false });\n if (undefined === mapLayer)\n return false;\n\n const visible = (enable === undefined) ? !mapLayer.visible : enable;\n\n vp.displayStyle.changeMapLayerProps({ visible }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (typeof enable !== \"string\")\n await this.run(layerIndex, enable);\n\n return true;\n }\n}\n/** This tool reorders map layers.\n * @beta\n */\nexport class ReorderMapLayers extends Tool {\n public static override toolId = \"ReorderMapLayers\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, reordering the map layers.\n * @param from a numeric value specifying the layer index that is being moved\n * @param from a numeric value specifying the layer index to move that layer to\n */\n public override async run(from: number, to: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.moveMapLayerToIndex(isNaN(from) ? 0 : from, isNaN(to) ? vp.displayStyle.settings.mapImagery.backgroundLayers.length : to, false);\n vp.invalidateRenderPlan();\n return true;\n }\n /** Executes this tool's run method with args[0] containing `from` and args[1] containing `to`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const from = parseInt(args[0], 10);\n const to = parseInt(args[1], 10);\n await this.run(from, to);\n return true;\n }\n\n}\n\n/** This tool sets the transparency of a map layer.\n * @beta\n */\nexport class MapLayerTransparencyTool extends Tool {\n public static override toolId = \"SetMapLayerTransparency\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, setting the transparency of a map layer.\n * @param layerIndex the index of the layer to change\n * @param transparency a numeric value in the range 0.0 (fully opaque) to 1.0 (fully transparent)\n */\n public override async run(layerIndex: number, transparency: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapLayerProps({ transparency }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (transparency >= 0 && transparency <= 1)\n await this.run(layerIndex, transparency);\n\n return true;\n }\n}\n/** This tool sets the visibility of the map sublayer.\n * @beta\n */\nexport class MapLayerSubLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapSubLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map sublayer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the sublayer should be visible\n */\n public override async run(layerIndex: number, visible: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapSubLayerProps({ visible }, -1, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const on = args[0] !== \"off\";\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex, on);\n\n return true;\n }\n}\n\n/** This tool changes the viewport so it is zoomed to the range of a map layer.\n * @beta\n */\nexport class MapLayerZoomTool extends Tool {\n public static override toolId = \"MapLayerZoom\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the viewport so it is zoomed to the range of a map layer.\n * @param layerIndex the index of the layer whose range to zoom to\n */\n public override async run(layerIndex: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.viewMapLayerRange({ index: layerIndex, isOverlay: false }, vp).then(() => { }).catch(() => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex);\n\n return true;\n }\n}\n\n/** This tool toggles whether to apply terrain heights to the map.\n * @beta\n */\nexport class ToggleTerrainTool extends Tool {\n public static override toolId = \"ToggleTerrain\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing whether to apply terrain heights to the map.\n * @param enable whether or not to enable terrain heights on the map\n */\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const applyTerrain = (enable === undefined) ? !vp.displayStyle.backgroundMapSettings.applyTerrain : enable;\n vp.displayStyle.changeBackgroundMapProps({ applyTerrain });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n\n/** This tool changes the color of the base map.\n * @beta\n */\nexport class MapBaseColorTool extends Tool {\n public static override toolId = \"SetMapBaseColorTool\";\n public static override get minArgs() { return 3; }\n public static override get maxArgs() { return 3; }\n\n /** This method runs the tool, changing the color of the base map.\n * @param color the color for the base map\n */\n public override async run(color: ColorDef) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const curTransparency = vp.displayStyle.backgroundMapBase instanceof ColorDef ? vp.displayStyle.backgroundMapBase.getTransparency() : 0;\n vp.displayStyle.backgroundMapBase = color.withTransparency(curTransparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing a 0 to 255 red component, args[1] containing a 0 to 255 green component, and args[2] containing a 0 to 255 blue component.\n * These rgb values will be used to construct the `color` parameter passed to this tool's run method.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const red = parseFloat(args[0]), green = parseFloat(args[1]), blue = parseFloat(args[2]);\n\n return (isNaN(red) || red < 0 || red > 255 || isNaN(green) || green < 0 || green > 255 || isNaN(blue) || blue < 0 || blue > 255) ? false : this.run(ColorDef.from(red, green, blue));\n }\n}\n/** This tool changes the transparency of the base map.\n * @beta\n */\nexport class MapBaseTransparencyTool extends Tool {\n public static override toolId = \"SetMapBaseTransparencyTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the transparency of the base map.\n * @param transparency a numeric value in range 0.0 to 1.0 whether 0.0 means fully opaque and 1.0 means fully transparent\n */\n public override async run(transparency: number) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeBaseMapTransparency(transparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n\n return (isNaN(transparency) || transparency < 0 || transparency > 1) ? false : this.run(transparency);\n }\n}\n\n/** This tool changes the visibility of the base map.\n * @beta\n */\nexport class MapBaseVisibilityTool extends Tool {\n public static override toolId = \"SetMapBaseVisibilityTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the visibility of the base map.\n * @param visible a boolean which specifies whether or not to make the base map visible\n */\n public override async run(visible: boolean) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView() || vp.displayStyle.backgroundMapBase instanceof ColorDef)\n return false;\n\n vp.displayStyle.backgroundMapBase = vp.displayStyle.backgroundMapBase.clone({ visible });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `visible`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const visible = parseBoolean(args[0]);\n\n return (visible !== undefined ? this.run(visible) : false);\n }\n}\n"]}
|
|
@@ -49,6 +49,7 @@ class TileLoadTimer {
|
|
|
49
49
|
* @beta
|
|
50
50
|
*/
|
|
51
51
|
class MeasureTileLoadTimeTool extends core_frontend_1.Tool {
|
|
52
|
+
static { this.toolId = "MeasureTileLoadTime"; }
|
|
52
53
|
/** This method runs the tool, unloading all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready. It will then output the elapsed time to notifications manager.
|
|
53
54
|
* @param _args this parameter is unused
|
|
54
55
|
*/
|
|
@@ -60,5 +61,4 @@ class MeasureTileLoadTimeTool extends core_frontend_1.Tool {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
exports.MeasureTileLoadTimeTool = MeasureTileLoadTimeTool;
|
|
63
|
-
MeasureTileLoadTimeTool.toolId = "MeasureTileLoadTime";
|
|
64
64
|
//# sourceMappingURL=MeasureTileLoadTime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeasureTileLoadTime.js","sourceRoot":"","sources":["../../../src/tools/MeasureTileLoadTime.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,sDAAgD;AAChD,wDAA8G;AAE9G,MAAM,aAAa;IAKjB,YAAmB,EAAY;QAC7B,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAS,EAAE,CAAC;QAElC,mCAAmC;QACnC,yBAAS,CAAC,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAE1D,MAAM,cAAc,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtE,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE;YACnB,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;QAClB,CAAC,CAAC;QAEF,yBAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,oCAAoB,CAAC,qCAAqB,CAAC,IAAI,E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,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAErK,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,oBAAI;aACxB,WAAM,GAAG,qBAAqB,CAAC;IAEtD;;OAEG;IACa,KAAK,CAAC,GAAG,CAAC,KAAY;QACpC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,SAAS,KAAK,EAAE;YAClB,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IACd,CAAC;;AAZH,0DAaC","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\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { StopWatch } from \"@itwin/core-bentley\";\nimport { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, Viewport } from \"@itwin/core-frontend\";\n\nclass TileLoadTimer {\n private readonly _vp: Viewport;\n private readonly _stopwatch: StopWatch;\n private _cleanup?: () => void;\n\n public constructor(vp: Viewport) {\n this._vp = vp;\n this._stopwatch = new StopWatch();\n\n // Purge tile trees for all models.\n IModelApp.viewManager.refreshForModifiedModels(undefined);\n\n const removeOnRender = vp.onRender.addListener(() => this.onRender());\n const removeOnClose = vp.iModel.onClose.addOnce(() => this.cancel());\n this._cleanup = () => {\n removeOnRender();\n removeOnClose();\n };\n\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Tile loading timer started.\"));\n this._stopwatch.start();\n }\n\n private cancel(): void {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Tile loading timer canceled.\"));\n this.stop();\n }\n\n private stop(): void {\n if (undefined !== this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n }\n\n private onRender(): void {\n // ###TODO: May be intermediate frames during which children props have been asynchronously requested but no outstanding tile requests.\n if (!this._vp.areAllTileTreesLoaded || 0 < this._vp.numRequestedTiles)\n return;\n\n this._stopwatch.stop();\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Tiles loaded in ${this._stopwatch.elapsedSeconds.toFixed(4)} seconds.`));\n\n this.stop();\n }\n}\n\n/** Unloads all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready.\n * Outputs the elapsed time to notifications manager.\n * @beta\n */\nexport class MeasureTileLoadTimeTool extends Tool {\n public static override toolId = \"MeasureTileLoadTime\";\n\n /** This method runs the tool, unloading all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready. It will then output the elapsed time to notifications manager.\n * @param _args this parameter is unused\n */\n public override async run(_args: any[]): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined !== vp)\n new TileLoadTimer(vp);\n\n return true;\n }\n}\n"]}
|
|
@@ -30,6 +30,7 @@ function modelChangedString(name) {
|
|
|
30
30
|
* @beta
|
|
31
31
|
*/
|
|
32
32
|
class SetModelTransparencyTool extends core_frontend_1.Tool {
|
|
33
|
+
static { this.toolId = "SetModelTransparencyTool"; }
|
|
33
34
|
static get minArgs() { return 1; }
|
|
34
35
|
static get maxArgs() { return 2; }
|
|
35
36
|
async run(transparency, name) {
|
|
@@ -43,11 +44,11 @@ class SetModelTransparencyTool extends core_frontend_1.Tool {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
exports.SetModelTransparencyTool = SetModelTransparencyTool;
|
|
46
|
-
SetModelTransparencyTool.toolId = "SetModelTransparencyTool";
|
|
47
47
|
/** Set model appearance override for line weight in display style.
|
|
48
48
|
* @beta
|
|
49
49
|
*/
|
|
50
50
|
class SetModelLineWeightTool extends core_frontend_1.Tool {
|
|
51
|
+
static { this.toolId = "SetModelLineWeightTool"; }
|
|
51
52
|
static get minArgs() { return 1; }
|
|
52
53
|
static get maxArgs() { return 2; }
|
|
53
54
|
async run(weight, name) {
|
|
@@ -61,13 +62,14 @@ class SetModelLineWeightTool extends core_frontend_1.Tool {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
exports.SetModelLineWeightTool = SetModelLineWeightTool;
|
|
64
|
-
SetModelLineWeightTool.toolId = "SetModelLineWeightTool";
|
|
65
65
|
/** Set model appearance override for line code in display style.
|
|
66
66
|
* @beta
|
|
67
67
|
*/
|
|
68
68
|
class SetModelLineCodeTool extends core_frontend_1.Tool {
|
|
69
|
+
static { this.toolId = "SetModelLineCodeTool"; }
|
|
69
70
|
static get minArgs() { return 1; }
|
|
70
71
|
static get maxArgs() { return 2; }
|
|
72
|
+
static { this.linePixels = [core_common_1.LinePixels.Code0, core_common_1.LinePixels.Code1, core_common_1.LinePixels.Code2, core_common_1.LinePixels.Code3, core_common_1.LinePixels.Code4, core_common_1.LinePixels.Code5, core_common_1.LinePixels.Code6, core_common_1.LinePixels.Code7]; }
|
|
71
73
|
async run(lineCode, name) {
|
|
72
74
|
if (lineCode < 0 || lineCode >= SetModelLineCodeTool.linePixels.length)
|
|
73
75
|
return false;
|
|
@@ -81,12 +83,11 @@ class SetModelLineCodeTool extends core_frontend_1.Tool {
|
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
exports.SetModelLineCodeTool = SetModelLineCodeTool;
|
|
84
|
-
SetModelLineCodeTool.toolId = "SetModelLineCodeTool";
|
|
85
|
-
SetModelLineCodeTool.linePixels = [core_common_1.LinePixels.Code0, core_common_1.LinePixels.Code1, core_common_1.LinePixels.Code2, core_common_1.LinePixels.Code3, core_common_1.LinePixels.Code4, core_common_1.LinePixels.Code5, core_common_1.LinePixels.Code6, core_common_1.LinePixels.Code7];
|
|
86
86
|
/** Set model appearance override for nonLocatable in display style.
|
|
87
87
|
* @beta
|
|
88
88
|
*/
|
|
89
89
|
class SetModelLocateTool extends core_frontend_1.Tool {
|
|
90
|
+
static { this.toolId = "SetModelLocateTool"; }
|
|
90
91
|
static get minArgs() { return 1; }
|
|
91
92
|
static get maxArgs() { return 2; }
|
|
92
93
|
async run(locate, name) {
|
|
@@ -102,11 +103,11 @@ class SetModelLocateTool extends core_frontend_1.Tool {
|
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
exports.SetModelLocateTool = SetModelLocateTool;
|
|
105
|
-
SetModelLocateTool.toolId = "SetModelLocateTool";
|
|
106
106
|
/** Set model appearance override for emphasized in display style.
|
|
107
107
|
* @beta
|
|
108
108
|
*/
|
|
109
109
|
class SetModelEmphasizedTool extends core_frontend_1.Tool {
|
|
110
|
+
static { this.toolId = "SetModelEmphasizedTool"; }
|
|
110
111
|
static get minArgs() { return 1; }
|
|
111
112
|
static get maxArgs() { return 2; }
|
|
112
113
|
async run(emphasized, name) {
|
|
@@ -121,11 +122,11 @@ class SetModelEmphasizedTool extends core_frontend_1.Tool {
|
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
exports.SetModelEmphasizedTool = SetModelEmphasizedTool;
|
|
124
|
-
SetModelEmphasizedTool.toolId = "SetModelEmphasizedTool";
|
|
125
125
|
/** Set model appearance override for ignoreMaterials in display style.
|
|
126
126
|
* @beta
|
|
127
127
|
*/
|
|
128
128
|
class SetModelIgnoresMaterialsTool extends core_frontend_1.Tool {
|
|
129
|
+
static { this.toolId = "SetModelIgnoresMaterialsTool"; }
|
|
129
130
|
static get minArgs() { return 1; }
|
|
130
131
|
static get maxArgs() { return 2; }
|
|
131
132
|
async run(ignoresMaterial, name) {
|
|
@@ -140,11 +141,11 @@ class SetModelIgnoresMaterialsTool extends core_frontend_1.Tool {
|
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
exports.SetModelIgnoresMaterialsTool = SetModelIgnoresMaterialsTool;
|
|
143
|
-
SetModelIgnoresMaterialsTool.toolId = "SetModelIgnoresMaterialsTool";
|
|
144
144
|
/** Set model appearance override for color in display style.
|
|
145
145
|
* @beta
|
|
146
146
|
*/
|
|
147
147
|
class SetModelColorTool extends core_frontend_1.Tool {
|
|
148
|
+
static { this.toolId = "SetModelColorTool"; }
|
|
148
149
|
static get minArgs() { return 3; }
|
|
149
150
|
static get maxArgs() { return 4; }
|
|
150
151
|
async run(rgb, name) {
|
|
@@ -158,11 +159,11 @@ class SetModelColorTool extends core_frontend_1.Tool {
|
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
161
|
exports.SetModelColorTool = SetModelColorTool;
|
|
161
|
-
SetModelColorTool.toolId = "SetModelColorTool";
|
|
162
162
|
/** clear model appearance overrides in display style.
|
|
163
163
|
* @beta
|
|
164
164
|
*/
|
|
165
165
|
class ClearModelAppearanceOverrides extends core_frontend_1.Tool {
|
|
166
|
+
static { this.toolId = "ClearModelAppearanceOverrides"; }
|
|
166
167
|
static get minArgs() { return 0; }
|
|
167
168
|
static get maxArgs() { return 1; }
|
|
168
169
|
async run(name) {
|
|
@@ -180,5 +181,4 @@ class ClearModelAppearanceOverrides extends core_frontend_1.Tool {
|
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
exports.ClearModelAppearanceOverrides = ClearModelAppearanceOverrides;
|
|
183
|
-
ClearModelAppearanceOverrides.toolId = "ClearModelAppearanceOverrides";
|
|
184
184
|
//# sourceMappingURL=ModelAppearanceTools.js.map
|