@itwin/map-layers-formats 3.5.0-dev.33
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/.nycrc +10 -0
- package/.rush/temp/package-deps_build_ci.json +33 -0
- package/.rush/temp/package-deps_cover.json +33 -0
- package/.rush/temp/package-deps_docs.json +33 -0
- package/.rush/temp/shrinkwrap-deps.json +352 -0
- package/README.md +11 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.d.ts +9 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js +15 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts +15 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js +135 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureJSON.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts +15 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js +206 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeaturePBF.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts +43 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +412 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +94 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +91 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts +18 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js +34 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureReader.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts +33 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js +143 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureRenderer.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts +17 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js +44 -0
- package/lib/cjs/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +86 -0
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +190 -0
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -0
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.d.ts +1064 -0
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.d.ts.map +1 -0
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js +2271 -0
- package/lib/cjs/ArcGisFeature/esriPBuffer.gen.js.map +1 -0
- package/lib/cjs/map-layers-formats.d.ts +9 -0
- package/lib/cjs/map-layers-formats.d.ts.map +1 -0
- package/lib/cjs/map-layers-formats.js +25 -0
- package/lib/cjs/map-layers-formats.js.map +1 -0
- package/lib/cjs/mapLayersFormats.d.ts +11 -0
- package/lib/cjs/mapLayersFormats.d.ts.map +1 -0
- package/lib/cjs/mapLayersFormats.js +29 -0
- package/lib/cjs/mapLayersFormats.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +35 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js +162 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js +168 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +657 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +109 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +215 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js +95 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +2 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +60 -0
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/Mocks.d.ts +7 -0
- package/lib/cjs/test/ArcGisFeature/Mocks.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/Mocks.js +19 -0
- package/lib/cjs/test/ArcGisFeature/Mocks.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts +56 -0
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js +420 -0
- package/lib/cjs/test/ArcGisFeature/NewYorkDataset.js.map +1 -0
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +1043 -0
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +1 -0
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js +427 -0
- package/lib/cjs/test/ArcGisFeature/PhillyLandmarksDataset.js.map +1 -0
- package/lib/cjs/test/coverage/.nyc_output/4a4a8f53-a85f-4448-a46a-5812eb4f4c28.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/c25e0b2e-c348-49c1-990c-2c062e25b38f.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/4a4a8f53-a85f-4448-a46a-5812eb4f4c28.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/c25e0b2e-c348-49c1-990c-2c062e25b38f.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -0
- package/lib/cjs/test/coverage/cobertura-coverage.xml +1162 -0
- package/lib/cjs/test/coverage/lcov-report/base.css +224 -0
- package/lib/cjs/test/coverage/lcov-report/block-navigation.js +87 -0
- package/lib/cjs/test/coverage/lcov-report/favicon.png +0 -0
- package/lib/cjs/test/coverage/lcov-report/index.html +131 -0
- package/lib/cjs/test/coverage/lcov-report/prettify.css +1 -0
- package/lib/cjs/test/coverage/lcov-report/prettify.js +2 -0
- package/lib/cjs/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/lib/cjs/test/coverage/lcov-report/sorter.js +196 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +133 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +550 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +736 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +1513 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +793 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +223 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +598 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +301 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +823 -0
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +236 -0
- package/lib/cjs/test/coverage/lcov-report/src/index.html +131 -0
- package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +130 -0
- package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +163 -0
- package/lib/cjs/test/coverage/lcov.info +1503 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts +9 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js +11 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureFormat.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts +15 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js +131 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureJSON.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts +15 -0
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js +202 -0
- package/lib/esm/ArcGisFeature/ArcGisFeaturePBF.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts +43 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +408 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +94 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +87 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts +18 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js +30 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureReader.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts +33 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js +139 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureRenderer.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts +17 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js +40 -0
- package/lib/esm/ArcGisFeature/ArcGisFeatureResponse.js.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts +86 -0
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +183 -0
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -0
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.d.ts +1064 -0
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.d.ts.map +1 -0
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.js +2268 -0
- package/lib/esm/ArcGisFeature/esriPBuffer.gen.js.map +1 -0
- package/lib/esm/map-layers-formats.d.ts +9 -0
- package/lib/esm/map-layers-formats.d.ts.map +1 -0
- package/lib/esm/map-layers-formats.js +13 -0
- package/lib/esm/map-layers-formats.js.map +1 -0
- package/lib/esm/mapLayersFormats.d.ts +11 -0
- package/lib/esm/mapLayersFormats.d.ts.map +1 -0
- package/lib/esm/mapLayersFormats.js +25 -0
- package/lib/esm/mapLayersFormats.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js +33 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js +160 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureJSON.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js +166 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeaturePBF.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +655 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +107 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js +213 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureRenderer.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js +93 -0
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureResponse.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts +2 -0
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +58 -0
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/Mocks.d.ts +7 -0
- package/lib/esm/test/ArcGisFeature/Mocks.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/Mocks.js +16 -0
- package/lib/esm/test/ArcGisFeature/Mocks.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts +56 -0
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.js +416 -0
- package/lib/esm/test/ArcGisFeature/NewYorkDataset.js.map +1 -0
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts +1043 -0
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.d.ts.map +1 -0
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js +423 -0
- package/lib/esm/test/ArcGisFeature/PhillyLandmarksDataset.js.map +1 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -0
- package/lib/test/junit_results.xml +161 -0
- package/map-layers-formats.build.log +30 -0
- package/package.json +103 -0
- package/src/ArcGisFeature/ArcGisFeatureFormat.ts +16 -0
- package/src/ArcGisFeature/ArcGisFeatureJSON.ts +155 -0
- package/src/ArcGisFeature/ArcGisFeaturePBF.ts +217 -0
- package/src/ArcGisFeature/ArcGisFeatureProvider.ts +476 -0
- package/src/ArcGisFeature/ArcGisFeatureQuery.ts +236 -0
- package/src/ArcGisFeature/ArcGisFeatureReader.ts +46 -0
- package/src/ArcGisFeature/ArcGisFeatureRenderer.ts +171 -0
- package/src/ArcGisFeature/ArcGisFeatureResponse.ts +72 -0
- package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +246 -0
- package/src/ArcGisFeature/esriPBuffer.gen.ts +2615 -0
- package/src/map-layers-formats.ts +15 -0
- package/src/mapLayersFormats.ts +26 -0
- package/src/test/ArcGisFeature/ArcGisFeatureFeatureFormats.test.ts +46 -0
- package/src/test/ArcGisFeature/ArcGisFeatureJSON.test.ts +202 -0
- package/src/test/ArcGisFeature/ArcGisFeaturePBF.test.ts +227 -0
- package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +776 -0
- package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +124 -0
- package/src/test/ArcGisFeature/ArcGisFeatureRenderer.test.ts +296 -0
- package/src/test/ArcGisFeature/ArcGisFeatureResponse.test.ts +109 -0
- package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +77 -0
- package/src/test/ArcGisFeature/Mocks.ts +19 -0
- package/src/test/ArcGisFeature/NewYorkDataset.ts +423 -0
- package/src/test/ArcGisFeature/PhillyLandmarksDataset.ts +455 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
import { Logger } from "@itwin/core-bentley";
|
|
7
|
+
import { ColorDef } from "@itwin/core-common";
|
|
8
|
+
import { ArcGisFeatureGeometryType } from "./ArcGisFeatureQuery";
|
|
9
|
+
|
|
10
|
+
// Convert a channel array [r, g, b, a] to ColorDef
|
|
11
|
+
function colorFromArray(channels?: number[]) {
|
|
12
|
+
if (channels && channels.length === 4) {
|
|
13
|
+
// Alpha channel is reversed, 255 = opaque
|
|
14
|
+
return ColorDef.from(channels[0], channels[1], channels[2], 255 - channels[3]);
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const loggerCategory = "MapLayersFormats.ArcGISFeature";
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type EsriSymbolType = "esriSFS" | "esriPMS" | "esriSLS" | "esriSMS" | "esriTS" | "CIMSymbolReference";
|
|
23
|
+
interface EsriSymbol {
|
|
24
|
+
type: EsriSymbolType;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type EsriSLSStyle = "esriSLSDash" | "esriSLSDashDot" | "esriSLSDashDotDot" | "esriSLSDot" | "esriSLSLongDash" | "esriSLSLongDashDot" |
|
|
29
|
+
"esriSLSNull" | "esriSLSShortDash" | "esriSLSShortDashDot" | "esriSLSShortDashDotDot" | "esriSLSShortDot" | "esriSLSSolid";
|
|
30
|
+
|
|
31
|
+
interface EsriSLSProps {
|
|
32
|
+
color: number[];
|
|
33
|
+
type: EsriSymbolType;
|
|
34
|
+
width: number;
|
|
35
|
+
style: EsriSLSStyle;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export class EsriSLS implements EsriSymbol {
|
|
40
|
+
public readonly props: EsriSLSProps;
|
|
41
|
+
|
|
42
|
+
public get color() { return colorFromArray(this.props.color); }
|
|
43
|
+
public get type() { return this.props.type; }
|
|
44
|
+
public get width() { return this.props.width; }
|
|
45
|
+
public get style() { return this.props.style; }
|
|
46
|
+
|
|
47
|
+
constructor(json: EsriSLSProps) {
|
|
48
|
+
this.props = json;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public static fromJSON(json: EsriSLSProps) {
|
|
52
|
+
return new EsriSLS(json);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface EsriPMSProps {
|
|
57
|
+
type: EsriSymbolType;
|
|
58
|
+
url: string;
|
|
59
|
+
imageData: string;
|
|
60
|
+
contentType: string;
|
|
61
|
+
width?: number;
|
|
62
|
+
height?: number;
|
|
63
|
+
xoffset?: number;
|
|
64
|
+
yoffset?: number;
|
|
65
|
+
angle?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export class EsriPMS implements EsriSymbol {
|
|
70
|
+
public readonly props: EsriPMSProps;
|
|
71
|
+
private _image: HTMLImageElement;
|
|
72
|
+
|
|
73
|
+
public get type() { return this.props.type; }
|
|
74
|
+
public get url() { return this.props.url; }
|
|
75
|
+
public get imageData() { return this.props.imageData; }
|
|
76
|
+
public get imageUrl() { return `data:${this.contentType};base64,${this.imageData}`; }
|
|
77
|
+
public get image() { return this._image; }
|
|
78
|
+
public get contentType() { return this.props.contentType; }
|
|
79
|
+
public get width() { return this.props.width; }
|
|
80
|
+
public get height() { return this.props.height; }
|
|
81
|
+
public get xoffset() { return this.props.xoffset; }
|
|
82
|
+
public get yoffset() { return this.props.yoffset; }
|
|
83
|
+
public get angle() { return this.props.angle; }
|
|
84
|
+
|
|
85
|
+
constructor(json: EsriPMSProps) {
|
|
86
|
+
this.props = json;
|
|
87
|
+
this._image = new Image();
|
|
88
|
+
this._image.src = this.imageUrl;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public static fromJSON(json: EsriPMSProps) {
|
|
92
|
+
return new EsriPMS(json);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export type EsriSFSStyleProps = "esriSFSBackwardDiagonal" | "esriSFSCross" | "esriSFSDiagonalCross" | "esriSFSForwardDiagonal" | "esriSFSHorizontal" | "esriSFSNull" | "esriSFSSolid" | "esriSFSVertical";
|
|
98
|
+
interface EsriSFSProps {
|
|
99
|
+
color?: number[];
|
|
100
|
+
type: EsriSymbolType;
|
|
101
|
+
style: EsriSFSStyleProps;
|
|
102
|
+
outline?: EsriSLSProps;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export class EsriSFS implements EsriSymbol {
|
|
107
|
+
public readonly props: EsriSFSProps;
|
|
108
|
+
private _outline: EsriSLS | undefined;
|
|
109
|
+
|
|
110
|
+
public get color() { return colorFromArray(this.props.color); }
|
|
111
|
+
public get type() { return this.props.type; }
|
|
112
|
+
public get style() { return this.props.style; }
|
|
113
|
+
public get outline() { return this._outline; }
|
|
114
|
+
constructor(json: EsriSFSProps) {
|
|
115
|
+
this.props = json;
|
|
116
|
+
if (json.outline)
|
|
117
|
+
this._outline = EsriSLS.fromJSON(json.outline);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public static fromJSON(json: EsriSFSProps): EsriSFS {
|
|
121
|
+
return new EsriSFS(json);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export class ArcGisSymbologyRenderer {
|
|
127
|
+
private _symbol: EsriSymbol | undefined;
|
|
128
|
+
|
|
129
|
+
private static readonly defaultPMS: EsriPMSProps = {
|
|
130
|
+
type: "esriPMS",
|
|
131
|
+
url: "",
|
|
132
|
+
contentType: "image/png",
|
|
133
|
+
imageData: "iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAT9JREFUOI2t1E8rRGEUx/HvMHViIm5ZXGt/3gFlwdKGhYjyAmxs7IassDHFyguwwkbZYJKNslVWJDZT1C3psRv9NMpmJk/Tvc3MHWf3/PuccxbPyfKPkW1wPmBmQ5L6giB4d849Al+tYjNAHpiQ1AHgnAMoA+dhGG5HUfTQCOsCDoGlhCTdwGIURfPVZPtJWCdwBkwntVF3d6+K78Rh+SYhP7bM7FbSjY8FwHqLEEBGUgEY97E5oCcFBjAGDAMvNWwyJVSLKR8L28QG4a/N7zYx+VipTazkY0VgNSVUAa597MrMniWNpMBOAOdjFUlrwAWQaQFywGZt4f+AIrAB7DYJlc1sQdJrHAZQAN6AA6A/STGzp1wut+ycu/f340bQEXAJrACzwCjQC3wAd8CppGNJP/UPk+bZZ7XKQlJ1cfEL1AZaAcKna+kAAAAASUVORK5CYII=",
|
|
134
|
+
width: 14,
|
|
135
|
+
height: 14,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
private static readonly defaultSLS: EsriSLSProps = {
|
|
139
|
+
type: "esriSLS",
|
|
140
|
+
color: [0, 0.0],
|
|
141
|
+
width: 1,
|
|
142
|
+
style: "esriSLSSolid",
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
private static readonly defaultSFS: EsriSFSProps = {
|
|
146
|
+
type: "esriSFS",
|
|
147
|
+
color: [0, 0.0],
|
|
148
|
+
style: "esriSFSSolid",
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
constructor(geometryType: ArcGisFeatureGeometryType, rendererDefinition: any) {
|
|
152
|
+
let symbol;
|
|
153
|
+
if (rendererDefinition?.symbol !== undefined) {
|
|
154
|
+
symbol = rendererDefinition.symbol;
|
|
155
|
+
} else if (rendererDefinition?.defaultSymbol !== undefined) {
|
|
156
|
+
symbol = rendererDefinition?.defaultSymbol;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (symbol !== undefined) {
|
|
160
|
+
if (symbol.type === "esriSFS") {
|
|
161
|
+
this._symbol = EsriSFS.fromJSON(symbol);
|
|
162
|
+
} else if (symbol.type === "esriSLS") {
|
|
163
|
+
this._symbol = EsriSLS.fromJSON(symbol);
|
|
164
|
+
} else if (symbol.type === "esriPMS") {
|
|
165
|
+
this._symbol = EsriPMS.fromJSON(symbol);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// If '_symbol' is still undefined at this point, that means we could not find
|
|
170
|
+
// any symbology definition from the metadata, let's use some default symbology
|
|
171
|
+
// so that we display at least something.
|
|
172
|
+
if (this._symbol === undefined) {
|
|
173
|
+
Logger.logWarning(loggerCategory, "Symbology definition not supported, using default symbology");
|
|
174
|
+
if (geometryType === "esriGeometryPoint" || geometryType === "esriGeometryMultipoint") {
|
|
175
|
+
this._symbol = ArcGisSymbologyRenderer.defaultPMS;
|
|
176
|
+
} else if (geometryType === "esriGeometryLine" || geometryType === "esriGeometryPolyline") {
|
|
177
|
+
this._symbol = ArcGisSymbologyRenderer.defaultSLS;
|
|
178
|
+
} else if (geometryType === "esriGeometryPolygon") {
|
|
179
|
+
this._symbol = ArcGisSymbologyRenderer.defaultSFS;
|
|
180
|
+
} else {
|
|
181
|
+
Logger.logError(loggerCategory, "Could not determine default symbology: geometry type not supported");
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
public applyFillStyle(context: CanvasRenderingContext2D) {
|
|
187
|
+
if (!context)
|
|
188
|
+
return;
|
|
189
|
+
|
|
190
|
+
if (this._symbol?.type === "esriSFS") {
|
|
191
|
+
const sfs = this._symbol as EsriSFS;
|
|
192
|
+
if (sfs.style === "esriSFSSolid" && sfs.color) {
|
|
193
|
+
context.fillStyle = sfs.color.toRgbaString();
|
|
194
|
+
} else {
|
|
195
|
+
context.fillStyle = ColorDef.from(200, 0, 0, 100).toRgbaString(); // default color is red?
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
public applyStrokeStyle(context: CanvasRenderingContext2D) {
|
|
201
|
+
if (!context)
|
|
202
|
+
return;
|
|
203
|
+
|
|
204
|
+
let sls: EsriSLS | undefined;
|
|
205
|
+
if (this._symbol?.type === "esriSFS") {
|
|
206
|
+
const sfs = this._symbol as EsriSFS;
|
|
207
|
+
if (sfs.outline && sfs.outline.style === "esriSLSSolid") {
|
|
208
|
+
sls = sfs.outline;
|
|
209
|
+
}
|
|
210
|
+
} else if (this._symbol?.type === "esriSLS") {
|
|
211
|
+
sls = this._symbol as EsriSLS;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (sls) {
|
|
215
|
+
if (sls.color)
|
|
216
|
+
context.strokeStyle = sls.color.toRgbaString();
|
|
217
|
+
context.lineWidth = sls.width; // TODO: Should we scale this value here?
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
public drawPoint(context: CanvasRenderingContext2D, ptX: number, ptY: number) {
|
|
222
|
+
if (!context)
|
|
223
|
+
return;
|
|
224
|
+
|
|
225
|
+
if (this._symbol?.type === "esriPMS") {
|
|
226
|
+
const pms = this._symbol as EsriPMS;
|
|
227
|
+
let xOffset = 0, yOffset = 0;
|
|
228
|
+
if (pms.xoffset)
|
|
229
|
+
xOffset = pms.xoffset;
|
|
230
|
+
if (pms.yoffset)
|
|
231
|
+
yOffset = pms.yoffset;
|
|
232
|
+
|
|
233
|
+
if (pms.width && pms.height) {
|
|
234
|
+
// // make sure the marker is centered on the point
|
|
235
|
+
xOffset += pms.width * -0.5;
|
|
236
|
+
yOffset += pms.height * -0.5;
|
|
237
|
+
|
|
238
|
+
context.drawImage(pms.image, ptX + xOffset, ptY + yOffset, pms.width, pms.height);
|
|
239
|
+
} else {
|
|
240
|
+
context.drawImage(pms.image, ptX + xOffset, ptY + yOffset);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// TODO: marker rotation angle
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|