@itwin/core-common 3.1.0-dev.7 → 3.2.0-dev.1

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 (72) hide show
  1. package/CHANGELOG.md +82 -17
  2. package/lib/cjs/Fonts.d.ts +16 -5
  3. package/lib/cjs/Fonts.d.ts.map +1 -1
  4. package/lib/cjs/Fonts.js +6 -2
  5. package/lib/cjs/Fonts.js.map +1 -1
  6. package/lib/cjs/MapImagerySettings.d.ts +2 -0
  7. package/lib/cjs/MapImagerySettings.d.ts.map +1 -1
  8. package/lib/cjs/MapImagerySettings.js.map +1 -1
  9. package/lib/cjs/MapLayerSettings.d.ts +120 -37
  10. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  11. package/lib/cjs/MapLayerSettings.js +156 -86
  12. package/lib/cjs/MapLayerSettings.js.map +1 -1
  13. package/lib/cjs/SpatialClassification.d.ts +5 -0
  14. package/lib/cjs/SpatialClassification.d.ts.map +1 -1
  15. package/lib/cjs/SpatialClassification.js +7 -0
  16. package/lib/cjs/SpatialClassification.js.map +1 -1
  17. package/lib/cjs/geometry/TextString.d.ts +5 -4
  18. package/lib/cjs/geometry/TextString.d.ts.map +1 -1
  19. package/lib/cjs/geometry/TextString.js.map +1 -1
  20. package/lib/cjs/ipc/IpcWebSocket.d.ts +0 -1
  21. package/lib/cjs/ipc/IpcWebSocket.d.ts.map +1 -1
  22. package/lib/cjs/ipc/IpcWebSocket.js +4 -13
  23. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  24. package/lib/cjs/ipc/IpcWebSocketTransport.d.ts +2 -1
  25. package/lib/cjs/ipc/IpcWebSocketTransport.d.ts.map +1 -1
  26. package/lib/cjs/ipc/IpcWebSocketTransport.js +24 -15
  27. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  28. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -0
  29. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  30. package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -0
  31. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  32. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -1
  33. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  34. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  35. package/lib/cjs/tile/IModelTileIO.js +2 -2
  36. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  37. package/lib/esm/Fonts.d.ts +16 -5
  38. package/lib/esm/Fonts.d.ts.map +1 -1
  39. package/lib/esm/Fonts.js +6 -2
  40. package/lib/esm/Fonts.js.map +1 -1
  41. package/lib/esm/MapImagerySettings.d.ts +2 -0
  42. package/lib/esm/MapImagerySettings.d.ts.map +1 -1
  43. package/lib/esm/MapImagerySettings.js.map +1 -1
  44. package/lib/esm/MapLayerSettings.d.ts +120 -37
  45. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  46. package/lib/esm/MapLayerSettings.js +152 -84
  47. package/lib/esm/MapLayerSettings.js.map +1 -1
  48. package/lib/esm/SpatialClassification.d.ts +5 -0
  49. package/lib/esm/SpatialClassification.d.ts.map +1 -1
  50. package/lib/esm/SpatialClassification.js +7 -0
  51. package/lib/esm/SpatialClassification.js.map +1 -1
  52. package/lib/esm/geometry/TextString.d.ts +5 -4
  53. package/lib/esm/geometry/TextString.d.ts.map +1 -1
  54. package/lib/esm/geometry/TextString.js.map +1 -1
  55. package/lib/esm/ipc/IpcWebSocket.d.ts +0 -1
  56. package/lib/esm/ipc/IpcWebSocket.d.ts.map +1 -1
  57. package/lib/esm/ipc/IpcWebSocket.js +4 -13
  58. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  59. package/lib/esm/ipc/IpcWebSocketTransport.d.ts +2 -1
  60. package/lib/esm/ipc/IpcWebSocketTransport.d.ts.map +1 -1
  61. package/lib/esm/ipc/IpcWebSocketTransport.js +24 -15
  62. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  63. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -0
  64. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  65. package/lib/esm/rpc/IModelReadRpcInterface.js +1 -0
  66. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  67. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -1
  68. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  69. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  70. package/lib/esm/tile/IModelTileIO.js +2 -2
  71. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  72. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,6 +1,71 @@
1
1
  # Change Log - @itwin/core-common
2
2
 
3
- This log was last generated on Wed, 12 Jan 2022 14:52:38 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 24 Feb 2022 15:26:55 GMT and should not be manually modified.
4
+
5
+ ## 3.0.1
6
+ Thu, 24 Feb 2022 15:26:55 GMT
7
+
8
+ ### Updates
9
+
10
+ - Migrated from deprecated MapBox api.
11
+
12
+ ## 3.0.0
13
+ Mon, 24 Jan 2022 14:00:52 GMT
14
+
15
+ ### Updates
16
+
17
+ - Add support for producing larger tiles.
18
+ - The Cartographic creation API now takes an interface as an argument with named properties. This will avoid callers mixing up the order of longitude, latitude, and height.
19
+ - improve concurrent query changes
20
+ - Upgrade target to ES2019 and deliver both a CommonJs and ESModule version of package
21
+ - Added additional documentation for ecefLocation iniModel
22
+ - Add support for indexed edges in tile graphics.
23
+ - Added non-existent property to EntityProps to make the compiler discriminate between EntityProps and Entity.
24
+ - Add compare method to ThematicGradientSettings. Fix Gradient.Symb.compareSymb method to also compare thematicSettings.
25
+ - Clean up SkyBox and GroundPlane APIs.
26
+ - improve getMetaData() and provide extended error codes
27
+ - Added support to LightSettings for Fresnel effect.
28
+ - Add new GeoServices class and first method to interpret WKT or complete GCS JSON."
29
+ - GeoCoordStatus documentation added
30
+ - getAccessToken always returns a token
31
+ - Fix frustum translate method.
32
+ - Make ViewFlags immutable. Simplify ViewFlagOverrides.
33
+ - Added LOCAL_ELLIPSOID vertical datum identifier.
34
+ - Added ability to convert iModel coordinates to or from any Geographic CRS
35
+ - rename contextId -> iTwinId
36
+ - MapLayerSettings.fromJSON, BaseLayerSettings.fromJSON and MapSubLayerSettings.fromJSON no longer return undefined.
37
+ - Fix problem with RealityDataSourceKey string convertion
38
+ - Promote RealityDataSource and RealityDataSourceKey API to beta and update documentation
39
+ - Removed internal tag from EGFBAccessors
40
+ - Moved RealityDataAccessProps from core-frontend to core-common
41
+ - FeatureOverrides now merge by default in case of conflicts.
42
+ - rename to @itwin/core-common
43
+ - Fix an import which would cause consumers of core-common to fail during build
44
+ - move js-base64 from devDeps to deps
45
+ - Improve conformance with the glTF 2.0 spec when reading glb chunks.
46
+ - remove ClientRequestContext and its subclasses
47
+ - Added AuthorizationClient
48
+ - Add support for inverting planar clip mask (inside vs outside)
49
+ - Remove deprecated APIs for 3.0.
50
+ - Generalize the way to attach a reality data by adding a RealityDataSourceKey to ContextRealityModelProps
51
+ - Enhance RealityDataSource class
52
+ - Replace usage of I18N with generic Localization interface.
53
+ - GeometryContainmentRequestProps.clip and SnapRequestProps.viewFlags use stricter type than `any`.
54
+ - removed deprecated apis
55
+ - Move map imagery provider from BackgroundMapSettings to MapImagerySettings.backgroundBase.
56
+ - remove IModelWriteRpcInterface
57
+ - Rename AnalysisStyleScalar to AnalysisStyleThematic
58
+ - Rename AnalysisStyleScalar to AnalysisStyleThematic.
59
+ - remove ClientRequestContext.current
60
+ - rework locks
61
+ - Fix for IModel._ecefTrans not being updated when setting IModel._ecefLocation.
62
+ - Deprecate RenderTexture.Params
63
+ - Renamed an iModel's parent container to iTwin
64
+ - Support Open City Planner (OCP) that stores orbit point clouds (OPC) in their own azure environment.
65
+ - FeatureAppearance transparency override by default ignores render mode and transparency view flag.
66
+ - Adding WebEditServer (test scenarios only for now)
67
+ - Concurrency fix within web IPC transport system.
68
+ - Add ViewFlags.wiremesh to control wiremesh display.
4
69
 
5
70
  ## 2.19.28
6
71
  Wed, 12 Jan 2022 14:52:38 GMT
@@ -193,8 +258,8 @@ Fri, 09 Jul 2021 18:11:24 GMT
193
258
 
194
259
  ### Updates
195
260
 
196
- - Accomodated the inability to reverse Changesets when creating change summaries.
197
- - Use ecef location calculated for projected models.
261
+ - Accomodated the inability to reverse Changesets when creating change summaries.
262
+ - Use ecef location calculated for projected models.
198
263
  - Clean up and promote AnalysisStyle APIs.
199
264
  - Added support for section clip to ElementGraphicsRequestProps.
200
265
  - Add internal API for reconstructing TileOptions from tree and content Ids.
@@ -460,7 +525,7 @@ Thu, 28 Jan 2021 13:39:27 GMT
460
525
  ### Updates
461
526
 
462
527
  - Fix brep DataProps to/from flatbuffer to account for base64 string header.
463
- - Element geometry creation by brep operations.
528
+ - Element geometry creation by brep operations.
464
529
  - add EditCommand
465
530
  - Improve ElementGeometry documentation.
466
531
  - Remove assertion in supplyPathForOperation when defaulting changeSetId.
@@ -616,8 +681,8 @@ Fri, 02 Oct 2020 18:03:32 GMT
616
681
 
617
682
  - Add documentation for ContextRealityModelProps.
618
683
  - Fix calculation of cartographic range.
619
- - Fixes to front end methods to pull, merge and push.
620
- - Fixed desktop authorization after recent changes.
684
+ - Fixes to front end methods to pull, merge and push.
685
+ - Fixed desktop authorization after recent changes.
621
686
  - Update Tile version due to changes to indexes for tesselated polylines
622
687
  - On iOS download in background
623
688
  - Introduce NoContentError (transmitted via 204)
@@ -749,7 +814,7 @@ Fri, 10 Jul 2020 17:23:14 GMT
749
814
  - Add ability to create selective overrides from display style settings, and apply the overrides to another settings.
750
815
  - Fix orientation of Ecef.createFromCartographicOrigin
751
816
  - Add non-locatable flag to TerrainSettings.
752
- - Setup BriefcaseDb.open() to allow profile and domain schema validation and upgrades.
817
+ - Setup BriefcaseDb.open() to allow profile and domain schema validation and upgrades.
753
818
  - Support for multiple RPC interface clients and attaching interfaces after startup.
754
819
  - Add function to convert solar angles to solar direction.
755
820
  - enforce max texture size for stepped gradients.
@@ -783,7 +848,7 @@ Thu, 28 May 2020 22:48:59 GMT
783
848
  ### Updates
784
849
 
785
850
  - Improved log message written on rpc error
786
- - Change default origin mode for terrain to Geodetic.
851
+ - Change default origin mode for terrain to Geodetic.
787
852
  - Fix transforms for creating and querying part instance geometry in world coordinate.
788
853
  - channel rules
789
854
  - Optimize thematic sensor display by culling sensors based on a distanceCutoff property on ThematicDisplaySensorSettings.
@@ -798,7 +863,7 @@ Wed, 06 May 2020 13:17:49 GMT
798
863
  - Show min/max window error for mouse wheel zoom.
799
864
  - Make animation state of a display style persistent.
800
865
  - Send a default pending message since Azure strips content-type header if no data is present
801
- - Monitor progress of downloading briefcases, ability to cancel download of briefcases.
866
+ - Monitor progress of downloading briefcases, ability to cancel download of briefcases.
802
867
  - Added to DisplayStyle3dSettings: MonochromeMode, LightSettings.
803
868
  - Simplify GeometryStreamIteratorEntry (breaking API change).
804
869
  - constructor of ColorDef wasn't setting transparency properly for rgba() strings
@@ -821,11 +886,11 @@ Wed, 06 May 2020 13:17:49 GMT
821
886
  - Added file size.
822
887
  - Supply RPC routing props for SnapshotIModelRpcInterface open methods"
823
888
  - MobileRpcConfiguration throws exception
824
- - Added NativeApp.deleteBriefcase, avoided authorization exceptions when offline.
825
- - Refactored NativeApp API and RPC interfaces. This continues to be WIP.
826
- - Added DownloadBriefcaseOptions and OpenBriefcaseOptions as parameters to the download/open calls for a briefcase.
889
+ - Added NativeApp.deleteBriefcase, avoided authorization exceptions when offline.
890
+ - Refactored NativeApp API and RPC interfaces. This continues to be WIP.
891
+ - Added DownloadBriefcaseOptions and OpenBriefcaseOptions as parameters to the download/open calls for a briefcase.
827
892
  - Added new interface for native app
828
- - VSTS#217447, 162382: Cleanups to implementation of downloading/opening/discovering briefcases in native applications (WIP).
893
+ - VSTS#217447, 162382: Cleanups to implementation of downloading/opening/discovering briefcases in native applications (WIP).
829
894
  - Handle null JSON in ViewDetails.
830
895
  - Renamed OIDC constructs for consistency; Removed SAML support.
831
896
  - OrbitGT point cloud interface.
@@ -875,7 +940,7 @@ Wed, 12 Feb 2020 17:45:50 GMT
875
940
  - iModel write API development
876
941
  - Fix issue with constructing the tile cache URL() on Safari.
877
942
  - Prevent reuse of cached tiles after project extents change.
878
- - VSTS#256133: Fixed issue with reopening connections if the backend crashes. Fixes to integration tests.
943
+ - VSTS#256133: Fixed issue with reopening connections if the backend crashes. Fixes to integration tests.
879
944
  - Define ViewDetails for manipulating optional detail settings of ViewDefinition and ViewState.
880
945
  - Add support for plan projection models with 3d display priority.
881
946
  - Add settings to control display of plan projection models.
@@ -1037,7 +1102,7 @@ Mon, 13 May 2019 15:52:05 GMT
1037
1102
 
1038
1103
  ### Updates
1039
1104
 
1040
- - Support spatial classification of context reality models.
1105
+ - Support spatial classification of context reality models.
1041
1106
  - Added OpenAPIInfo to the barrel file
1042
1107
  - Adds parameter for api-extractor to validate missing release tags
1043
1108
  - Adds ignoreMissingTags flag
@@ -1050,14 +1115,14 @@ Mon, 13 May 2019 15:52:05 GMT
1050
1115
  - LoggerCategory -> CommonLoggerCategory
1051
1116
  - Fix default line pattern for hidden edges.
1052
1117
  - Introduce LoggerCategory enum to advertise logger categories used by this package.
1053
- - Logging fixes.
1118
+ - Logging fixes.
1054
1119
  - Put sourcemap in npm package.
1055
1120
  - Add SVG to ImageSourceFormat
1056
1121
  - Add imodeljs-markup
1057
1122
  - New tile cache naming scheme.
1058
1123
  - queryPage use memoization/pending pattern
1059
1124
  - Remove StandaloneIModelRpcInterface
1060
- - Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
1125
+ - Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
1061
1126
  - Prefer the IModelToken values in the url (if different from values in JSON body -- should never happen except in a malicious request).
1062
1127
  - Exports interface MarshalingBinaryMarker to prevent errors in api-extractor V7
1063
1128
  - Add SnapshotIModelRpcInterface
@@ -9,12 +9,19 @@ export declare enum FontType {
9
9
  Rsc = 2,
10
10
  Shx = 3
11
11
  }
12
- /** The properties of a Font. This includes a iModel local id, the font type, and the font name.
12
+ /** An iModel-local identifier for a font.
13
+ * @public
14
+ */
15
+ export declare type FontId = number;
16
+ /** The properties of a Font.
13
17
  * @public
14
18
  */
15
19
  export interface FontProps {
16
- id: number;
20
+ /** the Id, within an iModel, of this font. */
21
+ id: FontId;
22
+ /** The type of font */
17
23
  type: FontType;
24
+ /** The name of the font. */
18
25
  name: string;
19
26
  }
20
27
  /** The properties of a FontMap
@@ -23,8 +30,12 @@ export interface FontProps {
23
30
  export interface FontMapProps {
24
31
  fonts: FontProps[];
25
32
  }
26
- /** A FontMap holds the table of known fonts available in an iModel.
27
- * A font is referenced by an "id" that is local to the iModel. This table maps those local ids to a FontProps.
33
+ /**
34
+ * A FontMap holds the set of font names available in an iModel.
35
+ * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.
36
+ * This class maps FontIds to FontProps.
37
+ * @note The font map is generally established when the iModel is first created to specify the set of fonts available
38
+ * for editors. Adding new entries requires that the schema lock be held.
28
39
  * @public
29
40
  */
30
41
  export declare class FontMap {
@@ -33,6 +44,6 @@ export declare class FontMap {
33
44
  addFonts(fonts: FontProps[]): void;
34
45
  toJSON(): FontMapProps;
35
46
  /** look up a font by name or number and return its FontProps */
36
- getFont(arg: string | number): FontProps | undefined;
47
+ getFont(arg: string | FontId): FontProps | undefined;
37
48
  }
38
49
  //# sourceMappingURL=Fonts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fonts.d.ts","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,QAAQ;IAAG,QAAQ,IAAI;IAAE,GAAG,IAAI;IAAE,GAAG,IAAI;CAAE;AAEvD;;GAEG;AACH,MAAM,WAAW,SAAS;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAEvE;;GAEG;AACH,MAAM,WAAW,YAAY;IAAG,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE;AAEpD;;;GAGG;AACH,qBAAa,OAAO;IAClB,SAAgB,KAAK,yBAAgC;gBACzC,KAAK,CAAC,EAAE,YAAY;IAIzB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE;IAG3B,MAAM,IAAI,YAAY;IAK7B,gEAAgE;IACzD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS;CAM5D"}
1
+ {"version":3,"file":"Fonts.d.ts","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,oBAAY,QAAQ;IAAG,QAAQ,IAAI;IAAE,GAAG,IAAI;IAAE,GAAG,IAAI;CAAE;AAEvD;;GAEG;AACH,oBAAY,MAAM,GAAG,MAAM,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,IAAI,EAAE,QAAQ,CAAC;IACf,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAAG,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE;AAEpD;;;;;;;GAOG;AACH,qBAAa,OAAO;IAClB,SAAgB,KAAK,yBAAgC;gBACzC,KAAK,CAAC,EAAE,YAAY;IAIzB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE;IAG3B,MAAM,IAAI,YAAY;IAK7B,gEAAgE;IACzD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS;CAM5D"}
package/lib/cjs/Fonts.js CHANGED
@@ -17,8 +17,12 @@ var FontType;
17
17
  FontType[FontType["Rsc"] = 2] = "Rsc";
18
18
  FontType[FontType["Shx"] = 3] = "Shx";
19
19
  })(FontType = exports.FontType || (exports.FontType = {}));
20
- /** A FontMap holds the table of known fonts available in an iModel.
21
- * A font is referenced by an "id" that is local to the iModel. This table maps those local ids to a FontProps.
20
+ /**
21
+ * A FontMap holds the set of font names available in an iModel.
22
+ * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.
23
+ * This class maps FontIds to FontProps.
24
+ * @note The font map is generally established when the iModel is first created to specify the set of fonts available
25
+ * for editors. Adding new entries requires that the schema lock be held.
22
26
  * @public
23
27
  */
24
28
  class FontMap {
@@ -1 +1 @@
1
- {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,QAA2C;AAAvD,WAAY,QAAQ;IAAG,+CAAY,CAAA;IAAE,qCAAO,CAAA;IAAE,qCAAO,CAAA;AAAC,CAAC,EAA3C,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAAmC;AAYvD;;;GAGG;AACH,MAAa,OAAO;IAElB,YAAY,KAAoB;QADhB,UAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEnD,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,gEAAgE;IACzD,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG;gBAAE,OAAO,IAAI,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArBD,0BAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\n/** The type of a font.\r\n * @public\r\n */\r\nexport enum FontType { TrueType = 1, Rsc = 2, Shx = 3 }\r\n\r\n/** The properties of a Font. This includes a iModel local id, the font type, and the font name.\r\n * @public\r\n */\r\nexport interface FontProps { id: number, type: FontType, name: string }\r\n\r\n/** The properties of a FontMap\r\n * @public\r\n */\r\nexport interface FontMapProps { fonts: FontProps[] }\r\n\r\n/** A FontMap holds the table of known fonts available in an iModel.\r\n * A font is referenced by an \"id\" that is local to the iModel. This table maps those local ids to a FontProps.\r\n * @public\r\n */\r\nexport class FontMap {\r\n public readonly fonts = new Map<number, FontProps>();\r\n constructor(props?: FontMapProps) {\r\n if (undefined !== props)\r\n this.addFonts(props.fonts);\r\n }\r\n public addFonts(fonts: FontProps[]) {\r\n fonts.forEach((font) => this.fonts.set(font.id, font));\r\n }\r\n public toJSON(): FontMapProps {\r\n const fonts: FontProps[] = [];\r\n this.fonts.forEach((font) => fonts.push(font));\r\n return { fonts };\r\n }\r\n /** look up a font by name or number and return its FontProps */\r\n public getFont(arg: string | number): FontProps | undefined {\r\n if (typeof arg === \"number\") return this.fonts.get(arg);\r\n for (const font of this.fonts.values())\r\n if (font.name === arg) return font;\r\n return undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,QAA2C;AAAvD,WAAY,QAAQ;IAAG,+CAAY,CAAA;IAAE,qCAAO,CAAA;IAAE,qCAAO,CAAA;AAAC,CAAC,EAA3C,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAAmC;AAwBvD;;;;;;;GAOG;AACH,MAAa,OAAO;IAElB,YAAY,KAAoB;QADhB,UAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEnD,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,gEAAgE;IACzD,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG;gBAAE,OAAO,IAAI,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArBD,0BAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\n/** The type of a font.\r\n * @public\r\n */\r\nexport enum FontType { TrueType = 1, Rsc = 2, Shx = 3 }\r\n\r\n/** An iModel-local identifier for a font.\r\n * @public\r\n */\r\nexport type FontId = number;\r\n\r\n/** The properties of a Font.\r\n * @public\r\n */\r\nexport interface FontProps {\r\n /** the Id, within an iModel, of this font. */\r\n id: FontId;\r\n /** The type of font */\r\n type: FontType;\r\n /** The name of the font. */\r\n name: string;\r\n}\r\n\r\n/** The properties of a FontMap\r\n * @public\r\n */\r\nexport interface FontMapProps { fonts: FontProps[] }\r\n\r\n/**\r\n * A FontMap holds the set of font names available in an iModel.\r\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\r\n * This class maps FontIds to FontProps.\r\n * @note The font map is generally established when the iModel is first created to specify the set of fonts available\r\n * for editors. Adding new entries requires that the schema lock be held.\r\n * @public\r\n */\r\nexport class FontMap {\r\n public readonly fonts = new Map<FontId, FontProps>();\r\n constructor(props?: FontMapProps) {\r\n if (undefined !== props)\r\n this.addFonts(props.fonts);\r\n }\r\n public addFonts(fonts: FontProps[]) {\r\n fonts.forEach((font) => this.fonts.set(font.id, font));\r\n }\r\n public toJSON(): FontMapProps {\r\n const fonts: FontProps[] = [];\r\n this.fonts.forEach((font) => fonts.push(font));\r\n return { fonts };\r\n }\r\n /** look up a font by name or number and return its FontProps */\r\n public getFont(arg: string | FontId): FontProps | undefined {\r\n if (typeof arg === \"number\") return this.fonts.get(arg);\r\n for (const font of this.fonts.values())\r\n if (font.name === arg) return font;\r\n return undefined;\r\n }\r\n}\r\n"]}
@@ -13,6 +13,8 @@ export declare type BaseLayerProps = BaseMapLayerProps | ColorDefProps;
13
13
  * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.
14
14
  * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as
15
15
  * the settings are compatible.
16
+ * The non-base map layers may represent image layers generated by tile servers or model layers that are generated by 2d projection of model geomety, typically from a model
17
+ * that is generated from two dimensional GIS data.
16
18
  * @beta
17
19
  */
18
20
  export interface MapImageryProps {
@@ -1 +1 @@
1
- {"version":3,"file":"MapImagerySettings.d.ts","sourceRoot":"","sources":["../../src/MapImagerySettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE9G;;GAEG;AACH,oBAAY,cAAc,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,oBAAY,iBAAiB,GAAG,oBAAoB,GAAG,QAAQ,CAAC;AAEhE,YAAY;AAEZ,yBAAiB,iBAAiB,CAAC;IACjC,wDAAwD;IACxD,SAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAEjE;CACF;AAED;;;;;GAKG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,eAAe,CAAoB;IAC3C,OAAO,CAAC,iBAAiB,CAAiC;IAC1D,OAAO,CAAC,cAAc,CAAiC;IAEvD,OAAO;IAkBP;;OAEG;IACH,IAAW,cAAc,IAAI,i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AAE,QAAuC;QACjG,MAAM,SAAS,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAAC,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,uCAAoB,CAAC,sBAAsB,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAG,CAAC,CAAC;QAEtK,OAAO,IAAI,kBAAkB,CAAC,SAAS,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,gBAAgB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,CAAC,CAAC;IACtG,CAAC;IAEM,MAAM;QACX,MAAM,KAAK,GAAoB,EAAE,cAAc,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;QACjF,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;YACnC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjF,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YAChC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAE3E,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA9DD,gDA8DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { BaseMapLayerProps, BaseMapLayerSettings, MapLayerProps, MapLayerSettings } from \"./MapLayerSettings\";\r\n\r\n/** JSON representation of a [[BaseLayerSettings]].\r\n * @beta\r\n */\r\nexport type BaseLayerProps = BaseMapLayerProps | ColorDefProps;\r\n\r\n/** The JSON representation of the map imagery. Map imagery include the specification for the base layer (which was originally\r\n * represented by [[BackgroundMapProps.providerName]] && [[BackgroundMapProps.providerData]]) and additional map layers.\r\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\r\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\r\n * the settings are compatible.\r\n * @beta\r\n */\r\nexport interface MapImageryProps {\r\n backgroundBase?: BaseLayerProps;\r\n backgroundLayers?: MapLayerProps[];\r\n overlayLayers?: MapLayerProps[];\r\n}\r\n\r\n/** The base layer for a [[MapImagerySettings]].\r\n * @see [[MapImagerySettings.backgroundBase]].\r\n * @beta\r\n */\r\nexport type BaseLayerSettings = BaseMapLayerSettings | ColorDef;\r\n\r\n/** @beta */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace BaseLayerSettings {\r\n /** Create a base layer from its JSON representation. */\r\n export function fromJSON(props: BaseLayerProps): BaseLayerSettings {\r\n return typeof props === \"number\" ? ColorDef.fromJSON(props) : BaseMapLayerSettings.fromJSON(props);\r\n }\r\n}\r\n\r\n/** Provides access to the map imagery settings (Base and layers).\r\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\r\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\r\n * the settings are compatible.\r\n * @beta\r\n */\r\nexport class MapImagerySettings {\r\n private _backgroundBase: BaseLayerSettings;\r\n private _backgroundLayers = new Array<MapLayerSettings>();\r\n private _overlayLayers = new Array<MapLayerSettings>();\r\n\r\n private constructor(base: BaseLayerSettings, backgroundLayerProps?: MapLayerProps[], overlayLayersProps?: MapLayerProps[]) {\r\n this._backgroundBase = base;\r\n if (backgroundLayerProps) {\r\n for (const layerProps of backgroundLayerProps) {\r\n const layer = MapLayerSettings.fromJSON(layerProps);\r\n if (layer)\r\n this._backgroundLayers.push(layer);\r\n }\r\n }\r\n if (overlayLayersProps) {\r\n for (const overlayLayerProps of overlayLayersProps) {\r\n const overlayLayer = MapLayerSettings.fromJSON(overlayLayerProps);\r\n if (overlayLayer)\r\n this._overlayLayers.push(overlayLayer);\r\n }\r\n }\r\n }\r\n\r\n /** The settings for the base layer.\r\n * @note If changing the base provider it is currently necessary to also update the background map settings.\r\n */\r\n public get backgroundBase(): BaseLayerSettings { return this._backgroundBase; }\r\n public set backgroundBase(base: BaseLayerSettings) { this._backgroundBase = base; }\r\n\r\n public get backgroundLayers(): MapLayerSettings[] { return this._backgroundLayers; }\r\n public get overlayLayers(): MapLayerSettings[] { return this._overlayLayers; }\r\n\r\n /** Return base transparency as a number between 0 and 1.\r\n * @internal\r\n */\r\n public get baseTransparency(): number {\r\n return (this._backgroundBase instanceof ColorDef) ? (this._backgroundBase.getTransparency() / 255) : this._backgroundBase.transparency;\r\n\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static fromJSON(imageryJson?: MapImageryProps) {\r\n return this.createFromJSON(imageryJson, undefined);\r\n }\r\n\r\n /** @internal */\r\n public static createFromJSON(imageryJson?: MapImageryProps, mapProps?: DeprecatedBackgroundMapProps) {\r\n const baseLayer = imageryJson?.backgroundBase ? BaseLayerSettings.fromJSON(imageryJson.backgroundBase) : BaseMapLayerSettings.fromBackgroundMapProps(mapProps ?? { });\r\n\r\n return new MapImagerySettings(baseLayer, imageryJson?.backgroundLayers, imageryJson?.overlayLayers);\r\n }\r\n\r\n public toJSON(): MapImageryProps {\r\n const props: MapImageryProps = { backgroundBase: this._backgroundBase.toJSON() };\r\n if (this._backgroundLayers.length > 0)\r\n props.backgroundLayers = this._backgroundLayers.map((layer) => layer.toJSON());\r\n\r\n if (this._overlayLayers.length > 0)\r\n props.overlayLayers = this._overlayLayers.map((layer) => layer.toJSON());\r\n\r\n return props;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MapImagerySettings.js","sourceRoot":"","sources":["../../src/MapImagerySettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,yCAAqD;AACrD,yDAA8G;AA4B9G,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,iBAAiB,CAKjC;AALD,WAAiB,iBAAiB;IAChC,wDAAwD;IACxD,SAAgB,QAAQ,CAAC,KAAqB;QAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,uCAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrG,CAAC;IAFe,0BAAQ,WAEvB,CAAA;AACH,CAAC,EALgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAKjC;AAED;;;;;GAKG;AACH,MAAa,kBAAkB;IAK7B,YAAoB,IAAuB,EAAE,oBAAsC,EAAE,kBAAoC;QAHjH,sBAAiB,GAAG,IAAI,KAAK,EAAoB,CAAC;QAClD,mBAAc,GAAG,IAAI,KAAK,EAAoB,CAAC;QAGrD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,oBAAoB,EAAE;YACxB,KAAK,MAAM,UAAU,IAAI,oBAAoB,EAAE;gBAC7C,MAAM,KAAK,GAAG,mCAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;gBACpD,IAAI,KAAK;oBACP,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACtC;SACF;QACD,IAAI,kBAAkB,EAAE;YACtB,KAAK,MAAM,iBAAiB,IAAI,kBAAkB,EAAE;gBAClD,MAAM,YAAY,GAAG,mCAAgB,CAAC,QAAQ,CAAC,iBAAiB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,aAAa,CAAC,CAAC;IACtG,CAAC;IAEM,MAAM;QACX,MAAM,KAAK,GAAoB,EAAE,cAAc,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;QACjF,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;YACnC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjF,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YAChC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAE3E,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA9DD,gDA8DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\r\nimport { BaseMapLayerProps, BaseMapLayerSettings, MapLayerProps, MapLayerSettings } from \"./MapLayerSettings\";\r\n\r\n/** JSON representation of a [[BaseLayerSettings]].\r\n * @beta\r\n */\r\nexport type BaseLayerProps = BaseMapLayerProps | ColorDefProps;\r\n\r\n/** The JSON representation of the map imagery. Map imagery include the specification for the base layer (which was originally\r\n * represented by [[BackgroundMapProps.providerName]] && [[BackgroundMapProps.providerData]]) and additional map layers.\r\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\r\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\r\n * the settings are compatible.\r\n * The non-base map layers may represent image layers generated by tile servers or model layers that are generated by 2d projection of model geomety, typically from a model\r\n * that is generated from two dimensional GIS data.\r\n * @beta\r\n */\r\nexport interface MapImageryProps {\r\n backgroundBase?: BaseLayerProps;\r\n backgroundLayers?: MapLayerProps[];\r\n overlayLayers?: MapLayerProps[];\r\n}\r\n\r\n/** The base layer for a [[MapImagerySettings]].\r\n * @see [[MapImagerySettings.backgroundBase]].\r\n * @beta\r\n */\r\nexport type BaseLayerSettings = BaseMapLayerSettings | ColorDef;\r\n\r\n/** @beta */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace BaseLayerSettings {\r\n /** Create a base layer from its JSON representation. */\r\n export function fromJSON(props: BaseLayerProps): BaseLayerSettings {\r\n return typeof props === \"number\" ? ColorDef.fromJSON(props) : BaseMapLayerSettings.fromJSON(props);\r\n }\r\n}\r\n\r\n/** Provides access to the map imagery settings (Base and layers).\r\n * In earlier versions only a background map was supported as specified by the providerName and mapType members of [[BackgroundMapSettings]] object.\r\n * In order to provide backward compatibility the original [[BackgroundMapSettings]] are synchronized with the [[MapImagerySettings]] base layer as long as\r\n * the settings are compatible.\r\n * @beta\r\n */\r\nexport class MapImagerySettings {\r\n private _backgroundBase: BaseLayerSettings;\r\n private _backgroundLayers = new Array<MapLayerSettings>();\r\n private _overlayLayers = new Array<MapLayerSettings>();\r\n\r\n private constructor(base: BaseLayerSettings, backgroundLayerProps?: MapLayerProps[], overlayLayersProps?: MapLayerProps[]) {\r\n this._backgroundBase = base;\r\n if (backgroundLayerProps) {\r\n for (const layerProps of backgroundLayerProps) {\r\n const layer = MapLayerSettings.fromJSON(layerProps);\r\n if (layer)\r\n this._backgroundLayers.push(layer);\r\n }\r\n }\r\n if (overlayLayersProps) {\r\n for (const overlayLayerProps of overlayLayersProps) {\r\n const overlayLayer = MapLayerSettings.fromJSON(overlayLayerProps);\r\n if (overlayLayer)\r\n this._overlayLayers.push(overlayLayer);\r\n }\r\n }\r\n }\r\n\r\n /** The settings for the base layer.\r\n * @note If changing the base provider it is currently necessary to also update the background map settings.\r\n */\r\n public get backgroundBase(): BaseLayerSettings { return this._backgroundBase; }\r\n public set backgroundBase(base: BaseLayerSettings) { this._backgroundBase = base; }\r\n\r\n public get backgroundLayers(): MapLayerSettings[] { return this._backgroundLayers; }\r\n public get overlayLayers(): MapLayerSettings[] { return this._overlayLayers; }\r\n\r\n /** Return base transparency as a number between 0 and 1.\r\n * @internal\r\n */\r\n public get baseTransparency(): number {\r\n return (this._backgroundBase instanceof ColorDef) ? (this._backgroundBase.getTransparency() / 255) : this._backgroundBase.transparency;\r\n\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields. */\r\n public static fromJSON(imageryJson?: MapImageryProps) {\r\n return this.createFromJSON(imageryJson, undefined);\r\n }\r\n\r\n /** @internal */\r\n public static createFromJSON(imageryJson?: MapImageryProps, mapProps?: DeprecatedBackgroundMapProps) {\r\n const baseLayer = imageryJson?.backgroundBase ? BaseLayerSettings.fromJSON(imageryJson.backgroundBase) : BaseMapLayerSettings.fromBackgroundMapProps(mapProps ?? { });\r\n\r\n return new MapImagerySettings(baseLayer, imageryJson?.backgroundLayers, imageryJson?.overlayLayers);\r\n }\r\n\r\n public toJSON(): MapImageryProps {\r\n const props: MapImageryProps = { backgroundBase: this._backgroundBase.toJSON() };\r\n if (this._backgroundLayers.length > 0)\r\n props.backgroundLayers = this._backgroundLayers.map((layer) => layer.toJSON());\r\n\r\n if (this._overlayLayers.length > 0)\r\n props.overlayLayers = this._overlayLayers.map((layer) => layer.toJSON());\r\n\r\n return props;\r\n }\r\n}\r\n"]}
@@ -1,6 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module DisplayStyles
3
3
  */
4
+ import { Id64String } from "@itwin/core-bentley";
4
5
  import { BackgroundMapProvider, BackgroundMapProviderProps, BackgroundMapType } from "./BackgroundMapProvider";
5
6
  import { DeprecatedBackgroundMapProps } from "./BackgroundMapSettings";
6
7
  /** @beta */
@@ -57,34 +58,64 @@ export declare class MapSubLayerSettings {
57
58
  /** return a string representing this sublayer id (converting to string if underlying id is number) */
58
59
  get idString(): string;
59
60
  }
60
- /** JSON representation of the settings associated with a map layer. One or more map layers may be included within a [[MapImageryProps]] object.
61
+ /** JSON representation of properties common to both [[ImageMapLayerProps]] and [[ModelMapLayerProps]].
61
62
  * @see [[MapImageryProps]]
62
63
  * @beta
63
64
  */
64
- export interface MapLayerProps {
65
+ export interface CommonMapLayerProps {
65
66
  /** Controls visibility of layer. Defaults to 'true'. */
66
67
  visible?: boolean;
67
- /** Identifies the map layers source.*/
68
- formatId: string;
69
- /** Name */
68
+ /** A user-friendly name for the layer. */
70
69
  name: string;
70
+ /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,
71
+ * or false to indicate the transparency should not be overridden.
72
+ * Default value: 0.
73
+ */
74
+ transparency?: number;
75
+ /** True to indicate background is transparent.
76
+ * Default: true.
77
+ */
78
+ transparentBackground?: boolean;
79
+ }
80
+ /** JSON representation of an [[ImageMapLayerSettings]].
81
+ * @see [[MapImagerySettings]].
82
+ * @beta
83
+ */
84
+ export interface ImageMapLayerProps extends CommonMapLayerProps {
71
85
  /** URL */
72
86
  url: string;
87
+ /** Identifies the map layers source.*/
88
+ formatId: string;
73
89
  /** Source layers. If undefined all layers are displayed. */
74
90
  subLayers?: MapSubLayerProps[];
75
- /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing,
76
- * or false to indicate the transparency should not be overridden. Default value: 0.
77
- * If omitted, defaults to 0. */
78
- transparency?: number;
79
- /** True to indicate background is transparent. Defaults to 'true'. */
80
- transparentBackground?: boolean;
81
- /** Is a base layer. Defaults to 'false'. */
82
- isBase?: boolean;
83
91
  /** Access Key for the Layer, like a subscription key or access token.
84
- * TODO This does not belong in the props object. It should never be persisted.
92
+ * ###TODO This does not belong in the props object. It should never be persisted.
85
93
  */
86
94
  accessKey?: MapLayerKey;
95
+ /** @internal */
96
+ modelId?: never;
87
97
  }
98
+ /** JSON representation of a [[ModelMapLayerSettings]].
99
+ * @see [[MapImagerySettings]].
100
+ * @beta
101
+ */
102
+ export interface ModelMapLayerProps extends CommonMapLayerProps {
103
+ /** The Id of the [GeometricModel]($backend) containing the geometry to be drawn by the layer. */
104
+ modelId: Id64String;
105
+ /** @internal */
106
+ url?: never;
107
+ /** @internal */
108
+ formatId?: never;
109
+ /** @internal */
110
+ subLayers?: never;
111
+ /** @internal */
112
+ accessKey?: never;
113
+ }
114
+ /** JSON representation of a [[MapLayerSettings]].
115
+ * @see [[MapImagerySettings]].
116
+ * @beta
117
+ */
118
+ export declare type MapLayerProps = ImageMapLayerProps | ModelMapLayerProps;
88
119
  /**
89
120
  * stores key-value pair to be added to all requests made involving map layer.
90
121
  * @beta
@@ -93,60 +124,112 @@ export interface MapLayerKey {
93
124
  key: string;
94
125
  value: string;
95
126
  }
96
- /** Normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
127
+ /** Abstract base class for normalized representation of a [[MapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
128
+ * This class is extended by [[ImageMapLayerSettings]] and [ModelMapLayerSettings]] to create the settings for image and model based layers.
97
129
  * One or more map layers may be included within [[MapImagerySettings]] object.
98
130
  * @see [[MapImagerySettings]]
99
131
  * @beta
100
132
  */
101
- export declare class MapLayerSettings {
133
+ export declare abstract class MapLayerSettings {
102
134
  readonly visible: boolean;
103
- readonly formatId: string;
104
135
  readonly name: string;
105
- readonly url: string;
106
136
  readonly transparency: number;
107
- readonly subLayers: MapSubLayerSettings[];
108
137
  readonly transparentBackground: boolean;
109
- readonly isBase: boolean;
138
+ abstract get allSubLayersInvisible(): boolean;
139
+ abstract clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;
140
+ abstract toJSON(): MapLayerProps;
141
+ /** @internal */
142
+ protected constructor(name: string, visible?: boolean, transparency?: number, transparentBackground?: boolean);
143
+ /** Create a map layer settings from its JSON representation. */
144
+ static fromJSON(props: MapLayerProps): MapLayerSettings;
145
+ /** @internal */
146
+ protected _toJSON(): CommonMapLayerProps;
147
+ /** @internal */
148
+ protected cloneProps(changedProps: Partial<MapLayerProps>): CommonMapLayerProps;
149
+ /** @internal */
150
+ displayMatches(other: MapLayerSettings): boolean;
151
+ /** Return a unique string identifying the layers source... The URL for image layer or modelID for model layer */
152
+ abstract get source(): string;
153
+ /** @internal */
154
+ matchesNameAndSource(name: string, source: string): boolean;
155
+ }
156
+ /** Normalized representation of a [[ImageMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
157
+ * Image map layers are created from servers that produce images that represent map tiles. Map layers map also be represented by models.
158
+ * One or more map layers may be included within [[MapImagerySettings]] object.
159
+ * @see [[MapImagerySettings]]
160
+ * @see [[ModelMapLayerSettings]] for model based map layer settings.
161
+ * @beta
162
+ */
163
+ export declare class ImageMapLayerSettings extends MapLayerSettings {
164
+ readonly formatId: string;
165
+ readonly url: string;
110
166
  userName?: string;
111
167
  password?: string;
112
168
  accessKey?: MapLayerKey;
113
- setCredentials(userName?: string, password?: string): void;
169
+ readonly subLayers: MapSubLayerSettings[];
170
+ get source(): string;
114
171
  /** @internal */
115
- protected constructor(url: string, name: string, formatId: string, visible?: boolean, jsonSubLayers?: MapSubLayerProps[] | undefined, transparency?: number, transparentBackground?: boolean, isBase?: boolean, userName?: string, password?: string, accessKey?: MapLayerKey);
116
- /** Construct from JSON, performing validation and applying default values for undefined fields. */
117
- static fromJSON(json: MapLayerProps): MapLayerSettings;
172
+ protected constructor(props: ImageMapLayerProps);
173
+ static fromJSON(props: ImageMapLayerProps): ImageMapLayerSettings;
118
174
  /** return JSON representation of this MapLayerSettings object */
119
- toJSON(): MapLayerProps;
120
- /** @internal */
121
- protected static mapTypeName(type: BackgroundMapType): "Aerial Imagery" | "Aerial Imagery with labels" | "Streets";
175
+ toJSON(): ImageMapLayerProps;
122
176
  /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
123
177
  * @param changedProps JSON representation of the properties to change.
124
178
  * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.
125
179
  */
126
- clone(changedProps: Partial<MapLayerProps>): MapLayerSettings;
180
+ clone(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerSettings;
127
181
  /** @internal */
128
- protected cloneProps(changedProps: Partial<MapLayerProps>): MapLayerProps;
182
+ protected cloneProps(changedProps: Partial<ImageMapLayerProps>): ImageMapLayerProps;
129
183
  /** @internal */
130
184
  displayMatches(other: MapLayerSettings): boolean;
131
- /** @internal */
132
- matchesNameAndUrl(name: string, url: string): boolean;
133
185
  /** Return a sublayer matching id -- or undefined if not found */
134
186
  subLayerById(id?: SubLayerId): MapSubLayerSettings | undefined;
135
187
  private hasInvisibleAncestors;
136
188
  /** Return true if sublayer is visible -- testing ancestors for visibility if they exist. */
137
189
  isSubLayerVisible(subLayer: MapSubLayerSettings): boolean;
138
- /** Return true if all sublayers are visible. */
190
+ /** Return true if all sublayers are invisible. */
139
191
  get allSubLayersInvisible(): boolean;
140
192
  /** Return the children for a sublayer */
141
193
  getSubLayerChildren(subLayer: MapSubLayerSettings): MapSubLayerSettings[] | undefined;
194
+ /** @internal */
195
+ protected static mapTypeName(type: BackgroundMapType): "Aerial Imagery" | "Aerial Imagery with labels" | "Streets";
196
+ setCredentials(userName?: string, password?: string): void;
197
+ }
198
+ /** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
199
+ * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.
200
+ * One or more map layers may be included within [[MapImagerySettings]] object.
201
+ * @see [[MapImagerySettings]]
202
+ * @see [[ImageMapLayerSettings]] for image based map layer settings.
203
+ * @beta
204
+ */
205
+ export declare class ModelMapLayerSettings extends MapLayerSettings {
206
+ readonly modelId: Id64String;
207
+ get source(): string;
208
+ /** @internal */
209
+ protected constructor(modelId: Id64String, name: string, visible?: boolean, transparency?: number, transparentBackground?: boolean);
210
+ /** Construct from JSON, performing validation and applying default values for undefined fields. */
211
+ static fromJSON(json: ModelMapLayerProps): ModelMapLayerSettings;
212
+ /** return JSON representation of this MapLayerSettings object */
213
+ toJSON(): ModelMapLayerProps;
214
+ /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
215
+ * @param changedProps JSON representation of the properties to change.
216
+ * @returns A MapLayerSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.
217
+ */
218
+ clone(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerSettings;
219
+ /** @internal */
220
+ protected cloneProps(changedProps: Partial<ModelMapLayerProps>): ModelMapLayerProps;
221
+ /** @internal */
222
+ displayMatches(other: MapLayerSettings): boolean;
223
+ /** Return true if all sublayers are invisible (always false as model layers do not include sublayers). */
224
+ get allSubLayersInvisible(): boolean;
142
225
  }
143
226
  /** JSON representation of a [[BaseMapLayerSettings]].
144
227
  * @beta
145
228
  */
146
- export interface BaseMapLayerProps extends MapLayerProps {
229
+ export interface BaseMapLayerProps extends ImageMapLayerProps {
147
230
  provider?: BackgroundMapProviderProps;
148
231
  }
149
- /** A [[MapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].
232
+ /** A [[ImageMapLayerSettings]] that can serve as the base layer for a [[MapImagerySettings]].
150
233
  * The base layer supports all of the same options as any other layer, but also allows for simplified configuration based
151
234
  * on a small set of known supported [[BackgroundMapProvider]]s like [Bing Maps](https://www.microsoft.com/en-us/maps).
152
235
  * If the base layer was configured from such a provider, that information will be preserved and can be queried; this allows
@@ -154,7 +237,7 @@ export interface BaseMapLayerProps extends MapLayerProps {
154
237
  * @see [[MapImagerySettings.backgroundBase]].
155
238
  * @beta
156
239
  */
157
- export declare class BaseMapLayerSettings extends MapLayerSettings {
240
+ export declare class BaseMapLayerSettings extends ImageMapLayerSettings {
158
241
  private _provider?;
159
242
  /** The provider from which this base layer was configured, if any. */
160
243
  get provider(): BackgroundMapProvider | undefined;
@@ -167,9 +250,9 @@ export declare class BaseMapLayerSettings extends MapLayerSettings {
167
250
  /** Convert this layer to its JSON representation. */
168
251
  toJSON(): BaseMapLayerProps;
169
252
  /** @internal */
170
- cloneProps(changedProps: Partial<MapLayerProps>): BaseMapLayerProps;
253
+ cloneProps(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerProps;
171
254
  /** Create a copy of this layer. */
172
- clone(changedProps: Partial<MapLayerProps>): BaseMapLayerSettings;
255
+ clone(changedProps: Partial<BaseMapLayerProps>): BaseMapLayerSettings;
173
256
  /** Create a base layer from a BackgroundMapProvider. */
174
257
  static fromProvider(provider: BackgroundMapProvider, options?: {
175
258
  invisible?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerSettings.d.ts","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,YAAY;AACZ,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAC9B,mIAAmI;IACnI,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,aAAa;IACb,SAAgB,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/B,gIAAgI;IAChI,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,oFAAoF;IACpF,SAAgB,EAAE,EAAE,UAAU,CAAC;IAC/B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