@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.
- package/CHANGELOG.md +74 -1
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts +19 -0
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js +46 -0
- package/lib/cjs/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +3 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +16 -8
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +157 -45
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +6 -4
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +14 -0
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/{ArcGisFeatureJSON.js → ArcGisJsonFeatureReader.js} +51 -55
- package/lib/cjs/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +22 -0
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js +249 -0
- package/lib/cjs/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +32 -77
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +88 -128
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts +152 -0
- package/lib/cjs/ArcGisFeature/EsriSymbology.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/EsriSymbology.js +181 -0
- package/lib/cjs/ArcGisFeature/EsriSymbology.js.map +1 -0
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts +34 -0
- package/lib/cjs/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js +281 -0
- package/lib/cjs/Tools/MapFeatureInfoDecorator.js.map +1 -0
- package/lib/cjs/Tools/MapFeatureInfoTool.d.ts +38 -0
- package/lib/cjs/Tools/MapFeatureInfoTool.d.ts.map +1 -0
- package/lib/cjs/Tools/MapFeatureInfoTool.js +113 -0
- package/lib/cjs/Tools/MapFeatureInfoTool.js.map +1 -0
- package/lib/cjs/map-layers-formats.d.ts +1 -0
- package/lib/cjs/map-layers-formats.d.ts.map +1 -1
- package/lib/cjs/map-layers-formats.js +1 -0
- package/lib/cjs/map-layers-formats.js.map +1 -1
- package/lib/cjs/mapLayersFormats.d.ts +12 -1
- package/lib/cjs/mapLayersFormats.d.ts.map +1 -1
- package/lib/cjs/mapLayersFormats.js +11 -1
- package/lib/cjs/mapLayersFormats.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts +19 -0
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js +42 -0
- package/lib/esm/ArcGisFeature/ArcGisCanvasRenderer.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +4 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +16 -8
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +158 -46
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +5 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +4 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +15 -6
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +4 -2
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts +14 -0
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/{ArcGisFeatureJSON.js → ArcGisJsonFeatureReader.js} +51 -55
- package/lib/esm/ArcGisFeature/ArcGisJsonFeatureReader.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts +22 -0
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js +245 -0
- package/lib/esm/ArcGisFeature/ArcGisPbfFeatureReader.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +32 -77
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +84 -124
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/esm/ArcGisFeature/EsriSymbology.d.ts +152 -0
- package/lib/esm/ArcGisFeature/EsriSymbology.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/EsriSymbology.js +170 -0
- package/lib/esm/ArcGisFeature/EsriSymbology.js.map +1 -0
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -1
- package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts +34 -0
- package/lib/esm/Tools/MapFeatureInfoDecorator.d.ts.map +1 -0
- package/lib/esm/Tools/MapFeatureInfoDecorator.js +277 -0
- package/lib/esm/Tools/MapFeatureInfoDecorator.js.map +1 -0
- package/lib/esm/Tools/MapFeatureInfoTool.d.ts +38 -0
- package/lib/esm/Tools/MapFeatureInfoTool.d.ts.map +1 -0
- package/lib/esm/Tools/MapFeatureInfoTool.js +110 -0
- package/lib/esm/Tools/MapFeatureInfoTool.js.map +1 -0
- package/lib/esm/map-layers-formats.d.ts +1 -0
- package/lib/esm/map-layers-formats.d.ts.map +1 -1
- package/lib/esm/map-layers-formats.js +1 -0
- package/lib/esm/map-layers-formats.js.map +1 -1
- package/lib/esm/mapLayersFormats.d.ts +12 -1
- package/lib/esm/mapLayersFormats.d.ts.map +1 -1
- package/lib/esm/mapLayersFormats.js +13 -2
- package/lib/esm/mapLayersFormats.js.map +1 -1
- package/lib/public/locales/en/mapLayersFormats.json +12 -0
- package/package.json +19 -22
- package/.nycrc +0 -10
- package/.rush/temp/operation/build/all.log +0 -3
- package/.rush/temp/operation/build/state.json +0 -3
- package/.rush/temp/operation/cover/all.log +0 -98
- package/.rush/temp/operation/cover/state.json +0 -3
- package/.rush/temp/operation/docs/all.log +0 -30
- package/.rush/temp/operation/docs/state.json +0 -3
- package/.rush/temp/package-deps_build.json +0 -36
- package/.rush/temp/package-deps_cover.json +0 -36
- package/.rush/temp/package-deps_docs.json +0 -36
- package/.rush/temp/shrinkwrap-deps.json +0 -505
- package/CHANGELOG.json +0 -119
- package/config/rush-project.json +0 -6
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts +0 -15
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js +0 -201
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +0 -143
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -35
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -162
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -168
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -680
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -104
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -215
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -95
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -60
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +0 -7
- package/lib/cjs/test/ArcGisFeature/Mocks.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/Mocks.js +0 -19
- package/lib/cjs/test/ArcGisFeature/Mocks.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +0 -420
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -427
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
- package/lib/cjs/test/coverage/.nyc_output/43b4d4c9-a360-43df-88fe-ecfb97b8832b.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/5c53bf83-e91a-4706-bc7c-fa9b79502114.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/43b4d4c9-a360-43df-88fe-ecfb97b8832b.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/5c53bf83-e91a-4706-bc7c-fa9b79502114.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +0 -1
- package/lib/cjs/test/coverage/cobertura-coverage.xml +0 -1169
- package/lib/cjs/test/coverage/lcov-report/base.css +0 -224
- package/lib/cjs/test/coverage/lcov-report/block-navigation.js +0 -87
- package/lib/cjs/test/coverage/lcov-report/favicon.png +0 -0
- package/lib/cjs/test/coverage/lcov-report/index.html +0 -131
- package/lib/cjs/test/coverage/lcov-report/prettify.css +0 -1
- package/lib/cjs/test/coverage/lcov-report/prettify.js +0 -2
- package/lib/cjs/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/lib/cjs/test/coverage/lcov-report/sorter.js +0 -196
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +0 -133
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +0 -550
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +0 -730
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +0 -1546
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +0 -763
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +0 -223
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +0 -598
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +0 -301
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +0 -832
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +0 -236
- package/lib/cjs/test/coverage/lcov-report/src/index.html +0 -131
- package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +0 -130
- package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +0 -163
- package/lib/cjs/test/coverage/lcov.info +0 -1358
- package/lib/cjs/tsconfig.tsbuildinfo +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +0 -15
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts +0 -15
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js +0 -197
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +0 -33
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +0 -139
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +0 -33
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +0 -160
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +0 -166
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +0 -678
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +0 -102
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +0 -213
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +0 -93
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +0 -2
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +0 -58
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/Mocks.d.ts +0 -7
- package/lib/esm/test/ArcGisFeature/Mocks.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/Mocks.js +0 -16
- package/lib/esm/test/ArcGisFeature/Mocks.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +0 -56
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +0 -417
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +0 -1
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +0 -1043
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +0 -1
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +0 -424
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +0 -1
- package/lib/esm/tsconfig.tsbuildinfo +0 -1
- package/lib/test/junit_results.xml +0 -159
- package/map-layers-formats.build.log +0 -30
- package/src/ArcGisFeature/ArcGisFeatureFormat.ts +0 -16
- package/src/ArcGisFeature/ArcGisFeatureJSON.ts +0 -155
- package/src/ArcGisFeature/ArcGisFeaturePBF.ts +0 -215
- package/src/ArcGisFeature/ArcGisFeatureProvider.ts +0 -487
- package/src/ArcGisFeature/ArcGisFeatureQuery.ts +0 -226
- package/src/ArcGisFeature/ArcGisFeatureReader.ts +0 -46
- package/src/ArcGisFeature/ArcGisFeatureRenderer.ts +0 -171
- package/src/ArcGisFeature/ArcGisFeatureResponse.ts +0 -72
- package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +0 -249
- package/src/ArcGisFeature/esriPBuffer.gen.ts +0 -2612
- package/src/map-layers-formats.ts +0 -15
- package/src/mapLayersFormats.ts +0 -26
- package/src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts +0 -46
- package/src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts +0 -202
- package/src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts +0 -227
- package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +0 -805
- package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +0 -117
- package/src/test/ArcGisFeature/ArcGisFeatureRenderer.test.ts +0 -296
- package/src/test/ArcGisFeature/ArcGisFeatureResponse.test.ts +0 -109
- package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +0 -77
- package/src/test/ArcGisFeature/Mocks.ts +0 -19
- package/src/test/ArcGisFeature/NewYorkDataset.ts +0 -423
- package/src/test/ArcGisFeature/PhillyLandmarksDataset.ts +0 -455
- package/tsconfig.json +0 -20
|
@@ -1,160 +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
|
-
import { Logger } from "@itwin/core-bentley";
|
|
6
|
-
import { ImageMapLayerSettings } from "@itwin/core-common";
|
|
7
|
-
import { expect } from "chai";
|
|
8
|
-
import * as sinon from "sinon";
|
|
9
|
-
import { ArcGisFeatureMapLayerFormat } from "../../ArcGisFeature/ArcGisFeatureFormat";
|
|
10
|
-
import { ArcGisFeatureJSON } from "../../ArcGisFeature/ArcGisFeatureJSON";
|
|
11
|
-
import { ArcGisFeatureRenderer } from "../../ArcGisFeature/ArcGisFeatureRenderer";
|
|
12
|
-
import { ArcGisSymbologyRenderer } from "../../ArcGisFeature/ArcGisSymbologyRenderer";
|
|
13
|
-
import { fakeContext } from "./Mocks";
|
|
14
|
-
import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
|
|
15
|
-
const esriFeatureSampleSource = { name: "dummyFeatureLayer", url: "https://dummy.com", formatId: ArcGisFeatureMapLayerFormat.formatId };
|
|
16
|
-
const createFeatureJSON = () => {
|
|
17
|
-
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
18
|
-
const featurePbf = new ArcGisFeatureJSON(settings, { name: "SampleLayer" });
|
|
19
|
-
// Locale configuration depends on the testing machine (i.e. linux vs windows),
|
|
20
|
-
// so we need to force date display to Iso to get a consistent value.
|
|
21
|
-
// In real scenario, we still want dates to be displayed in end-user's locale.
|
|
22
|
-
featurePbf.forceDateDisplayValueToIso = true;
|
|
23
|
-
return featurePbf;
|
|
24
|
-
};
|
|
25
|
-
describe("ArcGisFeatureJSON", () => {
|
|
26
|
-
const sandbox = sinon.createSandbox();
|
|
27
|
-
afterEach(async () => {
|
|
28
|
-
sandbox.restore();
|
|
29
|
-
});
|
|
30
|
-
it("should read FeatureInfo in JSON (phillyTansportation)", async () => {
|
|
31
|
-
const featureJson = createFeatureJSON();
|
|
32
|
-
// In some cases, PBF gives more floating-point precision than JSON.
|
|
33
|
-
// Since I want to use the same output reference for both formats, I force a max precision of 8.
|
|
34
|
-
featureJson.floatPrecision = 8;
|
|
35
|
-
const results = [];
|
|
36
|
-
featureJson.readFeatureInfo({ data: PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryJson, exceedTransferLimit: false }, results);
|
|
37
|
-
expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyTansportationGetFeatureInfoResultRef));
|
|
38
|
-
});
|
|
39
|
-
it("should read FeatureInfo in JSON (phillyAirport)", async () => {
|
|
40
|
-
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
41
|
-
const featureJson = new ArcGisFeatureJSON(settings, { name: "SampleLayer" });
|
|
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 = [];
|
|
46
|
-
const data = JSON.parse(PhillyLandmarksDataset.phillyAirportGetFeatureInfoQueryJson);
|
|
47
|
-
featureJson.readFeatureInfo({ data, exceedTransferLimit: false }, results);
|
|
48
|
-
const _test = JSON.stringify(results);
|
|
49
|
-
expect(_test).equals(JSON.stringify(PhillyLandmarksDataset.phillyAirportGetFeatureInfoResultRef));
|
|
50
|
-
});
|
|
51
|
-
it("should deflate coordinates array", async () => {
|
|
52
|
-
// Simple deflate stride = 2
|
|
53
|
-
let doubleArray = [[1, 2], [3, 4]];
|
|
54
|
-
let deflated = [];
|
|
55
|
-
let offset = ArcGisFeatureJSON.deflateCoordinates(doubleArray, deflated, 2, 0);
|
|
56
|
-
expect(offset).to.equals(4);
|
|
57
|
-
expect(deflated).to.eql([1, 2, 3, 4]);
|
|
58
|
-
/// Check offset with stride = 2
|
|
59
|
-
doubleArray = [[5, 6]];
|
|
60
|
-
offset = ArcGisFeatureJSON.deflateCoordinates(doubleArray, deflated, 2, offset);
|
|
61
|
-
expect(offset).to.equals(6);
|
|
62
|
-
expect(deflated).to.eql([1, 2, 3, 4, 5, 6]);
|
|
63
|
-
// Simple deflate stride = 3
|
|
64
|
-
doubleArray = [[1, 2, 3], [4, 5, 6]];
|
|
65
|
-
deflated = [];
|
|
66
|
-
offset = ArcGisFeatureJSON.deflateCoordinates(doubleArray, deflated, 3, 0);
|
|
67
|
-
expect(offset).to.equals(6);
|
|
68
|
-
expect(deflated).to.eql([1, 2, 3, 4, 5, 6]);
|
|
69
|
-
/// Check offset with stride = 3
|
|
70
|
-
doubleArray = [[7, 8, 9]];
|
|
71
|
-
offset = ArcGisFeatureJSON.deflateCoordinates(doubleArray, deflated, 3, offset);
|
|
72
|
-
expect(offset).to.equals(9);
|
|
73
|
-
expect(deflated).to.eql([1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
|
74
|
-
});
|
|
75
|
-
it("should readAndRender single ring polygon feature", async () => {
|
|
76
|
-
const featureJson = createFeatureJSON();
|
|
77
|
-
const data = PhillyLandmarksDataset.phillySimplePolyQueryJson;
|
|
78
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
|
|
79
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
80
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
81
|
-
featureJson.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
82
|
-
expect(renderPathSpy.calledOnce);
|
|
83
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
84
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
85
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
|
|
86
|
-
expect(firstCall.args[2]).to.eql(true); // fill
|
|
87
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
88
|
-
});
|
|
89
|
-
it("should readAndRender multiple ring polygon feature", async () => {
|
|
90
|
-
const featureJson = createFeatureJSON();
|
|
91
|
-
const data = PhillyLandmarksDataset.phillyDoubleRingPolyQueryJson;
|
|
92
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
|
|
93
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
94
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
95
|
-
featureJson.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
96
|
-
expect(renderPathSpy.calledOnce);
|
|
97
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
98
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
99
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
|
|
100
|
-
expect(firstCall.args[2]).to.eql(true); // fill
|
|
101
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
102
|
-
});
|
|
103
|
-
it("should readAndRender simple path", async () => {
|
|
104
|
-
const featureJson = createFeatureJSON();
|
|
105
|
-
const data = PhillyLandmarksDataset.phillySimplePathQueryJson;
|
|
106
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
107
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
108
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
109
|
-
featureJson.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
110
|
-
expect(renderPathSpy.calledOnce);
|
|
111
|
-
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];
|
|
112
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
113
|
-
expect(firstCall.args[0]).to.eql([24]); // geometryLengths
|
|
114
|
-
expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords
|
|
115
|
-
expect(firstCall.args[2]).to.eql(false); // fill
|
|
116
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
117
|
-
});
|
|
118
|
-
it("should readAndRender multi path", async () => {
|
|
119
|
-
const featureJson = createFeatureJSON();
|
|
120
|
-
const data = PhillyLandmarksDataset.phillyMultiPathQueryJson;
|
|
121
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
122
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
123
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
124
|
-
featureJson.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
125
|
-
expect(renderPathSpy.calledOnce);
|
|
126
|
-
// Pbf contains already the right output format expect, lets rely on that.
|
|
127
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
128
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.lengths);
|
|
129
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.coords);
|
|
130
|
-
expect(firstCall.args[2]).to.eql(false); // fill
|
|
131
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
132
|
-
});
|
|
133
|
-
it("should readAndRender simple point", async () => {
|
|
134
|
-
const featureJson = createFeatureJSON();
|
|
135
|
-
const data = PhillyLandmarksDataset.phillySimplePointQueryJson;
|
|
136
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType, PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
137
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
138
|
-
const spy = sinon.spy(featureRenderer, "renderPoint");
|
|
139
|
-
featureJson.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
140
|
-
expect(spy.calledOnce);
|
|
141
|
-
// Pbf contains already the right output format expect, lets rely on that.
|
|
142
|
-
const geometryCoords = PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.coords;
|
|
143
|
-
const firstCall = spy.getCalls()[0];
|
|
144
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
145
|
-
expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords
|
|
146
|
-
expect(firstCall.args[2]).to.eql(2); // stride
|
|
147
|
-
});
|
|
148
|
-
it("should log error when readAndRender / readFeatureInfo is called invalid response Data", async () => {
|
|
149
|
-
const featureJson = createFeatureJSON();
|
|
150
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryAny", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
151
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
152
|
-
const logErrorSpy = sandbox.spy(Logger, "logError");
|
|
153
|
-
featureJson.readAndRender({ data: { test: "test" }, exceedTransferLimit: false }, featureRenderer);
|
|
154
|
-
expect(logErrorSpy.calledOnce);
|
|
155
|
-
logErrorSpy.resetHistory();
|
|
156
|
-
featureJson.readFeatureInfo({ data: { test: "test" }, exceedTransferLimit: false }, []);
|
|
157
|
-
expect(logErrorSpy.calledOnce);
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
//# sourceMappingURL=ArcGisFeatureJSON.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGisFeatureJSON.test.js","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,uBAAuB,GAAG,EAAC,IAAI,EAAE,mBAAmB,EAAE,GAA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c,SAAS;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wFAAwF,EAAE,KAAK,IAAI,EAAE;QACtG,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;QACxC,MAAM,cAAc,GAAG,IAAI,uBAAuB,CAChD,iBAAiB,EACjB,sBAAsB,CAAC,4BAA4B,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAE5E,MAAM,eAAe,GAAG,IAAI,qBAAqB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC/E,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACpD,WAAW,CAAC,aAAa,CAAC,EAAC,IAAI,EAAE,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,mBAAmB,EAAE,KAAK,EAAC,EAAE,eAAe,CAAC,CAAC;QAC9F,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE/B,WAAW,CAAC,YAAY,EAAE,CAAC;QAC3B,WAAW,CAAC,eAAe,CAAC,EAAC,IAAI,EAAE,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,mBAAmB,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;QACnF,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAEjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { MapLayerFeatureInfo } from \"@itwin/core-frontend\";\r\nimport { expect } from \"chai\";\r\nimport * as sinon from \"sinon\";\r\nimport { ArcGisFeatureMapLayerFormat } from \"../../ArcGisFeature/ArcGisFeatureFormat\";\r\nimport { ArcGisFeatureJSON } from \"../../ArcGisFeature/ArcGisFeatureJSON\";\r\nimport { ArcGisFeatureGeometryType } from \"../../ArcGisFeature/ArcGisFeatureQuery\";\r\nimport { ArcGisFeatureRenderer } from \"../../ArcGisFeature/ArcGisFeatureRenderer\";\r\nimport { ArcGisSymbologyRenderer } from \"../../ArcGisFeature/ArcGisSymbologyRenderer\";\r\nimport { fakeContext } from \"./Mocks\";\r\nimport { PhillyLandmarksDataset } from \"./PhillyLandmarksDataset\";\r\n\r\nconst esriFeatureSampleSource = {name: \"dummyFeatureLayer\", url: \"https://dummy.com\", formatId: ArcGisFeatureMapLayerFormat.formatId};\r\n\r\nconst createFeatureJSON = () => {\r\n const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);\r\n const featurePbf = new ArcGisFeatureJSON(settings, {name: \"SampleLayer\"});\r\n\r\n // Locale configuration depends on the testing machine (i.e. linux vs windows),\r\n // so we need to force date display to Iso to get a consistent value.\r\n // In real scenario, we still want dates to be displayed in end-user's locale.\r\n featurePbf.forceDateDisplayValueToIso = true;\r\n return featurePbf;\r\n};\r\n\r\ndescribe(\"ArcGisFeatureJSON\", () => {\r\n\r\n const sandbox = sinon.createSandbox();\r\n\r\n afterEach(async () => {\r\n sandbox.restore();\r\n });\r\n\r\n it(\"should read FeatureInfo in JSON (phillyTansportation)\", async () => {\r\n const featureJson = createFeatureJSON();\r\n // In some cases, PBF gives more floating-point precision than JSON.\r\n // Since I want to use the same output reference for both formats, I force a max precision of 8.\r\n featureJson.floatPrecision = 8;\r\n const results: MapLayerFeatureInfo[] = [];\r\n featureJson.readFeatureInfo({data: PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryJson, exceedTransferLimit: false}, results);\r\n expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyTansportationGetFeatureInfoResultRef));\r\n });\r\n\r\n it(\"should read FeatureInfo in JSON (phillyAirport)\", async () => {\r\n const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);\r\n const featureJson = new ArcGisFeatureJSON(settings, {name: \"SampleLayer\"});\r\n // In some cases, PBF gives more floating-point precision than JSON.\r\n // Since I want to use the same output reference for both formats, I force a max precision of 8.\r\n featureJson.floatPrecision = 8;\r\n const results: MapLayerFeatureInfo[] = [];\r\n const data = JSON.parse(PhillyLandmarksDataset.phillyAirportGetFeatureInfoQueryJson);\r\n featureJson.readFeatureInfo({data, exceedTransferLimit: false}, results);\r\n const _test = JSON.stringify(results);\r\n expect(_test).equals(JSON.stringify(PhillyLandmarksDataset.phillyAirportGetFeatureInfoResultRef));\r\n });\r\n\r\n it(\"should deflate coordinates array\", async () => {\r\n // Simple deflate stride = 2\r\n let doubleArray = [[1,2], [3,4]];\r\n let deflated: number[] = [];\r\n let offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 2, 0);\r\n expect(offset).to.equals(4);\r\n expect(deflated).to.eql([1,2,3,4]);\r\n\r\n /// Check offset with stride = 2\r\n doubleArray = [[5,6]];\r\n offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 2, offset);\r\n expect(offset).to.equals(6);\r\n expect(deflated).to.eql([1,2,3,4,5,6]);\r\n\r\n // Simple deflate stride = 3\r\n doubleArray = [[1,2,3], [4,5,6]];\r\n deflated = [];\r\n offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 3, 0);\r\n expect(offset).to.equals(6);\r\n expect(deflated).to.eql([1,2,3,4,5,6]);\r\n\r\n /// Check offset with stride = 3\r\n doubleArray = [[7,8,9]];\r\n offset = (ArcGisFeatureJSON as any).deflateCoordinates(doubleArray, deflated, 3, offset);\r\n expect(offset).to.equals(9);\r\n expect(deflated).to.eql([1,2,3,4,5,6,7,8,9]);\r\n });\r\n\r\n it(\"should readAndRender single ring polygon feature\", async () => {\r\n const featureJson = createFeatureJSON();\r\n\r\n const data = PhillyLandmarksDataset.phillySimplePolyQueryJson;\r\n\r\n const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(true); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender multiple ring polygon feature\", async () => {\r\n const featureJson = createFeatureJSON();\r\n\r\n const data = PhillyLandmarksDataset.phillyDoubleRingPolyQueryJson;\r\n\r\n const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(true); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender simple path\", async () => {\r\n const featureJson = createFeatureJSON();\r\n const data = PhillyLandmarksDataset.phillySimplePathQueryJson;\r\n const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType,\r\n PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n 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];\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql([24]); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(false); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender multi path\", async () => {\r\n const featureJson = createFeatureJSON();\r\n const data = PhillyLandmarksDataset.phillyMultiPathQueryJson;\r\n const symbolRenderer = new ArcGisSymbologyRenderer(data.geometryType as ArcGisFeatureGeometryType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n // Pbf contains already the right output format expect, lets rely on that.\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.lengths);\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.coords);\r\n expect(firstCall.args[2]).to.eql(false); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender simple point\", async () => {\r\n const featureJson = createFeatureJSON();\r\n const data = PhillyLandmarksDataset.phillySimplePointQueryJson;\r\n const symbolRenderer = new ArcGisSymbologyRenderer(\r\n data.geometryType as ArcGisFeatureGeometryType,\r\n PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const spy = sinon.spy(featureRenderer, \"renderPoint\");\r\n featureJson.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(spy.calledOnce);\r\n\r\n // Pbf contains already the right output format expect, lets rely on that.\r\n const geometryCoords = PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.coords;\r\n const firstCall = spy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should log error when readAndRender / readFeatureInfo is called invalid response Data\", async () => {\r\n const featureJson = createFeatureJSON();\r\n const symbolRenderer = new ArcGisSymbologyRenderer(\r\n \"esriGeometryAny\",\r\n PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const logErrorSpy = sandbox.spy(Logger, \"logError\");\r\n featureJson.readAndRender({data: {test:\"test\"}, exceedTransferLimit: false}, featureRenderer);\r\n expect(logErrorSpy.calledOnce);\r\n\r\n logErrorSpy.resetHistory();\r\n featureJson.readFeatureInfo({data: {test:\"test\"}, exceedTransferLimit: false}, []);\r\n expect(logErrorSpy.calledOnce);\r\n\r\n });\r\n});\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGisFeaturePBF.test.d.ts","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,166 +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
|
-
import { Logger } from "@itwin/core-bentley";
|
|
6
|
-
import { Base64EncodedString, ImageMapLayerSettings } from "@itwin/core-common";
|
|
7
|
-
import { expect } from "chai";
|
|
8
|
-
import * as sinon from "sinon";
|
|
9
|
-
import { ArcGisFeaturePBF } from "../../ArcGisFeature/ArcGisFeaturePBF";
|
|
10
|
-
import { ArcGisFeatureRenderer } from "../../ArcGisFeature/ArcGisFeatureRenderer";
|
|
11
|
-
import { ArcGisSymbologyRenderer } from "../../ArcGisFeature/ArcGisSymbologyRenderer";
|
|
12
|
-
import { esriPBuffer } from "../../ArcGisFeature/esriPBuffer.gen";
|
|
13
|
-
import { esriFeatureSampleSource, fakeContext } from "./Mocks";
|
|
14
|
-
import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
|
|
15
|
-
const createFeaturePBF = () => {
|
|
16
|
-
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
17
|
-
const featurePbf = new ArcGisFeaturePBF(settings, { name: "SampleLayer" });
|
|
18
|
-
// Locale configuration depends on the testing machine (i.e. linux vs windows),
|
|
19
|
-
// so we need to force date display to Iso to get a consistent value.
|
|
20
|
-
// In real scenario, we still want dates to be displayed in end-user's locale.
|
|
21
|
-
featurePbf.forceDateDisplayValueToIso = true;
|
|
22
|
-
return featurePbf;
|
|
23
|
-
};
|
|
24
|
-
describe("ArcGisFeaturePBF", () => {
|
|
25
|
-
const sandbox = sinon.createSandbox();
|
|
26
|
-
afterEach(async () => {
|
|
27
|
-
sandbox.restore();
|
|
28
|
-
});
|
|
29
|
-
it("should convert pbf geometry type to Esri types", async () => {
|
|
30
|
-
expect(ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipatch))
|
|
31
|
-
.to.equals("esriGeometryMultiPatch");
|
|
32
|
-
expect(ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipoint))
|
|
33
|
-
.to.equals("esriGeometryMultipoint");
|
|
34
|
-
expect(ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePoint))
|
|
35
|
-
.to.equals("esriGeometryPoint");
|
|
36
|
-
expect(ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolygon))
|
|
37
|
-
.to.equals("esriGeometryPolygon");
|
|
38
|
-
expect(ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolyline))
|
|
39
|
-
.to.equals("esriGeometryPolyline");
|
|
40
|
-
expect(ArcGisFeaturePBF.getArcGisFeatureGeometryType(""))
|
|
41
|
-
.to.equals("esriGeometryNull");
|
|
42
|
-
});
|
|
43
|
-
it("should read FeatureInfo in PBF", async () => {
|
|
44
|
-
const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyAirportGetFeatureInfoQueryPbf);
|
|
45
|
-
const featureCollection = esriPBuffer.FeatureCollectionPBuffer.deserialize(byteArray);
|
|
46
|
-
const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
|
|
47
|
-
const featurePbf = new ArcGisFeaturePBF(settings, { name: "SampleLayer" });
|
|
48
|
-
// In some cases, PBF gives more floating-point precision than JSON.
|
|
49
|
-
// Since I want to use the same output reference for both formats, I force a max precision of 8.
|
|
50
|
-
featurePbf.floatPrecision = 8;
|
|
51
|
-
const results = [];
|
|
52
|
-
featurePbf.readFeatureInfo({ data: featureCollection, exceedTransferLimit: false }, results);
|
|
53
|
-
// Make deep comparison by using JSON.stringify
|
|
54
|
-
expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyAirportGetFeatureInfoResultRef));
|
|
55
|
-
});
|
|
56
|
-
it("should read FeatureInfo from PBF (philly transportation)", async () => {
|
|
57
|
-
const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryEncodedPbf);
|
|
58
|
-
const featureCollection = esriPBuffer.FeatureCollectionPBuffer.deserialize(byteArray);
|
|
59
|
-
const featurePbf = createFeaturePBF();
|
|
60
|
-
// In some cases, PBF gives more floating-point precision than JSON.
|
|
61
|
-
// Since I want to use the same output reference for both formats, I force a max precision.
|
|
62
|
-
featurePbf.floatPrecision = 2;
|
|
63
|
-
const results = [];
|
|
64
|
-
featurePbf.readFeatureInfo({ data: featureCollection, exceedTransferLimit: false }, results);
|
|
65
|
-
// Make deep comparison by using JSON.stringify
|
|
66
|
-
expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyTansportationGetFeatureInfoResultRef));
|
|
67
|
-
});
|
|
68
|
-
it("should read all data types from FeatureInfo ", async () => {
|
|
69
|
-
// In this test we use a synthetic PBuffer object to initialize a feature collection object.
|
|
70
|
-
// The is to ensure we cover correctly all possible attribute value types.
|
|
71
|
-
const featureCollection = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.fieldsCoveragePbufferCollection);
|
|
72
|
-
const featurePbf = createFeaturePBF();
|
|
73
|
-
const results = [];
|
|
74
|
-
featurePbf.readFeatureInfo({ data: featureCollection, exceedTransferLimit: false }, results);
|
|
75
|
-
// Make deep comparison by using JSON.stringify
|
|
76
|
-
expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.fieldsCoverageGetFeatureInfoResultRef));
|
|
77
|
-
});
|
|
78
|
-
it("should readAndRender single ring polygon feature", async () => {
|
|
79
|
-
const featurePbf = createFeaturePBF();
|
|
80
|
-
const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePolyQueryPbf);
|
|
81
|
-
const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.geometryType);
|
|
82
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
|
|
83
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
84
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
85
|
-
featurePbf.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
86
|
-
expect(renderPathSpy.calledOnce);
|
|
87
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
88
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
89
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
|
|
90
|
-
expect(firstCall.args[2]).to.eql(true); // fill
|
|
91
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
92
|
-
});
|
|
93
|
-
it("should readAndRender multiple ring polygon feature", async () => {
|
|
94
|
-
const featurePbf = createFeaturePBF();
|
|
95
|
-
const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.geometryType);
|
|
96
|
-
const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf);
|
|
97
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);
|
|
98
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
99
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
100
|
-
featurePbf.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
101
|
-
expect(renderPathSpy.calledOnce);
|
|
102
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
103
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
104
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
|
|
105
|
-
expect(firstCall.args[2]).to.eql(true); // fill
|
|
106
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
107
|
-
});
|
|
108
|
-
it("should readAndRender simple path", async () => {
|
|
109
|
-
const featurePbf = createFeaturePBF();
|
|
110
|
-
const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePathQueryPbf);
|
|
111
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.geometryType), PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
112
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
113
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
114
|
-
featurePbf.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
115
|
-
expect(renderPathSpy.calledOnce);
|
|
116
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
117
|
-
expect(firstCall).to.not.undefined;
|
|
118
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
119
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
|
|
120
|
-
expect(firstCall.args[2]).to.eql(false); // fill
|
|
121
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
122
|
-
});
|
|
123
|
-
it("should readAndRender multi path", async () => {
|
|
124
|
-
const featurePbf = createFeaturePBF();
|
|
125
|
-
const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyMultiPathQueryPbf);
|
|
126
|
-
const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.geometryType);
|
|
127
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
128
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
129
|
-
const renderPathSpy = sinon.spy(featureRenderer, "renderPath");
|
|
130
|
-
featurePbf.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
131
|
-
expect(renderPathSpy.calledOnce);
|
|
132
|
-
const firstCall = renderPathSpy.getCalls()[0];
|
|
133
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
134
|
-
expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords
|
|
135
|
-
expect(firstCall.args[2]).to.eql(false); // fill
|
|
136
|
-
expect(firstCall.args[3]).to.eql(2); // stride
|
|
137
|
-
});
|
|
138
|
-
it("should readAndRender simple point", async () => {
|
|
139
|
-
const featurePbf = createFeaturePBF();
|
|
140
|
-
const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePointQueryPbf);
|
|
141
|
-
const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.geometryType);
|
|
142
|
-
const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
143
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
144
|
-
const spy = sinon.spy(featureRenderer, "renderPoint");
|
|
145
|
-
featurePbf.readAndRender({ data, exceedTransferLimit: false }, featureRenderer);
|
|
146
|
-
expect(spy.calledOnce);
|
|
147
|
-
// Pbf contains already the right output format expect, lets rely on that.
|
|
148
|
-
const geometryCoords = PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.coords;
|
|
149
|
-
const firstCall = spy.getCalls()[0];
|
|
150
|
-
expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths
|
|
151
|
-
expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords
|
|
152
|
-
expect(firstCall.args[2]).to.eql(2); // stride
|
|
153
|
-
});
|
|
154
|
-
it("should log error when readAndRender / readFeatureInfo is called invalid response Data", async () => {
|
|
155
|
-
const featurePbf = createFeaturePBF();
|
|
156
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryAny", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
157
|
-
const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
158
|
-
const logErrorSpy = sandbox.spy(Logger, "logError");
|
|
159
|
-
featurePbf.readAndRender({ data: { test: "test" }, exceedTransferLimit: false }, featureRenderer);
|
|
160
|
-
expect(logErrorSpy.calledOnce);
|
|
161
|
-
logErrorSpy.resetHistory();
|
|
162
|
-
featurePbf.readFeatureInfo({ data: { test: "test" }, exceedTransferLimit: false }, []);
|
|
163
|
-
expect(logErrorSpy.calledOnce);
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
//# sourceMappingURL=ArcGisFeaturePBF.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGisFeaturePBF.test.js","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,gBAAgB,GAAI,GAAG,EAAE;IAC7B,MAAM,QAAQ,GAAG,qBAAqB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,IAAI,gBAAgB,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC,CAAC;IAEzE,+EAA+E;IAC/E,qEAAqE;IAC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C,4BAA4B,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAE5E,MAAM,eAAe,GAAG,IAAI,qBAAqB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC/E,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACpD,UAAU,CAAC,aAAa,CAAC,EAAC,IAAI,EAAE,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,mBAAmB,EAAE,KAAK,EAAC,EAAE,eAAe,CAAC,CAAC;QAC7F,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE/B,WAAW,CAAC,YAAY,EAAE,CAAC;QAC3B,UAAU,CAAC,eAAe,CAAC,EAAC,IAAI,EAAE,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,mBAAmB,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;QAClF,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAEjC,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { Base64EncodedString, ImageMapLayerSettings } from \"@itwin/core-common\";\r\nimport { MapLayerFeatureInfo } from \"@itwin/core-frontend\";\r\nimport { expect } from \"chai\";\r\nimport * as sinon from \"sinon\";\r\nimport { ArcGisFeaturePBF } from \"../../ArcGisFeature/ArcGisFeaturePBF\";\r\nimport { ArcGisFeatureRenderer } from \"../../ArcGisFeature/ArcGisFeatureRenderer\";\r\nimport { ArcGisSymbologyRenderer } from \"../../ArcGisFeature/ArcGisSymbologyRenderer\";\r\nimport { esriPBuffer } from \"../../ArcGisFeature/esriPBuffer.gen\";\r\nimport { esriFeatureSampleSource, fakeContext } from \"./Mocks\";\r\nimport { PhillyLandmarksDataset } from \"./PhillyLandmarksDataset\";\r\n\r\nconst createFeaturePBF = () => {\r\n const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);\r\n const featurePbf = new ArcGisFeaturePBF(settings, {name: \"SampleLayer\"});\r\n\r\n // Locale configuration depends on the testing machine (i.e. linux vs windows),\r\n // so we need to force date display to Iso to get a consistent value.\r\n // In real scenario, we still want dates to be displayed in end-user's locale.\r\n featurePbf.forceDateDisplayValueToIso = true;\r\n return featurePbf;\r\n};\r\n\r\ndescribe(\"ArcGisFeaturePBF\", () => {\r\n\r\n const sandbox = sinon.createSandbox();\r\n\r\n afterEach(async () => {\r\n sandbox.restore();\r\n });\r\n\r\n it(\"should convert pbf geometry type to Esri types\", async () => {\r\n\r\n expect (\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipatch))\r\n .to.equals(\"esriGeometryMultiPatch\");\r\n\r\n expect (\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypeMultipoint))\r\n .to.equals(\"esriGeometryMultipoint\");\r\n\r\n expect (\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePoint))\r\n .to.equals(\"esriGeometryPoint\");\r\n\r\n expect (\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolygon))\r\n .to.equals(\"esriGeometryPolygon\");\r\n\r\n expect (\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(esriPBuffer.FeatureCollectionPBuffer.GeometryType.esriGeometryTypePolyline))\r\n .to.equals(\"esriGeometryPolyline\");\r\n\r\n expect (\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(\"\" as unknown as esriPBuffer.FeatureCollectionPBuffer.GeometryType))\r\n .to.equals(\"esriGeometryNull\");\r\n\r\n });\r\n\r\n it(\"should read FeatureInfo in PBF\", async () => {\r\n const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyAirportGetFeatureInfoQueryPbf);\r\n const featureCollection = esriPBuffer.FeatureCollectionPBuffer.deserialize(byteArray);\r\n\r\n const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);\r\n const featurePbf = new ArcGisFeaturePBF(settings, {name: \"SampleLayer\"});\r\n\r\n // In some cases, PBF gives more floating-point precision than JSON.\r\n // Since I want to use the same output reference for both formats, I force a max precision of 8.\r\n featurePbf.floatPrecision = 8;\r\n const results: MapLayerFeatureInfo[] = [];\r\n featurePbf.readFeatureInfo({data:featureCollection, exceedTransferLimit: false}, results);\r\n\r\n // Make deep comparison by using JSON.stringify\r\n expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyAirportGetFeatureInfoResultRef));\r\n\r\n });\r\n\r\n it(\"should read FeatureInfo from PBF (philly transportation)\", async () => {\r\n\r\n const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryEncodedPbf);\r\n const featureCollection = esriPBuffer.FeatureCollectionPBuffer.deserialize(byteArray);\r\n const featurePbf = createFeaturePBF();\r\n\r\n // In some cases, PBF gives more floating-point precision than JSON.\r\n // Since I want to use the same output reference for both formats, I force a max precision.\r\n featurePbf.floatPrecision = 2;\r\n const results: MapLayerFeatureInfo[] = [];\r\n featurePbf.readFeatureInfo({data:featureCollection, exceedTransferLimit: false}, results);\r\n\r\n // Make deep comparison by using JSON.stringify\r\n expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.phillyTansportationGetFeatureInfoResultRef));\r\n\r\n });\r\n\r\n it(\"should read all data types from FeatureInfo \", async () => {\r\n\r\n // In this test we use a synthetic PBuffer object to initialize a feature collection object.\r\n // The is to ensure we cover correctly all possible attribute value types.\r\n const featureCollection = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.fieldsCoveragePbufferCollection);\r\n\r\n const featurePbf = createFeaturePBF();\r\n\r\n const results: MapLayerFeatureInfo[] = [];\r\n featurePbf.readFeatureInfo({data:featureCollection, exceedTransferLimit: false}, results);\r\n\r\n // Make deep comparison by using JSON.stringify\r\n expect(JSON.stringify(results)).equals(JSON.stringify(PhillyLandmarksDataset.fieldsCoverageGetFeatureInfoResultRef));\r\n });\r\n\r\n it(\"should readAndRender single ring polygon feature\", async () => {\r\n const featurePbf = createFeaturePBF();\r\n\r\n const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePolyQueryPbf);\r\n const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.geometryType);\r\n const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(true); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender multiple ring polygon feature\", async () => {\r\n const featurePbf = createFeaturePBF();\r\n\r\n const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.geometryType);\r\n const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf);\r\n\r\n const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePolyDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyDoubleRingPolyQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(true); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender simple path\", async () => {\r\n const featurePbf = createFeaturePBF();\r\n const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePathQueryPbf);\r\n const symbolRenderer = new ArcGisSymbologyRenderer(\r\n ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.geometryType),\r\n PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall).to.not.undefined;\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillySimplePathQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(false); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender multi path\", async () => {\r\n const featurePbf = createFeaturePBF();\r\n const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyMultiPathQueryPbf);\r\n const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.geometryType);\r\n const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const renderPathSpy = sinon.spy(featureRenderer, \"renderPath\");\r\n featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(renderPathSpy.calledOnce);\r\n\r\n const firstCall = renderPathSpy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.features[0].geometry.coords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(false); // fill\r\n expect(firstCall.args[3]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should readAndRender simple point\", async () => {\r\n const featurePbf = createFeaturePBF();\r\n const data = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillySimplePointQueryPbf);\r\n const geomType = ArcGisFeaturePBF.getArcGisFeatureGeometryType(PhillyLandmarksDataset.phillyMultiPathQueryPbf.queryResult.featureResult.geometryType);\r\n const symbolRenderer = new ArcGisSymbologyRenderer(geomType, PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const spy = sinon.spy(featureRenderer, \"renderPoint\");\r\n featurePbf.readAndRender({data, exceedTransferLimit: false}, featureRenderer);\r\n expect(spy.calledOnce);\r\n\r\n // Pbf contains already the right output format expect, lets rely on that.\r\n const geometryCoords = PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.coords;\r\n const firstCall = spy.getCalls()[0];\r\n expect(firstCall.args[0]).to.eql(PhillyLandmarksDataset.phillySimplePointQueryPbf.queryResult.featureResult.features[0].geometry.lengths); // geometryLengths\r\n expect(firstCall.args[1]).to.eql(geometryCoords); // geometryCoords\r\n expect(firstCall.args[2]).to.eql(2); // stride\r\n });\r\n\r\n it(\"should log error when readAndRender / readFeatureInfo is called invalid response Data\", async () => {\r\n const featurePbf = createFeaturePBF();\r\n const symbolRenderer = new ArcGisSymbologyRenderer(\r\n \"esriGeometryAny\",\r\n PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);\r\n\r\n const featureRenderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);\r\n const logErrorSpy = sandbox.spy(Logger, \"logError\");\r\n featurePbf.readAndRender({data: {test:\"test\"}, exceedTransferLimit: false}, featureRenderer);\r\n expect(logErrorSpy.calledOnce);\r\n\r\n logErrorSpy.resetHistory();\r\n featurePbf.readFeatureInfo({data: {test:\"test\"}, exceedTransferLimit: false}, []);\r\n expect(logErrorSpy.calledOnce);\r\n\r\n });\r\n\r\n});\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArcGisFeatureProvider.test.d.ts","sourceRoot":"","sources":["../../../../src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts"],"names":[],"mappings":""}
|