@itwin/map-layers-formats 3.7.17 → 3.8.0

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 (173) hide show
  1. package/.rush/temp/d8b4633f5de9404e0cc3d7f2d38b0b1796b3c3db.log +10 -0
  2. package/.rush/temp/operation/build_ci/state.json +1 -1
  3. package/.rush/temp/operation/cover/state.json +1 -1
  4. package/.rush/temp/operation/docs/state.json +1 -1
  5. package/.rush/temp/package-deps_cover.json +3 -3
  6. package/.rush/temp/package-deps_docs.json +3 -3
  7. package/CHANGELOG.json +6 -0
  8. package/CHANGELOG.md +6 -1
  9. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.d.ts +8 -8
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +14 -14
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  12. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +14 -14
  13. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js +134 -134
  14. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js.map +1 -1
  15. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts +14 -14
  16. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js +205 -205
  17. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +1 -1
  18. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +44 -44
  19. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +426 -426
  20. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  21. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +92 -92
  22. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +82 -82
  23. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  24. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +17 -17
  25. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +33 -33
  26. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  27. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +32 -32
  28. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +142 -142
  29. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js.map +1 -1
  30. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts +16 -16
  31. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js +43 -43
  32. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  33. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +85 -85
  34. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +192 -192
  35. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  36. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.d.ts +1063 -1063
  37. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js +2270 -2270
  38. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  39. package/lib/cjs/map-layers-formats.d.ts +8 -8
  40. package/lib/cjs/map-layers-formats.js +24 -24
  41. package/lib/cjs/map-layers-formats.js.map +1 -1
  42. package/lib/cjs/mapLayersFormats.d.ts +10 -10
  43. package/lib/cjs/mapLayersFormats.js +28 -28
  44. package/lib/cjs/mapLayersFormats.js.map +1 -1
  45. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +1 -1
  46. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +34 -34
  47. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +1 -1
  48. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +1 -1
  49. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +161 -161
  50. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +1 -1
  51. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +1 -1
  52. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +167 -167
  53. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +1 -1
  54. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +1 -1
  55. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +680 -680
  56. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  57. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +1 -1
  58. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +103 -103
  59. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -1
  60. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +1 -1
  61. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +214 -214
  62. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +1 -1
  63. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +1 -1
  64. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +94 -94
  65. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +1 -1
  66. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +1 -1
  67. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +59 -59
  68. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -1
  69. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +6 -6
  70. package/lib/cjs/test/ArcGisFeature/Mocks.js +18 -18
  71. package/lib/cjs/test/ArcGisFeature/Mocks.js.map +1 -1
  72. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +55 -55
  73. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +419 -419
  74. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +1 -1
  75. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +1042 -1042
  76. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +426 -426
  77. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +1 -1
  78. package/lib/cjs/test/coverage/.nyc_output/30f898ea-9e83-4ce6-b350-715085fba0aa.json +1 -0
  79. package/lib/cjs/test/coverage/.nyc_output/processinfo/{3ddcaf4b-cad7-4b8f-8aa1-4045acac103f.json → 30f898ea-9e83-4ce6-b350-715085fba0aa.json} +1 -1
  80. package/lib/cjs/test/coverage/.nyc_output/processinfo/94d85507-6283-4d4b-a1cb-0b0c400beb1b.json +1 -0
  81. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
  82. package/lib/cjs/test/coverage/cobertura-coverage.xml +1 -1
  83. package/lib/cjs/test/coverage/lcov-report/index.html +1 -1
  84. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +1 -1
  85. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +1 -1
  86. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +1 -1
  87. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +1 -1
  88. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +1 -1
  89. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +1 -1
  90. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +1 -1
  91. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +1 -1
  92. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +1 -1
  93. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +1 -1
  94. package/lib/cjs/test/coverage/lcov-report/src/index.html +1 -1
  95. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +1 -1
  96. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +1 -1
  97. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  98. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts +8 -8
  99. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +10 -10
  100. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  101. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +14 -14
  102. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js +130 -130
  103. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js.map +1 -1
  104. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts +14 -14
  105. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js +201 -201
  106. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +1 -1
  107. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +44 -44
  108. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +422 -422
  109. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  110. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +92 -92
  111. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +78 -78
  112. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  113. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +17 -17
  114. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +29 -29
  115. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  116. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +32 -32
  117. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +138 -138
  118. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js.map +1 -1
  119. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts +16 -16
  120. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js +39 -39
  121. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  122. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +85 -85
  123. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +185 -185
  124. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  125. package/lib/esm/ArcGisFeature/esriPBuffer.gen.d.ts +1063 -1063
  126. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js +2267 -2267
  127. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  128. package/lib/esm/map-layers-formats.d.ts +8 -8
  129. package/lib/esm/map-layers-formats.js +12 -12
  130. package/lib/esm/map-layers-formats.js.map +1 -1
  131. package/lib/esm/mapLayersFormats.d.ts +10 -10
  132. package/lib/esm/mapLayersFormats.js +24 -24
  133. package/lib/esm/mapLayersFormats.js.map +1 -1
  134. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +1 -1
  135. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +32 -32
  136. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +1 -1
  137. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +1 -1
  138. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +159 -159
  139. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +1 -1
  140. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +1 -1
  141. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +165 -165
  142. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +1 -1
  143. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +1 -1
  144. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +678 -678
  145. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  146. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +1 -1
  147. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +101 -101
  148. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -1
  149. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +1 -1
  150. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +212 -212
  151. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +1 -1
  152. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +1 -1
  153. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +92 -92
  154. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +1 -1
  155. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +1 -1
  156. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +57 -57
  157. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -1
  158. package/lib/esm/test/ArcGisFeature/Mocks.d.ts +6 -6
  159. package/lib/esm/test/ArcGisFeature/Mocks.js +15 -15
  160. package/lib/esm/test/ArcGisFeature/Mocks.js.map +1 -1
  161. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +55 -55
  162. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +415 -415
  163. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +1 -1
  164. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +1042 -1042
  165. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +422 -422
  166. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +1 -1
  167. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  168. package/lib/test/junit_results.xml +47 -47
  169. package/package.json +12 -12
  170. package/.rush/temp/package-deps_build_ci.json +0 -36
  171. package/lib/cjs/test/coverage/.nyc_output/3ddcaf4b-cad7-4b8f-8aa1-4045acac103f.json +0 -1
  172. package/lib/cjs/test/coverage/.nyc_output/processinfo/ed368a38-912e-4cb7-acf0-becadbfc86d5.json +0 -1
  173. /package/lib/cjs/test/coverage/.nyc_output/{ed368a38-912e-4cb7-acf0-becadbfc86d5.json → 94d85507-6283-4d4b-a1cb-0b0c400beb1b.json} +0 -0
@@ -0,0 +1,10 @@
1
+ Start time: Fri Dec 08 2023 14:10:46 GMT-0500 (Eastern Standard Time)
2
+ Invoking "C:\WINDOWS\system32\tar.exe -x -m -f D:\vsts_a\7\s\common\temp\build-cache\d8b4633f5de9404e0cc3d7f2d38b0b1796b3c3db"
3
+
4
+ ======= BEGIN PROCESS INPUT ======
5
+
6
+ ======== END PROCESS INPUT =======
7
+ ======= BEGIN PROCESS OUTPUT =======
8
+ ======== END PROCESS OUTPUT ========
9
+
10
+ Exited with code "0"
@@ -1,3 +1,3 @@
1
1
  {
2
- "nonCachedDurationMs": 19841.087999999523
2
+ "nonCachedDurationMs": 24535.567236000672
3
3
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "nonCachedDurationMs": 13615.461800009012
2
+ "nonCachedDurationMs": 14643.86160004139
3
3
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "nonCachedDurationMs": 13900.523400008678
2
+ "nonCachedDurationMs": 15097.28989994526
3
3
  }
@@ -2,11 +2,11 @@
2
2
  "files": {
3
3
  "extensions/map-layers-formats/.rush/temp/shrinkwrap-deps.json": "a404ccb86eb450b51a96733dc81eb5210d3bf9b3",
4
4
  "extensions/map-layers-formats/.nycrc": "54fda69da5c7309ffeb79f061013f8e974970e3b",
5
- "extensions/map-layers-formats/CHANGELOG.json": "a57f590ba633869209ac3437308cadd9e7aacde7",
6
- "extensions/map-layers-formats/CHANGELOG.md": "a1ec9cec89399a9b5becf76d35232eed1d585558",
5
+ "extensions/map-layers-formats/CHANGELOG.json": "2d71384b4f19ade03769406cb080935c67fff9c1",
6
+ "extensions/map-layers-formats/CHANGELOG.md": "10234d5823a43f2dcbd44dd05e287357476082b5",
7
7
  "extensions/map-layers-formats/README.md": "2e48eb22484a04084a763ea7c9b55e59f7306e48",
8
8
  "extensions/map-layers-formats/config/rush-project.json": "10683a57d3bd2b8ae364fbe8f844c01619f1a821",
9
- "extensions/map-layers-formats/package.json": "bdc48c1d1b09f20b540785dd90add1a8b04f56d8",
9
+ "extensions/map-layers-formats/package.json": "2038a7acbc65b15975f5096e98a15a5d8e335d7a",
10
10
  "extensions/map-layers-formats/src/ArcGisFeature/ArcGisFeatureFormat.ts": "9b191ce9a9359a3cbbf73c2c01398019d43baf6d",
11
11
  "extensions/map-layers-formats/src/ArcGisFeature/ArcGisFeatureJSON.ts": "118ce09619b9f1a04401e6a510ee7f3c5d94ab73",
12
12
  "extensions/map-layers-formats/src/ArcGisFeature/ArcGisFeaturePBF.ts": "2a611f204b16e0bf02cb0ba0f7235a85a445510c",
@@ -2,11 +2,11 @@
2
2
  "files": {
3
3
  "extensions/map-layers-formats/.rush/temp/shrinkwrap-deps.json": "a404ccb86eb450b51a96733dc81eb5210d3bf9b3",
4
4
  "extensions/map-layers-formats/.nycrc": "54fda69da5c7309ffeb79f061013f8e974970e3b",
5
- "extensions/map-layers-formats/CHANGELOG.json": "a57f590ba633869209ac3437308cadd9e7aacde7",
6
- "extensions/map-layers-formats/CHANGELOG.md": "a1ec9cec89399a9b5becf76d35232eed1d585558",
5
+ "extensions/map-layers-formats/CHANGELOG.json": "2d71384b4f19ade03769406cb080935c67fff9c1",
6
+ "extensions/map-layers-formats/CHANGELOG.md": "10234d5823a43f2dcbd44dd05e287357476082b5",
7
7
  "extensions/map-layers-formats/README.md": "2e48eb22484a04084a763ea7c9b55e59f7306e48",
8
8
  "extensions/map-layers-formats/config/rush-project.json": "10683a57d3bd2b8ae364fbe8f844c01619f1a821",
9
- "extensions/map-layers-formats/package.json": "bdc48c1d1b09f20b540785dd90add1a8b04f56d8",
9
+ "extensions/map-layers-formats/package.json": "2038a7acbc65b15975f5096e98a15a5d8e335d7a",
10
10
  "extensions/map-layers-formats/src/ArcGisFeature/ArcGisFeatureFormat.ts": "9b191ce9a9359a3cbbf73c2c01398019d43baf6d",
11
11
  "extensions/map-layers-formats/src/ArcGisFeature/ArcGisFeatureJSON.ts": "118ce09619b9f1a04401e6a510ee7f3c5d94ab73",
12
12
  "extensions/map-layers-formats/src/ArcGisFeature/ArcGisFeaturePBF.ts": "2a611f204b16e0bf02cb0ba0f7235a85a445510c",
package/CHANGELOG.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "@itwin/map-layers-formats",
3
3
  "entries": [
4
+ {
5
+ "version": "3.8.0",
6
+ "tag": "@itwin/map-layers-formats_v3.8.0",
7
+ "date": "Fri, 08 Dec 2023 15:23:59 GMT",
8
+ "comments": {}
9
+ },
4
10
  {
5
11
  "version": "3.7.17",
6
12
  "tag": "@itwin/map-layers-formats_v3.7.17",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log - @itwin/map-layers-formats
2
2
 
3
- This log was last generated on Mon, 20 Nov 2023 18:24:23 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 08 Dec 2023 15:23:59 GMT and should not be manually modified.
4
+
5
+ ## 3.8.0
6
+ Fri, 08 Dec 2023 15:23:59 GMT
7
+
8
+ _Version update only_
4
9
 
5
10
  ## 3.7.17
6
11
  Mon, 20 Nov 2023 18:24:23 GMT
@@ -1,9 +1,9 @@
1
- import { ImageMapLayerSettings } from "@itwin/core-common";
2
- import { ImageryMapLayerFormat, MapLayerImageryProvider, MapLayerSourceValidation } from "@itwin/core-frontend";
3
- /** @internal */
4
- export declare class ArcGisFeatureMapLayerFormat extends ImageryMapLayerFormat {
5
- static formatId: string;
6
- static createImageryProvider(settings: ImageMapLayerSettings): MapLayerImageryProvider | undefined;
7
- static validateSource(url: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation>;
8
- }
1
+ import { ImageMapLayerSettings } from "@itwin/core-common";
2
+ import { ImageryMapLayerFormat, MapLayerImageryProvider, MapLayerSourceValidation } from "@itwin/core-frontend";
3
+ /** @internal */
4
+ export declare class ArcGisFeatureMapLayerFormat extends ImageryMapLayerFormat {
5
+ static formatId: string;
6
+ static createImageryProvider(settings: ImageMapLayerSettings): MapLayerImageryProvider | undefined;
7
+ static validateSource(url: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation>;
8
+ }
9
9
  //# sourceMappingURL=ArcGisFeatureFormat.d.ts.map
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ArcGisFeatureMapLayerFormat = void 0;
4
- const core_frontend_1 = require("@itwin/core-frontend");
5
- const ArcGisFeatureProvider_1 = require("./ArcGisFeatureProvider");
6
- /** @internal */
7
- class ArcGisFeatureMapLayerFormat extends core_frontend_1.ImageryMapLayerFormat {
8
- static createImageryProvider(settings) { return new ArcGisFeatureProvider_1.ArcGisFeatureProvider(settings); }
9
- static async validateSource(url, userName, password, ignoreCache) {
10
- return core_frontend_1.ArcGisUtilities.validateSource(url, this.formatId, ["query"], userName, password, ignoreCache);
11
- }
12
- }
13
- exports.ArcGisFeatureMapLayerFormat = ArcGisFeatureMapLayerFormat;
14
- ArcGisFeatureMapLayerFormat.formatId = "ArcGISFeature";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArcGisFeatureMapLayerFormat = void 0;
4
+ const core_frontend_1 = require("@itwin/core-frontend");
5
+ const ArcGisFeatureProvider_1 = require("./ArcGisFeatureProvider");
6
+ /** @internal */
7
+ class ArcGisFeatureMapLayerFormat extends core_frontend_1.ImageryMapLayerFormat {
8
+ static createImageryProvider(settings) { return new ArcGisFeatureProvider_1.ArcGisFeatureProvider(settings); }
9
+ static async validateSource(url, userName, password, ignoreCache) {
10
+ return core_frontend_1.ArcGisUtilities.validateSource(url, this.formatId, ["query"], userName, password, ignoreCache);
11
+ }
12
+ }
13
+ exports.ArcGisFeatureMapLayerFormat = ArcGisFeatureMapLayerFormat;
14
+ ArcGisFeatureMapLayerFormat.formatId = "ArcGISFeature";
15
15
  //# sourceMappingURL=ArcGisFeatureFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGisFeatureFormat.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeatureFormat.ts"],"names":[],"mappings":";;;AAKA,wDAAiI;AACjI,mEAAgE;AAEhE,gBAAgB;AAChB,MAAa,2BAA4B,SAAQ,qCAAqB;IAE7D,MAAM,CAAU,qBAAqB,CAAC,QAA+B,IAAyC,OAAO,IAAI,6CAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3J,MAAM,CAAU,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,QAAiB,EAAE,QAAiB,EAAE,WAAqB;QAClH,OAAO,+BAAe,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACxG,CAAC;;AALH,kEAMC;AALwB,oCAAQ,GAAG,eAAe,CAAC","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\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { ArcGisUtilities, ImageryMapLayerFormat, MapLayerImageryProvider, MapLayerSourceValidation } from \"@itwin/core-frontend\";\r\nimport { ArcGisFeatureProvider } from \"./ArcGisFeatureProvider\";\r\n\r\n/** @internal */\r\nexport class ArcGisFeatureMapLayerFormat extends ImageryMapLayerFormat {\r\n public static override formatId = \"ArcGISFeature\";\r\n public static override createImageryProvider(settings: ImageMapLayerSettings): MapLayerImageryProvider | undefined { return new ArcGisFeatureProvider(settings); }\r\n public static override async validateSource(url: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\r\n return ArcGisUtilities.validateSource(url, this.formatId, [\"query\"], userName, password, ignoreCache);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ArcGisFeatureFormat.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeatureFormat.ts"],"names":[],"mappings":";;;AAKA,wDAAiI;AACjI,mEAAgE;AAEhE,gBAAgB;AAChB,MAAa,2BAA4B,SAAQ,qCAAqB;IAE7D,MAAM,CAAU,qBAAqB,CAAC,QAA+B,IAAyC,OAAO,IAAI,6CAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3J,MAAM,CAAU,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,QAAiB,EAAE,QAAiB,EAAE,WAAqB;QAClH,OAAO,+BAAe,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACxG,CAAC;;AALH,kEAMC;AALwB,oCAAQ,GAAG,eAAe,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { ArcGisUtilities, ImageryMapLayerFormat, MapLayerImageryProvider, MapLayerSourceValidation } from \"@itwin/core-frontend\";\nimport { ArcGisFeatureProvider } from \"./ArcGisFeatureProvider\";\n\n/** @internal */\nexport class ArcGisFeatureMapLayerFormat extends ImageryMapLayerFormat {\n public static override formatId = \"ArcGISFeature\";\n public static override createImageryProvider(settings: ImageMapLayerSettings): MapLayerImageryProvider | undefined { return new ArcGisFeatureProvider(settings); }\n public static override async validateSource(url: string, userName?: string, password?: string, ignoreCache?: boolean): Promise<MapLayerSourceValidation> {\n return ArcGisUtilities.validateSource(url, this.formatId, [\"query\"], userName, password, ignoreCache);\n }\n}\n"]}
@@ -1,15 +1,15 @@
1
- import { ImageMapLayerSettings } from "@itwin/core-common";
2
- import { MapLayerFeatureInfo } from "@itwin/core-frontend";
3
- import { Transform } from "@itwin/core-geometry";
4
- import { ArcGisFeatureReader } from "./ArcGisFeatureReader";
5
- import { ArcGisFeatureRenderer } from "./ArcGisFeatureRenderer";
6
- import { ArcGisResponseData } from "./ArcGisFeatureResponse";
7
- /** @internal */
8
- export declare class ArcGisFeatureJSON extends ArcGisFeatureReader {
9
- transform: Transform | undefined;
10
- constructor(settings: ImageMapLayerSettings, layerMetadata: any);
11
- readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer): void;
12
- protected static deflateCoordinates(coordinates: number[][], flatCoordinates: number[], stride: number, offset: number): number;
13
- readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]): void;
14
- }
1
+ import { ImageMapLayerSettings } from "@itwin/core-common";
2
+ import { MapLayerFeatureInfo } from "@itwin/core-frontend";
3
+ import { Transform } from "@itwin/core-geometry";
4
+ import { ArcGisFeatureReader } from "./ArcGisFeatureReader";
5
+ import { ArcGisFeatureRenderer } from "./ArcGisFeatureRenderer";
6
+ import { ArcGisResponseData } from "./ArcGisFeatureResponse";
7
+ /** @internal */
8
+ export declare class ArcGisFeatureJSON extends ArcGisFeatureReader {
9
+ transform: Transform | undefined;
10
+ constructor(settings: ImageMapLayerSettings, layerMetadata: any);
11
+ readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer): void;
12
+ protected static deflateCoordinates(coordinates: number[][], flatCoordinates: number[], stride: number, offset: number): number;
13
+ readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]): void;
14
+ }
15
15
  //# sourceMappingURL=ArcGisFeatureJSON.d.ts.map
@@ -1,135 +1,135 @@
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.ArcGisFeatureJSON = void 0;
8
- const appui_abstract_1 = require("@itwin/appui-abstract");
9
- const core_frontend_1 = require("@itwin/core-frontend");
10
- const ArcGisFeatureReader_1 = require("./ArcGisFeatureReader");
11
- /** @internal */
12
- class ArcGisFeatureJSON extends ArcGisFeatureReader_1.ArcGisFeatureReader {
13
- constructor(settings, layerMetadata) {
14
- super(settings, layerMetadata);
15
- }
16
- readAndRender(response, renderer) {
17
- var _a, _b, _c, _d;
18
- const responseObj = response.data;
19
- if ((responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryPolyline" || (responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryPolygon") {
20
- const fill = (responseObj.geometryType === "esriGeometryPolygon");
21
- for (const feature of responseObj.features) {
22
- let offset = 0;
23
- const lengths = [];
24
- const coords = [];
25
- if ((_a = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _a === void 0 ? void 0 : _a.rings) {
26
- for (const ring of (_b = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _b === void 0 ? void 0 : _b.rings) {
27
- offset = ArcGisFeatureJSON.deflateCoordinates(ring, coords, 2, offset);
28
- lengths.push(ring.length);
29
- }
30
- }
31
- else if ((_c = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _c === void 0 ? void 0 : _c.paths) {
32
- for (const path of (_d = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _d === void 0 ? void 0 : _d.paths) {
33
- offset = ArcGisFeatureJSON.deflateCoordinates(path, coords, 2, offset);
34
- lengths.push(path.length);
35
- }
36
- }
37
- renderer.renderPath(lengths, coords, fill, 2, renderer.transform === undefined);
38
- }
39
- }
40
- else if ((responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryPoint" || (responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryMultiPoint") {
41
- for (const feature of responseObj.features) {
42
- // TODO: Add support for multipoint
43
- if (feature.geometry) {
44
- const lengths = [];
45
- const coords = [feature.geometry.x, feature.geometry.y];
46
- renderer.renderPoint(lengths, coords, 2, renderer.transform === undefined);
47
- }
48
- }
49
- }
50
- }
51
- // Converts an [[x1,y1], [x2,y2], ...] to [x1,y1,x2,y2, ...]
52
- // stride is the number of dimensions
53
- // https://github.com/openlayers/openlayers/blob/7a2f87caca9ddc1912d910f56eb5637445fc11f6/src/ol/geom/flat/deflate.js#L26
54
- static deflateCoordinates(coordinates, flatCoordinates, stride, offset) {
55
- for (let i = 0, ii = coordinates.length; i < ii; ++i) {
56
- const coordinate = coordinates[i];
57
- for (let j = 0; j < stride; ++j)
58
- flatCoordinates[offset++] = coordinate[j];
59
- }
60
- return offset;
61
- }
62
- readFeatureInfo(response, featureInfos) {
63
- var _a;
64
- const responseObj = response.data;
65
- if (responseObj === undefined || !Array.isArray(responseObj.features))
66
- return;
67
- const layerInfo = { layerName: this._settings.name };
68
- // Create a signature index for every field name / type.
69
- const fieldsType = {};
70
- for (const fieldInfo of responseObj.fields) {
71
- fieldsType[fieldInfo.name] = fieldInfo.type;
72
- }
73
- const getStandardTypeName = (fieldType) => {
74
- switch (fieldType) {
75
- case "esriFieldTypeInteger":
76
- case "esriFieldTypeSmallInteger":
77
- case "esriFieldTypeOID":
78
- return appui_abstract_1.StandardTypeNames.Integer;
79
- case "esriFieldTypeDouble":
80
- return appui_abstract_1.StandardTypeNames.Double;
81
- case "esriFieldTypeSingle":
82
- return appui_abstract_1.StandardTypeNames.Float;
83
- case "esriFieldTypeDate":
84
- return appui_abstract_1.StandardTypeNames.DateTime;
85
- default:
86
- return appui_abstract_1.StandardTypeNames.String;
87
- }
88
- };
89
- const getRecordInfo = (fieldName, value) => {
90
- const propertyValue = { valueFormat: appui_abstract_1.PropertyValueFormat.Primitive };
91
- if (value === null) {
92
- value = undefined;
93
- }
94
- const strValue = `${value}`;
95
- const fieldType = fieldsType[fieldName];
96
- switch (fieldType) {
97
- case "esriFieldTypeInteger":
98
- case "esriFieldTypeSmallInteger":
99
- case "esriFieldTypeOID":
100
- propertyValue.value = value;
101
- break;
102
- case "esriFieldTypeDouble":
103
- case "esriFieldTypeSingle":
104
- propertyValue.value = this.toFixedWithoutPadding(value);
105
- break;
106
- case "esriFieldTypeDate":
107
- propertyValue.value = new Date(value);
108
- break;
109
- default:
110
- if (value !== undefined)
111
- propertyValue.value = strValue;
112
- break;
113
- }
114
- const typename = getStandardTypeName(fieldType);
115
- propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);
116
- return new core_frontend_1.MapFeatureInfoRecord(propertyValue, { name: fieldName, displayLabel: fieldName, typename });
117
- };
118
- for (const feature of responseObj.features) {
119
- const subLayerInfo = {
120
- subLayerName: this._layerMetadata.name,
121
- displayFieldName: this._layerMetadata.name,
122
- records: [],
123
- };
124
- for (const [key, value] of Object.entries(feature.attributes))
125
- (_a = subLayerInfo.records) === null || _a === void 0 ? void 0 : _a.push(getRecordInfo(key, value));
126
- if (layerInfo.info === undefined)
127
- layerInfo.info = [];
128
- if (!(layerInfo.info instanceof HTMLElement))
129
- layerInfo.info.push(subLayerInfo);
130
- }
131
- featureInfos.push(layerInfo);
132
- }
133
- }
134
- exports.ArcGisFeatureJSON = ArcGisFeatureJSON;
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.ArcGisFeatureJSON = void 0;
8
+ const appui_abstract_1 = require("@itwin/appui-abstract");
9
+ const core_frontend_1 = require("@itwin/core-frontend");
10
+ const ArcGisFeatureReader_1 = require("./ArcGisFeatureReader");
11
+ /** @internal */
12
+ class ArcGisFeatureJSON extends ArcGisFeatureReader_1.ArcGisFeatureReader {
13
+ constructor(settings, layerMetadata) {
14
+ super(settings, layerMetadata);
15
+ }
16
+ readAndRender(response, renderer) {
17
+ var _a, _b, _c, _d;
18
+ const responseObj = response.data;
19
+ if ((responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryPolyline" || (responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryPolygon") {
20
+ const fill = (responseObj.geometryType === "esriGeometryPolygon");
21
+ for (const feature of responseObj.features) {
22
+ let offset = 0;
23
+ const lengths = [];
24
+ const coords = [];
25
+ if ((_a = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _a === void 0 ? void 0 : _a.rings) {
26
+ for (const ring of (_b = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _b === void 0 ? void 0 : _b.rings) {
27
+ offset = ArcGisFeatureJSON.deflateCoordinates(ring, coords, 2, offset);
28
+ lengths.push(ring.length);
29
+ }
30
+ }
31
+ else if ((_c = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _c === void 0 ? void 0 : _c.paths) {
32
+ for (const path of (_d = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _d === void 0 ? void 0 : _d.paths) {
33
+ offset = ArcGisFeatureJSON.deflateCoordinates(path, coords, 2, offset);
34
+ lengths.push(path.length);
35
+ }
36
+ }
37
+ renderer.renderPath(lengths, coords, fill, 2, renderer.transform === undefined);
38
+ }
39
+ }
40
+ else if ((responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryPoint" || (responseObj === null || responseObj === void 0 ? void 0 : responseObj.geometryType) === "esriGeometryMultiPoint") {
41
+ for (const feature of responseObj.features) {
42
+ // TODO: Add support for multipoint
43
+ if (feature.geometry) {
44
+ const lengths = [];
45
+ const coords = [feature.geometry.x, feature.geometry.y];
46
+ renderer.renderPoint(lengths, coords, 2, renderer.transform === undefined);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ // Converts an [[x1,y1], [x2,y2], ...] to [x1,y1,x2,y2, ...]
52
+ // stride is the number of dimensions
53
+ // https://github.com/openlayers/openlayers/blob/7a2f87caca9ddc1912d910f56eb5637445fc11f6/src/ol/geom/flat/deflate.js#L26
54
+ static deflateCoordinates(coordinates, flatCoordinates, stride, offset) {
55
+ for (let i = 0, ii = coordinates.length; i < ii; ++i) {
56
+ const coordinate = coordinates[i];
57
+ for (let j = 0; j < stride; ++j)
58
+ flatCoordinates[offset++] = coordinate[j];
59
+ }
60
+ return offset;
61
+ }
62
+ readFeatureInfo(response, featureInfos) {
63
+ var _a;
64
+ const responseObj = response.data;
65
+ if (responseObj === undefined || !Array.isArray(responseObj.features))
66
+ return;
67
+ const layerInfo = { layerName: this._settings.name };
68
+ // Create a signature index for every field name / type.
69
+ const fieldsType = {};
70
+ for (const fieldInfo of responseObj.fields) {
71
+ fieldsType[fieldInfo.name] = fieldInfo.type;
72
+ }
73
+ const getStandardTypeName = (fieldType) => {
74
+ switch (fieldType) {
75
+ case "esriFieldTypeInteger":
76
+ case "esriFieldTypeSmallInteger":
77
+ case "esriFieldTypeOID":
78
+ return appui_abstract_1.StandardTypeNames.Integer;
79
+ case "esriFieldTypeDouble":
80
+ return appui_abstract_1.StandardTypeNames.Double;
81
+ case "esriFieldTypeSingle":
82
+ return appui_abstract_1.StandardTypeNames.Float;
83
+ case "esriFieldTypeDate":
84
+ return appui_abstract_1.StandardTypeNames.DateTime;
85
+ default:
86
+ return appui_abstract_1.StandardTypeNames.String;
87
+ }
88
+ };
89
+ const getRecordInfo = (fieldName, value) => {
90
+ const propertyValue = { valueFormat: appui_abstract_1.PropertyValueFormat.Primitive };
91
+ if (value === null) {
92
+ value = undefined;
93
+ }
94
+ const strValue = `${value}`;
95
+ const fieldType = fieldsType[fieldName];
96
+ switch (fieldType) {
97
+ case "esriFieldTypeInteger":
98
+ case "esriFieldTypeSmallInteger":
99
+ case "esriFieldTypeOID":
100
+ propertyValue.value = value;
101
+ break;
102
+ case "esriFieldTypeDouble":
103
+ case "esriFieldTypeSingle":
104
+ propertyValue.value = this.toFixedWithoutPadding(value);
105
+ break;
106
+ case "esriFieldTypeDate":
107
+ propertyValue.value = new Date(value);
108
+ break;
109
+ default:
110
+ if (value !== undefined)
111
+ propertyValue.value = strValue;
112
+ break;
113
+ }
114
+ const typename = getStandardTypeName(fieldType);
115
+ propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);
116
+ return new core_frontend_1.MapFeatureInfoRecord(propertyValue, { name: fieldName, displayLabel: fieldName, typename });
117
+ };
118
+ for (const feature of responseObj.features) {
119
+ const subLayerInfo = {
120
+ subLayerName: this._layerMetadata.name,
121
+ displayFieldName: this._layerMetadata.name,
122
+ records: [],
123
+ };
124
+ for (const [key, value] of Object.entries(feature.attributes))
125
+ (_a = subLayerInfo.records) === null || _a === void 0 ? void 0 : _a.push(getRecordInfo(key, value));
126
+ if (layerInfo.info === undefined)
127
+ layerInfo.info = [];
128
+ if (!(layerInfo.info instanceof HTMLElement))
129
+ layerInfo.info.push(subLayerInfo);
130
+ }
131
+ featureInfos.push(layerInfo);
132
+ }
133
+ }
134
+ exports.ArcGisFeatureJSON = ArcGisFeatureJSON;
135
135
  //# sourceMappingURL=ArcGisFeatureJSON.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGisFeatureJSON.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeatureJSON.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,0DAA+F;AAE/F,wDAAyG;AAEzG,+DAA4D;AAI5D,gBAAgB;AAChB,MAAa,iBAAmB,SAAQ,yCAAmB;IAGzD,YA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EvD,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS;gBAC9B,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC;YAEtB,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,YAAY,WAAW,CAAC;gBAC1C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACrC;QAED,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;CACF;AA5ID,8CA4IC","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\r\nimport { PrimitiveValue, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { MapFeatureInfoRecord, MapLayerFeatureInfo, MapSubLayerFeatureInfo } from \"@itwin/core-frontend\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport { ArcGisFeatureReader } from \"./ArcGisFeatureReader\";\r\nimport { ArcGisFeatureRenderer } from \"./ArcGisFeatureRenderer\";\r\nimport { ArcGisFieldType, ArcGisResponseData } from \"./ArcGisFeatureResponse\";\r\n\r\n/** @internal */\r\nexport class ArcGisFeatureJSON extends ArcGisFeatureReader {\r\n public transform: Transform|undefined;\r\n\r\n public constructor(settings: ImageMapLayerSettings, layerMetadata: any) {\r\n super(settings, layerMetadata);\r\n }\r\n\r\n public readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer) {\r\n const responseObj = response.data;\r\n\r\n if (responseObj?.geometryType === \"esriGeometryPolyline\" || responseObj?.geometryType === \"esriGeometryPolygon\") {\r\n const fill = (responseObj.geometryType === \"esriGeometryPolygon\");\r\n for (const feature of responseObj.features) {\r\n let offset = 0;\r\n const lengths: number[] = [];\r\n const coords: number[] = [];\r\n\r\n if (feature?.geometry?.rings) {\r\n for (const ring of feature?.geometry?.rings) {\r\n offset = ArcGisFeatureJSON.deflateCoordinates(ring, coords, 2, offset);\r\n lengths.push(ring.length);\r\n }\r\n } else if (feature?.geometry?.paths) {\r\n for (const path of feature?.geometry?.paths) {\r\n offset = ArcGisFeatureJSON.deflateCoordinates(path, coords, 2, offset);\r\n lengths.push(path.length);\r\n }\r\n }\r\n renderer.renderPath(lengths, coords, fill, 2, renderer.transform === undefined);\r\n\r\n }\r\n } else if (responseObj?.geometryType === \"esriGeometryPoint\" || responseObj?.geometryType === \"esriGeometryMultiPoint\") {\r\n for (const feature of responseObj.features) {\r\n // TODO: Add support for multipoint\r\n if (feature.geometry) {\r\n const lengths: number[] = [];\r\n const coords: number[] = [feature.geometry.x, feature.geometry.y];\r\n renderer.renderPoint(lengths, coords, 2, renderer.transform === undefined);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Converts an [[x1,y1], [x2,y2], ...] to [x1,y1,x2,y2, ...]\r\n // stride is the number of dimensions\r\n // https://github.com/openlayers/openlayers/blob/7a2f87caca9ddc1912d910f56eb5637445fc11f6/src/ol/geom/flat/deflate.js#L26\r\n protected static deflateCoordinates( coordinates: number[][], flatCoordinates: number[], stride: number, offset: number) {\r\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\r\n const coordinate = coordinates[i];\r\n for (let j = 0; j < stride; ++j)\r\n flatCoordinates[offset++] = coordinate[j];\r\n }\r\n\r\n return offset;\r\n }\r\n\r\n public readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]) {\r\n const responseObj = response.data;\r\n if (responseObj === undefined || !Array.isArray(responseObj.features))\r\n return;\r\n\r\n const layerInfo: MapLayerFeatureInfo = {layerName: this._settings.name};\r\n\r\n // Create a signature index for every field name / type.\r\n const fieldsType: {[key: string]: ArcGisFieldType} = {};\r\n for (const fieldInfo of responseObj.fields) {\r\n fieldsType[fieldInfo.name] = fieldInfo.type;\r\n }\r\n\r\n const getStandardTypeName = (fieldType: ArcGisFieldType) => {\r\n switch (fieldType) {\r\n case \"esriFieldTypeInteger\":\r\n case \"esriFieldTypeSmallInteger\":\r\n case \"esriFieldTypeOID\":\r\n return StandardTypeNames.Integer;\r\n case \"esriFieldTypeDouble\":\r\n return StandardTypeNames.Double;\r\n case \"esriFieldTypeSingle\":\r\n return StandardTypeNames.Float;\r\n case \"esriFieldTypeDate\":\r\n return StandardTypeNames.DateTime;\r\n default:\r\n return StandardTypeNames.String;\r\n }\r\n };\r\n\r\n const getRecordInfo = (fieldName: string, value: any) => {\r\n const propertyValue: PrimitiveValue = {valueFormat: PropertyValueFormat.Primitive};\r\n\r\n if (value === null) {\r\n value = undefined;\r\n }\r\n\r\n const strValue = `${value}`;\r\n const fieldType = fieldsType[fieldName];\r\n switch (fieldType) {\r\n case \"esriFieldTypeInteger\":\r\n case \"esriFieldTypeSmallInteger\":\r\n case \"esriFieldTypeOID\":\r\n propertyValue.value = value as number;\r\n break;\r\n case \"esriFieldTypeDouble\":\r\n case \"esriFieldTypeSingle\":\r\n propertyValue.value = this.toFixedWithoutPadding(value);\r\n break;\r\n case \"esriFieldTypeDate\":\r\n propertyValue.value = new Date(value);\r\n break;\r\n default:\r\n if (value !== undefined)\r\n propertyValue.value = strValue;\r\n\r\n break;\r\n }\r\n\r\n const typename = getStandardTypeName(fieldType);\r\n propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);\r\n\r\n return new MapFeatureInfoRecord (propertyValue, {name: fieldName, displayLabel: fieldName, typename});\r\n };\r\n\r\n for (const feature of responseObj.features) {\r\n const subLayerInfo: MapSubLayerFeatureInfo = {\r\n subLayerName: this._layerMetadata.name,\r\n displayFieldName: this._layerMetadata.name,\r\n records : [],\r\n };\r\n\r\n for (const [key, value] of Object.entries(feature.attributes))\r\n subLayerInfo.records?.push(getRecordInfo(key,value));\r\n\r\n if (layerInfo.info === undefined)\r\n layerInfo.info = [];\r\n\r\n if (!(layerInfo.info instanceof HTMLElement))\r\n layerInfo.info.push(subLayerInfo);\r\n }\r\n\r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AI,CAAC,cAAc,CAAC,IAAI;gBAC1C,OAAO,EAAG,EAAE;aACb,CAAC;YAEF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;gBAC3D,MAAA,YAAY,CAAC,OAAO,0CAAE,IAAI,CAAC,aAAa,CAAC,GAAG,EAAC,KAAK,CAAC,CAAC,CAAC;YAEvD,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS;gBAC9B,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC;YAEtB,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,YAAY,WAAW,CAAC;gBAC1C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACrC;QAED,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;CACF;AA5ID,8CA4IC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { PrimitiveValue, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { MapFeatureInfoRecord, MapLayerFeatureInfo, MapSubLayerFeatureInfo } from \"@itwin/core-frontend\";\nimport { Transform } from \"@itwin/core-geometry\";\nimport { ArcGisFeatureReader } from \"./ArcGisFeatureReader\";\nimport { ArcGisFeatureRenderer } from \"./ArcGisFeatureRenderer\";\nimport { ArcGisFieldType, ArcGisResponseData } from \"./ArcGisFeatureResponse\";\n\n/** @internal */\nexport class ArcGisFeatureJSON extends ArcGisFeatureReader {\n public transform: Transform|undefined;\n\n public constructor(settings: ImageMapLayerSettings, layerMetadata: any) {\n super(settings, layerMetadata);\n }\n\n public readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer) {\n const responseObj = response.data;\n\n if (responseObj?.geometryType === \"esriGeometryPolyline\" || responseObj?.geometryType === \"esriGeometryPolygon\") {\n const fill = (responseObj.geometryType === \"esriGeometryPolygon\");\n for (const feature of responseObj.features) {\n let offset = 0;\n const lengths: number[] = [];\n const coords: number[] = [];\n\n if (feature?.geometry?.rings) {\n for (const ring of feature?.geometry?.rings) {\n offset = ArcGisFeatureJSON.deflateCoordinates(ring, coords, 2, offset);\n lengths.push(ring.length);\n }\n } else if (feature?.geometry?.paths) {\n for (const path of feature?.geometry?.paths) {\n offset = ArcGisFeatureJSON.deflateCoordinates(path, coords, 2, offset);\n lengths.push(path.length);\n }\n }\n renderer.renderPath(lengths, coords, fill, 2, renderer.transform === undefined);\n\n }\n } else if (responseObj?.geometryType === \"esriGeometryPoint\" || responseObj?.geometryType === \"esriGeometryMultiPoint\") {\n for (const feature of responseObj.features) {\n // TODO: Add support for multipoint\n if (feature.geometry) {\n const lengths: number[] = [];\n const coords: number[] = [feature.geometry.x, feature.geometry.y];\n renderer.renderPoint(lengths, coords, 2, renderer.transform === undefined);\n }\n }\n }\n }\n\n // Converts an [[x1,y1], [x2,y2], ...] to [x1,y1,x2,y2, ...]\n // stride is the number of dimensions\n // https://github.com/openlayers/openlayers/blob/7a2f87caca9ddc1912d910f56eb5637445fc11f6/src/ol/geom/flat/deflate.js#L26\n protected static deflateCoordinates( coordinates: number[][], flatCoordinates: number[], stride: number, offset: number) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n const coordinate = coordinates[i];\n for (let j = 0; j < stride; ++j)\n flatCoordinates[offset++] = coordinate[j];\n }\n\n return offset;\n }\n\n public readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]) {\n const responseObj = response.data;\n if (responseObj === undefined || !Array.isArray(responseObj.features))\n return;\n\n const layerInfo: MapLayerFeatureInfo = {layerName: this._settings.name};\n\n // Create a signature index for every field name / type.\n const fieldsType: {[key: string]: ArcGisFieldType} = {};\n for (const fieldInfo of responseObj.fields) {\n fieldsType[fieldInfo.name] = fieldInfo.type;\n }\n\n const getStandardTypeName = (fieldType: ArcGisFieldType) => {\n switch (fieldType) {\n case \"esriFieldTypeInteger\":\n case \"esriFieldTypeSmallInteger\":\n case \"esriFieldTypeOID\":\n return StandardTypeNames.Integer;\n case \"esriFieldTypeDouble\":\n return StandardTypeNames.Double;\n case \"esriFieldTypeSingle\":\n return StandardTypeNames.Float;\n case \"esriFieldTypeDate\":\n return StandardTypeNames.DateTime;\n default:\n return StandardTypeNames.String;\n }\n };\n\n const getRecordInfo = (fieldName: string, value: any) => {\n const propertyValue: PrimitiveValue = {valueFormat: PropertyValueFormat.Primitive};\n\n if (value === null) {\n value = undefined;\n }\n\n const strValue = `${value}`;\n const fieldType = fieldsType[fieldName];\n switch (fieldType) {\n case \"esriFieldTypeInteger\":\n case \"esriFieldTypeSmallInteger\":\n case \"esriFieldTypeOID\":\n propertyValue.value = value as number;\n break;\n case \"esriFieldTypeDouble\":\n case \"esriFieldTypeSingle\":\n propertyValue.value = this.toFixedWithoutPadding(value);\n break;\n case \"esriFieldTypeDate\":\n propertyValue.value = new Date(value);\n break;\n default:\n if (value !== undefined)\n propertyValue.value = strValue;\n\n break;\n }\n\n const typename = getStandardTypeName(fieldType);\n propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);\n\n return new MapFeatureInfoRecord (propertyValue, {name: fieldName, displayLabel: fieldName, typename});\n };\n\n for (const feature of responseObj.features) {\n const subLayerInfo: MapSubLayerFeatureInfo = {\n subLayerName: this._layerMetadata.name,\n displayFieldName: this._layerMetadata.name,\n records : [],\n };\n\n for (const [key, value] of Object.entries(feature.attributes))\n subLayerInfo.records?.push(getRecordInfo(key,value));\n\n if (layerInfo.info === undefined)\n layerInfo.info = [];\n\n if (!(layerInfo.info instanceof HTMLElement))\n layerInfo.info.push(subLayerInfo);\n }\n\n featureInfos.push(layerInfo);\n }\n}\n"]}
@@ -1,15 +1,15 @@
1
- import { ArcGisFeatureRenderer } from "./ArcGisFeatureRenderer";
2
- import { esriPBuffer } from "../ArcGisFeature/esriPBuffer.gen";
3
- import { MapLayerFeatureInfo } from "@itwin/core-frontend";
4
- import { ImageMapLayerSettings } from "@itwin/core-common";
5
- import { ArcGisFeatureReader } from "./ArcGisFeatureReader";
6
- import { ArcGisResponseData } from "./ArcGisFeatureResponse";
7
- import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
8
- /** @internal */
9
- export declare class ArcGisFeaturePBF extends ArcGisFeatureReader {
10
- constructor(settings: ImageMapLayerSettings, layerMetadata: any);
11
- static getArcGisFeatureGeometryType(geomType: esriPBuffer.FeatureCollectionPBuffer.GeometryType): ArcGisFeatureGeometryType;
12
- readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer): void;
13
- readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]): void;
14
- }
1
+ import { ArcGisFeatureRenderer } from "./ArcGisFeatureRenderer";
2
+ import { esriPBuffer } from "../ArcGisFeature/esriPBuffer.gen";
3
+ import { MapLayerFeatureInfo } from "@itwin/core-frontend";
4
+ import { ImageMapLayerSettings } from "@itwin/core-common";
5
+ import { ArcGisFeatureReader } from "./ArcGisFeatureReader";
6
+ import { ArcGisResponseData } from "./ArcGisFeatureResponse";
7
+ import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
8
+ /** @internal */
9
+ export declare class ArcGisFeaturePBF extends ArcGisFeatureReader {
10
+ constructor(settings: ImageMapLayerSettings, layerMetadata: any);
11
+ static getArcGisFeatureGeometryType(geomType: esriPBuffer.FeatureCollectionPBuffer.GeometryType): ArcGisFeatureGeometryType;
12
+ readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer): void;
13
+ readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]): void;
14
+ }
15
15
  //# sourceMappingURL=ArcGisFeaturePBF.d.ts.map