@itwin/map-layers-formats 4.1.0-dev.54 → 4.1.0-dev.56

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 (272) hide show
  1. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts +17 -0
  2. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
  3. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js +42 -0
  4. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
  5. package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  6. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +4 -5
  7. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  8. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +39 -24
  9. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  12. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
  13. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  14. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
  15. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  16. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +6 -4
  17. package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  18. package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  19. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +13 -0
  20. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
  21. package/lib/cjs/ArcGisFeature/{ArcGisFeatureJSON.js → ArcGisJsonFeatureReader.js} +36 -58
  22. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
  23. package/lib/cjs/ArcGisFeature/{ArcGisFeaturePBF.d.ts → ArcGisPbfFeatureReader.d.ts} +6 -7
  24. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
  25. package/lib/cjs/ArcGisFeature/{ArcGisFeaturePBF.js → ArcGisPbfFeatureReader.js} +46 -32
  26. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
  27. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +1 -1
  28. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  29. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  30. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts +34 -0
  31. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
  32. package/lib/cjs/Tools/MapFeatureInfoDecorator.js +281 -0
  33. package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -0
  34. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts +38 -0
  35. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts.map +1 -0
  36. package/lib/cjs/Tools/MapFeatureInfoTool.js +113 -0
  37. package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -0
  38. package/lib/cjs/map-layers-formats.d.ts +1 -0
  39. package/lib/cjs/map-layers-formats.d.ts.map +1 -1
  40. package/lib/cjs/map-layers-formats.js +1 -0
  41. package/lib/cjs/map-layers-formats.js.map +1 -1
  42. package/lib/cjs/mapLayersFormats.d.ts +12 -1
  43. package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
  44. package/lib/cjs/mapLayersFormats.js +11 -1
  45. package/lib/cjs/mapLayersFormats.js.map +1 -1
  46. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts +17 -0
  47. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
  48. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js +38 -0
  49. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
  50. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  51. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +4 -5
  52. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  53. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +40 -25
  54. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  55. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
  56. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  57. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
  58. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  59. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
  60. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  61. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +4 -2
  62. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  63. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  64. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +13 -0
  65. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
  66. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js +107 -0
  67. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
  68. package/lib/esm/ArcGisFeature/{ArcGisFeaturePBF.d.ts → ArcGisPbfFeatureReader.d.ts} +6 -7
  69. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
  70. package/lib/esm/ArcGisFeature/{ArcGisFeaturePBF.js → ArcGisPbfFeatureReader.js} +44 -30
  71. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
  72. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +1 -1
  73. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  74. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  75. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts +34 -0
  76. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
  77. package/lib/esm/Tools/MapFeatureInfoDecorator.js +277 -0
  78. package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -0
  79. package/lib/esm/Tools/MapFeatureInfoTool.d.ts +38 -0
  80. package/lib/esm/Tools/MapFeatureInfoTool.d.ts.map +1 -0
  81. package/lib/esm/Tools/MapFeatureInfoTool.js +110 -0
  82. package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -0
  83. package/lib/esm/map-layers-formats.d.ts +1 -0
  84. package/lib/esm/map-layers-formats.d.ts.map +1 -1
  85. package/lib/esm/map-layers-formats.js +1 -0
  86. package/lib/esm/map-layers-formats.js.map +1 -1
  87. package/lib/esm/mapLayersFormats.d.ts +12 -1
  88. package/lib/esm/mapLayersFormats.d.ts.map +1 -1
  89. package/lib/esm/mapLayersFormats.js +13 -2
  90. package/lib/esm/mapLayersFormats.js.map +1 -1
  91. package/lib/public/locales/en/mapLayersFormats.json +12 -0
  92. package/package.json +15 -12
  93. package/.nycrc +0 -10
  94. package/.rush/temp/operation/build/all.log +0 -1
  95. package/.rush/temp/operation/build/state.json +0 -3
  96. package/.rush/temp/operation/cover/all.log +0 -103
  97. package/.rush/temp/operation/cover/state.json +0 -3
  98. package/.rush/temp/operation/docs/all.log +0 -30
  99. package/.rush/temp/operation/docs/state.json +0 -3
  100. package/.rush/temp/package-deps_build.json +0 -36
  101. package/.rush/temp/package-deps_cover.json +0 -36
  102. package/.rush/temp/package-deps_docs.json +0 -36
  103. package/.rush/temp/shrinkwrap-deps.json +0 -495
  104. package/CHANGELOG.json +0 -176
  105. package/config/rush-project.json +0 -6
  106. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
  107. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
  108. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
  109. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
  110. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
  111. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
  112. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
  113. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +0 -143
  114. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
  115. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
  116. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
  117. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -35
  118. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
  119. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
  120. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
  121. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -162
  122. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
  123. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
  124. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
  125. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -168
  126. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
  127. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
  128. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
  129. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -812
  130. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
  131. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
  132. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
  133. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -104
  134. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
  135. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
  136. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
  137. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -215
  138. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
  139. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
  140. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
  141. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -95
  142. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
  143. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
  144. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
  145. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -60
  146. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
  147. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +0 -7
  148. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts.map +0 -1
  149. package/lib/cjs/test/ArcGisFeature/Mocks.js +0 -19
  150. package/lib/cjs/test/ArcGisFeature/Mocks.js.map +0 -1
  151. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
  152. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
  153. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +0 -420
  154. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
  155. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
  156. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
  157. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -427
  158. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
  159. package/lib/cjs/test/coverage/.nyc_output/329513f2-7069-4b0e-a487-c3b48366153a.json +0 -1
  160. package/lib/cjs/test/coverage/.nyc_output/a1ec61a9-c1af-46dd-9c85-a6f85693894b.json +0 -1
  161. package/lib/cjs/test/coverage/.nyc_output/processinfo/329513f2-7069-4b0e-a487-c3b48366153a.json +0 -1
  162. package/lib/cjs/test/coverage/.nyc_output/processinfo/a1ec61a9-c1af-46dd-9c85-a6f85693894b.json +0 -1
  163. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +0 -1
  164. package/lib/cjs/test/coverage/cobertura-coverage.xml +0 -1206
  165. package/lib/cjs/test/coverage/lcov-report/base.css +0 -224
  166. package/lib/cjs/test/coverage/lcov-report/block-navigation.js +0 -87
  167. package/lib/cjs/test/coverage/lcov-report/favicon.png +0 -0
  168. package/lib/cjs/test/coverage/lcov-report/index.html +0 -131
  169. package/lib/cjs/test/coverage/lcov-report/prettify.css +0 -1
  170. package/lib/cjs/test/coverage/lcov-report/prettify.js +0 -2
  171. package/lib/cjs/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  172. package/lib/cjs/test/coverage/lcov-report/sorter.js +0 -196
  173. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +0 -145
  174. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +0 -550
  175. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +0 -730
  176. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +0 -1672
  177. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +0 -763
  178. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +0 -223
  179. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +0 -598
  180. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +0 -301
  181. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +0 -832
  182. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +0 -236
  183. package/lib/cjs/test/coverage/lcov-report/src/index.html +0 -131
  184. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +0 -130
  185. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +0 -163
  186. package/lib/cjs/test/coverage/lcov.info +0 -1399
  187. package/lib/cjs/tsconfig.tsbuildinfo +0 -1
  188. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
  189. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
  190. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js +0 -129
  191. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
  192. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
  193. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
  194. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
  195. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
  196. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +0 -139
  197. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
  198. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
  199. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
  200. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -33
  201. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
  202. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
  203. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
  204. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -160
  205. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
  206. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
  207. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
  208. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -166
  209. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
  210. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
  211. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
  212. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -810
  213. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
  214. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
  215. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
  216. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -102
  217. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
  218. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
  219. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
  220. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -213
  221. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
  222. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
  223. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
  224. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -93
  225. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
  226. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
  227. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
  228. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -58
  229. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
  230. package/lib/esm/test/ArcGisFeature/Mocks.d.ts +0 -7
  231. package/lib/esm/test/ArcGisFeature/Mocks.d.ts.map +0 -1
  232. package/lib/esm/test/ArcGisFeature/Mocks.js +0 -16
  233. package/lib/esm/test/ArcGisFeature/Mocks.js.map +0 -1
  234. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
  235. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
  236. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +0 -417
  237. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
  238. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
  239. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
  240. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -424
  241. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
  242. package/lib/esm/tsconfig.tsbuildinfo +0 -1
  243. package/lib/test/junit_results.xml +0 -169
  244. package/map-layers-formats.build.cache.log +0 -2
  245. package/map-layers-formats.cover.log +0 -103
  246. package/map-layers-formats.docs.log +0 -30
  247. package/map-layers-formats.lint.error.log +0 -1
  248. package/map-layers-formats.lint.log +0 -2
  249. package/src/ArcGisFeature/ArcGisFeatureFormat.ts +0 -20
  250. package/src/ArcGisFeature/ArcGisFeatureJSON.ts +0 -155
  251. package/src/ArcGisFeature/ArcGisFeaturePBF.ts +0 -215
  252. package/src/ArcGisFeature/ArcGisFeatureProvider.ts +0 -529
  253. package/src/ArcGisFeature/ArcGisFeatureQuery.ts +0 -226
  254. package/src/ArcGisFeature/ArcGisFeatureReader.ts +0 -46
  255. package/src/ArcGisFeature/ArcGisFeatureRenderer.ts +0 -171
  256. package/src/ArcGisFeature/ArcGisFeatureResponse.ts +0 -72
  257. package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +0 -249
  258. package/src/ArcGisFeature/esriPBuffer.gen.ts +0 -2612
  259. package/src/map-layers-formats.ts +0 -15
  260. package/src/mapLayersFormats.ts +0 -26
  261. package/src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts +0 -46
  262. package/src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts +0 -202
  263. package/src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts +0 -227
  264. package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +0 -977
  265. package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +0 -117
  266. package/src/test/ArcGisFeature/ArcGisFeatureRenderer.test.ts +0 -296
  267. package/src/test/ArcGisFeature/ArcGisFeatureResponse.test.ts +0 -109
  268. package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +0 -77
  269. package/src/test/ArcGisFeature/Mocks.ts +0 -19
  270. package/src/test/ArcGisFeature/NewYorkDataset.ts +0 -423
  271. package/src/test/ArcGisFeature/PhillyLandmarksDataset.ts +0 -455
  272. package/tsconfig.json +0 -20
@@ -1,15 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- export * from "./mapLayersFormats";
7
- export * from "./ArcGisFeature/ArcGisFeatureProvider";
8
-
9
- /** @docs-package-description
10
- * This package provides support for additional map layer formats that are not included in the @itwin/core-frontend package.
11
- */
12
-
13
- /** @docs-group-description MapLayersFormats
14
- * APIs for working with the map layer formats provided by this package.
15
- */
@@ -1,26 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- /** @packageDocumentation
7
- * @module MapLayersFormats
8
- */
9
- import { assert } from "@itwin/core-bentley";
10
- import { IModelApp } from "@itwin/core-frontend";
11
- import { ArcGisFeatureMapLayerFormat } from "./ArcGisFeature/ArcGisFeatureFormat";
12
-
13
- /** The primary API for the `@itwin/map-layers-formats` package. It allows the package's features to be [[initialize]]d.
14
- * @beta
15
- */
16
- export class MapLayersFormats {
17
- /** Registers the [MapLayerFormat]($frontend)s provided by this package for use with [IModelApp]($frontend).
18
- * Typically, an application will call `MapLayersFormats.initialize` immediately after [IModelApp.startup]($frontend).
19
- * This function has no effect if called **before** [IModelApp.startup]($frontend) or **after** [IModelApp.shutdown]($frontend).
20
- */
21
- public static initialize() {
22
- assert(IModelApp.initialized, "MapLayersFormats.initialize must be called after IModelApp.startup and before IModelApp.shutdown");
23
- if (IModelApp.initialized)
24
- IModelApp.mapLayerFormatRegistry.register(ArcGisFeatureMapLayerFormat);
25
- }
26
- }
@@ -1,46 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- import { ImageMapLayerSettings } from "@itwin/core-common";
7
- import {
8
- ArcGisUtilities,
9
- MapLayerSourceStatus,
10
- } from "@itwin/core-frontend";
11
- import { expect } from "chai";
12
- import { ArcGisFeatureMapLayerFormat } from "../../ArcGisFeature/ArcGisFeatureFormat";
13
- import { esriFeatureSampleSource } from "./Mocks";
14
- import * as sinon from "sinon";
15
-
16
- describe("ArcGisFeaturePBF", () => {
17
-
18
- const sandbox = sinon.createSandbox();
19
-
20
- afterEach(async () => {
21
- sandbox.restore();
22
- });
23
-
24
- it("should createImageryProvider", async () => {
25
- const provider = ArcGisFeatureMapLayerFormat.createImageryProvider(ImageMapLayerSettings.fromJSON(esriFeatureSampleSource));
26
- expect(provider).to.not.undefined;
27
- });
28
-
29
- it("should validateSource", async () => {
30
-
31
- const fakeMethod = async (_url: string, _formatId: string,_filter: string[], _userName?: string, _password?: string, _ignoreCache?: boolean) => {
32
- return {status: MapLayerSourceStatus.Valid};
33
-
34
- };
35
- const validateSourceStub = sinon.stub(ArcGisUtilities, "validateSource").callsFake(fakeMethod);
36
-
37
- await ArcGisFeatureMapLayerFormat.validateSource(esriFeatureSampleSource.url);
38
-
39
- expect(validateSourceStub.calledOnce).to.be.true;
40
- const firstCall = validateSourceStub.getCalls()[0];
41
- expect(firstCall.args[0]).to.equals(esriFeatureSampleSource.url);
42
- expect(firstCall.args[1]).to.equals(ArcGisFeatureMapLayerFormat.formatId);
43
- expect(firstCall.args[2]).to.eqls(["query"]);
44
- });
45
-
46
- });
@@ -1,202 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- import { Logger } from "@itwin/core-bentley";
7
- import { ImageMapLayerSettings } from "@itwin/core-common";
8
- import { MapLayerFeatureInfo } from "@itwin/core-frontend";
9
- import { expect } from "chai";
10
- import * as sinon from "sinon";
11
- import { ArcGisFeatureMapLayerFormat } from "../../ArcGisFeature/ArcGisFeatureFormat";
12
- import { ArcGisFeatureJSON } from "../../ArcGisFeature/ArcGisFeatureJSON";
13
- import { ArcGisFeatureGeometryType } from "../../ArcGisFeature/ArcGisFeatureQuery";
14
- import { ArcGisFeatureRenderer } from "../../ArcGisFeature/ArcGisFeatureRenderer";
15
- import { ArcGisSymbologyRenderer } from "../../ArcGisFeature/ArcGisSymbologyRenderer";
16
- import { fakeContext } from "./Mocks";
17
- import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
18
-
19
- const esriFeatureSampleSource = {name: "dummyFeatureLayer", url: "https://dummy.com", formatId: ArcGisFeatureMapLayerFormat.formatId};
20
-
21
- const createFeatureJSON = () => {
22
- const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
23
- const featurePbf = new ArcGisFeatureJSON(settings, {name: "SampleLayer"});
24
-
25
- // Locale configuration depends on the testing machine (i.e. linux vs windows),
26
- // so we need to force date display to Iso to get a consistent value.
27
- // In real scenario, we still want dates to be displayed in end-user's locale.
28
- featurePbf.forceDateDisplayValueToIso = true;
29
- return featurePbf;
30
- };
31
-
32
- describe("ArcGisFeatureJSON", () => {
33
-
34
- const sandbox = sinon.createSandbox();
35
-
36
- afterEach(async () => {
37
- sandbox.restore();
38
- });
39
-
40
- it("should read FeatureInfo in JSON (phillyTansportation)", async () => {
41
- const featureJson = createFeatureJSON();
42
- // In some cases, PBF gives more floating-point precision than JSON.
43
- // Since I want to use the same output reference for both formats, I force a max precision of 8.
44
- featureJson.floatPrecision = 8;
45
- const results: MapLayerFeatureInfo[] = [];
46
- featureJson.readFeatureInfo({data: PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryJson, exceedTransferLimit: false}, results);
47
- expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyTansportationGetFeatureInfoResultRef));
48
- });
49
-
50
- it("should read FeatureInfo in JSON (phillyAirport)", async () => {
51
- const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
52
- const featureJson = new ArcGisFeatureJSON(settings, {name: "SampleLayer"});
53
- // In some cases, PBF gives more floating-point precision than JSON.
54
- // Since I want to use the same output reference for both formats, I force a max precision of 8.
55
- featureJson.floatPrecision = 8;
56
- const results: MapLayerFeatureInfo[] = [];
57
- const data = JSON.parse(PhillyLandmarksDataset.phillyAirportGetFeatureInfoQueryJson);
58
- featureJson.readFeatureInfo({data, exceedTransferLimit: false}, results);
59
- const _test = JSON.stringify(results);
60
- expect(_test).equals(JSON.stringify(PhillyLandmarksDataset.phillyAirportGetFeatureInfoResultRef));
61
- });
62
-
63
- it("should deflate coordinates array", async () => {
64
- // Simple deflate stride = 2
65
- let doubleArray = [[1,2], [3,4]];
66
- let deflated: number[] = [];
67
- let offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 2, 0);
68
- expect(offset).to.equals(4);
69
- expect(deflated).to.eql([1,2,3,4]);
70
-
71
- /// Check offset with stride = 2
72
- doubleArray = [[5,6]];
73
- offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 2, offset);
74
- expect(offset).to.equals(6);
75
- expect(deflated).to.eql([1,2,3,4,5,6]);
76
-
77
- // Simple deflate stride = 3
78
- doubleArray = [[1,2,3], [4,5,6]];
79
- deflated = [];
80
- offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 3, 0);
81
- expect(offset).to.equals(6);
82
- expect(deflated).to.eql([1,2,3,4,5,6]);
83
-
84
- /// Check offset with stride = 3
85
- doubleArray = [[7,8,9]];
86
- offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 3, offset);
87
- expect(offset).to.equals(9);
88
- expect(deflated).to.eql([1,2,3,4,5,6,7,8,9]);
89
- });
90
-
91
- it("should readAndRender single ring polygon feature", async () => {
92
- const featureJson = createFeatureJSON();
93
-
94
- const data = PhillyLandmarksDataset.phillySimplePolyQueryJson;
95
-
96
- const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
97
-
98
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
99
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
100
- featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
101
- expect(renderPathSpy.calledOnce);
102
-
103
- const firstCall = renderPathSpy.getCalls()[0];
104
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
105
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
106
- expect(firstCall.args[2]).to.eql(true); // fill
107
- expect(firstCall.args[3]).to.eql(2); // stride
108
- });
109
-
110
- it("should readAndRender multiple ring polygon feature", async () => {
111
- const featureJson = createFeatureJSON();
112
-
113
- const data = PhillyLandmarksDataset.phillyDoubleRingPolyQueryJson;
114
-
115
- const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
116
-
117
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
118
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
119
- featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
120
- expect(renderPathSpy.calledOnce);
121
-
122
- const firstCall = renderPathSpy.getCalls()[0];
123
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
124
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
125
- expect(firstCall.args[2]).to.eql(true); // fill
126
- expect(firstCall.args[3]).to.eql(2); // stride
127
- });
128
-
129
- it("should readAndRender simple path", async () => {
130
- const featureJson = createFeatureJSON();
131
- const data = PhillyLandmarksDataset.phillySimplePathQueryJson;
132
- const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType,
133
- PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
134
-
135
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
136
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
137
- featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
138
- expect(renderPathSpy.calledOnce);
139
-
140
- const geometryCoords = [360,491,-2,-1,-1,0,-1,0,-1,0,-1,1,-4,1,-10,2,-15,3,-1,0,-1,0,-2,0,-1,0,-1,0,-1,-1,-1,0,-2,-1,0,-1,-1,0,-1,0,-1,0,-1,0,-1,0,-1,0];
141
- const firstCall = renderPathSpy.getCalls()[0];
142
- expect(firstCall.args[0]).to.eql([24]); // geometryLengths
143
- expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords
144
- expect(firstCall.args[2]).to.eql(false); // fill
145
- expect(firstCall.args[3]).to.eql(2); // stride
146
- });
147
-
148
- it("should readAndRender multi path", async () => {
149
- const featureJson = createFeatureJSON();
150
- const data = PhillyLandmarksDataset.phillyMultiPathQueryJson;
151
- const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
152
-
153
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
154
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
155
- featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
156
- expect(renderPathSpy.calledOnce);
157
-
158
- // Pbf contains already the right output format expect, lets rely on that.
159
- const firstCall = renderPathSpy.getCalls()[0];
160
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.lengths);
161
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.coords);
162
- expect(firstCall.args[2]).to.eql(false); // fill
163
- expect(firstCall.args[3]).to.eql(2); // stride
164
- });
165
-
166
- it("should readAndRender simple point", async () => {
167
- const featureJson = createFeatureJSON();
168
- const data = PhillyLandmarksDataset.phillySimplePointQueryJson;
169
- const symbolRenderer = new ArcGisSymbologyRenderer(
170
- data.geometryType as ArcGisFeatureGeometryType,
171
- PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
172
-
173
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
174
- const spy = sinon.spy(featureRenderer, "renderPoint");
175
- featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
176
- expect(spy.calledOnce);
177
-
178
- // Pbf contains already the right output format expect, lets rely on that.
179
- const geometryCoords = PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.coords;
180
- const firstCall = spy.getCalls()[0];
181
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
182
- expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords
183
- expect(firstCall.args[2]).to.eql(2); // stride
184
- });
185
-
186
- it("should log error when readAndRender / readFeatureInfo is called invalid response Data", async () => {
187
- const featureJson = createFeatureJSON();
188
- const symbolRenderer = new ArcGisSymbologyRenderer(
189
- "esriGeometryAny",
190
- PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
191
-
192
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
193
- const logErrorSpy = sandbox.spy(Logger, "logError");
194
- featureJson.readAndRender({data: {test:"test"}, exceedTransferLimit: false}, featureRenderer);
195
- expect(logErrorSpy.calledOnce);
196
-
197
- logErrorSpy.resetHistory();
198
- featureJson.readFeatureInfo({data: {test:"test"}, exceedTransferLimit: false}, []);
199
- expect(logErrorSpy.calledOnce);
200
-
201
- });
202
- });
@@ -1,227 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
-
6
- import { Logger } from "@itwin/core-bentley";
7
- import { Base64EncodedString, ImageMapLayerSettings } from "@itwin/core-common";
8
- import { MapLayerFeatureInfo } from "@itwin/core-frontend";
9
- import { expect } from "chai";
10
- import * as sinon from "sinon";
11
- import { ArcGisFeaturePBF } from "../../ArcGisFeature/ArcGisFeaturePBF";
12
- import { ArcGisFeatureRenderer } from "../../ArcGisFeature/ArcGisFeatureRenderer";
13
- import { ArcGisSymbologyRenderer } from "../../ArcGisFeature/ArcGisSymbologyRenderer";
14
- import { esriPBuffer } from "../../ArcGisFeature/esriPBuffer.gen";
15
- import { esriFeatureSampleSource, fakeContext } from "./Mocks";
16
- import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
17
-
18
- const createFeaturePBF = () => {
19
- const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
20
- const featurePbf = new ArcGisFeaturePBF(settings, {name: "SampleLayer"});
21
-
22
- // Locale configuration depends on the testing machine (i.e. linux vs windows),
23
- // so we need to force date display to Iso to get a consistent value.
24
- // In real scenario, we still want dates to be displayed in end-user's locale.
25
- featurePbf.forceDateDisplayValueToIso = true;
26
- return featurePbf;
27
- };
28
-
29
- describe("ArcGisFeaturePBF", () => {
30
-
31
- const sandbox = sinon.createSandbox();
32
-
33
- afterEach(async () => {
34
- sandbox.restore();
35
- });
36
-
37
- it("should convert pbf geometry type to Esri types", async () => {
38
-
39
- expect (
40
- ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipatch))
41
- .to.equals("esriGeometryMultiPatch");
42
-
43
- expect (
44
- ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipoint))
45
- .to.equals("esriGeometryMultipoint");
46
-
47
- expect (
48
- ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePoint))
49
- .to.equals("esriGeometryPoint");
50
-
51
- expect (
52
- ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolygon))
53
- .to.equals("esriGeometryPolygon");
54
-
55
- expect (
56
- ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolyline))
57
- .to.equals("esriGeometryPolyline");
58
-
59
- expect (
60
- ArcGisFeaturePBF.getArcGisFeatureGeometryType("" as unknown as esriPBuffer.FeatureCollectionPBuffer.GeometryType))
61
- .to.equals("esriGeometryNull");
62
-
63
- });
64
-
65
- it("should read FeatureInfo in PBF", async () => {
66
- const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyAirportGetFeatureInfoQueryPbf);
67
- const featureCollection = esriPBuffer.FeatureCollectionPBuffer.deserialize(byteArray);
68
-
69
- const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
70
- const featurePbf = new ArcGisFeaturePBF(settings, {name: "SampleLayer"});
71
-
72
- // In some cases, PBF gives more floating-point precision than JSON.
73
- // Since I want to use the same output reference for both formats, I force a max precision of 8.
74
- featurePbf.floatPrecision = 8;
75
- const results: MapLayerFeatureInfo[] = [];
76
- featurePbf.readFeatureInfo({data:featureCollection, exceedTransferLimit: false}, results);
77
-
78
- // Make deep comparison by using JSON.stringify
79
- expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyAirportGetFeatureInfoResultRef));
80
-
81
- });
82
-
83
- it("should read FeatureInfo from PBF (philly transportation)", async () => {
84
-
85
- const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryEncodedPbf);
86
- const featureCollection = esriPBuffer.FeatureCollectionPBuffer.deserialize(byteArray);
87
- const featurePbf = createFeaturePBF();
88
-
89
- // In some cases, PBF gives more floating-point precision than JSON.
90
- // Since I want to use the same output reference for both formats, I force a max precision.
91
- featurePbf.floatPrecision = 2;
92
- const results: MapLayerFeatureInfo[] = [];
93
- featurePbf.readFeatureInfo({data:featureCollection, exceedTransferLimit: false}, results);
94
-
95
- // Make deep comparison by using JSON.stringify
96
- expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyTansportationGetFeatureInfoResultRef));
97
-
98
- });
99
-
100
- it("should read all data types from FeatureInfo ", async () => {
101
-
102
- // In this test we use a synthetic PBuffer object to initialize a feature collection object.
103
- // The is to ensure we cover correctly all possible attribute value types.
104
- const featureCollection = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.fieldsCoveragePbufferCollection);
105
-
106
- const featurePbf = createFeaturePBF();
107
-
108
- const results: MapLayerFeatureInfo[] = [];
109
- featurePbf.readFeatureInfo({data:featureCollection, exceedTransferLimit: false}, results);
110
-
111
- // Make deep comparison by using JSON.stringify
112
- expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.fieldsCoverageGetFeatureInfoResultRef));
113
- });
114
-
115
- it("should readAndRender single ring polygon feature", async () => {
116
- const featurePbf = createFeaturePBF();
117
-
118
- const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePolyQueryPbf);
119
- const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.geometryType);
120
- const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
121
-
122
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
123
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
124
- featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
125
- expect(renderPathSpy.calledOnce);
126
-
127
- const firstCall = renderPathSpy.getCalls()[0];
128
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
129
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
130
- expect(firstCall.args[2]).to.eql(true); // fill
131
- expect(firstCall.args[3]).to.eql(2); // stride
132
- });
133
-
134
- it("should readAndRender multiple ring polygon feature", async () => {
135
- const featurePbf = createFeaturePBF();
136
-
137
- const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.geometryType);
138
- const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf);
139
-
140
- const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
141
-
142
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
143
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
144
- featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
145
- expect(renderPathSpy.calledOnce);
146
-
147
- const firstCall = renderPathSpy.getCalls()[0];
148
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
149
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
150
- expect(firstCall.args[2]).to.eql(true); // fill
151
- expect(firstCall.args[3]).to.eql(2); // stride
152
- });
153
-
154
- it("should readAndRender simple path", async () => {
155
- const featurePbf = createFeaturePBF();
156
- const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePathQueryPbf);
157
- const symbolRenderer = new ArcGisSymbologyRenderer(
158
- ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.geometryType),
159
- PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
160
-
161
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
162
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
163
- featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
164
- expect(renderPathSpy.calledOnce);
165
-
166
- const firstCall = renderPathSpy.getCalls()[0];
167
- expect(firstCall).to.not.undefined;
168
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
169
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
170
- expect(firstCall.args[2]).to.eql(false); // fill
171
- expect(firstCall.args[3]).to.eql(2); // stride
172
- });
173
-
174
- it("should readAndRender multi path", async () => {
175
- const featurePbf = createFeaturePBF();
176
- const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyMultiPathQueryPbf);
177
- const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.geometryType);
178
- const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
179
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
180
- const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
181
- featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
182
- expect(renderPathSpy.calledOnce);
183
-
184
- const firstCall = renderPathSpy.getCalls()[0];
185
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
186
- expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
187
- expect(firstCall.args[2]).to.eql(false); // fill
188
- expect(firstCall.args[3]).to.eql(2); // stride
189
- });
190
-
191
- it("should readAndRender simple point", async () => {
192
- const featurePbf = createFeaturePBF();
193
- const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePointQueryPbf);
194
- const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.geometryType);
195
- const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
196
-
197
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
198
- const spy = sinon.spy(featureRenderer, "renderPoint");
199
- featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);
200
- expect(spy.calledOnce);
201
-
202
- // Pbf contains already the right output format expect, lets rely on that.
203
- const geometryCoords = PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.coords;
204
- const firstCall = spy.getCalls()[0];
205
- expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
206
- expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords
207
- expect(firstCall.args[2]).to.eql(2); // stride
208
- });
209
-
210
- it("should log error when readAndRender / readFeatureInfo is called invalid response Data", async () => {
211
- const featurePbf = createFeaturePBF();
212
- const symbolRenderer = new ArcGisSymbologyRenderer(
213
- "esriGeometryAny",
214
- PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
215
-
216
- const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
217
- const logErrorSpy = sandbox.spy(Logger, "logError");
218
- featurePbf.readAndRender({data: {test:"test"}, exceedTransferLimit: false}, featureRenderer);
219
- expect(logErrorSpy.calledOnce);
220
-
221
- logErrorSpy.resetHistory();
222
- featurePbf.readFeatureInfo({data: {test:"test"}, exceedTransferLimit: false}, []);
223
- expect(logErrorSpy.calledOnce);
224
-
225
- });
226
-
227
- });