@itwin/map-layers 4.0.0-dev.41 → 4.0.0-dev.47

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.
Files changed (193) hide show
  1. package/CHANGELOG.md +864 -864
  2. package/README.md +32 -32
  3. package/lib/cjs/MapLayerPreferences.d.ts +88 -88
  4. package/lib/cjs/MapLayerPreferences.js +311 -311
  5. package/lib/cjs/MapLayerPreferences.js.map +1 -1
  6. package/lib/cjs/map-layers.d.ts +6 -6
  7. package/lib/cjs/map-layers.js +22 -22
  8. package/lib/cjs/mapLayers.d.ts +26 -44
  9. package/lib/cjs/mapLayers.d.ts.map +1 -1
  10. package/lib/cjs/mapLayers.js +33 -61
  11. package/lib/cjs/mapLayers.js.map +1 -1
  12. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts +16 -11
  13. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  14. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +46 -51
  15. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  16. package/lib/cjs/ui/Interfaces.d.ts +50 -50
  17. package/lib/cjs/ui/Interfaces.js +2 -2
  18. package/lib/cjs/ui/Interfaces.js.map +1 -1
  19. package/lib/cjs/ui/MapFeatureInfoTool.d.ts +13 -13
  20. package/lib/cjs/ui/MapFeatureInfoTool.js +50 -50
  21. package/lib/cjs/ui/MapFeatureInfoTool.js.map +1 -1
  22. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +8 -8
  23. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  24. package/lib/cjs/ui/MapLayersUiItemsProvider.js +35 -38
  25. package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
  26. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts +13 -14
  27. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  28. package/lib/cjs/ui/widget/AttachLayerPopupButton.js +335 -335
  29. package/lib/cjs/ui/widget/BasemapPanel.d.ts +7 -8
  30. package/lib/cjs/ui/widget/BasemapPanel.d.ts.map +1 -1
  31. package/lib/cjs/ui/widget/BasemapPanel.js +156 -156
  32. package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
  33. package/lib/cjs/ui/widget/BasemapPanel.scss +87 -87
  34. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +20 -21
  35. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  36. package/lib/cjs/ui/widget/ConfirmMessageDialog.js +22 -22
  37. package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
  38. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
  39. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +138 -138
  40. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  41. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +6 -7
  42. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  43. package/lib/cjs/ui/widget/FeatureInfoWidget.js +65 -65
  44. package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
  45. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +18 -19
  46. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  47. package/lib/cjs/ui/widget/MapLayerDroppable.js +85 -85
  48. package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
  49. package/lib/cjs/ui/widget/MapLayerManager.d.ts +26 -26
  50. package/lib/cjs/ui/widget/MapLayerManager.js +401 -401
  51. package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
  52. package/lib/cjs/ui/widget/MapLayerManager.scss +409 -409
  53. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +11 -12
  54. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  55. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +82 -82
  56. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  57. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts +6 -7
  58. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  59. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +65 -65
  60. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  61. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  62. package/lib/cjs/ui/widget/MapLayersWidget.d.ts +10 -11
  63. package/lib/cjs/ui/widget/MapLayersWidget.d.ts.map +1 -1
  64. package/lib/cjs/ui/widget/MapLayersWidget.js +31 -31
  65. package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
  66. package/lib/cjs/ui/widget/MapManagerSettings.d.ts +2 -3
  67. package/lib/cjs/ui/widget/MapManagerSettings.d.ts.map +1 -1
  68. package/lib/cjs/ui/widget/MapManagerSettings.js +200 -200
  69. package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
  70. package/lib/cjs/ui/widget/MapManagerSettings.scss +29 -29
  71. package/lib/cjs/ui/widget/MapUrlDialog.d.ts +22 -23
  72. package/lib/cjs/ui/widget/MapUrlDialog.d.ts.map +1 -1
  73. package/lib/cjs/ui/widget/MapUrlDialog.js +530 -530
  74. package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
  75. package/lib/cjs/ui/widget/MapUrlDialog.scss +99 -100
  76. package/lib/cjs/ui/widget/SelectMapFormat.d.ts +17 -18
  77. package/lib/cjs/ui/widget/SelectMapFormat.d.ts.map +1 -1
  78. package/lib/cjs/ui/widget/SelectMapFormat.js +54 -54
  79. package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
  80. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +18 -20
  81. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  82. package/lib/cjs/ui/widget/SubLayersDataProvider.js +74 -75
  83. package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
  84. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +9 -10
  85. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  86. package/lib/cjs/ui/widget/SubLayersPopupButton.js +40 -40
  87. package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
  88. package/lib/cjs/ui/widget/SubLayersTree.d.ts +14 -15
  89. package/lib/cjs/ui/widget/SubLayersTree.d.ts.map +1 -1
  90. package/lib/cjs/ui/widget/SubLayersTree.js +413 -413
  91. package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
  92. package/lib/cjs/ui/widget/SubLayersTree.scss +69 -69
  93. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts +13 -14
  94. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  95. package/lib/cjs/ui/widget/TransparencyPopupButton.js +47 -47
  96. package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
  97. package/lib/cjs/ui/widget/TransparencyPopupButton.scss +35 -36
  98. package/lib/esm/MapLayerPreferences.d.ts +88 -88
  99. package/lib/esm/MapLayerPreferences.js +307 -307
  100. package/lib/esm/MapLayerPreferences.js.map +1 -1
  101. package/lib/esm/map-layers.d.ts +6 -6
  102. package/lib/esm/map-layers.js +10 -10
  103. package/lib/esm/mapLayers.d.ts +26 -44
  104. package/lib/esm/mapLayers.d.ts.map +1 -1
  105. package/lib/esm/mapLayers.js +29 -57
  106. package/lib/esm/mapLayers.js.map +1 -1
  107. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +16 -11
  108. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  109. package/lib/esm/ui/FeatureInfoUiItemsProvider.js +42 -47
  110. package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  111. package/lib/esm/ui/Interfaces.d.ts +50 -50
  112. package/lib/esm/ui/Interfaces.js +1 -1
  113. package/lib/esm/ui/Interfaces.js.map +1 -1
  114. package/lib/esm/ui/MapFeatureInfoTool.d.ts +13 -13
  115. package/lib/esm/ui/MapFeatureInfoTool.js +45 -45
  116. package/lib/esm/ui/MapFeatureInfoTool.js.map +1 -1
  117. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +8 -8
  118. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  119. package/lib/esm/ui/MapLayersUiItemsProvider.js +31 -34
  120. package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
  121. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts +13 -14
  122. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  123. package/lib/esm/ui/widget/AttachLayerPopupButton.js +331 -331
  124. package/lib/esm/ui/widget/BasemapPanel.d.ts +7 -8
  125. package/lib/esm/ui/widget/BasemapPanel.d.ts.map +1 -1
  126. package/lib/esm/ui/widget/BasemapPanel.js +152 -152
  127. package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
  128. package/lib/esm/ui/widget/BasemapPanel.scss +87 -87
  129. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +20 -21
  130. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  131. package/lib/esm/ui/widget/ConfirmMessageDialog.js +18 -18
  132. package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
  133. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
  134. package/lib/esm/ui/widget/FeatureInfoDataProvider.js +134 -134
  135. package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  136. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +6 -7
  137. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  138. package/lib/esm/ui/widget/FeatureInfoWidget.js +61 -61
  139. package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
  140. package/lib/esm/ui/widget/MapLayerDroppable.d.ts +18 -19
  141. package/lib/esm/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  142. package/lib/esm/ui/widget/MapLayerDroppable.js +81 -81
  143. package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
  144. package/lib/esm/ui/widget/MapLayerManager.d.ts +26 -26
  145. package/lib/esm/ui/widget/MapLayerManager.js +396 -396
  146. package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
  147. package/lib/esm/ui/widget/MapLayerManager.scss +409 -409
  148. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +11 -12
  149. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  150. package/lib/esm/ui/widget/MapLayerSettingsMenu.js +78 -78
  151. package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  152. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts +6 -7
  153. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  154. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +61 -61
  155. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  156. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  157. package/lib/esm/ui/widget/MapLayersWidget.d.ts +10 -11
  158. package/lib/esm/ui/widget/MapLayersWidget.d.ts.map +1 -1
  159. package/lib/esm/ui/widget/MapLayersWidget.js +27 -27
  160. package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
  161. package/lib/esm/ui/widget/MapManagerSettings.d.ts +2 -3
  162. package/lib/esm/ui/widget/MapManagerSettings.d.ts.map +1 -1
  163. package/lib/esm/ui/widget/MapManagerSettings.js +196 -196
  164. package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
  165. package/lib/esm/ui/widget/MapManagerSettings.scss +29 -29
  166. package/lib/esm/ui/widget/MapUrlDialog.d.ts +22 -23
  167. package/lib/esm/ui/widget/MapUrlDialog.d.ts.map +1 -1
  168. package/lib/esm/ui/widget/MapUrlDialog.js +526 -526
  169. package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
  170. package/lib/esm/ui/widget/MapUrlDialog.scss +99 -100
  171. package/lib/esm/ui/widget/SelectMapFormat.d.ts +17 -18
  172. package/lib/esm/ui/widget/SelectMapFormat.d.ts.map +1 -1
  173. package/lib/esm/ui/widget/SelectMapFormat.js +50 -50
  174. package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
  175. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +18 -20
  176. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  177. package/lib/esm/ui/widget/SubLayersDataProvider.js +70 -71
  178. package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
  179. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +9 -10
  180. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  181. package/lib/esm/ui/widget/SubLayersPopupButton.js +36 -36
  182. package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
  183. package/lib/esm/ui/widget/SubLayersTree.d.ts +14 -15
  184. package/lib/esm/ui/widget/SubLayersTree.d.ts.map +1 -1
  185. package/lib/esm/ui/widget/SubLayersTree.js +408 -408
  186. package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
  187. package/lib/esm/ui/widget/SubLayersTree.scss +69 -69
  188. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts +13 -14
  189. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  190. package/lib/esm/ui/widget/TransparencyPopupButton.js +43 -43
  191. package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
  192. package/lib/esm/ui/widget/TransparencyPopupButton.scss +35 -36
  193. package/package.json +31 -37
package/README.md CHANGED
@@ -1,32 +1,32 @@
1
- # MapLayers Extension/Package
2
-
3
- Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
4
-
5
- An iTwin.js Extension that adds a widget for attaching and updating map attachments in a view:
6
-
7
- This extension serves as an example of a extension that can be added to iTwin.js host applications.
8
- See <http://itwinjs.org> for comprehensive documentation on the iTwin.js API and the various constructs used in this sample.
9
-
10
- This package can also be installed into an application and the method MapLayersUI.initialized() called during the host IModelApps initialize processing.
11
-
12
- ## Development Setup
13
-
14
- 1. Select and prepare an iTwin.js host application. You can use the [ui-test-app] to host the extension, for example.
15
- 2. The dependencies are installed as part of "rush install" in the iTwin.js repository.
16
- 3. Build the extension as part of the "rush build" in the iTwin.js repository, or separately build using the npm build command.
17
-
18
- ```sh
19
- npm run build
20
- ```
21
-
22
- 4. Start the host application - go to its directory and run:
23
-
24
- ```sh
25
- npm run start:servers
26
- ```
27
-
28
- 5. Open a web browser (e.g., Chrome), and browse to http://localhost:3000.
29
-
30
- ## Contributing
31
-
32
- [Contributing to iTwin.js](https://github.com/iTwin/itwinjs-core/blob/master/CONTRIBUTING.md)
1
+ # MapLayers Extension/Package
2
+
3
+ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
4
+
5
+ An iTwin.js Extension that adds a widget for attaching and updating map attachments in a view:
6
+
7
+ This extension serves as an example of a extension that can be added to iTwin.js host applications.
8
+ See <http://itwinjs.org> for comprehensive documentation on the iTwin.js API and the various constructs used in this sample.
9
+
10
+ This package can also be installed into an application and the method MapLayersUI.initialized() called during the host IModelApps initialize processing.
11
+
12
+ ## Development Setup
13
+
14
+ 1. Select and prepare an iTwin.js host application. You can use the [ui-test-app] to host the extension, for example.
15
+ 2. The dependencies are installed as part of "rush install" in the iTwin.js repository.
16
+ 3. Build the extension as part of the "rush build" in the iTwin.js repository, or separately build using the npm build command.
17
+
18
+ ```sh
19
+ npm run build
20
+ ```
21
+
22
+ 4. Start the host application - go to its directory and run:
23
+
24
+ ```sh
25
+ npm run start:servers
26
+ ```
27
+
28
+ 5. Open a web browser (e.g., Chrome), and browse to http://localhost:3000.
29
+
30
+ ## Contributing
31
+
32
+ [Contributing to iTwin.js](https://github.com/iTwin/itwinjs-core/blob/master/CONTRIBUTING.md)
@@ -1,89 +1,89 @@
1
- import { MapLayerSource } from "@itwin/core-frontend";
2
- import { BeEvent, GuidString } from "@itwin/core-bentley";
3
- /** @internal */
4
- export interface MapLayerPreferencesContent {
5
- url: string;
6
- name: string;
7
- formatId: string;
8
- transparentBackground: boolean | undefined;
9
- }
10
- /** @internal */
11
- export declare enum MapLayerSourceChangeType {
12
- Added = 0,
13
- Removed = 1,
14
- Replaced = 2
15
- }
16
- /** @internal */
17
- export interface MapLayerSourceArg {
18
- readonly source: MapLayerSource;
19
- readonly iTwinId: GuidString;
20
- readonly iModelId: GuidString;
21
- }
22
- /** A wrapper around user preferences to provide a way to store [[MapLayerSettings]].
23
- *
24
- * Note: This is currently internal only and used directly by the MapLayersExtension. It makes use of the IModelApp.authorizationClient if it exists.
25
- *
26
- * @internal
27
- */
28
- export declare class MapLayerPreferences {
29
- /** Event raised whenever a source is added, replaced or removed:
30
- * changeType : Type of changed occurred.
31
- * oldSource : Source that was removed or replaced.
32
- * newSource : Source that was added or replacement of oldSource.
33
- *
34
- * @see [[MapLayerSourceChangeType]]
35
- */
36
- static readonly onLayerSourceChanged: BeEvent<(changeType: MapLayerSourceChangeType, oldSource?: MapLayerSource | undefined, newSource?: MapLayerSource | undefined) => void>;
37
- /** Store the Map Layer source preference. If the same setting exists at a higher level, an error will be thrown and the setting will not be updated.
38
- *
39
- * Returns false if the settings object would override some other settings object in a larger scope i.e. storing settings on model when
40
- * a project setting exists with same name or map layer url.
41
- * @param source source to be stored on the setting service
42
- * @param storeOnIModel if true store the settings object on the model, if false store it on the project
43
- */
44
- static storeSource(source: MapLayerSource, iTwinId: GuidString, iModelId?: GuidString, storeOnIModel?: boolean): Promise<boolean>;
45
- /** Replace the old map layer source with a new map layer source.
46
- *
47
- * The source is replaced at the same level that the original source is defined. (i.e. if the old source is defined at a project level, the new source will also be defined there.)
48
- *
49
- * @param oldSource
50
- * @param newSource
51
- * @param iTwinId
52
- * @param iModelId
53
- */
54
- static replaceSource(oldSource: MapLayerSource, newSource: MapLayerSource, iTwinId: GuidString, iModelId?: GuidString): Promise<void>;
55
- /** Deletes the provided MapLayerSource by name from both the iTwin or iModel level.
56
- *
57
- * @param source The source to delete. The name is used to identify the source.
58
- * @param iTwinId
59
- * @param iModelId
60
- */
61
- static deleteByName(source: MapLayerSource, iTwinId: GuidString, iModelId?: GuidString): Promise<void>;
62
- /** Deletes the current setting with the provided key if it is defined at the same preference level.
63
- *
64
- * If the preference is defined within a different level, false will be returned indicating the setting should not be overriden.
65
- *
66
- * The two potential preference levels are iTwin and iModel.
67
- *
68
- * @param url
69
- * @param name
70
- * @param iTwinId
71
- * @param iModelId
72
- * @param storeOnIModel
73
- */
74
- private static delete;
75
- /** Attempts to get a map layer based off a specific url.
76
- * @param url
77
- * @param iTwinId
78
- * @param iModelId
79
- */
80
- static getByUrl(url: string, iTwinId: string, iModelId?: string): Promise<MapLayerPreferencesContent | undefined>;
81
- /** Get all MapLayerSources from the user's preferences, iTwin setting and iModel settings.
82
- * @param iTwinId id of the iTwin
83
- * @param iModelId id of the iModel
84
- * @throws if any of the calls to grab settings fail.
85
- */
86
- static getSources(iTwinId: GuidString, iModelId?: GuidString): Promise<MapLayerSource[]>;
87
- private static get _preferenceNamespace();
88
- }
1
+ import { MapLayerSource } from "@itwin/core-frontend";
2
+ import { BeEvent, GuidString } from "@itwin/core-bentley";
3
+ /** @internal */
4
+ export interface MapLayerPreferencesContent {
5
+ url: string;
6
+ name: string;
7
+ formatId: string;
8
+ transparentBackground: boolean | undefined;
9
+ }
10
+ /** @internal */
11
+ export declare enum MapLayerSourceChangeType {
12
+ Added = 0,
13
+ Removed = 1,
14
+ Replaced = 2
15
+ }
16
+ /** @internal */
17
+ export interface MapLayerSourceArg {
18
+ readonly source: MapLayerSource;
19
+ readonly iTwinId: GuidString;
20
+ readonly iModelId: GuidString;
21
+ }
22
+ /** A wrapper around user preferences to provide a way to store [[MapLayerSettings]].
23
+ *
24
+ * Note: This is currently internal only and used directly by the MapLayersExtension. It makes use of the IModelApp.authorizationClient if it exists.
25
+ *
26
+ * @internal
27
+ */
28
+ export declare class MapLayerPreferences {
29
+ /** Event raised whenever a source is added, replaced or removed:
30
+ * changeType : Type of changed occurred.
31
+ * oldSource : Source that was removed or replaced.
32
+ * newSource : Source that was added or replacement of oldSource.
33
+ *
34
+ * @see [[MapLayerSourceChangeType]]
35
+ */
36
+ static readonly onLayerSourceChanged: BeEvent<(changeType: MapLayerSourceChangeType, oldSource?: MapLayerSource | undefined, newSource?: MapLayerSource | undefined) => void>;
37
+ /** Store the Map Layer source preference. If the same setting exists at a higher level, an error will be thrown and the setting will not be updated.
38
+ *
39
+ * Returns false if the settings object would override some other settings object in a larger scope i.e. storing settings on model when
40
+ * a project setting exists with same name or map layer url.
41
+ * @param source source to be stored on the setting service
42
+ * @param storeOnIModel if true store the settings object on the model, if false store it on the project
43
+ */
44
+ static storeSource(source: MapLayerSource, iTwinId: GuidString, iModelId?: GuidString, storeOnIModel?: boolean): Promise<boolean>;
45
+ /** Replace the old map layer source with a new map layer source.
46
+ *
47
+ * The source is replaced at the same level that the original source is defined. (i.e. if the old source is defined at a project level, the new source will also be defined there.)
48
+ *
49
+ * @param oldSource
50
+ * @param newSource
51
+ * @param iTwinId
52
+ * @param iModelId
53
+ */
54
+ static replaceSource(oldSource: MapLayerSource, newSource: MapLayerSource, iTwinId: GuidString, iModelId?: GuidString): Promise<void>;
55
+ /** Deletes the provided MapLayerSource by name from both the iTwin or iModel level.
56
+ *
57
+ * @param source The source to delete. The name is used to identify the source.
58
+ * @param iTwinId
59
+ * @param iModelId
60
+ */
61
+ static deleteByName(source: MapLayerSource, iTwinId: GuidString, iModelId?: GuidString): Promise<void>;
62
+ /** Deletes the current setting with the provided key if it is defined at the same preference level.
63
+ *
64
+ * If the preference is defined within a different level, false will be returned indicating the setting should not be overriden.
65
+ *
66
+ * The two potential preference levels are iTwin and iModel.
67
+ *
68
+ * @param url
69
+ * @param name
70
+ * @param iTwinId
71
+ * @param iModelId
72
+ * @param storeOnIModel
73
+ */
74
+ private static delete;
75
+ /** Attempts to get a map layer based off a specific url.
76
+ * @param url
77
+ * @param iTwinId
78
+ * @param iModelId
79
+ */
80
+ static getByUrl(url: string, iTwinId: string, iModelId?: string): Promise<MapLayerPreferencesContent | undefined>;
81
+ /** Get all MapLayerSources from the user's preferences, iTwin setting and iModel settings.
82
+ * @param iTwinId id of the iTwin
83
+ * @param iModelId id of the iModel
84
+ * @throws if any of the calls to grab settings fail.
85
+ */
86
+ static getSources(iTwinId: GuidString, iModelId?: GuidString): Promise<MapLayerSource[]>;
87
+ private static get _preferenceNamespace();
88
+ }
89
89
  //# sourceMappingURL=MapLayerPreferences.d.ts.map