@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
@@ -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
- });