@itwin/map-layers-formats 4.1.0-dev.8 → 4.1.0-dev.80

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 (288) hide show
  1. package/CHANGELOG.md +74 -1
  2. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts +19 -0
  3. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
  4. package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js +46 -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 +16 -8
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +157 -45
  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/ArcGisFeatureResponse.js.map +1 -1
  22. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +14 -0
  23. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
  24. package/lib/cjs/ArcGisFeature/{ArcGisFeatureJSON.js → ArcGisJsonFeatureReader.js} +51 -55
  25. package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
  26. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +22 -0
  27. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
  28. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js +249 -0
  29. package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
  30. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +32 -77
  31. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  32. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +88 -128
  33. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  34. package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts +152 -0
  35. package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts.map +1 -0
  36. package/lib/cjs/ArcGisFeature/EsriSymbology.js +181 -0
  37. package/lib/cjs/ArcGisFeature/EsriSymbology.js.map +1 -0
  38. package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  39. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts +34 -0
  40. package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
  41. package/lib/cjs/Tools/MapFeatureInfoDecorator.js +281 -0
  42. package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -0
  43. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts +38 -0
  44. package/lib/cjs/Tools/MapFeatureInfoTool.d.ts.map +1 -0
  45. package/lib/cjs/Tools/MapFeatureInfoTool.js +113 -0
  46. package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -0
  47. package/lib/cjs/map-layers-formats.d.ts +1 -0
  48. package/lib/cjs/map-layers-formats.d.ts.map +1 -1
  49. package/lib/cjs/map-layers-formats.js +1 -0
  50. package/lib/cjs/map-layers-formats.js.map +1 -1
  51. package/lib/cjs/mapLayersFormats.d.ts +12 -1
  52. package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
  53. package/lib/cjs/mapLayersFormats.js +11 -1
  54. package/lib/cjs/mapLayersFormats.js.map +1 -1
  55. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts +19 -0
  56. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
  57. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js +42 -0
  58. package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
  59. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -1
  60. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +4 -1
  61. package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
  62. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +16 -8
  63. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  64. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +158 -46
  65. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  66. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
  67. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  68. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
  69. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  70. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
  71. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
  72. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +4 -2
  73. package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
  74. package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
  75. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +14 -0
  76. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
  77. package/lib/esm/ArcGisFeature/{ArcGisFeatureJSON.js → ArcGisJsonFeatureReader.js} +51 -55
  78. package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
  79. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +22 -0
  80. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
  81. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js +245 -0
  82. package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
  83. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +32 -77
  84. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  85. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +84 -124
  86. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  87. package/lib/esm/ArcGisFeature/EsriSymbology.d.ts +152 -0
  88. package/lib/esm/ArcGisFeature/EsriSymbology.d.ts.map +1 -0
  89. package/lib/esm/ArcGisFeature/EsriSymbology.js +170 -0
  90. package/lib/esm/ArcGisFeature/EsriSymbology.js.map +1 -0
  91. package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
  92. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts +34 -0
  93. package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
  94. package/lib/esm/Tools/MapFeatureInfoDecorator.js +277 -0
  95. package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -0
  96. package/lib/esm/Tools/MapFeatureInfoTool.d.ts +38 -0
  97. package/lib/esm/Tools/MapFeatureInfoTool.d.ts.map +1 -0
  98. package/lib/esm/Tools/MapFeatureInfoTool.js +110 -0
  99. package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -0
  100. package/lib/esm/map-layers-formats.d.ts +1 -0
  101. package/lib/esm/map-layers-formats.d.ts.map +1 -1
  102. package/lib/esm/map-layers-formats.js +1 -0
  103. package/lib/esm/map-layers-formats.js.map +1 -1
  104. package/lib/esm/mapLayersFormats.d.ts +12 -1
  105. package/lib/esm/mapLayersFormats.d.ts.map +1 -1
  106. package/lib/esm/mapLayersFormats.js +13 -2
  107. package/lib/esm/mapLayersFormats.js.map +1 -1
  108. package/lib/public/locales/en/mapLayersFormats.json +12 -0
  109. package/package.json +19 -22
  110. package/.nycrc +0 -10
  111. package/.rush/temp/operation/build/all.log +0 -3
  112. package/.rush/temp/operation/build/state.json +0 -3
  113. package/.rush/temp/operation/cover/all.log +0 -98
  114. package/.rush/temp/operation/cover/state.json +0 -3
  115. package/.rush/temp/operation/docs/all.log +0 -30
  116. package/.rush/temp/operation/docs/state.json +0 -3
  117. package/.rush/temp/package-deps_build.json +0 -36
  118. package/.rush/temp/package-deps_cover.json +0 -36
  119. package/.rush/temp/package-deps_docs.json +0 -36
  120. package/.rush/temp/shrinkwrap-deps.json +0 -505
  121. package/CHANGELOG.json +0 -119
  122. package/config/rush-project.json +0 -6
  123. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
  124. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
  125. package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
  126. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts +0 -15
  127. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
  128. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js +0 -201
  129. package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
  130. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
  131. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
  132. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +0 -143
  133. package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
  134. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
  135. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
  136. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -35
  137. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
  138. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
  139. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
  140. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -162
  141. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
  142. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
  143. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
  144. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -168
  145. package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
  146. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
  147. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
  148. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -680
  149. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
  150. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
  151. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
  152. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -104
  153. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
  154. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
  155. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
  156. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -215
  157. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
  158. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
  159. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
  160. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -95
  161. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
  162. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
  163. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
  164. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -60
  165. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
  166. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +0 -7
  167. package/lib/cjs/test/ArcGisFeature/Mocks.d.ts.map +0 -1
  168. package/lib/cjs/test/ArcGisFeature/Mocks.js +0 -19
  169. package/lib/cjs/test/ArcGisFeature/Mocks.js.map +0 -1
  170. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
  171. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
  172. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +0 -420
  173. package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
  174. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
  175. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
  176. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -427
  177. package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
  178. package/lib/cjs/test/coverage/.nyc_output/43b4d4c9-a360-43df-88fe-ecfb97b8832b.json +0 -1
  179. package/lib/cjs/test/coverage/.nyc_output/5c53bf83-e91a-4706-bc7c-fa9b79502114.json +0 -1
  180. package/lib/cjs/test/coverage/.nyc_output/processinfo/43b4d4c9-a360-43df-88fe-ecfb97b8832b.json +0 -1
  181. package/lib/cjs/test/coverage/.nyc_output/processinfo/5c53bf83-e91a-4706-bc7c-fa9b79502114.json +0 -1
  182. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +0 -1
  183. package/lib/cjs/test/coverage/cobertura-coverage.xml +0 -1169
  184. package/lib/cjs/test/coverage/lcov-report/base.css +0 -224
  185. package/lib/cjs/test/coverage/lcov-report/block-navigation.js +0 -87
  186. package/lib/cjs/test/coverage/lcov-report/favicon.png +0 -0
  187. package/lib/cjs/test/coverage/lcov-report/index.html +0 -131
  188. package/lib/cjs/test/coverage/lcov-report/prettify.css +0 -1
  189. package/lib/cjs/test/coverage/lcov-report/prettify.js +0 -2
  190. package/lib/cjs/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  191. package/lib/cjs/test/coverage/lcov-report/sorter.js +0 -196
  192. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +0 -133
  193. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +0 -550
  194. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +0 -730
  195. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +0 -1546
  196. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +0 -763
  197. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +0 -223
  198. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +0 -598
  199. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +0 -301
  200. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +0 -832
  201. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +0 -236
  202. package/lib/cjs/test/coverage/lcov-report/src/index.html +0 -131
  203. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +0 -130
  204. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +0 -163
  205. package/lib/cjs/test/coverage/lcov.info +0 -1358
  206. package/lib/cjs/tsconfig.tsbuildinfo +0 -1
  207. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
  208. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
  209. package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
  210. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts +0 -15
  211. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
  212. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js +0 -197
  213. package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
  214. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
  215. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
  216. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +0 -139
  217. package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
  218. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
  219. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
  220. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -33
  221. package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
  222. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
  223. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
  224. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -160
  225. package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
  226. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
  227. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
  228. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -166
  229. package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
  230. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
  231. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
  232. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -678
  233. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
  234. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
  235. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
  236. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -102
  237. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
  238. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
  239. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
  240. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -213
  241. package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
  242. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
  243. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
  244. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -93
  245. package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
  246. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
  247. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
  248. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -58
  249. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
  250. package/lib/esm/test/ArcGisFeature/Mocks.d.ts +0 -7
  251. package/lib/esm/test/ArcGisFeature/Mocks.d.ts.map +0 -1
  252. package/lib/esm/test/ArcGisFeature/Mocks.js +0 -16
  253. package/lib/esm/test/ArcGisFeature/Mocks.js.map +0 -1
  254. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
  255. package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
  256. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +0 -417
  257. package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
  258. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
  259. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
  260. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -424
  261. package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
  262. package/lib/esm/tsconfig.tsbuildinfo +0 -1
  263. package/lib/test/junit_results.xml +0 -159
  264. package/map-layers-formats.build.log +0 -30
  265. package/src/ArcGisFeature/ArcGisFeatureFormat.ts +0 -16
  266. package/src/ArcGisFeature/ArcGisFeatureJSON.ts +0 -155
  267. package/src/ArcGisFeature/ArcGisFeaturePBF.ts +0 -215
  268. package/src/ArcGisFeature/ArcGisFeatureProvider.ts +0 -487
  269. package/src/ArcGisFeature/ArcGisFeatureQuery.ts +0 -226
  270. package/src/ArcGisFeature/ArcGisFeatureReader.ts +0 -46
  271. package/src/ArcGisFeature/ArcGisFeatureRenderer.ts +0 -171
  272. package/src/ArcGisFeature/ArcGisFeatureResponse.ts +0 -72
  273. package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +0 -249
  274. package/src/ArcGisFeature/esriPBuffer.gen.ts +0 -2612
  275. package/src/map-layers-formats.ts +0 -15
  276. package/src/mapLayersFormats.ts +0 -26
  277. package/src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts +0 -46
  278. package/src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts +0 -202
  279. package/src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts +0 -227
  280. package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +0 -805
  281. package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +0 -117
  282. package/src/test/ArcGisFeature/ArcGisFeatureRenderer.test.ts +0 -296
  283. package/src/test/ArcGisFeature/ArcGisFeatureResponse.test.ts +0 -109
  284. package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +0 -77
  285. package/src/test/ArcGisFeature/Mocks.ts +0 -19
  286. package/src/test/ArcGisFeature/NewYorkDataset.ts +0 -423
  287. package/src/test/ArcGisFeature/PhillyLandmarksDataset.ts +0 -455
  288. package/tsconfig.json +0 -20
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcGisJsonFeatureReader.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisJsonFeatureReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAkB,mBAAmB,EAAE,iBAAiB,EAAE,MAA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,CAAC,IAAI;YACtC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI;YAC1C,QAAQ,EAAE,EAAE;SACb,CAAC;QAEF,4CAA4C;QAC5C,KAAK,MAAM,eAAe,IAAI,WAAW,CAAC,QAAQ,EAAE;YAClD,MAAM,OAAO,GAAoB,EAAC,UAAU,EAAE,EAAE,EAAC,CAAC;YAElD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC;gBACnE,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;YAEtD,IAAI,UAAU,EAAE;gBACd,MAAM,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;gBACxD,MAAM,QAAQ,GAAG,QAAS,CAAC,YAAY,EAAE,CAAC;gBAC1C,OAAO,CAAC,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC5C,OAAO,EAAC,OAAO,EAAC,CAAC;gBACnB,CAAC,CAAC,CAAC;aACJ;YACD,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACrC;QAED,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS;YACvC,SAAS,CAAC,aAAa,GAAG,EAAE,CAAC;QAC/B,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE3C,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { PrimitiveValue, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { ArcGisAttributeDrivenSymbology, ArcGisGeometryReaderJSON, ArcGisGeometryRenderer, ArcGisGraphicsRenderer, MapLayerFeature, MapLayerFeatureAttribute, MapLayerFeatureInfo, MapSubLayerFeatureInfo} from \"@itwin/core-frontend\";\nimport { Transform } from \"@itwin/core-geometry\";\nimport { ArcGisBaseFeatureReader } from \"./ArcGisFeatureReader\";\nimport { ArcGisFieldType, ArcGisResponseData } from \"./ArcGisFeatureResponse\";\n\n/** @internal */\nexport class ArcGisJsonFeatureReader extends ArcGisBaseFeatureReader {\n public transform: Transform | undefined;\n\n public constructor(settings: ImageMapLayerSettings, layerMetadata: any) {\n super(settings, layerMetadata);\n\n }\n\n private applySymbologyAttributes(attrSymbology: ArcGisAttributeDrivenSymbology, feature: any) {\n if (attrSymbology && feature) {\n const symbolFields = attrSymbology.rendererFields;\n if (symbolFields && symbolFields.length > 0 && feature.attributes) {\n const featureAttr: {[key: string]: any} = {};\n for (const [attrKey, attrValue] of Object.entries(feature.attributes))\n if (symbolFields.includes(attrKey)) {\n featureAttr[attrKey] = attrValue;\n }\n attrSymbology.setActiveFeatureAttributes(featureAttr);\n }\n }\n }\n\n public async readAndRender(response: ArcGisResponseData, renderer: ArcGisGeometryRenderer) {\n const responseObj = response.data;\n if (responseObj.geometryType) {\n const attrSymbology = renderer.attributeSymbology;\n\n const geomReader = new ArcGisGeometryReaderJSON(responseObj.geometryType, renderer, renderer.transform === undefined);\n\n for (const feature of responseObj.features) {\n if (attrSymbology) {\n // Read attributes if needed (attribute driven symbology)\n this.applySymbologyAttributes(attrSymbology, feature);\n }\n\n await geomReader.readGeometry(feature.geometry);\n }\n }\n }\n\n public async readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[], renderer?: ArcGisGraphicsRenderer) {\n const responseObj = response.data;\n if (responseObj === undefined || !Array.isArray(responseObj.features))\n return;\n\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name };\n\n // Create a signature index for every field name / type.\n const fieldsType: { [key: string]: ArcGisFieldType } = {};\n for (const fieldInfo of responseObj.fields) {\n fieldsType[fieldInfo.name] = fieldInfo.type;\n }\n\n const getStandardTypeName = (fieldType: ArcGisFieldType) => {\n switch (fieldType) {\n case \"esriFieldTypeInteger\":\n case \"esriFieldTypeSmallInteger\":\n case \"esriFieldTypeOID\":\n return StandardTypeNames.Integer;\n case \"esriFieldTypeDouble\":\n return StandardTypeNames.Double;\n case \"esriFieldTypeSingle\":\n return StandardTypeNames.Float;\n case \"esriFieldTypeDate\":\n return StandardTypeNames.DateTime;\n default:\n return StandardTypeNames.String;\n }\n };\n\n const getRecordInfo = (fieldName: string, value: any): MapLayerFeatureAttribute => {\n const propertyValue: PrimitiveValue = {valueFormat: PropertyValueFormat.Primitive};\n\n if (value === null) {\n value = undefined;\n }\n\n const strValue = `${value}`;\n const fieldType = fieldsType[fieldName];\n switch (fieldType) {\n case \"esriFieldTypeInteger\":\n case \"esriFieldTypeSmallInteger\":\n case \"esriFieldTypeOID\":\n propertyValue.value = value as number;\n break;\n case \"esriFieldTypeDouble\":\n case \"esriFieldTypeSingle\":\n propertyValue.value = this.toFixedWithoutPadding(value);\n break;\n case \"esriFieldTypeDate\":\n propertyValue.value = new Date(value);\n break;\n default:\n if (value !== undefined)\n propertyValue.value = strValue;\n\n break;\n }\n\n const typename = getStandardTypeName(fieldType);\n propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);\n\n return {value: propertyValue, property: { name: fieldName, displayLabel: fieldName, typename }};\n };\n\n let geomReader: ArcGisGeometryReaderJSON|undefined;\n if (renderer && responseObj?.geometryType) {\n geomReader = new ArcGisGeometryReaderJSON(responseObj.geometryType, renderer);\n }\n\n // Each feature response represent a single sub-layer, no need to check for existing entry.\n const subLayerInfo: MapSubLayerFeatureInfo = {\n subLayerName: this._layerMetadata.name,\n displayFieldName: this._layerMetadata.name,\n features: [],\n };\n\n // Read all features attributes / geometries\n for (const responseFeature of responseObj.features) {\n const feature: MapLayerFeature = {attributes: []};\n\n for (const [key, value] of Object.entries(responseFeature.attributes))\n feature.attributes?.push(getRecordInfo(key, value));\n\n if (geomReader) {\n await geomReader.readGeometry(responseFeature.geometry);\n const graphics = renderer!.moveGraphics();\n feature.geometries = graphics.map((graphic) => {\n return {graphic};\n });\n }\n subLayerInfo.features.push(feature);\n }\n\n if (layerInfo.subLayerInfos === undefined)\n layerInfo.subLayerInfos = [];\n layerInfo.subLayerInfos.push(subLayerInfo);\n\n featureInfos.push(layerInfo);\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { esriPBuffer } from "../ArcGisFeature/esriPBuffer.gen";
2
+ import { ArcGisGeometryRenderer, ArcGisGraphicsRenderer, MapLayerFeatureAttribute, MapLayerFeatureInfo } from "@itwin/core-frontend";
3
+ import { ImageMapLayerSettings } from "@itwin/core-common";
4
+ import { ArcGisBaseFeatureReader } from "./ArcGisFeatureReader";
5
+ import { ArcGisResponseData } from "./ArcGisFeatureResponse";
6
+ import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
7
+ interface PbfFieldInfo {
8
+ name: string;
9
+ type: esriPBuffer.FeatureCollectionPBuffer.FieldType;
10
+ }
11
+ /** @internal */
12
+ export declare class ArcGisPbfFeatureReader extends ArcGisBaseFeatureReader {
13
+ constructor(settings: ImageMapLayerSettings, layerMetadata: any);
14
+ static getArcGisFeatureGeometryType(geomType: esriPBuffer.FeatureCollectionPBuffer.GeometryType): ArcGisFeatureGeometryType;
15
+ private getNumericValue;
16
+ getFeatureAttribute(fieldInfo: PbfFieldInfo, attrValue: esriPBuffer.FeatureCollectionPBuffer.Value): MapLayerFeatureAttribute | undefined;
17
+ readAndRender(response: ArcGisResponseData, renderer: ArcGisGeometryRenderer): Promise<void>;
18
+ private applySymbologyAttributes;
19
+ readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[], renderer?: ArcGisGraphicsRenderer): Promise<void>;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=ArcGisPbfFeatureReader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcGisPbfFeatureReader.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisPbfFeatureReader.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAkC,sBAAsB,EAAE,sBAAsB,EAAmB,wBAAwB,EAAE,mBAAmB,EAAyB,MAAM,sBAAsB,CAAC;AAE7M,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAKjE,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC;CACtD;AAED,gBAAgB;AAChB,qBAAa,sBAAuB,SAAQ,uBAAuB;gBAC9C,QAAQ,EAAE,qBAAqB,EAAE,aAAa,EAAE,GAAG;WAIxD,4BAA4B,CAAC,QAAQ,EAAE,WAAW,CAAC,wBAAwB,CAAC,YAAY,GAAG,yBAAyB;IAiBlI,OAAO,CAAC,eAAe;IAiChB,mBAAmB,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,wBAAwB,CAAC,KAAK,GAAG,wBAAwB,GAAC,SAAS;IA2DjI,aAAa,CAAC,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,sBAAsB;IA0CzF,OAAO,CAAC,wBAAwB;IA0BnB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,EAAE,YAAY,EAAE,mBAAmB,EAAE,EAAE,QAAQ,CAAC,EAAE,sBAAsB;CAkElI"}
@@ -0,0 +1,245 @@
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
+ import { esriPBuffer } from "../ArcGisFeature/esriPBuffer.gen";
6
+ import { PropertyValueFormat, StandardTypeNames } from "@itwin/appui-abstract";
7
+ import { ArcGisBaseFeatureReader } from "./ArcGisFeatureReader";
8
+ import { Logger } from "@itwin/core-bentley";
9
+ const esriGeometryType = esriPBuffer.FeatureCollectionPBuffer.GeometryType;
10
+ const loggerCategory = "MapLayersFormats.ArcGISFeature";
11
+ /** @internal */
12
+ export class ArcGisPbfFeatureReader extends ArcGisBaseFeatureReader {
13
+ constructor(settings, layerMetadata) {
14
+ super(settings, layerMetadata);
15
+ }
16
+ static getArcGisFeatureGeometryType(geomType) {
17
+ switch (geomType) {
18
+ case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipatch:
19
+ return "esriGeometryMultiPatch";
20
+ case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipoint:
21
+ return "esriGeometryMultipoint";
22
+ case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePoint:
23
+ return "esriGeometryPoint";
24
+ case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolygon:
25
+ return "esriGeometryPolygon";
26
+ case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolyline:
27
+ return "esriGeometryPolyline";
28
+ default:
29
+ return "esriGeometryNull";
30
+ }
31
+ }
32
+ getNumericValue(attrValue) {
33
+ const propertyValue = { valueFormat: PropertyValueFormat.Primitive };
34
+ let typename = StandardTypeNames.Number;
35
+ if (attrValue.has_double_value) {
36
+ const value = this.toFixedWithoutPadding(attrValue.double_value);
37
+ propertyValue.value = value;
38
+ typename = StandardTypeNames.Double;
39
+ }
40
+ else if (attrValue.has_float_value) {
41
+ const value = this.toFixedWithoutPadding(attrValue.float_value);
42
+ propertyValue.value = value;
43
+ typename = StandardTypeNames.Float;
44
+ }
45
+ else if (attrValue.has_int64_value) {
46
+ propertyValue.value = attrValue.int64_value;
47
+ typename = StandardTypeNames.Integer;
48
+ }
49
+ else if (attrValue.has_sint64_value) {
50
+ propertyValue.value = attrValue.sint64_value;
51
+ typename = StandardTypeNames.Integer;
52
+ }
53
+ else if (attrValue.has_sint_value) {
54
+ propertyValue.value = attrValue.sint_value;
55
+ typename = StandardTypeNames.Integer;
56
+ }
57
+ else if (attrValue.has_uint64_value) {
58
+ propertyValue.value = attrValue.uint64_value;
59
+ typename = StandardTypeNames.Integer;
60
+ }
61
+ else if (attrValue.has_uint_value) {
62
+ propertyValue.value = attrValue.uint_value;
63
+ typename = StandardTypeNames.Integer;
64
+ }
65
+ else {
66
+ propertyValue.value = undefined;
67
+ }
68
+ return { propertyValue, typename };
69
+ }
70
+ getFeatureAttribute(fieldInfo, attrValue) {
71
+ let propertyValue = { valueFormat: PropertyValueFormat.Primitive };
72
+ let typename = StandardTypeNames.String;
73
+ if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDouble
74
+ || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeInteger
75
+ || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeSmallInteger
76
+ || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeOID
77
+ || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeSingle
78
+ || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDate) {
79
+ const value = this.getNumericValue(attrValue);
80
+ if (value.propertyValue === undefined) {
81
+ Logger.logError(loggerCategory, `Could not read numeric value for field ${fieldInfo.name}`);
82
+ return undefined;
83
+ }
84
+ if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDate) {
85
+ const test = value.propertyValue.value;
86
+ propertyValue.value = new Date(test);
87
+ typename = StandardTypeNames.DateTime;
88
+ }
89
+ else {
90
+ typename = value.typename;
91
+ propertyValue = value.propertyValue;
92
+ }
93
+ }
94
+ else if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeString) {
95
+ if (attrValue.has_string_value) {
96
+ propertyValue.value = attrValue.string_value;
97
+ typename = StandardTypeNames.String;
98
+ }
99
+ }
100
+ else if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeGlobalID) {
101
+ if (attrValue.has_string_value) {
102
+ propertyValue.value = attrValue.string_value;
103
+ typename = StandardTypeNames.String;
104
+ }
105
+ else {
106
+ const value = this.getNumericValue(attrValue);
107
+ if (value.propertyValue === undefined) {
108
+ Logger.logError(loggerCategory, `Could not read GlobalId value for field ${fieldInfo.name}`);
109
+ return undefined;
110
+ }
111
+ }
112
+ }
113
+ else if (attrValue.has_string_value) {
114
+ // If we reach this case that probably mean we don't support the field type, simply try to output string value
115
+ typename = StandardTypeNames.String;
116
+ propertyValue.value = attrValue.string_value;
117
+ }
118
+ else if (attrValue.value_type === "none") {
119
+ // Sometimes fields are just empty, use an empty string
120
+ typename = StandardTypeNames.String;
121
+ propertyValue.value = undefined;
122
+ }
123
+ else {
124
+ Logger.logError(loggerCategory, `Could not read value for field ${fieldInfo.name}`);
125
+ return undefined;
126
+ }
127
+ propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);
128
+ return { value: propertyValue, property: { name: fieldInfo.name, displayLabel: fieldInfo.name, typename } };
129
+ }
130
+ async readAndRender(response, renderer) {
131
+ if (!(response.data instanceof esriPBuffer.FeatureCollectionPBuffer)) {
132
+ const msg = "Response was not in PBF format";
133
+ Logger.logError(loggerCategory, msg);
134
+ return;
135
+ }
136
+ const collection = response.data;
137
+ if (!collection.has_queryResult || !collection.queryResult.has_featureResult || collection?.queryResult?.featureResult?.features === undefined)
138
+ return;
139
+ const attrSymbology = renderer.attributeSymbology;
140
+ // Fields metadata is stored outside feature results, create dedicated array first
141
+ const fields = [];
142
+ for (const field of collection.queryResult.featureResult.fields)
143
+ fields.push({ name: field.name, type: field.fieldType });
144
+ const geomType = collection.queryResult.featureResult.geometryType;
145
+ const stride = (collection.queryResult.featureResult.hasM || collection.queryResult.featureResult.hasZ) ? 3 : 2;
146
+ const relativeCoords = renderer.transform === undefined;
147
+ for (const feature of collection.queryResult.featureResult.features) {
148
+ // Render geometries
149
+ if (renderer && feature?.has_geometry) {
150
+ if (attrSymbology) {
151
+ // Read attributes if needed (attribute driven symbology)
152
+ this.applySymbologyAttributes(attrSymbology, feature, fields);
153
+ }
154
+ if (geomType === esriGeometryType.esriGeometryTypePoint || geomType === esriGeometryType.esriGeometryTypeMultipoint) {
155
+ await renderer.renderPoint(feature.geometry.lengths, feature.geometry.coords, stride, relativeCoords);
156
+ }
157
+ else if (geomType === esriGeometryType.esriGeometryTypePolyline || geomType === esriGeometryType.esriGeometryTypePolygon) {
158
+ const fill = (geomType === esriGeometryType.esriGeometryTypePolygon);
159
+ await renderer.renderPath(feature.geometry.lengths, feature.geometry.coords, fill, stride, relativeCoords);
160
+ }
161
+ }
162
+ }
163
+ }
164
+ applySymbologyAttributes(attrSymbology, feature, fields) {
165
+ if (attrSymbology) {
166
+ const symbolFields = attrSymbology.rendererFields;
167
+ if (symbolFields && symbolFields.length > 0 && feature.attributes) {
168
+ let fieldIdx = 0;
169
+ const featureAttr = {};
170
+ for (const attrValue of feature.attributes) {
171
+ if (fieldIdx > fields.length) {
172
+ Logger.logError(loggerCategory, "Error while read feature info data: fields metadata missing");
173
+ break;
174
+ }
175
+ const fieldInfo = fields[fieldIdx++];
176
+ if (symbolFields.includes(fieldInfo.name)) {
177
+ const attr = this.getFeatureAttribute(fieldInfo, attrValue);
178
+ if (attr) {
179
+ const primitiveValue = attr.value;
180
+ featureAttr[fieldInfo.name] = primitiveValue.value;
181
+ }
182
+ }
183
+ }
184
+ attrSymbology.setActiveFeatureAttributes(featureAttr);
185
+ }
186
+ }
187
+ }
188
+ async readFeatureInfo(response, featureInfos, renderer) {
189
+ if (!(response.data instanceof esriPBuffer.FeatureCollectionPBuffer)) {
190
+ Logger.logError(loggerCategory, "Response was not in PBF format");
191
+ }
192
+ const collection = response.data;
193
+ if (!collection.has_queryResult || !collection.queryResult.has_featureResult || collection?.queryResult?.featureResult?.features === undefined)
194
+ return;
195
+ const layerInfo = { layerName: this._settings.name, subLayerInfos: [] };
196
+ // Fields metadata is stored outside feature results, create dedicated array first
197
+ const fields = [];
198
+ for (const field of collection.queryResult.featureResult.fields)
199
+ fields.push({ name: field.name, type: field.fieldType });
200
+ const geomType = collection.queryResult.featureResult.geometryType;
201
+ const stride = (collection.queryResult.featureResult.hasM || collection.queryResult.featureResult.hasZ) ? 3 : 2;
202
+ const subLayerInfo = {
203
+ subLayerName: this._layerMetadata.name,
204
+ displayFieldName: this._layerMetadata.name,
205
+ features: [],
206
+ };
207
+ // Read feature values
208
+ for (const featureResponse of collection.queryResult.featureResult.features) {
209
+ const feature = { attributes: [] };
210
+ if (renderer && featureResponse?.has_geometry) {
211
+ if (geomType === esriGeometryType.esriGeometryTypePoint || geomType === esriGeometryType.esriGeometryTypeMultipoint) {
212
+ await renderer.renderPoint(featureResponse.geometry.lengths, featureResponse.geometry.coords, stride, true);
213
+ }
214
+ else if (geomType === esriGeometryType.esriGeometryTypePolyline || geomType === esriGeometryType.esriGeometryTypePolygon) {
215
+ const fill = (geomType === esriGeometryType.esriGeometryTypePolygon);
216
+ await renderer.renderPath(featureResponse.geometry.lengths, featureResponse.geometry.coords, fill, stride, true);
217
+ }
218
+ const graphics = renderer.moveGraphics();
219
+ feature.geometries = graphics.map((graphic) => {
220
+ return { graphic };
221
+ });
222
+ }
223
+ let fieldIdx = 0;
224
+ for (const attrValue of featureResponse.attributes) {
225
+ if (fieldIdx > fields.length) {
226
+ Logger.logError(loggerCategory, "Error while read feature info data: fields metadata missing");
227
+ break;
228
+ }
229
+ // Convert everything to string for now
230
+ const attr = this.getFeatureAttribute(fields[fieldIdx], attrValue);
231
+ if (attr) {
232
+ feature.attributes?.push(attr);
233
+ }
234
+ fieldIdx++;
235
+ }
236
+ subLayerInfo.features.push(feature);
237
+ }
238
+ if (layerInfo.subLayerInfos === undefined) {
239
+ layerInfo.subLayerInfos = [];
240
+ }
241
+ layerInfo.subLayerInfos.push(subLayerInfo);
242
+ featureInfos.push(layerInfo);
243
+ }
244
+ }
245
+ //# sourceMappingURL=ArcGisPbfFeatureReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcGisPbfFeatureReader.js","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisPbfFeatureReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAkB,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,gBAAgB,GAAG,WAAW,CAAC,wBAAwB,CAAC,YAAY,CAAC;AAC3E,MAAM,cAAc,GAAG,gCAAgC,CAAC;AAOxD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,uBAAuB;IACjE,YAAmB,QAA+B,EAAE,aAAkB;QACpE,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACjC,CAAC;IAEM,MAAM,CAAC,4BAA4B,CAAC,QAA2D;QACpG,QAAQ,QAAQ,EAAE;YAChB,KAAK,WAAW,CAAC,wBAAwB,CAAC,YAAY,CAAC,0BAA0B;gBAC/E,OAAO,wBAAwB,CAAC;YAClC,KAAK,WAAW,CAAC,wBAAwB,CAAC,YAAY,CAAC,0BAA0B;gBAC/E,OAAO,wBAAwB,CAAC;YAClC,KAAK,WAAW,CAAC,wBAAwB,CAAC,YAAY,CAAC,qBAAqB;gBAC1E,OAAO,mBAAmB,CA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AC,CAAC;iBAChC;gBAED,QAAQ,EAAE,CAAC;aACZ;YACD,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACrC;QAED,IAAI,SAAS,CAAC,aAAa,KAAK,SAAS,EAAE;YACzC,SAAS,CAAC,aAAa,GAAG,EAAE,CAAC;SAC9B;QACD,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3C,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { esriPBuffer } from \"../ArcGisFeature/esriPBuffer.gen\";\nimport { ArcGisAttributeDrivenSymbology, ArcGisGeometryRenderer, ArcGisGraphicsRenderer, MapLayerFeature, MapLayerFeatureAttribute, MapLayerFeatureInfo, MapSubLayerFeatureInfo} from \"@itwin/core-frontend\";\nimport { PrimitiveValue, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\nimport { ArcGisBaseFeatureReader } from \"./ArcGisFeatureReader\";\nimport { ArcGisResponseData } from \"./ArcGisFeatureResponse\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { ArcGisFeatureGeometryType } from \"./ArcGisFeatureQuery\";\n\nconst esriGeometryType = esriPBuffer.FeatureCollectionPBuffer.GeometryType;\nconst loggerCategory = \"MapLayersFormats.ArcGISFeature\";\n\ninterface PbfFieldInfo {\n name: string;\n type: esriPBuffer.FeatureCollectionPBuffer.FieldType;\n}\n\n/** @internal */\nexport class ArcGisPbfFeatureReader extends ArcGisBaseFeatureReader {\n public constructor(settings: ImageMapLayerSettings, layerMetadata: any) {\n super(settings, layerMetadata);\n }\n\n public static getArcGisFeatureGeometryType(geomType: esriPBuffer.FeatureCollectionPBuffer.GeometryType): ArcGisFeatureGeometryType {\n switch (geomType) {\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipatch:\n return \"esriGeometryMultiPatch\";\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipoint:\n return \"esriGeometryMultipoint\";\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePoint:\n return \"esriGeometryPoint\";\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolygon:\n return \"esriGeometryPolygon\";\n case esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolyline:\n return \"esriGeometryPolyline\";\n default:\n return \"esriGeometryNull\";\n }\n }\n\n private getNumericValue(attrValue: esriPBuffer.FeatureCollectionPBuffer.Value) {\n const propertyValue: PrimitiveValue = { valueFormat: PropertyValueFormat.Primitive };\n let typename = StandardTypeNames.Number;\n if (attrValue.has_double_value) {\n const value = this.toFixedWithoutPadding(attrValue.double_value);\n propertyValue.value = value;\n typename = StandardTypeNames.Double;\n } else if (attrValue.has_float_value) {\n const value = this.toFixedWithoutPadding(attrValue.float_value);\n propertyValue.value = value;\n typename = StandardTypeNames.Float;\n } else if (attrValue.has_int64_value) {\n propertyValue.value = attrValue.int64_value;\n typename = StandardTypeNames.Integer;\n } else if (attrValue.has_sint64_value) {\n propertyValue.value = attrValue.sint64_value;\n typename = StandardTypeNames.Integer;\n } else if (attrValue.has_sint_value) {\n propertyValue.value = attrValue.sint_value;\n typename = StandardTypeNames.Integer;\n } else if (attrValue.has_uint64_value) {\n propertyValue.value = attrValue.uint64_value;\n typename = StandardTypeNames.Integer;\n } else if (attrValue.has_uint_value) {\n propertyValue.value = attrValue.uint_value;\n typename = StandardTypeNames.Integer;\n } else {\n propertyValue.value = undefined;\n }\n\n return { propertyValue, typename };\n }\n\n public getFeatureAttribute(fieldInfo: PbfFieldInfo, attrValue: esriPBuffer.FeatureCollectionPBuffer.Value): MapLayerFeatureAttribute|undefined {\n let propertyValue: PrimitiveValue = { valueFormat: PropertyValueFormat.Primitive };\n\n let typename = StandardTypeNames.String;\n if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDouble\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeInteger\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeSmallInteger\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeOID\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeSingle\n || fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDate\n ) {\n const value = this.getNumericValue(attrValue);\n if (value.propertyValue === undefined) {\n Logger.logError(loggerCategory, `Could not read numeric value for field ${fieldInfo.name}`);\n return undefined;\n }\n\n if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeDate) {\n const test = (value.propertyValue.value as unknown) as number;\n propertyValue.value = new Date(test);\n typename = StandardTypeNames.DateTime;\n } else {\n typename = value.typename;\n propertyValue = value.propertyValue;\n }\n } else if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeString) {\n if (attrValue.has_string_value) {\n propertyValue.value = attrValue.string_value;\n typename = StandardTypeNames.String;\n }\n } else if (fieldInfo.type === esriPBuffer.FeatureCollectionPBuffer.FieldType.esriFieldTypeGlobalID) {\n if (attrValue.has_string_value) {\n propertyValue.value = attrValue.string_value;\n typename = StandardTypeNames.String;\n } else {\n const value = this.getNumericValue(attrValue);\n if (value.propertyValue === undefined) {\n Logger.logError(loggerCategory, `Could not read GlobalId value for field ${fieldInfo.name}`);\n return undefined;\n }\n }\n } else if (attrValue.has_string_value) {\n // If we reach this case that probably mean we don't support the field type, simply try to output string value\n typename = StandardTypeNames.String;\n propertyValue.value = attrValue.string_value;\n } else if (attrValue.value_type === \"none\") {\n // Sometimes fields are just empty, use an empty string\n typename = StandardTypeNames.String;\n propertyValue.value = undefined;\n } else {\n Logger.logError(loggerCategory, `Could not read value for field ${fieldInfo.name}`);\n return undefined;\n }\n\n propertyValue.displayValue = this.getDisplayValue(typename, propertyValue.value);\n\n return {value: propertyValue, property: { name: fieldInfo.name, displayLabel: fieldInfo.name, typename } };\n }\n\n public async readAndRender(response: ArcGisResponseData, renderer: ArcGisGeometryRenderer) {\n if (!(response.data instanceof esriPBuffer.FeatureCollectionPBuffer)) {\n const msg = \"Response was not in PBF format\";\n Logger.logError(loggerCategory, msg);\n return;\n }\n\n const collection = response.data;\n if (!collection.has_queryResult || !collection.queryResult.has_featureResult || collection?.queryResult?.featureResult?.features === undefined)\n return;\n\n const attrSymbology = renderer.attributeSymbology;\n\n // Fields metadata is stored outside feature results, create dedicated array first\n const fields: PbfFieldInfo[] = [];\n for (const field of collection.queryResult.featureResult.fields)\n fields.push({name: field.name, type:field.fieldType});\n\n const geomType = collection.queryResult.featureResult.geometryType;\n const stride = (collection.queryResult.featureResult.hasM || collection.queryResult.featureResult.hasZ) ? 3 : 2;\n const relativeCoords = renderer.transform === undefined;\n for (const feature of collection.queryResult.featureResult.features) {\n\n // Render geometries\n if (renderer && feature?.has_geometry) {\n\n if (attrSymbology) {\n // Read attributes if needed (attribute driven symbology)\n this.applySymbologyAttributes(attrSymbology, feature, fields);\n }\n\n if (geomType === esriGeometryType.esriGeometryTypePoint || geomType === esriGeometryType.esriGeometryTypeMultipoint) {\n await renderer.renderPoint(feature.geometry.lengths, feature.geometry.coords, stride, relativeCoords);\n } else if (geomType === esriGeometryType.esriGeometryTypePolyline || geomType === esriGeometryType.esriGeometryTypePolygon) {\n const fill = (geomType === esriGeometryType.esriGeometryTypePolygon);\n await renderer.renderPath(feature.geometry.lengths, feature.geometry.coords, fill, stride, relativeCoords);\n }\n }\n\n }\n }\n\n private applySymbologyAttributes(attrSymbology: ArcGisAttributeDrivenSymbology, feature: esriPBuffer.FeatureCollectionPBuffer.Feature, fields: PbfFieldInfo[]) {\n if (attrSymbology) {\n const symbolFields = attrSymbology.rendererFields;\n if (symbolFields && symbolFields.length > 0 && feature.attributes) {\n let fieldIdx = 0;\n const featureAttr: {[key: string]: any} = {};\n for (const attrValue of feature.attributes) {\n if (fieldIdx > fields.length) {\n Logger.logError(loggerCategory, \"Error while read feature info data: fields metadata missing\");\n break;\n }\n const fieldInfo = fields[fieldIdx++];\n if (symbolFields.includes(fieldInfo.name)) {\n const attr = this.getFeatureAttribute(fieldInfo, attrValue);\n if (attr) {\n const primitiveValue = attr.value as PrimitiveValue;\n featureAttr[fieldInfo.name] = primitiveValue.value;\n }\n }\n\n }\n attrSymbology.setActiveFeatureAttributes(featureAttr);\n }\n }\n }\n\n public async readFeatureInfo(response: ArcGisResponseData, featureInfos: MapLayerFeatureInfo[], renderer?: ArcGisGraphicsRenderer) {\n if (!(response.data instanceof esriPBuffer.FeatureCollectionPBuffer)) {\n\n Logger.logError(loggerCategory, \"Response was not in PBF format\");\n }\n\n const collection = response.data as esriPBuffer.FeatureCollectionPBuffer;\n if (!collection.has_queryResult || !collection.queryResult.has_featureResult || collection?.queryResult?.featureResult?.features === undefined)\n return;\n\n const layerInfo: MapLayerFeatureInfo = { layerName: this._settings.name, subLayerInfos: [] };\n\n // Fields metadata is stored outside feature results, create dedicated array first\n const fields: PbfFieldInfo[] = [];\n for (const field of collection.queryResult.featureResult.fields)\n fields.push({name: field.name, type:field.fieldType});\n\n const geomType = collection.queryResult.featureResult.geometryType;\n const stride = (collection.queryResult.featureResult.hasM || collection.queryResult.featureResult.hasZ) ? 3 : 2;\n\n const subLayerInfo: MapSubLayerFeatureInfo = {\n subLayerName: this._layerMetadata.name,\n displayFieldName: this._layerMetadata.name,\n features: [],\n };\n\n // Read feature values\n for (const featureResponse of collection.queryResult.featureResult.features) {\n const feature: MapLayerFeature = { attributes: []};\n\n if (renderer && featureResponse?.has_geometry) {\n if (geomType === esriGeometryType.esriGeometryTypePoint || geomType === esriGeometryType.esriGeometryTypeMultipoint) {\n await renderer.renderPoint(featureResponse.geometry.lengths, featureResponse.geometry.coords, stride, true);\n } else if (geomType === esriGeometryType.esriGeometryTypePolyline || geomType === esriGeometryType.esriGeometryTypePolygon) {\n const fill = (geomType === esriGeometryType.esriGeometryTypePolygon);\n await renderer.renderPath(featureResponse.geometry.lengths, featureResponse.geometry.coords, fill, stride, true);\n }\n const graphics = renderer.moveGraphics();\n feature.geometries = graphics.map((graphic) => {\n return {graphic};\n });\n }\n\n let fieldIdx = 0;\n for (const attrValue of featureResponse.attributes) {\n if (fieldIdx > fields.length) {\n Logger.logError(loggerCategory, \"Error while read feature info data: fields metadata missing\");\n break;\n }\n // Convert everything to string for now\n const attr = this.getFeatureAttribute(fields[fieldIdx], attrValue);\n if (attr) {\n feature.attributes?.push(attr);\n }\n\n fieldIdx++;\n }\n subLayerInfo.features.push(feature);\n }\n\n if (layerInfo.subLayerInfos === undefined) {\n layerInfo.subLayerInfos = [];\n }\n layerInfo.subLayerInfos.push(subLayerInfo);\n featureInfos.push(layerInfo);\n }\n}\n"]}
@@ -1,86 +1,41 @@
1
- import { ColorDef } from "@itwin/core-common";
2
- import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
1
+ import { EsriRenderer, EsriSymbol, EsriUniqueValueRenderer } from "./EsriSymbology";
2
+ import { ArcGisAttributeDrivenSymbology } from "@itwin/core-frontend";
3
3
  /** @internal */
4
- export type EsriSymbolType = "esriSFS" | "esriPMS" | "esriSLS" | "esriSMS" | "esriTS" | "CIMSymbolReference";
5
- interface EsriSymbol {
6
- type: EsriSymbolType;
7
- }
8
- /** @internal */
9
- export type EsriSLSStyle = "esriSLSDash" | "esriSLSDashDot" | "esriSLSDashDotDot" | "esriSLSDot" | "esriSLSLongDash" | "esriSLSLongDashDot" | "esriSLSNull" | "esriSLSShortDash" | "esriSLSShortDashDot" | "esriSLSShortDashDotDot" | "esriSLSShortDot" | "esriSLSSolid";
10
- interface EsriSLSProps {
11
- color: number[];
12
- type: EsriSymbolType;
13
- width: number;
14
- style: EsriSLSStyle;
15
- }
16
- /** @internal */
17
- export declare class EsriSLS implements EsriSymbol {
18
- readonly props: EsriSLSProps;
19
- get color(): ColorDef | undefined;
20
- get type(): EsriSymbolType;
21
- get width(): number;
22
- get style(): EsriSLSStyle;
23
- constructor(json: EsriSLSProps);
24
- static fromJSON(json: EsriSLSProps): EsriSLS;
25
- }
26
- interface EsriPMSProps {
27
- type: EsriSymbolType;
28
- url: string;
29
- imageData: string;
30
- contentType: string;
31
- width?: number;
32
- height?: number;
33
- xoffset?: number;
34
- yoffset?: number;
35
- angle?: number;
36
- }
4
+ export type ArcGisSymbologyRendererType = "simple" | "attributeDriven";
37
5
  /** @internal */
38
- export declare class EsriPMS implements EsriSymbol {
39
- readonly props: EsriPMSProps;
40
- private _image;
41
- get type(): EsriSymbolType;
42
- get url(): string;
43
- get imageData(): string;
44
- get imageUrl(): string;
45
- get image(): HTMLImageElement;
46
- get contentType(): string;
47
- get width(): number | undefined;
48
- get height(): number | undefined;
49
- get xoffset(): number | undefined;
50
- get yoffset(): number | undefined;
51
- get angle(): number | undefined;
52
- constructor(json: EsriPMSProps);
53
- static fromJSON(json: EsriPMSProps): EsriPMS;
6
+ export declare abstract class ArcGisSymbologyRenderer {
7
+ abstract isAttributeDriven(): this is ArcGisAttributeDrivenSymbology;
8
+ abstract applyFillStyle(context: CanvasRenderingContext2D): void;
9
+ abstract applyStrokeStyle(context: CanvasRenderingContext2D): void;
10
+ abstract drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;
11
+ static create(renderer: EsriRenderer | undefined, defaultSymbol: EsriSymbol): ArcGisSimpleSymbologyRenderer;
54
12
  }
55
13
  /** @internal */
56
- export type EsriSFSStyleProps = "esriSFSBackwardDiagonal" | "esriSFSCross" | "esriSFSDiagonalCross" | "esriSFSForwardDiagonal" | "esriSFSHorizontal" | "esriSFSNull" | "esriSFSSolid" | "esriSFSVertical";
57
- interface EsriSFSProps {
58
- color?: number[];
59
- type: EsriSymbolType;
60
- style: EsriSFSStyleProps;
61
- outline?: EsriSLSProps;
62
- }
63
- /** @internal */
64
- export declare class EsriSFS implements EsriSymbol {
65
- readonly props: EsriSFSProps;
66
- private _outline;
67
- get color(): ColorDef | undefined;
68
- get type(): EsriSymbolType;
69
- get style(): EsriSFSStyleProps;
70
- get outline(): EsriSLS | undefined;
71
- constructor(json: EsriSFSProps);
72
- static fromJSON(json: EsriSFSProps): EsriSFS;
73
- }
74
- /** @internal */
75
- export declare class ArcGisSymbologyRenderer {
76
- private _symbol;
77
- private static readonly defaultPMS;
78
- private static readonly defaultSLS;
79
- private static readonly defaultSFS;
80
- constructor(geometryType: ArcGisFeatureGeometryType, rendererDefinition: any);
14
+ export declare class ArcGisSimpleSymbologyRenderer extends ArcGisSymbologyRenderer {
15
+ isAttributeDriven(): this is ArcGisAttributeDrivenSymbology;
16
+ lineWidthScaleFactor: number;
17
+ get symbol(): EsriSymbol;
18
+ get defaultSymbol(): EsriSymbol;
19
+ protected _symbol: EsriSymbol;
20
+ protected _defaultSymbol: EsriSymbol;
21
+ readonly renderer?: EsriRenderer;
22
+ constructor(renderer: EsriRenderer | undefined, defaultSymbol: EsriSymbol);
81
23
  applyFillStyle(context: CanvasRenderingContext2D): void;
24
+ private getFillColor;
82
25
  applyStrokeStyle(context: CanvasRenderingContext2D): void;
83
26
  drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number): void;
84
27
  }
85
- export {};
28
+ /** @internal */
29
+ export declare class ArcGisUniqueValueSymbologyRenderer extends ArcGisSimpleSymbologyRenderer implements ArcGisAttributeDrivenSymbology {
30
+ isAttributeDriven(): this is ArcGisAttributeDrivenSymbology;
31
+ protected _activeFeatureAttributes: {
32
+ [key: string]: any;
33
+ } | undefined;
34
+ protected uvRenderer: EsriUniqueValueRenderer;
35
+ get rendererFields(): string[] | undefined;
36
+ constructor(renderer: EsriUniqueValueRenderer, defaultSymbol: EsriSymbol);
37
+ setActiveFeatureAttributes(attributes: {
38
+ [key: string]: any;
39
+ }): void;
40
+ }
86
41
  //# sourceMappingURL=ArcGisSymbologyRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGisSymbologyRenderer.d.ts","sourceRoot":"","sources":["../../../src/ArcGisFeature/ArcGisSymbologyRenderer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAajE,gBAAgB;AAChB,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,CAAC;AAC7G,UAAU,UAAU;IAClB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,YAAY,GAAG,iBAAiB,GAAG,oBAAoB,GAC3I,aAAa,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAE3H,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,gBAAgB;AAChB,qBAAa,OAAQ,YAAW,UAAU;IACxC,SAAgB,KAAK,EAAE,YAAY,CAAC;IAEpC,IAAW,KAAK,yBAA+C;IAC/D,IAAW,IAAI,mBAA8B;IAC7C,IAAW,KAAK,WAA+B;IAC/C,IAAW,KAAK,iBAA+B;gBAEnC,IAAI,EAAE,YAAY;WAIhB,QAAQ,CAAC,IAAI,EAAE,YAAY;CAG1C;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,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