@itwin/map-layers-formats 4.0.0-dev.52 → 4.0.0-dev.55

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 (148) hide show
  1. package/.rush/temp/operation/build_ci/state.json +1 -1
  2. package/.rush/temp/operation/cover/state.json +1 -1
  3. package/.rush/temp/operation/docs/state.json +1 -1
  4. package/.rush/temp/package-deps_build_ci.json +3 -3
  5. package/.rush/temp/package-deps_cover.json +3 -3
  6. package/.rush/temp/package-deps_docs.json +3 -3
  7. package/.rush/temp/shrinkwrap-deps.json +44 -51
  8. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.d.ts +8 -8
  9. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +14 -14
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +14 -14
  12. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js +132 -132
  13. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts +14 -14
  14. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js +200 -200
  15. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +44 -44
  16. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +421 -421
  17. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  18. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +92 -92
  19. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  20. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +82 -82
  21. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +17 -17
  22. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +33 -33
  23. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +32 -32
  24. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +142 -142
  25. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts +16 -16
  26. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts.map +1 -1
  27. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js +42 -42
  28. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +85 -85
  29. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  30. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +189 -189
  31. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  32. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.d.ts +1063 -1063
  33. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js +2270 -2270
  34. package/lib/cjs/map-layers-formats.d.ts +8 -8
  35. package/lib/cjs/map-layers-formats.js +28 -24
  36. package/lib/cjs/map-layers-formats.js.map +1 -1
  37. package/lib/cjs/mapLayersFormats.d.ts +10 -10
  38. package/lib/cjs/mapLayersFormats.js +28 -28
  39. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +1 -1
  40. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +34 -34
  41. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +1 -1
  42. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +161 -161
  43. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +1 -1
  44. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +167 -167
  45. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +1 -1
  46. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +679 -679
  47. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  48. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +1 -1
  49. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +103 -103
  50. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +1 -1
  51. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +214 -214
  52. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +1 -1
  53. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +94 -94
  54. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +1 -1
  55. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +59 -59
  56. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +6 -6
  57. package/lib/cjs/test/ArcGisFeature/Mocks.js +18 -18
  58. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +55 -55
  59. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +419 -419
  60. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +1 -1
  61. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +1042 -1042
  62. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +426 -426
  63. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +1 -1
  64. package/lib/cjs/test/coverage/.nyc_output/186e5c44-6980-4d7a-9c52-bb4c9af0ad82.json +1 -0
  65. package/lib/cjs/test/coverage/.nyc_output/processinfo/186e5c44-6980-4d7a-9c52-bb4c9af0ad82.json +1 -0
  66. package/lib/cjs/test/coverage/.nyc_output/processinfo/a4fe7565-9b86-4573-8375-3819c82246d8.json +1 -0
  67. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
  68. package/lib/cjs/test/coverage/cobertura-coverage.xml +39 -39
  69. package/lib/cjs/test/coverage/lcov-report/index.html +1 -1
  70. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +1 -1
  71. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +1 -1
  72. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +1 -1
  73. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +1 -1
  74. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +1 -1
  75. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +1 -1
  76. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +1 -1
  77. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +1 -1
  78. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +1 -1
  79. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +1 -1
  80. package/lib/cjs/test/coverage/lcov-report/src/index.html +1 -1
  81. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +1 -1
  82. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +1 -1
  83. package/lib/cjs/test/coverage/lcov.info +47 -47
  84. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  85. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts +8 -8
  86. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +11 -10
  87. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  88. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +14 -14
  89. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js +128 -128
  90. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts +14 -14
  91. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js +196 -196
  92. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +44 -44
  93. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +418 -417
  94. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  95. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +92 -92
  96. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  97. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +78 -78
  98. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +17 -17
  99. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +29 -29
  100. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +32 -32
  101. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +138 -138
  102. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts +16 -16
  103. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts.map +1 -1
  104. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js +38 -38
  105. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +85 -85
  106. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  107. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +183 -182
  108. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  109. package/lib/esm/ArcGisFeature/esriPBuffer.gen.d.ts +1063 -1063
  110. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js +2267 -2267
  111. package/lib/esm/map-layers-formats.d.ts +8 -8
  112. package/lib/esm/map-layers-formats.js +12 -12
  113. package/lib/esm/mapLayersFormats.d.ts +10 -10
  114. package/lib/esm/mapLayersFormats.js +24 -24
  115. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +1 -1
  116. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +32 -32
  117. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +1 -1
  118. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +159 -159
  119. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +1 -1
  120. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +165 -165
  121. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +1 -1
  122. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +677 -677
  123. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  124. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +1 -1
  125. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +101 -101
  126. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +1 -1
  127. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +212 -212
  128. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +1 -1
  129. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +92 -92
  130. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +1 -1
  131. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +57 -57
  132. package/lib/esm/test/ArcGisFeature/Mocks.d.ts +6 -6
  133. package/lib/esm/test/ArcGisFeature/Mocks.js +15 -15
  134. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +55 -55
  135. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +416 -415
  136. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +1 -1
  137. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +1042 -1042
  138. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +423 -422
  139. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +1 -1
  140. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  141. package/lib/test/junit_results.xml +52 -52
  142. package/map-layers-formats.build.log +2 -2
  143. package/package.json +13 -13
  144. package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +21 -21
  145. package/lib/cjs/test/coverage/.nyc_output/579ba75b-0cfc-4b77-82ad-4f939b76443a.json +0 -1
  146. package/lib/cjs/test/coverage/.nyc_output/processinfo/579ba75b-0cfc-4b77-82ad-4f939b76443a.json +0 -1
  147. package/lib/cjs/test/coverage/.nyc_output/processinfo/f0a37b08-29bc-49a6-a608-b82501dccee7.json +0 -1
  148. /package/lib/cjs/test/coverage/.nyc_output/{f0a37b08-29bc-49a6-a608-b82501dccee7.json → a4fe7565-9b86-4573-8375-3819c82246d8.json} +0 -0
@@ -1,86 +1,86 @@
1
- import { ColorDef } from "@itwin/core-common";
2
- import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
3
- /** @internal */
4
- export declare type EsriSymbolType = "esriSFS" | "esriPMS" | "esriSLS" | "esriSMS" | "esriTS" | "CIMSymbolReference";
5
- interface EsriSymbol {
6
- type: EsriSymbolType;
7
- }
8
- /** @internal */
9
- export declare type EsriSLSStyle = "esriSLSDash" | "esriSLSDashDot" | "esriSLSDashDotDot" | "esriSLSDot" | "esriSLSLongDash" | "esriSLSLongDashDot" | "esriSLSNull" | "esriSLSShortDash" | "esriSLSShortDashDot" | "esriSLSShortDashDotDot" | "esriSLSShortDot" | "esriSLSSolid";
10
- interface EsriSLSProps {
11
- color: number[];
12
- type: EsriSymbolType;
13
- width: number;
14
- style: EsriSLSStyle;
15
- }
16
- /** @internal */
17
- export declare class EsriSLS implements EsriSymbol {
18
- readonly props: EsriSLSProps;
19
- get color(): ColorDef | undefined;
20
- get type(): EsriSymbolType;
21
- get width(): number;
22
- get style(): EsriSLSStyle;
23
- constructor(json: EsriSLSProps);
24
- static fromJSON(json: EsriSLSProps): EsriSLS;
25
- }
26
- interface EsriPMSProps {
27
- type: EsriSymbolType;
28
- url: string;
29
- imageData: string;
30
- contentType: string;
31
- width?: number;
32
- height?: number;
33
- xoffset?: number;
34
- yoffset?: number;
35
- angle?: number;
36
- }
37
- /** @internal */
38
- export declare class EsriPMS implements EsriSymbol {
39
- readonly props: EsriPMSProps;
40
- private _image;
41
- get type(): EsriSymbolType;
42
- get url(): string;
43
- get imageData(): string;
44
- get imageUrl(): string;
45
- get image(): HTMLImageElement;
46
- get contentType(): string;
47
- get width(): number | undefined;
48
- get height(): number | undefined;
49
- get xoffset(): number | undefined;
50
- get yoffset(): number | undefined;
51
- get angle(): number | undefined;
52
- constructor(json: EsriPMSProps);
53
- static fromJSON(json: EsriPMSProps): EsriPMS;
54
- }
55
- /** @internal */
56
- export declare type EsriSFSStyleProps = "esriSFSBackwardDiagonal" | "esriSFSCross" | "esriSFSDiagonalCross" | "esriSFSForwardDiagonal" | "esriSFSHorizontal" | "esriSFSNull" | "esriSFSSolid" | "esriSFSVertical";
57
- interface EsriSFSProps {
58
- color?: number[];
59
- type: EsriSymbolType;
60
- style: EsriSFSStyleProps;
61
- outline?: EsriSLSProps;
62
- }
63
- /** @internal */
64
- export declare class EsriSFS implements EsriSymbol {
65
- readonly props: EsriSFSProps;
66
- private _outline;
67
- get color(): ColorDef | undefined;
68
- get type(): EsriSymbolType;
69
- get style(): EsriSFSStyleProps;
70
- get outline(): EsriSLS | undefined;
71
- constructor(json: EsriSFSProps);
72
- static fromJSON(json: EsriSFSProps): EsriSFS;
73
- }
74
- /** @internal */
75
- export declare class ArcGisSymbologyRenderer {
76
- private _symbol;
77
- private static readonly defaultPMS;
78
- private static readonly defaultSLS;
79
- private static readonly defaultSFS;
80
- constructor(geometryType: ArcGisFeatureGeometryType, rendererDefinition: any);
81
- applyFillStyle(context: CanvasRenderingContext2D): void;
82
- applyStrokeStyle(context: CanvasRenderingContext2D): void;
83
- drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;
84
- }
85
- export {};
1
+ import { ColorDef } from "@itwin/core-common";
2
+ import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
3
+ /** @internal */
4
+ export type EsriSymbolType = "esriSFS" | "esriPMS" | "esriSLS" | "esriSMS" | "esriTS" | "CIMSymbolReference";
5
+ interface EsriSymbol {
6
+ type: EsriSymbolType;
7
+ }
8
+ /** @internal */
9
+ export type EsriSLSStyle = "esriSLSDash" | "esriSLSDashDot" | "esriSLSDashDotDot" | "esriSLSDot" | "esriSLSLongDash" | "esriSLSLongDashDot" | "esriSLSNull" | "esriSLSShortDash" | "esriSLSShortDashDot" | "esriSLSShortDashDotDot" | "esriSLSShortDot" | "esriSLSSolid";
10
+ interface EsriSLSProps {
11
+ color: number[];
12
+ type: EsriSymbolType;
13
+ width: number;
14
+ style: EsriSLSStyle;
15
+ }
16
+ /** @internal */
17
+ export declare class EsriSLS implements EsriSymbol {
18
+ readonly props: EsriSLSProps;
19
+ get color(): ColorDef | undefined;
20
+ get type(): EsriSymbolType;
21
+ get width(): number;
22
+ get style(): EsriSLSStyle;
23
+ constructor(json: EsriSLSProps);
24
+ static fromJSON(json: EsriSLSProps): EsriSLS;
25
+ }
26
+ interface EsriPMSProps {
27
+ type: EsriSymbolType;
28
+ url: string;
29
+ imageData: string;
30
+ contentType: string;
31
+ width?: number;
32
+ height?: number;
33
+ xoffset?: number;
34
+ yoffset?: number;
35
+ angle?: number;
36
+ }
37
+ /** @internal */
38
+ export declare class EsriPMS implements EsriSymbol {
39
+ readonly props: EsriPMSProps;
40
+ private _image;
41
+ get type(): EsriSymbolType;
42
+ get url(): string;
43
+ get imageData(): string;
44
+ get imageUrl(): string;
45
+ get image(): HTMLImageElement;
46
+ get contentType(): string;
47
+ get width(): number | undefined;
48
+ get height(): number | undefined;
49
+ get xoffset(): number | undefined;
50
+ get yoffset(): number | undefined;
51
+ get angle(): number | undefined;
52
+ constructor(json: EsriPMSProps);
53
+ static fromJSON(json: EsriPMSProps): EsriPMS;
54
+ }
55
+ /** @internal */
56
+ export type EsriSFSStyleProps = "esriSFSBackwardDiagonal" | "esriSFSCross" | "esriSFSDiagonalCross" | "esriSFSForwardDiagonal" | "esriSFSHorizontal" | "esriSFSNull" | "esriSFSSolid" | "esriSFSVertical";
57
+ interface EsriSFSProps {
58
+ color?: number[];
59
+ type: EsriSymbolType;
60
+ style: EsriSFSStyleProps;
61
+ outline?: EsriSLSProps;
62
+ }
63
+ /** @internal */
64
+ export declare class EsriSFS implements EsriSymbol {
65
+ readonly props: EsriSFSProps;
66
+ private _outline;
67
+ get color(): ColorDef | undefined;
68
+ get type(): EsriSymbolType;
69
+ get style(): EsriSFSStyleProps;
70
+ get outline(): EsriSLS | undefined;
71
+ constructor(json: EsriSFSProps);
72
+ static fromJSON(json: EsriSFSProps): EsriSFS;
73
+ }
74
+ /** @internal */
75
+ export declare class ArcGisSymbologyRenderer {
76
+ private _symbol;
77
+ private static readonly defaultPMS;
78
+ private static readonly defaultSLS;
79
+ private static readonly defaultSFS;
80
+ constructor(geometryType: ArcGisFeatureGeometryType, rendererDefinition: any);
81
+ applyFillStyle(context: CanvasRenderingContext2D): void;
82
+ applyStrokeStyle(context: CanvasRenderingContext2D): void;
83
+ drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;
84
+ }
85
+ export {};
86
86
  //# sourceMappingURL=ArcGisSymbologyRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGisSymbologyRenderer.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisSymbologyRenderer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAajE,gBAAgB;AAChB,oBAAY,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,CAAC;AAC7G,UAAU,UAAU;IAClB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,gBAAgB;AAChB,oBAAY,YAAY,GAAG,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,G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C,OAAO,CAAC,OAAO,CAAyB;IAExC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAShC;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAKhC;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAIhC;gBAEU,YAAY,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,GAAG;IAmCrE,cAAc,CAAC,OAAO,EAAE,wBAAwB;IAchD,gBAAgB,CAAC,OAAO,EAAE,wBAAwB;IAqBlD,SAAS,CAAC,OAAO,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CA0B7E"}
@@ -1,190 +1,190 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ArcGisSymbologyRenderer = exports.EsriSFS = exports.EsriPMS = exports.EsriSLS = void 0;
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const core_common_1 = require("@itwin/core-common");
10
- // Convert a channel array [r, g, b, a] to ColorDef
11
- function colorFromArray(channels) {
12
- if (channels && channels.length === 4) {
13
- // Alpha channel is reversed, 255 = opaque
14
- return core_common_1.ColorDef.from(channels[0], channels[1], channels[2], 255 - channels[3]);
15
- }
16
- return undefined;
17
- }
18
- const loggerCategory = "MapLayersFormats.ArcGISFeature";
19
- /** @internal */
20
- class EsriSLS {
21
- constructor(json) {
22
- this.props = json;
23
- }
24
- get color() { return colorFromArray(this.props.color); }
25
- get type() { return this.props.type; }
26
- get width() { return this.props.width; }
27
- get style() { return this.props.style; }
28
- static fromJSON(json) {
29
- return new EsriSLS(json);
30
- }
31
- }
32
- exports.EsriSLS = EsriSLS;
33
- /** @internal */
34
- class EsriPMS {
35
- constructor(json) {
36
- this.props = json;
37
- this._image = new Image();
38
- this._image.src = this.imageUrl;
39
- }
40
- get type() { return this.props.type; }
41
- get url() { return this.props.url; }
42
- get imageData() { return this.props.imageData; }
43
- get imageUrl() { return `data:${this.contentType};base64,${this.imageData}`; }
44
- get image() { return this._image; }
45
- get contentType() { return this.props.contentType; }
46
- get width() { return this.props.width; }
47
- get height() { return this.props.height; }
48
- get xoffset() { return this.props.xoffset; }
49
- get yoffset() { return this.props.yoffset; }
50
- get angle() { return this.props.angle; }
51
- static fromJSON(json) {
52
- return new EsriPMS(json);
53
- }
54
- }
55
- exports.EsriPMS = EsriPMS;
56
- /** @internal */
57
- class EsriSFS {
58
- constructor(json) {
59
- this.props = json;
60
- if (json.outline)
61
- this._outline = EsriSLS.fromJSON(json.outline);
62
- }
63
- get color() { return colorFromArray(this.props.color); }
64
- get type() { return this.props.type; }
65
- get style() { return this.props.style; }
66
- get outline() { return this._outline; }
67
- static fromJSON(json) {
68
- return new EsriSFS(json);
69
- }
70
- }
71
- exports.EsriSFS = EsriSFS;
72
- /** @internal */
73
- class ArcGisSymbologyRenderer {
74
- constructor(geometryType, rendererDefinition) {
75
- let symbol;
76
- if (rendererDefinition?.symbol !== undefined) {
77
- symbol = rendererDefinition.symbol;
78
- }
79
- else if (rendererDefinition?.defaultSymbol !== undefined) {
80
- symbol = rendererDefinition?.defaultSymbol;
81
- }
82
- if (symbol !== undefined) {
83
- if (symbol.type === "esriSFS") {
84
- this._symbol = EsriSFS.fromJSON(symbol);
85
- }
86
- else if (symbol.type === "esriSLS") {
87
- this._symbol = EsriSLS.fromJSON(symbol);
88
- }
89
- else if (symbol.type === "esriPMS") {
90
- this._symbol = EsriPMS.fromJSON(symbol);
91
- }
92
- }
93
- // If '_symbol' is still undefined at this point, that means we could not find
94
- // any symbology definition from the metadata, let's use some default symbology
95
- // so that we display at least something.
96
- if (this._symbol === undefined) {
97
- core_bentley_1.Logger.logWarning(loggerCategory, "Symbology definition not supported, using default symbology");
98
- if (geometryType === "esriGeometryPoint" || geometryType === "esriGeometryMultipoint") {
99
- this._symbol = EsriPMS.fromJSON(ArcGisSymbologyRenderer.defaultPMS);
100
- }
101
- else if (geometryType === "esriGeometryLine" || geometryType === "esriGeometryPolyline") {
102
- this._symbol = EsriSLS.fromJSON(ArcGisSymbologyRenderer.defaultSLS);
103
- }
104
- else if (geometryType === "esriGeometryPolygon") {
105
- this._symbol = EsriSFS.fromJSON(ArcGisSymbologyRenderer.defaultSFS);
106
- }
107
- else {
108
- core_bentley_1.Logger.logError(loggerCategory, "Could not determine default symbology: geometry type not supported");
109
- }
110
- }
111
- }
112
- applyFillStyle(context) {
113
- if (!context)
114
- return;
115
- if (this._symbol?.type === "esriSFS") {
116
- const sfs = this._symbol;
117
- if (sfs.style === "esriSFSSolid" && sfs.color) {
118
- context.fillStyle = sfs.color.toRgbaString();
119
- }
120
- else {
121
- context.fillStyle = core_common_1.ColorDef.from(200, 0, 0, 100).toRgbaString(); // default color is red?
122
- }
123
- }
124
- }
125
- applyStrokeStyle(context) {
126
- if (!context)
127
- return;
128
- let sls;
129
- if (this._symbol?.type === "esriSFS") {
130
- const sfs = this._symbol;
131
- if (sfs.outline && sfs.outline.style === "esriSLSSolid") {
132
- sls = sfs.outline;
133
- }
134
- }
135
- else if (this._symbol?.type === "esriSLS") {
136
- sls = this._symbol;
137
- }
138
- if (sls) {
139
- if (sls.color)
140
- context.strokeStyle = sls.color.toRgbaString();
141
- context.lineWidth = sls.width; // TODO: Should we scale this value here?
142
- }
143
- }
144
- drawPoint(context, ptX, ptY) {
145
- if (!context)
146
- return;
147
- if (this._symbol?.type === "esriPMS") {
148
- const pms = this._symbol;
149
- let xOffset = 0, yOffset = 0;
150
- if (pms.xoffset)
151
- xOffset = pms.xoffset;
152
- else if (pms.width)
153
- xOffset = pms.width * -0.5; // if no offset center in the middle
154
- if (pms.yoffset)
155
- yOffset = pms.yoffset;
156
- else if (pms.height)
157
- yOffset = pms.height * -0.5; // if no offset center in the middle
158
- if (pms.width && pms.height) {
159
- context.drawImage(pms.image, ptX + xOffset, ptY + yOffset, pms.width, pms.height);
160
- }
161
- else {
162
- context.drawImage(pms.image, ptX + xOffset, ptY + yOffset);
163
- }
164
- // TODO: marker rotation angle
165
- }
166
- }
167
- }
168
- exports.ArcGisSymbologyRenderer = ArcGisSymbologyRenderer;
169
- ArcGisSymbologyRenderer.defaultPMS = {
170
- type: "esriPMS",
171
- url: "",
172
- contentType: "image/png",
173
- imageData: "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAmBJREFUOE+Nk01IVFEUx//n3jfvOZOaJkMtiiJ7o9RG3LgoqKhFSFJBTS1ahFBBi0ijfJXCIyQr+hBbSIsoW7iQoKKFCw2CkAI3tZAgy8Ei+xhoTCbnje/NPfHGnA816KzuPR+/c8/HJRQJE7o+VUhym0DcCOYGgBQEXjOLlyqo+nHanCkMoaL4rslKjZwOQLT4ek3Mmz3FACFNLB67ut6M1nWphbg8wI6VyJK5KEH0EQFVJRKbwzokAW++p/ErraAYSQK3u47bC3vLnA+ZB9i2gHF0oyQMCfCGNaUa+vauxs71wWz2V18cnBj8gQ8J1/eeBnHUa4sMFQDGdGno+4gwEAoQzjVUon3rqlx1KY9x7+0MWobjAPg3QJ2eZV4tAEyFNCN5FkSXyw2B3j1hRGvLcgBXMV5MptA4MOXr0gT0u5bZnAf0jBsyiSgJPAxqhON1K3FlRxUMvwFAtv7u0Wl0jvwEmJNEuOhakTt5wKEBifr6Oo14BIBRpgt07w6jcVMIngKGY7NofR5HwlF+zDcpsC193vyYB/innvHywCzdZfAR/+onX1segBTAxHzzfPE7/8yzzIPLjJE1LTixHZx5CtCK4gXLzovBiDPUsYxVM7gUkB3nWKlm6DYEnQGzXARxCOK+a1WfKtQXb6LNAvr7iCboCUA1Ocdsdv5KLPe7F6pH/w3wLbc+BwOuc5IZ1wEE/jonQbjptZn24tKKX7BgvR2r0NKZRwDvAqCI+Z30VJPTURv7P4A9psuQcYAUPwAoReBLrmX2Lmls7i8sZ7kWLwuoxA1FVJGxzMPLufi6P2r+2xFbOUjGAAAAAElFTkSuQmCC",
174
- width: 16,
175
- height: 16,
176
- xoffset: -8,
177
- yoffset: -16,
178
- };
179
- ArcGisSymbologyRenderer.defaultSLS = {
180
- type: "esriSLS",
181
- color: [0, 0, 0, 255],
182
- width: 1,
183
- style: "esriSLSSolid",
184
- };
185
- ArcGisSymbologyRenderer.defaultSFS = {
186
- type: "esriSFS",
187
- color: [0, 0, 0, 255],
188
- style: "esriSFSSolid",
189
- };
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ArcGisSymbologyRenderer = exports.EsriSFS = exports.EsriPMS = exports.EsriSLS = void 0;
8
+ const core_bentley_1 = require("@itwin/core-bentley");
9
+ const core_common_1 = require("@itwin/core-common");
10
+ // Convert a channel array [r, g, b, a] to ColorDef
11
+ function colorFromArray(channels) {
12
+ if (channels && channels.length === 4) {
13
+ // Alpha channel is reversed, 255 = opaque
14
+ return core_common_1.ColorDef.from(channels[0], channels[1], channels[2], 255 - channels[3]);
15
+ }
16
+ return undefined;
17
+ }
18
+ const loggerCategory = "MapLayersFormats.ArcGISFeature";
19
+ /** @internal */
20
+ class EsriSLS {
21
+ get color() { return colorFromArray(this.props.color); }
22
+ get type() { return this.props.type; }
23
+ get width() { return this.props.width; }
24
+ get style() { return this.props.style; }
25
+ constructor(json) {
26
+ this.props = json;
27
+ }
28
+ static fromJSON(json) {
29
+ return new EsriSLS(json);
30
+ }
31
+ }
32
+ exports.EsriSLS = EsriSLS;
33
+ /** @internal */
34
+ class EsriPMS {
35
+ get type() { return this.props.type; }
36
+ get url() { return this.props.url; }
37
+ get imageData() { return this.props.imageData; }
38
+ get imageUrl() { return `data:${this.contentType};base64,${this.imageData}`; }
39
+ get image() { return this._image; }
40
+ get contentType() { return this.props.contentType; }
41
+ get width() { return this.props.width; }
42
+ get height() { return this.props.height; }
43
+ get xoffset() { return this.props.xoffset; }
44
+ get yoffset() { return this.props.yoffset; }
45
+ get angle() { return this.props.angle; }
46
+ constructor(json) {
47
+ this.props = json;
48
+ this._image = new Image();
49
+ this._image.src = this.imageUrl;
50
+ }
51
+ static fromJSON(json) {
52
+ return new EsriPMS(json);
53
+ }
54
+ }
55
+ exports.EsriPMS = EsriPMS;
56
+ /** @internal */
57
+ class EsriSFS {
58
+ get color() { return colorFromArray(this.props.color); }
59
+ get type() { return this.props.type; }
60
+ get style() { return this.props.style; }
61
+ get outline() { return this._outline; }
62
+ constructor(json) {
63
+ this.props = json;
64
+ if (json.outline)
65
+ this._outline = EsriSLS.fromJSON(json.outline);
66
+ }
67
+ static fromJSON(json) {
68
+ return new EsriSFS(json);
69
+ }
70
+ }
71
+ exports.EsriSFS = EsriSFS;
72
+ /** @internal */
73
+ class ArcGisSymbologyRenderer {
74
+ constructor(geometryType, rendererDefinition) {
75
+ let symbol;
76
+ if (rendererDefinition?.symbol !== undefined) {
77
+ symbol = rendererDefinition.symbol;
78
+ }
79
+ else if (rendererDefinition?.defaultSymbol !== undefined) {
80
+ symbol = rendererDefinition?.defaultSymbol;
81
+ }
82
+ if (symbol !== undefined) {
83
+ if (symbol.type === "esriSFS") {
84
+ this._symbol = EsriSFS.fromJSON(symbol);
85
+ }
86
+ else if (symbol.type === "esriSLS") {
87
+ this._symbol = EsriSLS.fromJSON(symbol);
88
+ }
89
+ else if (symbol.type === "esriPMS") {
90
+ this._symbol = EsriPMS.fromJSON(symbol);
91
+ }
92
+ }
93
+ // If '_symbol' is still undefined at this point, that means we could not find
94
+ // any symbology definition from the metadata, let's use some default symbology
95
+ // so that we display at least something.
96
+ if (this._symbol === undefined) {
97
+ core_bentley_1.Logger.logWarning(loggerCategory, "Symbology definition not supported, using default symbology");
98
+ if (geometryType === "esriGeometryPoint" || geometryType === "esriGeometryMultipoint") {
99
+ this._symbol = EsriPMS.fromJSON(ArcGisSymbologyRenderer.defaultPMS);
100
+ }
101
+ else if (geometryType === "esriGeometryLine" || geometryType === "esriGeometryPolyline") {
102
+ this._symbol = EsriSLS.fromJSON(ArcGisSymbologyRenderer.defaultSLS);
103
+ }
104
+ else if (geometryType === "esriGeometryPolygon") {
105
+ this._symbol = EsriSFS.fromJSON(ArcGisSymbologyRenderer.defaultSFS);
106
+ }
107
+ else {
108
+ core_bentley_1.Logger.logError(loggerCategory, "Could not determine default symbology: geometry type not supported");
109
+ }
110
+ }
111
+ }
112
+ applyFillStyle(context) {
113
+ if (!context)
114
+ return;
115
+ if (this._symbol?.type === "esriSFS") {
116
+ const sfs = this._symbol;
117
+ if (sfs.style === "esriSFSSolid" && sfs.color) {
118
+ context.fillStyle = sfs.color.toRgbaString();
119
+ }
120
+ else {
121
+ context.fillStyle = core_common_1.ColorDef.from(200, 0, 0, 100).toRgbaString(); // default color is red?
122
+ }
123
+ }
124
+ }
125
+ applyStrokeStyle(context) {
126
+ if (!context)
127
+ return;
128
+ let sls;
129
+ if (this._symbol?.type === "esriSFS") {
130
+ const sfs = this._symbol;
131
+ if (sfs.outline && sfs.outline.style === "esriSLSSolid") {
132
+ sls = sfs.outline;
133
+ }
134
+ }
135
+ else if (this._symbol?.type === "esriSLS") {
136
+ sls = this._symbol;
137
+ }
138
+ if (sls) {
139
+ if (sls.color)
140
+ context.strokeStyle = sls.color.toRgbaString();
141
+ context.lineWidth = sls.width; // TODO: Should we scale this value here?
142
+ }
143
+ }
144
+ drawPoint(context, ptX, ptY) {
145
+ if (!context)
146
+ return;
147
+ if (this._symbol?.type === "esriPMS") {
148
+ const pms = this._symbol;
149
+ let xOffset = 0, yOffset = 0;
150
+ if (pms.xoffset)
151
+ xOffset = pms.xoffset;
152
+ else if (pms.width)
153
+ xOffset = pms.width * -0.5; // if no offset center in the middle
154
+ if (pms.yoffset)
155
+ yOffset = pms.yoffset;
156
+ else if (pms.height)
157
+ yOffset = pms.height * -0.5; // if no offset center in the middle
158
+ if (pms.width && pms.height) {
159
+ context.drawImage(pms.image, ptX + xOffset, ptY + yOffset, pms.width, pms.height);
160
+ }
161
+ else {
162
+ context.drawImage(pms.image, ptX + xOffset, ptY + yOffset);
163
+ }
164
+ // TODO: marker rotation angle
165
+ }
166
+ }
167
+ }
168
+ ArcGisSymbologyRenderer.defaultPMS = {
169
+ type: "esriPMS",
170
+ url: "",
171
+ contentType: "image/png",
172
+ imageData: "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAmBJREFUOE+Nk01IVFEUx//n3jfvOZOaJkMtiiJ7o9RG3LgoqKhFSFJBTS1ahFBBi0ijfJXCIyQr+hBbSIsoW7iQoKKFCw2CkAI3tZAgy8Ei+xhoTCbnje/NPfHGnA816KzuPR+/c8/HJRQJE7o+VUhym0DcCOYGgBQEXjOLlyqo+nHanCkMoaL4rslKjZwOQLT4ek3Mmz3FACFNLB67ut6M1nWphbg8wI6VyJK5KEH0EQFVJRKbwzokAW++p/ErraAYSQK3u47bC3vLnA+ZB9i2gHF0oyQMCfCGNaUa+vauxs71wWz2V18cnBj8gQ8J1/eeBnHUa4sMFQDGdGno+4gwEAoQzjVUon3rqlx1KY9x7+0MWobjAPg3QJ2eZV4tAEyFNCN5FkSXyw2B3j1hRGvLcgBXMV5MptA4MOXr0gT0u5bZnAf0jBsyiSgJPAxqhON1K3FlRxUMvwFAtv7u0Wl0jvwEmJNEuOhakTt5wKEBifr6Oo14BIBRpgt07w6jcVMIngKGY7NofR5HwlF+zDcpsC193vyYB/innvHywCzdZfAR/+onX1segBTAxHzzfPE7/8yzzIPLjJE1LTixHZx5CtCK4gXLzovBiDPUsYxVM7gUkB3nWKlm6DYEnQGzXARxCOK+a1WfKtQXb6LNAvr7iCboCUA1Ocdsdv5KLPe7F6pH/w3wLbc+BwOuc5IZ1wEE/jonQbjptZn24tKKX7BgvR2r0NKZRwDvAqCI+Z30VJPTURv7P4A9psuQcYAUPwAoReBLrmX2Lmls7i8sZ7kWLwuoxA1FVJGxzMPLufi6P2r+2xFbOUjGAAAAAElFTkSuQmCC",
173
+ width: 16,
174
+ height: 16,
175
+ xoffset: -8,
176
+ yoffset: -16,
177
+ };
178
+ ArcGisSymbologyRenderer.defaultSLS = {
179
+ type: "esriSLS",
180
+ color: [0, 0, 0, 255],
181
+ width: 1,
182
+ style: "esriSLSSolid",
183
+ };
184
+ ArcGisSymbologyRenderer.defaultSFS = {
185
+ type: "esriSFS",
186
+ color: [0, 0, 0, 255],
187
+ style: "esriSFSSolid",
188
+ };
189
+ exports.ArcGisSymbologyRenderer = ArcGisSymbologyRenderer;
190
190
  //# sourceMappingURL=ArcGisSymbologyRenderer.js.map