@itwin/map-layers-formats 4.1.0-dev.7 → 4.1.0-dev.71
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/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/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/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/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/2a6113c3-018f-40b1-ae8f-f3d0cbe030ce.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/74410d89-cce2-4b2a-89c9-6d56490c73f1.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/2a6113c3-018f-40b1-ae8f-f3d0cbe030ce.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/74410d89-cce2-4b2a-89c9-6d56490c73f1.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,117 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
import { expect } from "chai";
|
|
7
|
-
import * as sinon from "sinon";
|
|
8
|
-
import { ArcGisExtent, ArcGisFeatureQuery } from "../../ArcGisFeature/ArcGisFeatureQuery";
|
|
9
|
-
|
|
10
|
-
describe("ArcGisFeatureQuery", () => {
|
|
11
|
-
|
|
12
|
-
const sandbox = sinon.createSandbox();
|
|
13
|
-
|
|
14
|
-
beforeEach(async () => {
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
afterEach(async () => {
|
|
18
|
-
sandbox.restore();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it("should not apply different switches if not needed", async () => {
|
|
22
|
-
|
|
23
|
-
const query = new ArcGisFeatureQuery("https://test.com/rest/",0, "JSON", 3857);
|
|
24
|
-
const queryUrl = query.toString();
|
|
25
|
-
expect(queryUrl).to.not.contains("resultRecordCount");
|
|
26
|
-
expect(queryUrl).to.not.contains("resultOffset");
|
|
27
|
-
expect(queryUrl).to.not.contains("returnGeometry");
|
|
28
|
-
expect(queryUrl).to.not.contains("resultType");
|
|
29
|
-
expect(queryUrl).to.not.contains("maxRecordCountFactor");
|
|
30
|
-
expect(queryUrl).to.not.contains("returnExceededLimitFeatures");
|
|
31
|
-
expect(queryUrl).to.not.contains("geometryType");
|
|
32
|
-
expect(queryUrl).to.not.contains("geometry");
|
|
33
|
-
expect(queryUrl).to.not.contains("inSR");
|
|
34
|
-
expect(queryUrl).to.not.contains("inSR");
|
|
35
|
-
expect(queryUrl).to.contains("where=1%3D1");
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it("should not apply different switches if not needed", async () => {
|
|
39
|
-
|
|
40
|
-
const extentSize = 100;
|
|
41
|
-
const fakeEnvelope: ArcGisExtent = {
|
|
42
|
-
xmin : 0,
|
|
43
|
-
ymin : 0,
|
|
44
|
-
xmax : extentSize,
|
|
45
|
-
ymax : extentSize,
|
|
46
|
-
spatialReference : {
|
|
47
|
-
wkid : 102100,
|
|
48
|
-
latestWkid : 3857,
|
|
49
|
-
}};
|
|
50
|
-
const query = new ArcGisFeatureQuery("https://test.com/rest/",0, "JSON", 3857,
|
|
51
|
-
{
|
|
52
|
-
resultRecordCount: 10,
|
|
53
|
-
resultOffset: 11,
|
|
54
|
-
returnGeometry: true,
|
|
55
|
-
geometry: {type:"esriGeometryEnvelope", geom:fakeEnvelope},
|
|
56
|
-
geometryType: "esriGeometryEnvelope",
|
|
57
|
-
spatialRel: "esriSpatialRelIntersects",
|
|
58
|
-
resultType: "tile",
|
|
59
|
-
maxRecordCountFactor: 1000,
|
|
60
|
-
returnExceededLimitFeatures: false,
|
|
61
|
-
quantizationParameters: {
|
|
62
|
-
mode: "view",
|
|
63
|
-
originPosition: "upperLeft",
|
|
64
|
-
tolerance: 10,
|
|
65
|
-
extent: fakeEnvelope,
|
|
66
|
-
},
|
|
67
|
-
outFields: "test",
|
|
68
|
-
distance: 100,
|
|
69
|
-
});
|
|
70
|
-
const queryUrl = query.toString();
|
|
71
|
-
expect(queryUrl).to.contains("resultRecordCount=10");
|
|
72
|
-
expect(queryUrl).to.contains("resultOffset=11");
|
|
73
|
-
expect(queryUrl).to.contains("returnGeometry=true");
|
|
74
|
-
expect(queryUrl).to.contains(`resultType=tile`);
|
|
75
|
-
expect(queryUrl).to.contains("maxRecordCountFactor=1000");
|
|
76
|
-
expect(queryUrl).to.contains("returnExceededLimitFeatures=false");
|
|
77
|
-
expect(queryUrl).to.contains("geometryType=esriGeometryEnvelope");
|
|
78
|
-
expect(queryUrl).to.contains(`geometry=%7B%22xmin%22%3A0%2C%22ymin%22%3A0%2C%22xmax%22%3A100%2C%22ymax%22%3A100%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D`);
|
|
79
|
-
expect(queryUrl).to.contains("inSR=102100");
|
|
80
|
-
expect(queryUrl).to.contains("outFields=test");
|
|
81
|
-
expect(queryUrl).to.contains("distance=100");
|
|
82
|
-
expect(queryUrl).to.contains("units=esriSRUnit_Meter");
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it("should not include geometry only when applicable", async () => {
|
|
87
|
-
|
|
88
|
-
const extentSize = 100;
|
|
89
|
-
const fakeEnvelope: ArcGisExtent = {
|
|
90
|
-
xmin : 0,
|
|
91
|
-
ymin : 0,
|
|
92
|
-
xmax : extentSize,
|
|
93
|
-
ymax : extentSize,
|
|
94
|
-
spatialReference : {
|
|
95
|
-
wkid : 102100,
|
|
96
|
-
latestWkid : 3857,
|
|
97
|
-
}};
|
|
98
|
-
const query = new ArcGisFeatureQuery("https://test.com/rest/",0, "JSON", 3857,
|
|
99
|
-
{
|
|
100
|
-
spatialRel: "esriSpatialRelIntersects",
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
let queryUrl = query.toString();
|
|
104
|
-
expect(queryUrl).to.not.contains("geometryType=");
|
|
105
|
-
expect(queryUrl).to.not.contains(`geometry=`);
|
|
106
|
-
expect(queryUrl).to.not.contains("inSR=");
|
|
107
|
-
|
|
108
|
-
query.spatialRel = undefined;
|
|
109
|
-
query.geometry = {type:"esriGeometryEnvelope", geom:fakeEnvelope};
|
|
110
|
-
queryUrl = query.toString();
|
|
111
|
-
expect(queryUrl).to.contains("geometryType=esriGeometryEnvelope");
|
|
112
|
-
expect(queryUrl).to.contains(`geometry=%7B%22xmin%22%3A0%2C%22ymin%22%3A0%2C%22xmax%22%3A100%2C%22ymax%22%3A100%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D`);
|
|
113
|
-
expect(queryUrl).to.contains("inSR=102100");
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
});
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
import { expect } from "chai";
|
|
7
|
-
import * as sinon from "sinon";
|
|
8
|
-
import { fakeContext } from "./Mocks";
|
|
9
|
-
import { ArcGisSymbologyRenderer } from "../../ArcGisFeature/ArcGisSymbologyRenderer";
|
|
10
|
-
import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
|
|
11
|
-
import { ArcGisFeatureRenderer } from "../../ArcGisFeature/ArcGisFeatureRenderer";
|
|
12
|
-
import { Point3d, Transform } from "@itwin/core-geometry";
|
|
13
|
-
|
|
14
|
-
describe("ArcGisFeatureRenderer", () => {
|
|
15
|
-
|
|
16
|
-
const sandbox = sinon.createSandbox();
|
|
17
|
-
|
|
18
|
-
let beginPathSpy: sinon.SinonSpy<[], void>;
|
|
19
|
-
let moveToSpy: sinon.SinonSpy<[x: number, y: number], void>;
|
|
20
|
-
let lineToSpy: sinon.SinonSpy<[x: number, y: number], void>;
|
|
21
|
-
let strokeSpy: sinon.SinonSpy<[path: Path2D], void>;
|
|
22
|
-
let fillSpy: sinon.SinonSpy<[path: Path2D, fillRule?: CanvasFillRule | undefined], void>;
|
|
23
|
-
let closePathSpy: sinon.SinonSpy<[], void>;
|
|
24
|
-
|
|
25
|
-
beforeEach(async () => {
|
|
26
|
-
beginPathSpy = sandbox.spy(fakeContext, "beginPath");
|
|
27
|
-
moveToSpy = sandbox.spy(fakeContext, "moveTo");
|
|
28
|
-
lineToSpy = sandbox.spy(fakeContext, "lineTo");
|
|
29
|
-
strokeSpy = sandbox.spy(fakeContext, "stroke");
|
|
30
|
-
fillSpy = sandbox.spy(fakeContext, "fill");
|
|
31
|
-
closePathSpy = sandbox.spy(fakeContext, "closePath");
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
afterEach(async () => {
|
|
35
|
-
sandbox.restore();
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it("should render simple path, stride = 2", async () => {
|
|
39
|
-
|
|
40
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
41
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
42
|
-
const coords = [1,2,3,4];
|
|
43
|
-
const applyFillStyleSpy = sandbox.spy(symbolRenderer, "applyFillStyle");
|
|
44
|
-
const applyStrokeStyleSpy = sandbox.spy(symbolRenderer, "applyStrokeStyle");
|
|
45
|
-
|
|
46
|
-
renderer.renderPath([2], coords, false, 2, true);
|
|
47
|
-
|
|
48
|
-
expect(beginPathSpy.calledOnce).to.be.true;
|
|
49
|
-
expect(moveToSpy.calledOnce).to.be.true;
|
|
50
|
-
expect(moveToSpy.getCalls()[0].args[0]).to.equals(coords[0]);
|
|
51
|
-
expect(moveToSpy.getCalls()[0].args[1]).to.equals(coords[1]);
|
|
52
|
-
|
|
53
|
-
expect(lineToSpy.calledOnce).to.be.true;
|
|
54
|
-
|
|
55
|
-
// IMPORTANT: Only first coord is absolute, following coords are expressed relative to previous coord.
|
|
56
|
-
expect(lineToSpy.getCalls()[0].args[0]).to.equals(coords[0] + coords[2]);
|
|
57
|
-
expect(lineToSpy.getCalls()[0].args[1]).to.equals(coords[1] + coords[3]);
|
|
58
|
-
|
|
59
|
-
expect(strokeSpy.calledOnce).to.be.true;
|
|
60
|
-
expect(fillSpy.called).to.be.false;
|
|
61
|
-
expect(closePathSpy.called).to.be.false;
|
|
62
|
-
expect(applyFillStyleSpy.calledOnce).to.be.false;
|
|
63
|
-
expect(applyStrokeStyleSpy.calledOnce).to.be.true;
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it("should render simple filled path", async () => {
|
|
67
|
-
|
|
68
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
69
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
70
|
-
const coords = [1,2,3,4];
|
|
71
|
-
|
|
72
|
-
const applyFillStyleSpy = sandbox.spy(symbolRenderer, "applyFillStyle");
|
|
73
|
-
const applyStrokeStyleSpy = sandbox.spy(symbolRenderer, "applyStrokeStyle");
|
|
74
|
-
renderer.renderPath([2], coords, true, 2, true);
|
|
75
|
-
|
|
76
|
-
expect(beginPathSpy.calledOnce).to.be.true;
|
|
77
|
-
expect(moveToSpy.calledOnce).to.be.true;
|
|
78
|
-
expect(moveToSpy.getCalls()[0].args[0]).to.equals(coords[0]);
|
|
79
|
-
expect(moveToSpy.getCalls()[0].args[1]).to.equals(coords[1]);
|
|
80
|
-
|
|
81
|
-
expect(lineToSpy.calledOnce).to.be.true;
|
|
82
|
-
|
|
83
|
-
// IMPORTANT: Only first coord is absolute, following coords are expressed relative to previous coord.
|
|
84
|
-
expect(lineToSpy.getCalls()[0].args[0]).to.equals(coords[0] + coords[2]);
|
|
85
|
-
expect(lineToSpy.getCalls()[0].args[1]).to.equals(coords[1] + coords[3]);
|
|
86
|
-
|
|
87
|
-
expect(strokeSpy.calledOnce).to.be.true;
|
|
88
|
-
expect(fillSpy.calledOnce).to.be.true;
|
|
89
|
-
expect(closePathSpy.calledOnce).to.be.true;
|
|
90
|
-
|
|
91
|
-
expect(applyFillStyleSpy.calledOnce).to.be.true;
|
|
92
|
-
expect(applyStrokeStyleSpy.calledOnce).to.be.true;
|
|
93
|
-
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it("should render simple Path, stride = 3", async () => {
|
|
97
|
-
|
|
98
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
99
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
100
|
-
const coords = [1,2,3,4,5,6];
|
|
101
|
-
|
|
102
|
-
renderer.renderPath([2], coords, false, 3, true);
|
|
103
|
-
|
|
104
|
-
expect(beginPathSpy.calledOnce).to.be.true;
|
|
105
|
-
expect(moveToSpy.calledOnce).to.be.true;
|
|
106
|
-
expect(moveToSpy.getCalls()[0].args[0]).to.equals(coords[0]);
|
|
107
|
-
expect(moveToSpy.getCalls()[0].args[1]).to.equals(coords[1]);
|
|
108
|
-
|
|
109
|
-
expect(lineToSpy.calledOnce).to.be.true;
|
|
110
|
-
|
|
111
|
-
expect(lineToSpy.getCalls()[0].args[0]).to.equals(coords[0] + coords[3]);
|
|
112
|
-
expect(lineToSpy.getCalls()[0].args[1]).to.equals(coords[1] + coords[4]);
|
|
113
|
-
|
|
114
|
-
expect(strokeSpy.calledOnce).to.be.true;
|
|
115
|
-
expect(fillSpy.called).to.be.false;
|
|
116
|
-
expect(closePathSpy.called).to.be.false;
|
|
117
|
-
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it("should render multiple Paths, stride = 2", async () => {
|
|
121
|
-
|
|
122
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
123
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
124
|
-
const coords = [1,2,3,4];
|
|
125
|
-
const applyFillStyleSpy = sandbox.spy(symbolRenderer, "applyFillStyle");
|
|
126
|
-
const applyStrokeStyleSpy = sandbox.spy(symbolRenderer, "applyStrokeStyle");
|
|
127
|
-
|
|
128
|
-
renderer.renderPath([2], coords, false, 2, true);
|
|
129
|
-
|
|
130
|
-
expect(beginPathSpy.calledOnce).to.be.true;
|
|
131
|
-
expect(moveToSpy.calledOnce).to.be.true;
|
|
132
|
-
expect(moveToSpy.getCalls()[0].args[0]).to.equals(coords[0]);
|
|
133
|
-
expect(moveToSpy.getCalls()[0].args[1]).to.equals(coords[1]);
|
|
134
|
-
|
|
135
|
-
expect(lineToSpy.calledOnce).to.be.true;
|
|
136
|
-
|
|
137
|
-
// IMPORTANT: Only first coord is absolute, following coords are expressed relative to previous coord.
|
|
138
|
-
expect(lineToSpy.getCalls()[0].args[0]).to.equals(coords[0] + coords[2]);
|
|
139
|
-
expect(lineToSpy.getCalls()[0].args[1]).to.equals(coords[1] + coords[3]);
|
|
140
|
-
|
|
141
|
-
expect(strokeSpy.calledOnce).to.be.true;
|
|
142
|
-
expect(fillSpy.called).to.be.false;
|
|
143
|
-
expect(closePathSpy.called).to.be.false;
|
|
144
|
-
expect(applyFillStyleSpy.calledOnce).to.be.false;
|
|
145
|
-
expect(applyStrokeStyleSpy.calledOnce).to.be.true;
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
it("should not render invalid with stride value", async () => {
|
|
149
|
-
|
|
150
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
151
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
152
|
-
const coords = [1,2,3,4];
|
|
153
|
-
|
|
154
|
-
renderer.renderPath([2], coords, false, 1, true);
|
|
155
|
-
renderer.renderPath([2], coords, false, 4, true);
|
|
156
|
-
renderer.renderPoint([2], coords, 1, true);
|
|
157
|
-
renderer.renderPoint([2], coords, 4, true);
|
|
158
|
-
|
|
159
|
-
expect(lineToSpy.calledOnce).to.be.false;
|
|
160
|
-
expect(strokeSpy.calledOnce).to.be.false;
|
|
161
|
-
expect(fillSpy.called).to.be.false;
|
|
162
|
-
expect(closePathSpy.called).to.be.false;
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
it("should render Path and apply transform, relativeCoords OFF", async () => {
|
|
166
|
-
|
|
167
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
168
|
-
|
|
169
|
-
const fakeOffset = 10;
|
|
170
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer, Transform.createTranslation(Point3d.create(fakeOffset,fakeOffset)));
|
|
171
|
-
const coords = [1,2,3,4];
|
|
172
|
-
|
|
173
|
-
renderer.renderPath([2], coords, false, 2, false);
|
|
174
|
-
|
|
175
|
-
expect(beginPathSpy.calledOnce).to.be.true;
|
|
176
|
-
expect(moveToSpy.calledOnce).to.be.true;
|
|
177
|
-
expect(moveToSpy.getCalls()[0].args[0]).to.equals(coords[0]+fakeOffset);
|
|
178
|
-
expect(moveToSpy.getCalls()[0].args[1]).to.equals(coords[1]+fakeOffset);
|
|
179
|
-
|
|
180
|
-
expect(lineToSpy.calledOnce).to.be.true;
|
|
181
|
-
|
|
182
|
-
// IMPORTANT: Only first coord is absolute, following coords are expressed relative to previous coord.
|
|
183
|
-
expect(lineToSpy.getCalls()[0].args[0]).to.equals(coords[2] + fakeOffset);
|
|
184
|
-
expect(lineToSpy.getCalls()[0].args[1]).to.equals(coords[3] + fakeOffset);
|
|
185
|
-
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
it("should render single Point, no transform, relativeCoords OFF", async () => {
|
|
189
|
-
|
|
190
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryPoint", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
191
|
-
|
|
192
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
193
|
-
|
|
194
|
-
const drawPointStub = sandbox.stub(ArcGisSymbologyRenderer.prototype, "drawPoint");
|
|
195
|
-
const coords = [1,2];
|
|
196
|
-
renderer.renderPoint([], coords, 2, false);
|
|
197
|
-
|
|
198
|
-
expect(drawPointStub.calledOnce).to.be.true;
|
|
199
|
-
expect(drawPointStub.getCalls()[0].args[1]).to.equals(coords[0]);
|
|
200
|
-
expect(drawPointStub.getCalls()[0].args[2]).to.equals(coords[1]);
|
|
201
|
-
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
it("should render single Point and apply transform, relativeCoords OFF", async () => {
|
|
205
|
-
|
|
206
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryPoint", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
207
|
-
|
|
208
|
-
const fakeOffset = 10;
|
|
209
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer, Transform.createTranslation(Point3d.create(fakeOffset,fakeOffset)));
|
|
210
|
-
|
|
211
|
-
const drawPointStub = sandbox.stub(ArcGisSymbologyRenderer.prototype, "drawPoint");
|
|
212
|
-
const coords = [1,2];
|
|
213
|
-
renderer.renderPoint([], coords, 2, false);
|
|
214
|
-
|
|
215
|
-
expect(drawPointStub.calledOnce).to.be.true;
|
|
216
|
-
expect(drawPointStub.getCalls()[0].args[1]).to.equals(coords[0]+fakeOffset);
|
|
217
|
-
expect(drawPointStub.getCalls()[0].args[2]).to.equals(coords[1]+fakeOffset);
|
|
218
|
-
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
it("should render multi Point, transform, relativeCoords OFF", async () => {
|
|
222
|
-
|
|
223
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryPoint", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
224
|
-
|
|
225
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer);
|
|
226
|
-
|
|
227
|
-
const drawPointStub = sandbox.stub(ArcGisSymbologyRenderer.prototype, "drawPoint");
|
|
228
|
-
const coords = [1,2,3,4];
|
|
229
|
-
renderer.renderPoint([2], coords, 2, false);
|
|
230
|
-
|
|
231
|
-
expect(drawPointStub.getCalls().length).to.equals(2);
|
|
232
|
-
expect(drawPointStub.getCalls()[0].args[1]).to.equals(coords[0]);
|
|
233
|
-
expect(drawPointStub.getCalls()[0].args[2]).to.equals(coords[1]);
|
|
234
|
-
expect(drawPointStub.getCalls()[1].args[1]).to.equals(coords[2]);
|
|
235
|
-
expect(drawPointStub.getCalls()[1].args[2]).to.equals(coords[3]);
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
it("should render multi Point and apply transform, relativeCoords OFF", async () => {
|
|
239
|
-
|
|
240
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryPoint", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
241
|
-
|
|
242
|
-
const fakeOffset = 10;
|
|
243
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer, Transform.createTranslation(Point3d.create(fakeOffset,fakeOffset)));
|
|
244
|
-
|
|
245
|
-
const drawPointStub = sandbox.stub(ArcGisSymbologyRenderer.prototype, "drawPoint");
|
|
246
|
-
const coords = [1,2,3,4];
|
|
247
|
-
renderer.renderPoint([2], coords, 2, false);
|
|
248
|
-
|
|
249
|
-
expect(drawPointStub.getCalls().length).to.equals(2);
|
|
250
|
-
expect(drawPointStub.getCalls()[0].args[1]).to.equals(coords[0]+fakeOffset);
|
|
251
|
-
expect(drawPointStub.getCalls()[0].args[2]).to.equals(coords[1]+fakeOffset);
|
|
252
|
-
expect(drawPointStub.getCalls()[1].args[1]).to.equals(coords[2]+fakeOffset);
|
|
253
|
-
expect(drawPointStub.getCalls()[1].args[2]).to.equals(coords[3]+fakeOffset);
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it("should render multi Point and apply transform, relativeCoords ON", async () => {
|
|
257
|
-
|
|
258
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryPoint", PhillyLandmarksDataset.phillySimplePointDrawingInfo.drawingInfo.renderer);
|
|
259
|
-
|
|
260
|
-
const fakeOffset = 10;
|
|
261
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer, Transform.createTranslation(Point3d.create(fakeOffset,fakeOffset)));
|
|
262
|
-
|
|
263
|
-
const drawPointStub = sandbox.stub(ArcGisSymbologyRenderer.prototype, "drawPoint");
|
|
264
|
-
const coords = [1,2,3,4];
|
|
265
|
-
renderer.renderPoint([2], coords, 2, true);
|
|
266
|
-
|
|
267
|
-
expect(drawPointStub.getCalls().length).to.equals(2);
|
|
268
|
-
expect(drawPointStub.getCalls()[0].args[1]).to.equals(coords[0]+fakeOffset);
|
|
269
|
-
expect(drawPointStub.getCalls()[0].args[2]).to.equals(coords[1]+fakeOffset);
|
|
270
|
-
expect(drawPointStub.getCalls()[1].args[1]).to.equals(coords[0]+coords[2]+fakeOffset);
|
|
271
|
-
expect(drawPointStub.getCalls()[1].args[2]).to.equals(coords[1]+coords[3]+fakeOffset);
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it("should render and apply transform, relativeCoords ON", async () => {
|
|
275
|
-
|
|
276
|
-
const symbolRenderer = new ArcGisSymbologyRenderer("esriGeometryLine", PhillyLandmarksDataset.phillySimpleLineDrawingInfo.drawingInfo.renderer);
|
|
277
|
-
|
|
278
|
-
const fakeOffset = 10;
|
|
279
|
-
const renderer = new ArcGisFeatureRenderer(fakeContext, symbolRenderer, Transform.createTranslation(Point3d.create(fakeOffset,fakeOffset)));
|
|
280
|
-
const coords = [1,2,3,4];
|
|
281
|
-
|
|
282
|
-
renderer.renderPath([2], coords, false, 2, true);
|
|
283
|
-
|
|
284
|
-
expect(beginPathSpy.calledOnce).to.be.true;
|
|
285
|
-
expect(moveToSpy.calledOnce).to.be.true;
|
|
286
|
-
expect(moveToSpy.getCalls()[0].args[0]).to.equals(coords[0]+fakeOffset);
|
|
287
|
-
expect(moveToSpy.getCalls()[0].args[1]).to.equals(coords[1]+fakeOffset);
|
|
288
|
-
|
|
289
|
-
expect(lineToSpy.calledOnce).to.be.true;
|
|
290
|
-
|
|
291
|
-
// IMPORTANT: Only first coord is absolute, following coords are expressed relative to previous coord.
|
|
292
|
-
expect(lineToSpy.getCalls()[0].args[0]).to.equals(coords[0] + coords[2] + fakeOffset);
|
|
293
|
-
expect(lineToSpy.getCalls()[0].args[1]).to.equals(coords[1] + coords[3] + fakeOffset);
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
});
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
import { ByteStream } from "@itwin/core-bentley";
|
|
7
|
-
import { Base64EncodedString } from "@itwin/core-common";
|
|
8
|
-
import { expect } from "chai";
|
|
9
|
-
import * as sinon from "sinon";
|
|
10
|
-
import { ArcGisFeatureResponse } from "../../ArcGisFeature/ArcGisFeatureResponse";
|
|
11
|
-
import { esriPBuffer } from "../../ArcGisFeature/esriPBuffer.gen";
|
|
12
|
-
import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
|
|
13
|
-
|
|
14
|
-
describe("ArcGisFeatureResponse", () => {
|
|
15
|
-
|
|
16
|
-
const sandbox = sinon.createSandbox();
|
|
17
|
-
|
|
18
|
-
afterEach(async () => {
|
|
19
|
-
sandbox.restore();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it("should return undefined if http error", async () => {
|
|
23
|
-
const response = new ArcGisFeatureResponse("PBF", Promise.resolve({status: 404} as Response));
|
|
24
|
-
const data = await response.getResponseData();
|
|
25
|
-
expect(data).to.be.undefined;
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("should return undefined if invalid PBF data", async () => {
|
|
29
|
-
const response = new ArcGisFeatureResponse("PBF", Promise.resolve({
|
|
30
|
-
status: 404,
|
|
31
|
-
arrayBuffer: async () => {
|
|
32
|
-
return Promise.resolve(undefined);
|
|
33
|
-
},
|
|
34
|
-
} as unknown as Response));
|
|
35
|
-
const data = await response.getResponseData();
|
|
36
|
-
expect(data).to.be.undefined;
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it("should create FeatureCollectionPBuffer from PBF data", async () => {
|
|
40
|
-
|
|
41
|
-
const fakeResponse = {
|
|
42
|
-
headers: { "content-type" : "pbf"},
|
|
43
|
-
arrayBuffer: async () => {
|
|
44
|
-
const byteArray = Base64EncodedString.toUint8Array(PhillyLandmarksDataset.phillyTransportationGetFeatureInfoQueryEncodedPbf);
|
|
45
|
-
return Promise.resolve(byteArray ? ByteStream.fromUint8Array(byteArray).arrayBuffer : undefined);
|
|
46
|
-
},
|
|
47
|
-
status: 200,
|
|
48
|
-
} as unknown;
|
|
49
|
-
|
|
50
|
-
const response = new ArcGisFeatureResponse("PBF", Promise.resolve(fakeResponse as Response));
|
|
51
|
-
const data = await response.getResponseData();
|
|
52
|
-
expect(data?.exceedTransferLimit).to.be.false;
|
|
53
|
-
expect(data?.data instanceof esriPBuffer.FeatureCollectionPBuffer).to.be.true;
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("should report exceededTransferLimit from PBF object", async () => {
|
|
57
|
-
|
|
58
|
-
const collection = esriPBuffer.FeatureCollectionPBuffer.fromObject(PhillyLandmarksDataset.phillyExceededTransferLimitPbf);
|
|
59
|
-
|
|
60
|
-
const fakeResponse = {
|
|
61
|
-
headers: { "content-type" : "pbf"},
|
|
62
|
-
arrayBuffer: async () => {
|
|
63
|
-
const byteArray = collection.serialize();
|
|
64
|
-
return Promise.resolve(byteArray ? ByteStream.fromUint8Array(byteArray).arrayBuffer : undefined);
|
|
65
|
-
},
|
|
66
|
-
status: 200,
|
|
67
|
-
} as unknown;
|
|
68
|
-
|
|
69
|
-
const response = new ArcGisFeatureResponse("PBF", Promise.resolve(fakeResponse as Response));
|
|
70
|
-
const data = await response.getResponseData();
|
|
71
|
-
expect(data?.exceedTransferLimit).to.be.true;
|
|
72
|
-
expect(data?.data instanceof esriPBuffer.FeatureCollectionPBuffer).to.be.true;
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it("should return undefined if invalid JSON", async () => {
|
|
76
|
-
const response = new ArcGisFeatureResponse("JSON", Promise.resolve({
|
|
77
|
-
status: 404,
|
|
78
|
-
json: async () => {
|
|
79
|
-
return undefined;
|
|
80
|
-
},
|
|
81
|
-
} as unknown as Response));
|
|
82
|
-
const data = await response.getResponseData();
|
|
83
|
-
expect(data).to.be.undefined;
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it("should return JSON data", async () => {
|
|
87
|
-
const response = new ArcGisFeatureResponse("JSON", Promise.resolve({
|
|
88
|
-
status: 200,
|
|
89
|
-
json: async () => {
|
|
90
|
-
return {exceededTransferLimit: false};
|
|
91
|
-
},
|
|
92
|
-
} as unknown as Response));
|
|
93
|
-
const data = await response.getResponseData();
|
|
94
|
-
expect(data?.data).not.to.be.undefined;
|
|
95
|
-
expect(data?.exceedTransferLimit).to.be.false;
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it("should report exceededTransferLimit from JSON object", async () => {
|
|
99
|
-
const response = new ArcGisFeatureResponse("JSON", Promise.resolve({
|
|
100
|
-
status: 200,
|
|
101
|
-
json: async () => {
|
|
102
|
-
return {exceededTransferLimit: true};
|
|
103
|
-
},
|
|
104
|
-
} as unknown as Response));
|
|
105
|
-
const data = await response.getResponseData();
|
|
106
|
-
expect(data?.exceedTransferLimit).to.be.true;
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
});
|
|
@@ -1,77 +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 { expect } from "chai";
|
|
6
|
-
import * as sinon from "sinon";
|
|
7
|
-
import { NewYorkDataset } from "./NewYorkDataset";
|
|
8
|
-
import { ArcGisSymbologyRenderer, EsriPMS, EsriSFS, EsriSLS } from "../../ArcGisFeature/ArcGisSymbologyRenderer";
|
|
9
|
-
import { PhillyLandmarksDataset } from "./PhillyLandmarksDataset";
|
|
10
|
-
|
|
11
|
-
describe("ArcGisSymbologyRenderer", () => {
|
|
12
|
-
|
|
13
|
-
const sandbox = sinon.createSandbox();
|
|
14
|
-
|
|
15
|
-
afterEach(async () => {
|
|
16
|
-
sandbox.restore();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const comparePointSymbol = (symbol1: EsriPMS, symbol2: EsriPMS ) => {
|
|
20
|
-
expect(symbol1.type).to.equals(symbol2.type);
|
|
21
|
-
expect(symbol1.contentType).to.equals(symbol2.contentType);
|
|
22
|
-
expect(symbol1.height).to.equals(symbol2.height);
|
|
23
|
-
expect(symbol1.width).to.equals(symbol2.width);
|
|
24
|
-
expect(symbol1.imageData).to.equals(symbol2.imageData);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const compareLineSymbol = (symbol1: EsriSLS, symbol2: EsriSLS ) => {
|
|
28
|
-
expect(symbol1.type).to.equals(symbol2.type);
|
|
29
|
-
expect(symbol1.color).to.equals(symbol2.color);
|
|
30
|
-
expect(symbol1.width).to.equals(symbol2.width);
|
|
31
|
-
expect(symbol1.style).to.equals(symbol2.style);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const comparePolySymbol = (symbol1: EsriSLS, symbol2: EsriSFS ) => {
|
|
35
|
-
expect(symbol1.type).to.equals(symbol2.type);
|
|
36
|
-
expect(symbol1.color).to.equals(symbol2.color);
|
|
37
|
-
expect(symbol1.style).to.equals(symbol2.style);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
it("should construct renderer from incomplete drawing info", async () => {
|
|
41
|
-
let provider = new ArcGisSymbologyRenderer("esriGeometryPoint", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
42
|
-
comparePointSymbol((provider as any)._symbol, EsriPMS.fromJSON((ArcGisSymbologyRenderer as any).defaultPMS));
|
|
43
|
-
|
|
44
|
-
provider = new ArcGisSymbologyRenderer("esriGeometryMultipoint", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
45
|
-
comparePointSymbol((provider as any)._symbol, EsriPMS.fromJSON((ArcGisSymbologyRenderer as any).defaultPMS));
|
|
46
|
-
|
|
47
|
-
provider = new ArcGisSymbologyRenderer("esriGeometryPolyline", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
48
|
-
compareLineSymbol((provider as any)._symbol, EsriSLS.fromJSON((ArcGisSymbologyRenderer as any).defaultSLS));
|
|
49
|
-
|
|
50
|
-
provider = new ArcGisSymbologyRenderer("esriGeometryLine", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
51
|
-
compareLineSymbol((provider as any)._symbol, EsriSLS.fromJSON((ArcGisSymbologyRenderer as any).defaultSLS));
|
|
52
|
-
|
|
53
|
-
provider = new ArcGisSymbologyRenderer("esriGeometryPolygon", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
54
|
-
comparePolySymbol((provider as any)._symbol, EsriSFS.fromJSON((ArcGisSymbologyRenderer as any).defaultSFS));
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it("should construct renderer from unique value drawing info", async () => {
|
|
59
|
-
const provider = new ArcGisSymbologyRenderer("esriGeometryPoint", NewYorkDataset.uniqueValueDrawingInfo.drawingInfo.renderer);
|
|
60
|
-
comparePointSymbol((provider as any)._symbol, NewYorkDataset.uniqueValueDrawingInfo.drawingInfo.renderer.defaultSymbol as any);
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it("should construct renderer from point symbology drawing info", async () => {
|
|
65
|
-
|
|
66
|
-
let provider = new ArcGisSymbologyRenderer("esriGeometryPoint", PhillyLandmarksDataset.pointDrawingInfo.drawingInfo.renderer);
|
|
67
|
-
comparePointSymbol((provider as any)._symbol, PhillyLandmarksDataset.pointDrawingInfo.drawingInfo.renderer.symbol as any);
|
|
68
|
-
|
|
69
|
-
provider = new ArcGisSymbologyRenderer("esriGeometryPolyline", PhillyLandmarksDataset.lineDrawingInfo.drawingInfo.renderer);
|
|
70
|
-
comparePointSymbol((provider as any)._symbol, PhillyLandmarksDataset.lineDrawingInfo.drawingInfo.renderer.symbol as any);
|
|
71
|
-
|
|
72
|
-
provider = new ArcGisSymbologyRenderer("esriGeometryPolygon", PhillyLandmarksDataset.polygonDrawingInfo.drawingInfo.renderer);
|
|
73
|
-
comparePointSymbol((provider as any)._symbol, PhillyLandmarksDataset.polygonDrawingInfo.drawingInfo.renderer.symbol as any);
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
import { ArcGisFeatureMapLayerFormat } from "../../ArcGisFeature/ArcGisFeatureFormat";
|
|
7
|
-
|
|
8
|
-
export const fakeContext = ({
|
|
9
|
-
beginPath: () => {},
|
|
10
|
-
closePath: () => {},
|
|
11
|
-
moveTo: (_x: number, _y: number) => {},
|
|
12
|
-
lineTo: (_x: number, _y: number) => {},
|
|
13
|
-
fill: (_fillRule?: CanvasFillRule)=> {},
|
|
14
|
-
stroke: ()=> {},
|
|
15
|
-
drawImage: (_image: CanvasImageSource, _dx: number, _dy: number) => {},
|
|
16
|
-
|
|
17
|
-
} as CanvasRenderingContext2D);
|
|
18
|
-
|
|
19
|
-
export const esriFeatureSampleSource = {name: "dummyFeatureLayer", url: "https://dummy.com", formatId: ArcGisFeatureMapLayerFormat.formatId};
|