@itwin/map-layers-formats 4.1.0-dev.6 → 4.1.0-dev.63

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 (269) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts +17 -0
  3. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
  4. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js +42 -0
  5. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
  6. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -1
  7. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +3 -0
  8. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  9. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +7 -5
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +88 -35
  12. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  13. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
  14. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  15. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
  16. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  17. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
  18. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  19. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +6 -4
  20. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  21. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +13 -0
  22. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
  23. package/lib/cjs/ArcGisFeature/{ArcGisFeatureJSON.js → ArcGisJsonFeatureReader.js} +36 -58
  24. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
  25. package/lib/cjs/ArcGisFeature/{ArcGisFeaturePBF.d.ts → ArcGisPbfFeatureReader.d.ts} +6 -7
  26. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
  27. package/lib/cjs/ArcGisFeature/{ArcGisFeaturePBF.js → ArcGisPbfFeatureReader.js} +46 -32
  28. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
  29. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +4 -4
  30. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  31. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts +34 -0
  32. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
  33. package/lib/cjs/Tools/MapFeatureInfoDecorator.js +281 -0
  34. package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -0
  35. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts +38 -0
  36. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts.map +1 -0
  37. package/lib/cjs/Tools/MapFeatureInfoTool.js +113 -0
  38. package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -0
  39. package/lib/cjs/map-layers-formats.d.ts +1 -0
  40. package/lib/cjs/map-layers-formats.d.ts.map +1 -1
  41. package/lib/cjs/map-layers-formats.js +1 -0
  42. package/lib/cjs/map-layers-formats.js.map +1 -1
  43. package/lib/cjs/mapLayersFormats.d.ts +12 -1
  44. package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
  45. package/lib/cjs/mapLayersFormats.js +11 -1
  46. package/lib/cjs/mapLayersFormats.js.map +1 -1
  47. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts +17 -0
  48. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
  49. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js +38 -0
  50. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
  51. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -1
  52. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +4 -1
  53. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  54. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +7 -5
  55. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  56. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +89 -36
  57. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  58. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
  59. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  60. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
  61. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  62. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
  63. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  64. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +4 -2
  65. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  66. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +13 -0
  67. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
  68. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js +107 -0
  69. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
  70. package/lib/esm/ArcGisFeature/{ArcGisFeaturePBF.d.ts → ArcGisPbfFeatureReader.d.ts} +6 -7
  71. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
  72. package/lib/esm/ArcGisFeature/{ArcGisFeaturePBF.js → ArcGisPbfFeatureReader.js} +44 -30
  73. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
  74. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +4 -4
  75. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  76. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts +34 -0
  77. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
  78. package/lib/esm/Tools/MapFeatureInfoDecorator.js +277 -0
  79. package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -0
  80. package/lib/esm/Tools/MapFeatureInfoTool.d.ts +38 -0
  81. package/lib/esm/Tools/MapFeatureInfoTool.d.ts.map +1 -0
  82. package/lib/esm/Tools/MapFeatureInfoTool.js +110 -0
  83. package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -0
  84. package/lib/esm/map-layers-formats.d.ts +1 -0
  85. package/lib/esm/map-layers-formats.d.ts.map +1 -1
  86. package/lib/esm/map-layers-formats.js +1 -0
  87. package/lib/esm/map-layers-formats.js.map +1 -1
  88. package/lib/esm/mapLayersFormats.d.ts +12 -1
  89. package/lib/esm/mapLayersFormats.d.ts.map +1 -1
  90. package/lib/esm/mapLayersFormats.js +13 -2
  91. package/lib/esm/mapLayersFormats.js.map +1 -1
  92. package/lib/public/locales/en/mapLayersFormats.json +12 -0
  93. package/package.json +18 -15
  94. package/.nycrc +0 -10
  95. package/.rush/temp/operation/build/all.log +0 -3
  96. package/.rush/temp/operation/build/state.json +0 -3
  97. package/.rush/temp/operation/cover/all.log +0 -98
  98. package/.rush/temp/operation/cover/state.json +0 -3
  99. package/.rush/temp/operation/docs/all.log +0 -30
  100. package/.rush/temp/operation/docs/state.json +0 -3
  101. package/.rush/temp/package-deps_build.json +0 -36
  102. package/.rush/temp/package-deps_cover.json +0 -36
  103. package/.rush/temp/package-deps_docs.json +0 -36
  104. package/.rush/temp/shrinkwrap-deps.json +0 -505
  105. package/CHANGELOG.json +0 -119
  106. package/config/rush-project.json +0 -6
  107. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
  108. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
  109. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
  110. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
  111. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
  112. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
  113. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
  114. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +0 -143
  115. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
  116. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
  117. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
  118. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -35
  119. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
  120. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
  121. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
  122. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -162
  123. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
  124. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
  125. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
  126. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -168
  127. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
  128. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
  129. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
  130. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -680
  131. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
  132. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
  133. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
  134. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -104
  135. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
  136. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
  137. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
  138. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -215
  139. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
  140. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
  141. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
  142. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -95
  143. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
  144. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
  145. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
  146. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -60
  147. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
  148. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +0 -7
  149. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts.map +0 -1
  150. package/lib/cjs/test/ArcGisFeature/Mocks.js +0 -19
  151. package/lib/cjs/test/ArcGisFeature/Mocks.js.map +0 -1
  152. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
  153. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
  154. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +0 -420
  155. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
  156. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
  157. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
  158. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -427
  159. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
  160. package/lib/cjs/test/coverage/.nyc_output/abd3af4c-9bb0-47fb-a670-3c609e62305c.json +0 -1
  161. package/lib/cjs/test/coverage/.nyc_output/b444582a-0db5-4b2b-949d-8c71645890c8.json +0 -1
  162. package/lib/cjs/test/coverage/.nyc_output/processinfo/abd3af4c-9bb0-47fb-a670-3c609e62305c.json +0 -1
  163. package/lib/cjs/test/coverage/.nyc_output/processinfo/b444582a-0db5-4b2b-949d-8c71645890c8.json +0 -1
  164. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +0 -1
  165. package/lib/cjs/test/coverage/cobertura-coverage.xml +0 -1169
  166. package/lib/cjs/test/coverage/lcov-report/base.css +0 -224
  167. package/lib/cjs/test/coverage/lcov-report/block-navigation.js +0 -87
  168. package/lib/cjs/test/coverage/lcov-report/favicon.png +0 -0
  169. package/lib/cjs/test/coverage/lcov-report/index.html +0 -131
  170. package/lib/cjs/test/coverage/lcov-report/prettify.css +0 -1
  171. package/lib/cjs/test/coverage/lcov-report/prettify.js +0 -2
  172. package/lib/cjs/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  173. package/lib/cjs/test/coverage/lcov-report/sorter.js +0 -196
  174. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +0 -133
  175. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +0 -550
  176. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +0 -730
  177. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +0 -1546
  178. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +0 -763
  179. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +0 -223
  180. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +0 -598
  181. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +0 -301
  182. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +0 -832
  183. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +0 -236
  184. package/lib/cjs/test/coverage/lcov-report/src/index.html +0 -131
  185. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +0 -130
  186. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +0 -163
  187. package/lib/cjs/test/coverage/lcov.info +0 -1358
  188. package/lib/cjs/tsconfig.tsbuildinfo +0 -1
  189. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
  190. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
  191. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js +0 -129
  192. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
  193. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
  194. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
  195. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
  196. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
  197. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +0 -139
  198. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
  199. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
  200. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
  201. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -33
  202. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
  203. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
  204. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
  205. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -160
  206. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
  207. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
  208. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
  209. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -166
  210. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
  211. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
  212. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
  213. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -678
  214. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
  215. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
  216. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
  217. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -102
  218. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
  219. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
  220. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
  221. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -213
  222. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
  223. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
  224. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
  225. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -93
  226. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
  227. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
  228. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
  229. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -58
  230. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
  231. package/lib/esm/test/ArcGisFeature/Mocks.d.ts +0 -7
  232. package/lib/esm/test/ArcGisFeature/Mocks.d.ts.map +0 -1
  233. package/lib/esm/test/ArcGisFeature/Mocks.js +0 -16
  234. package/lib/esm/test/ArcGisFeature/Mocks.js.map +0 -1
  235. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
  236. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
  237. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +0 -417
  238. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
  239. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
  240. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
  241. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -424
  242. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
  243. package/lib/esm/tsconfig.tsbuildinfo +0 -1
  244. package/lib/test/junit_results.xml +0 -159
  245. package/map-layers-formats.build.log +0 -30
  246. package/src/ArcGisFeature/ArcGisFeatureFormat.ts +0 -16
  247. package/src/ArcGisFeature/ArcGisFeatureJSON.ts +0 -155
  248. package/src/ArcGisFeature/ArcGisFeaturePBF.ts +0 -215
  249. package/src/ArcGisFeature/ArcGisFeatureProvider.ts +0 -487
  250. package/src/ArcGisFeature/ArcGisFeatureQuery.ts +0 -226
  251. package/src/ArcGisFeature/ArcGisFeatureReader.ts +0 -46
  252. package/src/ArcGisFeature/ArcGisFeatureRenderer.ts +0 -171
  253. package/src/ArcGisFeature/ArcGisFeatureResponse.ts +0 -72
  254. package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +0 -249
  255. package/src/ArcGisFeature/esriPBuffer.gen.ts +0 -2612
  256. package/src/map-layers-formats.ts +0 -15
  257. package/src/mapLayersFormats.ts +0 -26
  258. package/src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts +0 -46
  259. package/src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts +0 -202
  260. package/src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts +0 -227
  261. package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +0 -805
  262. package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +0 -117
  263. package/src/test/ArcGisFeature/ArcGisFeatureRenderer.test.ts +0 -296
  264. package/src/test/ArcGisFeature/ArcGisFeatureResponse.test.ts +0 -109
  265. package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +0 -77
  266. package/src/test/ArcGisFeature/Mocks.ts +0 -19
  267. package/src/test/ArcGisFeature/NewYorkDataset.ts +0 -423
  268. package/src/test/ArcGisFeature/PhillyLandmarksDataset.ts +0 -455
  269. package/tsconfig.json +0 -20
package/CHANGELOG.json DELETED
@@ -1,119 +0,0 @@
1
- {
2
- "name": "@itwin/map-layers-formats",
3
- "entries": [
4
- {
5
- "version": "3.7.4",
6
- "tag": "@itwin/map-layers-formats_v3.7.4",
7
- "date": "Tue, 25 Apr 2023 17:50:35 GMT",
8
- "comments": {}
9
- },
10
- {
11
- "version": "3.7.3",
12
- "tag": "@itwin/map-layers-formats_v3.7.3",
13
- "date": "Thu, 20 Apr 2023 13:19:29 GMT",
14
- "comments": {}
15
- },
16
- {
17
- "version": "3.7.2",
18
- "tag": "@itwin/map-layers-formats_v3.7.2",
19
- "date": "Wed, 12 Apr 2023 13:12:42 GMT",
20
- "comments": {}
21
- },
22
- {
23
- "version": "3.7.1",
24
- "tag": "@itwin/map-layers-formats_v3.7.1",
25
- "date": "Mon, 03 Apr 2023 15:15:37 GMT",
26
- "comments": {}
27
- },
28
- {
29
- "version": "3.7.0",
30
- "tag": "@itwin/map-layers-formats_v3.7.0",
31
- "date": "Wed, 29 Mar 2023 15:02:27 GMT",
32
- "comments": {}
33
- },
34
- {
35
- "version": "3.6.3",
36
- "tag": "@itwin/map-layers-formats_v3.6.3",
37
- "date": "Mon, 27 Mar 2023 16:26:47 GMT",
38
- "comments": {}
39
- },
40
- {
41
- "version": "3.6.2",
42
- "tag": "@itwin/map-layers-formats_v3.6.2",
43
- "date": "Fri, 17 Mar 2023 17:52:32 GMT",
44
- "comments": {}
45
- },
46
- {
47
- "version": "3.6.1",
48
- "tag": "@itwin/map-layers-formats_v3.6.1",
49
- "date": "Fri, 24 Feb 2023 22:00:48 GMT",
50
- "comments": {}
51
- },
52
- {
53
- "version": "3.6.0",
54
- "tag": "@itwin/map-layers-formats_v3.6.0",
55
- "date": "Wed, 08 Feb 2023 14:58:40 GMT",
56
- "comments": {
57
- "none": [
58
- {
59
- "comment": "Allow map-layer requiring authentication to be correctly initialized after a saved view restore."
60
- },
61
- {
62
- "comment": "Map-layers oauth2 requests optimization and improvements"
63
- }
64
- ]
65
- }
66
- },
67
- {
68
- "version": "3.5.6",
69
- "tag": "@itwin/map-layers-formats_v3.5.6",
70
- "date": "Fri, 24 Feb 2023 16:02:47 GMT",
71
- "comments": {}
72
- },
73
- {
74
- "version": "3.5.5",
75
- "tag": "@itwin/map-layers-formats_v3.5.5",
76
- "date": "Thu, 26 Jan 2023 22:53:27 GMT",
77
- "comments": {}
78
- },
79
- {
80
- "version": "3.5.4",
81
- "tag": "@itwin/map-layers-formats_v3.5.4",
82
- "date": "Wed, 18 Jan 2023 15:27:15 GMT",
83
- "comments": {}
84
- },
85
- {
86
- "version": "3.5.3",
87
- "tag": "@itwin/map-layers-formats_v3.5.3",
88
- "date": "Fri, 13 Jan 2023 17:23:07 GMT",
89
- "comments": {}
90
- },
91
- {
92
- "version": "3.5.2",
93
- "tag": "@itwin/map-layers-formats_v3.5.2",
94
- "date": "Wed, 11 Jan 2023 16:46:30 GMT",
95
- "comments": {}
96
- },
97
- {
98
- "version": "3.5.1",
99
- "tag": "@itwin/map-layers-formats_v3.5.1",
100
- "date": "Thu, 15 Dec 2022 16:38:29 GMT",
101
- "comments": {}
102
- },
103
- {
104
- "version": "3.5.0",
105
- "tag": "@itwin/map-layers-formats_v3.5.0",
106
- "date": "Wed, 07 Dec 2022 19:12:37 GMT",
107
- "comments": {
108
- "none": [
109
- {
110
- "comment": "Improved ArcGIS feature for support servers older than version 11"
111
- },
112
- {
113
- "comment": "Enabled min LOD for ArcGisFeature format."
114
- }
115
- ]
116
- }
117
- }
118
- ]
119
- }
@@ -1,6 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json",
3
- "operationSettings": [
4
- { "operationName": "build", "outputFolderNames": ["lib"] }
5
- ]
6
- }
@@ -1,15 +0,0 @@
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
- //# sourceMappingURL=ArcGisFeatureJSON.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeatureJSON.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeatureJSON.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAwB,mBAAmB,EAA0B,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAmB,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,gBAAgB;AAChB,qBAAa,iBAAmB,SAAQ,mBAAmB;IAClD,SAAS,EAAE,SAAS,GAAC,SAAS,CAAC;gBAEnB,QAAQ,EAAE,qBAAqB,EAAE,aAAa,EAAE,GAAG;IAI/D,aAAa,CAAC,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,qBAAqB;IAuClF,S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;aACb,CAAC;YAEF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;gBAC3D,YAAY,CAAC,OAAO,EAAE,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":["/*---------------------------------------------------------------------------------------------\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\n featureInfos.push(layerInfo);\r\n }\r\n}\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeaturePBF.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeaturePBF.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAwB,mBAAmB,EAA0B,MAAM,sBAAsB,CAAC;AAEzG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAUjE,gBAAgB;AAChB,qBAAa,gBAAiB,SAAQ,mBAAmB;gBACpC,QAAQ,EAAE,qBAAqB,EAAE,aAAa,EAAE,GAAG;WAIxD,4BAA4B,CAAC,QAAQ,EAAE,WAAW,CAAC,wBAAwB,CAAC,YAAY,GAAG,yBAAyB;IAiB3H,aAAa,CAAC,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,qBAAqB;IA2B3E,eAAe,CAAC,QAAQ,EAAE,kBAAkB,EAAE,YAAY,EAAE,mBAAmB,EAAE;CA6IzF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeaturePBF.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeaturePBF.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F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,sBAAsB;QACtB,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE;YACnE,MAAM,YAAY,GAA2B;gBAC3C,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI;gBACtC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI;gBAC1C,OAAO,EAAE,EAAE;aACZ,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,CAAC;YAEV,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE;gBAC1C,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE;oBACrB,qBAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,6DAA6D,CAAC,CAAC;oBAC/F,MAAM;iBACP;gBACD,uCAAuC;gBACvC,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;gBACjD,IAAI,IAAI,EAAE;oBACR,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;iBAClC;gBAED,CAAC,EAAE,CAAC;aACL;YACD,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,EAAE;gBAChC,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC;aACrB;YACD,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,YAAY,WAAW,CAAC,EAAE;gBAC5C,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;aACnC;SACF;QAED,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;CACF;AA9LD,4CA8LC","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 { ArcGisFeatureRenderer } from \"./ArcGisFeatureRenderer\";\r\nimport { esriPBuffer } from \"../ArcGisFeature/esriPBuffer.gen\";\r\nimport { MapFeatureInfoRecord, MapLayerFeatureInfo, MapSubLayerFeatureInfo } from \"@itwin/core-frontend\";\r\nimport { PrimitiveValue, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { ArcGisFeatureReader } from \"./ArcGisFeatureReader\";\r\nimport { ArcGisResponseData } from \"./ArcGisFeatureResponse\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { ArcGisFeatureGeometryType } from \"./ArcGisFeatureQuery\";\r\n\r\nconst esriGeometryType = esriPBuffer.FeatureCollectionPBuffer.GeometryType;\r\nconst loggerCategory = \"MapLayersFormats.ArcGISFeature\";\r\n\r\ninterface PbfFieldInfo {\r\n name: string;\r\n type: esriPBuffer.FeatureCollectionPBuffer.FieldType;\r\n}\r\n\r\n/** @internal */\r\nexport class ArcGisFeaturePBF extends ArcGisFeatureReader {\r\n public constructor(settings: ImageMapLayerSettings, layerMetadata: any) {\r\n super(settings, layerMetadata);\r\n }\r\n\r\n public static getArcGisFeatureGeometryType(geomType: esriPBuffer.FeatureCollectionPBuffer.GeometryType): ArcGisFeatureGeometryType {\r\n switch (geomType) {\r\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipatch:\r\n return \"esriGeometryMultiPatch\";\r\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipoint:\r\n return \"esriGeometryMultipoint\";\r\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePoint:\r\n return \"esriGeometryPoint\";\r\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolygon:\r\n return \"esriGeometryPolygon\";\r\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolyline:\r\n return \"esriGeometryPolyline\";\r\n default:\r\n return \"esriGeometryNull\";\r\n }\r\n }\r\n\r\n public readAndRender(response: ArcGisResponseData, renderer: ArcGisFeatureRenderer) {\r\n if (!(response.data instanceof esriPBuffer.FeatureCollectionPBuffer)) {\r\n const msg = \"Response was not in PBF format\";\r\n Logger.logError(loggerCategory, msg);\r\n return;\r\n }\r\n\r\n const collection = response.data;\r\n if (!collection.has_queryResult || !collection.queryResult.has_featureResult || collection?.queryResult?.featureResult?.features === undefined)\r\n return;\r\n\r\n const geomType = collection.queryResult.featureResult.geometryType;\r\n const stride = (collection.queryResult.featureResult.hasM || collection.queryResult.featureResult.hasZ) ? 3 : 2;\r\n\r\n // console.log(`Nb Feature: ${collection.queryResult.featureResult.features.length}`);\r\n if (geomType === esriGeometryType.esriGeometryTypePoint ||\r\n geomType === esriGeometryType.esriGeometryTypeMultipoint) {\r\n for (const feature of collection.queryResult.featureResult.features)\r\n renderer.renderPoint(feature.geometry.lengths, feature.geometry.coords, stride, renderer.transform === undefined);\r\n } else if (geomType === esriGeometryType.esriGeometryTypePolyline || geomType === esriGeometryType.esriGeometryTypePolygon) {\r\n const fill = (geomType === esriGeometryType.esriGeometryTypePolygon);\r\n for (const feature of collection.queryResult.featureResult.features)\r\n if (feature?.has_geometry)\r\n renderer.renderPath(feature.geometry.lengths, feature.geometry.coords, fill, stride, renderer.transform === undefined);\r\n }\r\n }\r\n\r\n public readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[]) {\r\n if (!(response.data instanceof esriPBuffer.FeatureCollectionPBuffer)) {\r\n\r\n Logger.logError(loggerCategory, \"Response was not in PBF format\");\r\n }\r\n\r\n const collection = response.data as esriPBuffer.FeatureCollectionPBuffer;\r\n if (!collection.has_queryResult || !collection.queryResult.has_featureResult || collection?.queryResult?.featureResult?.features === undefined)\r\n return;\r\n\r\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, info: [] };\r\n\r\n // Fields metadata is stored outside feature results, create dedicated array first\r\n const fields: PbfFieldInfo[] = [];\r\n for (const field of collection.queryResult.featureResult.fields)\r\n fields.push({name: field.name, type:field.fieldType});\r\n\r\n const getNumericValue = (attrValue: esriPBuffer.FeatureCollectionPBuffer.Value) => {\r\n const propertyValue: PrimitiveValue = { valueFormat: PropertyValueFormat.Primitive };\r\n let typename = StandardTypeNames.Number;\r\n if (attrValue.has_double_value) {\r\n const value = this.toFixedWithoutPadding(attrValue.double_value);\r\n propertyValue.value = value;\r\n typename = StandardTypeNames.Double;\r\n } else if (attrValue.has_float_value) {\r\n const value = this.toFixedWithoutPadding(attrValue.float_value);\r\n propertyValue.value = value;\r\n typename = StandardTypeNames.Float;\r\n } else if (attrValue.has_int64_value) {\r\n propertyValue.value = attrValue.int64_value;\r\n typename = StandardTypeNames.Integer;\r\n } else if (attrValue.has_sint64_value) {\r\n propertyValue.value = attrValue.sint64_value;\r\n typename = StandardTypeNames.Integer;\r\n } else if (attrValue.has_sint_value) {\r\n propertyValue.value = attrValue.sint_value;\r\n typename = StandardTypeNames.Integer;\r\n } else if (attrValue.has_uint64_value) {\r\n propertyValue.value = attrValue.uint64_value;\r\n typename = StandardTypeNames.Integer;\r\n } else if (attrValue.has_uint_value) {\r\n propertyValue.value = attrValue.uint_value;\r\n typename = StandardTypeNames.Integer;\r\n } else {\r\n propertyValue.value = undefined;\r\n }\r\n\r\n return { propertyValue, typename };\r\n };\r\n\r\n const getRecordInfo = (fieldInfo: PbfFieldInfo, attrValue: esriPBuffer.FeatureCollectionPBuffer.Value) => {\r\n let propertyValue: PrimitiveValue = { valueFormat: PropertyValueFormat.Primitive };\r\n\r\n let typename = StandardTypeNames.String;\r\n if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDouble\r\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeInteger\r\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeSmallInteger\r\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeOID\r\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeSingle\r\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDate\r\n ) {\r\n const value = getNumericValue(attrValue);\r\n if (value.propertyValue === undefined) {\r\n Logger.logError(loggerCategory, `Could not read numeric value for field ${fieldInfo.name}`);\r\n return undefined;\r\n }\r\n\r\n if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDate) {\r\n const test = (value.propertyValue.value as unknown) as number;\r\n propertyValue.value = new Date(test);\r\n typename = StandardTypeNames.DateTime;\r\n } else {\r\n typename = value.typename;\r\n propertyValue = value.propertyValue;\r\n }\r\n } else if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeString) {\r\n if (attrValue.has_string_value) {\r\n propertyValue.value = attrValue.string_value;\r\n typename = StandardTypeNames.String;\r\n }\r\n } else if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeGlobalID) {\r\n if (attrValue.has_string_value) {\r\n propertyValue.value = attrValue.string_value;\r\n typename = StandardTypeNames.String;\r\n } else {\r\n const value = getNumericValue(attrValue);\r\n if (value.propertyValue === undefined) {\r\n Logger.logError(loggerCategory, `Could not read GlobalId value for field ${fieldInfo.name}`);\r\n return undefined;\r\n }\r\n }\r\n } else if (attrValue.has_string_value) {\r\n // If we reach this case that probably mean we don't support the field type, simply try to output string value\r\n typename = StandardTypeNames.String;\r\n propertyValue.value = attrValue.string_value;\r\n } else if (attrValue.value_type === \"none\") {\r\n // Sometimes fields are just empty, use an empty string\r\n typename = StandardTypeNames.String;\r\n propertyValue.value = undefined;\r\n } else {\r\n Logger.logError(loggerCategory, `Could not read value for field ${fieldInfo.name}`);\r\n return undefined;\r\n }\r\n\r\n propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);\r\n\r\n return new MapFeatureInfoRecord(propertyValue, { name: fieldInfo.name, displayLabel: fieldInfo.name, typename });\r\n };\r\n\r\n // Read feature values\r\n for (const feature of collection.queryResult.featureResult.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 let i = 0;\r\n\r\n for (const attrValue of feature.attributes) {\r\n if (i > fields.length) {\r\n Logger.logError(loggerCategory, \"Error while read feature info data: fields metadata missing\");\r\n break;\r\n }\r\n // Convert everything to string for now\r\n const info = getRecordInfo(fields[i], attrValue);\r\n if (info) {\r\n subLayerInfo.records?.push(info);\r\n }\r\n\r\n i++;\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\n\r\n featureInfos.push(layerInfo);\r\n }\r\n}\r\n"]}
@@ -1,33 +0,0 @@
1
- import { Transform } from "@itwin/core-geometry";
2
- import { ArcGisSymbologyRenderer } from "./ArcGisSymbologyRenderer";
3
- /** @internal */
4
- export declare class ArcGisFeatureRenderer {
5
- private _symbol;
6
- private _transform;
7
- private _context;
8
- constructor(context: CanvasRenderingContext2D, symbol: ArcGisSymbologyRenderer, world2PixelTransform?: Transform);
9
- get transform(): Transform | undefined;
10
- private closePath;
11
- private lineTo;
12
- private moveTo;
13
- private fill;
14
- private stroke;
15
- /**
16
- * Render a path on the renderer's context.
17
- * Note: Inputs are designed based on the PBF format, to avoid any data transformation.
18
- * @param geometryLengths Array be used to determine the start and end of each sub-path / rings. (i.e. [5,5] = two rings of 5 vertices)
19
- * @param geometryCoords Array that linearly encodes the vertices of each sub-path of a polyline / ring of a polygon
20
- * @param fill Indicates if the path should be filled or not.
21
- * @param stride Dimension of each vertices (i.e. 2 or 3. 3 could be X,Y,Z, X,YM) Currently 3rd dimension is ignored.
22
- */
23
- renderPath(geometryLengths: number[], geometryCoords: number[], fill: boolean, stride: number, relativeCoords: boolean): void;
24
- /**
25
- * Render a point on the renderer's context.
26
- * Note: Inputs are designed based on the PBF format, to avoid any data transformation.
27
- * @param geometryLengths Array be used to determine the start and end of each multi-point array, empty for single point.
28
- * @param geometryCoords Array that linearly encodes vertices.
29
- * @param stride Dimension of each vertices (i.e. 2 or 3. 3 could be X,Y,Z, X,YM) Currently 3rd dimension is ignored.
30
- */
31
- renderPoint(geometryLengths: number[], geometryCoords: number[], stride: number, relativeCoords: boolean): void;
32
- }
33
- //# sourceMappingURL=ArcGisFeatureRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeatureRenderer.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeatureRenderer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,QAAQ,CAA2B;gBAE/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,uBAAuB,EAAE,oBAAoB,CAAC,EAAE,SAAS;IAMhH,IAAW,SAAS,0BAA4B;IAGhD,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,MAAM;IAId;;;;;;;MAOE;IACK,UAAU,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;IAmE7H;;;;;;MAME;IACK,WAAW,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO;CA8ChH"}
@@ -1,143 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ArcGisFeatureRenderer = void 0;
4
- /** @internal */
5
- class ArcGisFeatureRenderer {
6
- constructor(context, symbol, world2PixelTransform) {
7
- this._symbol = symbol;
8
- this._context = context;
9
- this._transform = world2PixelTransform;
10
- }
11
- get transform() { return this._transform; }
12
- // Utility functions to make ease testing.
13
- closePath() {
14
- this._context.closePath();
15
- }
16
- lineTo(x, y) {
17
- this._context.lineTo(x, y);
18
- }
19
- moveTo(x, y) {
20
- this._context.moveTo(x, y);
21
- }
22
- fill() {
23
- this._context.fill();
24
- }
25
- stroke() {
26
- this._context.stroke();
27
- }
28
- /**
29
- * Render a path on the renderer's context.
30
- * Note: Inputs are designed based on the PBF format, to avoid any data transformation.
31
- * @param geometryLengths Array be used to determine the start and end of each sub-path / rings. (i.e. [5,5] = two rings of 5 vertices)
32
- * @param geometryCoords Array that linearly encodes the vertices of each sub-path of a polyline / ring of a polygon
33
- * @param fill Indicates if the path should be filled or not.
34
- * @param stride Dimension of each vertices (i.e. 2 or 3. 3 could be X,Y,Z, X,YM) Currently 3rd dimension is ignored.
35
- */
36
- renderPath(geometryLengths, geometryCoords, fill, stride, relativeCoords) {
37
- if (stride < 2 || stride > 3) {
38
- return;
39
- }
40
- // Keep track of our position in the in the 'coords' array:
41
- // Every time we loop on the 'lengths' array, the position
42
- // to start reading vertices in the 'coords' must be the sum of all previously read vertices.
43
- let coordsOffset = 0;
44
- // Begin the path here.
45
- // Note: Even though path is closed inside the 'geometryLengths' loop,
46
- // it's import to begin the path only once.
47
- this._context.beginPath();
48
- for (const vertexCount of geometryLengths) {
49
- let lastPtX = 0, lastPtY = 0;
50
- for (let vertexIdx = 0; vertexIdx < vertexCount; vertexIdx++) {
51
- let pX = geometryCoords[coordsOffset + (vertexIdx * stride)];
52
- let pY = geometryCoords[coordsOffset + (vertexIdx * stride) + 1];
53
- if (vertexIdx === 0) {
54
- // first vertex is always "absolute" and must be drawn as 'moveTo' (i.e. not lineTo)
55
- if (relativeCoords) {
56
- lastPtX = pX;
57
- lastPtY = pY;
58
- }
59
- if (this._transform) {
60
- const transformedPoint = this._transform.multiplyPoint2d({ x: pX, y: pY });
61
- pX = transformedPoint.x;
62
- pY = transformedPoint.y;
63
- }
64
- this.moveTo(pX, pY);
65
- }
66
- else {
67
- // Following vertices are relative to the previous one (sadly not really well documented by ESRI)
68
- // typically this happens when 'coordinates quantization' is active (i.e. no client side transformation is needed)
69
- if (relativeCoords) {
70
- pX = lastPtX = lastPtX + pX;
71
- pY = lastPtY = lastPtY + pY;
72
- }
73
- if (this._transform) {
74
- const transformedPoint = this._transform.multiplyPoint2d({ x: pX, y: pY });
75
- pX = transformedPoint.x;
76
- pY = transformedPoint.y;
77
- }
78
- this.lineTo(pX, pY);
79
- }
80
- }
81
- coordsOffset += stride * vertexCount;
82
- if (fill) {
83
- // ClosePath but do not 'fill' here, only at the very end (otherwise it will mess up holes)
84
- this.closePath();
85
- }
86
- }
87
- if (fill) {
88
- this._symbol.applyFillStyle(this._context);
89
- this.fill();
90
- }
91
- this._symbol.applyStrokeStyle(this._context);
92
- this.stroke(); // draw line path or polygon outline
93
- }
94
- /**
95
- * Render a point on the renderer's context.
96
- * Note: Inputs are designed based on the PBF format, to avoid any data transformation.
97
- * @param geometryLengths Array be used to determine the start and end of each multi-point array, empty for single point.
98
- * @param geometryCoords Array that linearly encodes vertices.
99
- * @param stride Dimension of each vertices (i.e. 2 or 3. 3 could be X,Y,Z, X,YM) Currently 3rd dimension is ignored.
100
- */
101
- renderPoint(geometryLengths, geometryCoords, stride, relativeCoords) {
102
- if (stride < 2 || stride > 3) {
103
- return;
104
- }
105
- let coordsOffset = 0;
106
- if (geometryLengths.length === 0) {
107
- // Strangely, for points, 'lengths' array is empty, so we assume there is a single vertex in 'coords' array.
108
- if (geometryCoords.length >= stride) {
109
- if (this._transform) {
110
- const transformedPoint = this._transform.multiplyPoint2d({ x: geometryCoords[0], y: geometryCoords[1] });
111
- this._symbol.drawPoint(this._context, transformedPoint.x, transformedPoint.y);
112
- }
113
- else {
114
- this._symbol.drawPoint(this._context, geometryCoords[0], geometryCoords[1]);
115
- }
116
- }
117
- }
118
- else {
119
- // MULTI-POINTS: Needs testing
120
- // I assume 'lengths' array will get populated and 'coords' array will look similar to line/polygons.
121
- for (const vertexCount of geometryLengths) {
122
- let lastPtX = 0, lastPtY = 0;
123
- for (let vertexIdx = 0; vertexIdx < vertexCount; vertexIdx++) {
124
- let pX = geometryCoords[coordsOffset + (vertexIdx * stride)];
125
- let pY = geometryCoords[coordsOffset + (vertexIdx * stride) + 1];
126
- if (relativeCoords) {
127
- pX = lastPtX = lastPtX + pX;
128
- pY = lastPtY = lastPtY + pY;
129
- }
130
- if (this._transform) {
131
- const transformedPoint = this._transform.multiplyPoint2d({ x: pX, y: pY });
132
- pX = transformedPoint.x;
133
- pY = transformedPoint.y;
134
- }
135
- this._symbol.drawPoint(this._context, pX, pY);
136
- }
137
- coordsOffset += stride * vertexCount;
138
- }
139
- }
140
- }
141
- }
142
- exports.ArcGisFeatureRenderer = ArcGisFeatureRenderer;
143
- //# sourceMappingURL=ArcGisFeatureRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeatureRenderer.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisFeatureRenderer.ts"],"names":[],"mappings":";;;AAOA,gBAAgB;AAChB,MAAa,qBAAqB;IAKhC,YAAY,OAAiC,EAAE,MAA+B,EAAE,oBAAgC;QAC9G,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC;IACzC,CAAC;IAED,IAAW,SAAS,KAAI,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA,CAAC;IAEhD,0CAA0C;IAClC,SAAS;QACf,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAEO,MAAM,CAAC,CAAS,E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,CAAC,GAAC,CAAC,CAAC,CAAC;oBAE3D,IAAI,cAAc,EAAE;wBAClB,EAAE,GAAG,OAAO,GAAG,OAAO,GAAC,EAAE,CAAC;wBAC1B,EAAE,GAAG,OAAO,GAAG,OAAO,GAAC,EAAE,CAAC;qBAC3B;oBAED,IAAI,IAAI,CAAC,UAAU,EAAE;wBACnB,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC,EAAE,EAAC,CAAC,CAAC;wBACxE,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC;wBACxB,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC;qBACzB;oBAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;iBAE/C;gBACD,YAAY,IAAE,MAAM,GAAC,WAAW,CAAC;aAClC;SACF;IAEH,CAAC;CAEF;AAlKD,sDAkKC","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 { Transform } from \"@itwin/core-geometry\";\r\nimport { ArcGisSymbologyRenderer } from \"./ArcGisSymbologyRenderer\";\r\n\r\n/** @internal */\r\nexport class ArcGisFeatureRenderer {\r\n private _symbol: ArcGisSymbologyRenderer;\r\n private _transform: Transform|undefined;\r\n private _context: CanvasRenderingContext2D;\r\n\r\n constructor(context: CanvasRenderingContext2D, symbol: ArcGisSymbologyRenderer, world2PixelTransform?: Transform) {\r\n this._symbol = symbol;\r\n this._context = context;\r\n this._transform = world2PixelTransform;\r\n }\r\n\r\n public get transform() {return this._transform;}\r\n\r\n // Utility functions to make ease testing.\r\n private closePath() {\r\n this._context.closePath();\r\n }\r\n\r\n private lineTo(x: number, y: number) {\r\n this._context.lineTo(x,y);\r\n }\r\n\r\n private moveTo(x: number, y: number) {\r\n this._context.moveTo(x,y);\r\n }\r\n\r\n private fill() {\r\n this._context.fill();\r\n }\r\n\r\n private stroke() {\r\n this._context.stroke();\r\n }\r\n\r\n /**\r\n * Render a path on the renderer's context.\r\n * Note: Inputs are designed based on the PBF format, to avoid any data transformation.\r\n * @param geometryLengths Array be used to determine the start and end of each sub-path / rings. (i.e. [5,5] = two rings of 5 vertices)\r\n * @param geometryCoords Array that linearly encodes the vertices of each sub-path of a polyline / ring of a polygon\r\n * @param fill Indicates if the path should be filled or not.\r\n * @param stride Dimension of each vertices (i.e. 2 or 3. 3 could be X,Y,Z, X,YM) Currently 3rd dimension is ignored.\r\n */\r\n public renderPath(geometryLengths: number[], geometryCoords: number[], fill: boolean, stride: number, relativeCoords: boolean) {\r\n if (stride < 2 || stride > 3) {\r\n return;\r\n }\r\n\r\n // Keep track of our position in the in the 'coords' array:\r\n // Every time we loop on the 'lengths' array, the position\r\n // to start reading vertices in the 'coords' must be the sum of all previously read vertices.\r\n let coordsOffset = 0;\r\n\r\n // Begin the path here.\r\n // Note: Even though path is closed inside the 'geometryLengths' loop,\r\n // it's import to begin the path only once.\r\n this._context.beginPath();\r\n for (const vertexCount of geometryLengths) {\r\n let lastPtX = 0, lastPtY = 0;\r\n for (let vertexIdx=0 ; vertexIdx <vertexCount; vertexIdx++) {\r\n let pX = geometryCoords[coordsOffset+(vertexIdx*stride)];\r\n let pY = geometryCoords[coordsOffset+(vertexIdx*stride)+1];\r\n if (vertexIdx === 0) {\r\n // first vertex is always \"absolute\" and must be drawn as 'moveTo' (i.e. not lineTo)\r\n if (relativeCoords) {\r\n lastPtX = pX;\r\n lastPtY = pY;\r\n }\r\n\r\n if (this._transform) {\r\n const transformedPoint = this._transform.multiplyPoint2d({x: pX, y:pY});\r\n pX = transformedPoint.x;\r\n pY = transformedPoint.y;\r\n }\r\n\r\n this.moveTo(pX, pY);\r\n } else {\r\n\r\n // Following vertices are relative to the previous one (sadly not really well documented by ESRI)\r\n // typically this happens when 'coordinates quantization' is active (i.e. no client side transformation is needed)\r\n if (relativeCoords) {\r\n pX = lastPtX = lastPtX+pX;\r\n pY = lastPtY = lastPtY+pY;\r\n }\r\n\r\n if (this._transform) {\r\n const transformedPoint = this._transform.multiplyPoint2d({x: pX, y:pY});\r\n pX = transformedPoint.x;\r\n pY = transformedPoint.y;\r\n }\r\n this.lineTo(pX, pY);\r\n }\r\n\r\n }\r\n coordsOffset+=stride*vertexCount;\r\n if (fill) {\r\n // ClosePath but do not 'fill' here, only at the very end (otherwise it will mess up holes)\r\n this.closePath();\r\n }\r\n }\r\n\r\n if (fill) {\r\n this._symbol.applyFillStyle(this._context);\r\n this.fill();\r\n }\r\n\r\n this._symbol.applyStrokeStyle(this._context);\r\n this.stroke(); // draw line path or polygon outline\r\n }\r\n\r\n /**\r\n * Render a point on the renderer's context.\r\n * Note: Inputs are designed based on the PBF format, to avoid any data transformation.\r\n * @param geometryLengths Array be used to determine the start and end of each multi-point array, empty for single point.\r\n * @param geometryCoords Array that linearly encodes vertices.\r\n * @param stride Dimension of each vertices (i.e. 2 or 3. 3 could be X,Y,Z, X,YM) Currently 3rd dimension is ignored.\r\n */\r\n public renderPoint(geometryLengths: number[], geometryCoords: number[], stride: number, relativeCoords: boolean) {\r\n\r\n if (stride < 2 || stride > 3) {\r\n return;\r\n }\r\n let coordsOffset = 0;\r\n if (geometryLengths.length === 0) {\r\n // Strangely, for points, 'lengths' array is empty, so we assume there is a single vertex in 'coords' array.\r\n if (geometryCoords.length >= stride) {\r\n\r\n if (this._transform) {\r\n const transformedPoint = this._transform.multiplyPoint2d({x: geometryCoords[0], y:geometryCoords[1]});\r\n this._symbol.drawPoint(this._context, transformedPoint.x, transformedPoint.y);\r\n } else {\r\n this._symbol.drawPoint(this._context, geometryCoords[0], geometryCoords[1]);\r\n }\r\n }\r\n } else {\r\n // MULTI-POINTS: Needs testing\r\n // I assume 'lengths' array will get populated and 'coords' array will look similar to line/polygons.\r\n for (const vertexCount of geometryLengths) {\r\n let lastPtX = 0, lastPtY = 0;\r\n for (let vertexIdx=0 ; vertexIdx <vertexCount; vertexIdx++) {\r\n let pX = geometryCoords[coordsOffset+(vertexIdx*stride)];\r\n let pY = geometryCoords[coordsOffset+(vertexIdx*stride)+1];\r\n\r\n if (relativeCoords) {\r\n pX = lastPtX = lastPtX+pX;\r\n pY = lastPtY = lastPtY+pY;\r\n }\r\n\r\n if (this._transform) {\r\n const transformedPoint = this._transform.multiplyPoint2d({x: pX, y:pY});\r\n pX = transformedPoint.x;\r\n pY = transformedPoint.y;\r\n }\r\n\r\n this._symbol.drawPoint(this._context, pX, pY);\r\n\r\n }\r\n coordsOffset+=stride*vertexCount;\r\n }\r\n }\r\n\r\n }\r\n\r\n}\r\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ArcGisFeatureFeatureFormats.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeatureFeatureFormats.test.d.ts","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts"],"names":[],"mappings":""}
@@ -1,35 +0,0 @@
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
- const core_common_1 = require("@itwin/core-common");
8
- const core_frontend_1 = require("@itwin/core-frontend");
9
- const chai_1 = require("chai");
10
- const ArcGisFeatureFormat_1 = require("../../ArcGisFeature/ArcGisFeatureFormat");
11
- const Mocks_1 = require("./Mocks");
12
- const sinon = require("sinon");
13
- describe("ArcGisFeaturePBF", () => {
14
- const sandbox = sinon.createSandbox();
15
- afterEach(async () => {
16
- sandbox.restore();
17
- });
18
- it("should createImageryProvider", async () => {
19
- const provider = ArcGisFeatureFormat_1.ArcGisFeatureMapLayerFormat.createImageryProvider(core_common_1.ImageMapLayerSettings.fromJSON(Mocks_1.esriFeatureSampleSource));
20
- (0, chai_1.expect)(provider).to.not.undefined;
21
- });
22
- it("should validateSource", async () => {
23
- const fakeMethod = async (_url, _formatId, _filter, _userName, _password, _ignoreCache) => {
24
- return { status: core_frontend_1.MapLayerSourceStatus.Valid };
25
- };
26
- const validateSourceStub = sinon.stub(core_frontend_1.ArcGisUtilities, "validateSource").callsFake(fakeMethod);
27
- await ArcGisFeatureFormat_1.ArcGisFeatureMapLayerFormat.validateSource(Mocks_1.esriFeatureSampleSource.url);
28
- (0, chai_1.expect)(validateSourceStub.calledOnce).to.be.true;
29
- const firstCall = validateSourceStub.getCalls()[0];
30
- (0, chai_1.expect)(firstCall.args[0]).to.equals(Mocks_1.esriFeatureSampleSource.url);
31
- (0, chai_1.expect)(firstCall.args[1]).to.equals(ArcGisFeatureFormat_1.ArcGisFeatureMapLayerFormat.formatId);
32
- (0, chai_1.expect)(firstCall.args[2]).to.eqls(["query"]);
33
- });
34
- });
35
- //# sourceMappingURL=ArcGisFeatureFeatureFormats.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeatureFeatureFormats.test.js","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;AAE/F,oDAA2D;AAC3D,wDAG8B;AAC9B,+BAA8B;AAC9B,iFAAsF;AACtF,mCAAkD;AAClD,+BAA+B;AAE/B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAEhC,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IAEtC,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,QAAQ,GAAG,iDAA2B,CAAC,qBAAqB,CAAC,mC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\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 { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport {\r\n ArcGisUtilities,\r\n MapLayerSourceStatus,\r\n} from \"@itwin/core-frontend\";\r\nimport { expect } from \"chai\";\r\nimport { ArcGisFeatureMapLayerFormat } from \"../../ArcGisFeature/ArcGisFeatureFormat\";\r\nimport { esriFeatureSampleSource } from \"./Mocks\";\r\nimport * as sinon from \"sinon\";\r\n\r\ndescribe(\"ArcGisFeaturePBF\", () => {\r\n\r\n const sandbox = sinon.createSandbox();\r\n\r\n afterEach(async () => {\r\n sandbox.restore();\r\n });\r\n\r\n it(\"should createImageryProvider\", async () => {\r\n const provider = ArcGisFeatureMapLayerFormat.createImageryProvider(ImageMapLayerSettings.fromJSON(esriFeatureSampleSource));\r\n expect(provider).to.not.undefined;\r\n });\r\n\r\n it(\"should validateSource\", async () => {\r\n\r\n const fakeMethod = async (_url: string, _formatId: string,_filter: string[], _userName?: string, _password?: string, _ignoreCache?: boolean) => {\r\n return {status: MapLayerSourceStatus.Valid};\r\n\r\n };\r\n const validateSourceStub = sinon.stub(ArcGisUtilities, \"validateSource\").callsFake(fakeMethod);\r\n\r\n await ArcGisFeatureMapLayerFormat.validateSource(esriFeatureSampleSource.url);\r\n\r\n expect(validateSourceStub.calledOnce).to.be.true;\r\n const firstCall = validateSourceStub.getCalls()[0];\r\n expect(firstCall.args[0]).to.equals(esriFeatureSampleSource.url);\r\n expect(firstCall.args[1]).to.equals(ArcGisFeatureMapLayerFormat.formatId);\r\n expect(firstCall.args[2]).to.eqls([\"query\"]);\r\n });\r\n\r\n});\r\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ArcGisFeatureJSON.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ArcGisFeatureJSON.test.d.ts","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts"],"names":[],"mappings":""}