@itwin/map-layers-formats 3.6.0-dev.8 → 4.0.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.rush/temp/operation/build_ci/state.json +1 -1
  2. package/.rush/temp/operation/cover/state.json +3 -0
  3. package/.rush/temp/operation/docs/state.json +1 -1
  4. package/.rush/temp/package-deps_build_ci.json +7 -6
  5. package/.rush/temp/package-deps_cover.json +36 -0
  6. package/.rush/temp/package-deps_docs.json +7 -6
  7. package/.rush/temp/shrinkwrap-deps.json +22 -20
  8. package/CHANGELOG.json +30 -0
  9. package/CHANGELOG.md +26 -1
  10. package/config/rush-project.json +7 -0
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  12. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +10 -15
  13. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  14. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +52 -52
  15. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  16. package/lib/cjs/test/coverage/.nyc_output/076f01d3-f97f-4be1-bb26-ced6ce465355.json +1 -0
  17. package/lib/cjs/test/coverage/.nyc_output/{5915ac9b-d491-4417-9c9b-5f1c8af16991.json → 722f7ba4-f4d4-48f9-bd83-5d50f87f28e7.json} +0 -0
  18. package/lib/cjs/test/coverage/.nyc_output/processinfo/076f01d3-f97f-4be1-bb26-ced6ce465355.json +1 -0
  19. package/lib/cjs/test/coverage/.nyc_output/processinfo/722f7ba4-f4d4-48f9-bd83-5d50f87f28e7.json +1 -0
  20. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
  21. package/lib/cjs/test/coverage/cobertura-coverage.xml +209 -210
  22. package/lib/cjs/test/coverage/lcov-report/index.html +14 -14
  23. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +1 -1
  24. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +1 -1
  25. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +1 -1
  26. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +15 -36
  27. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +1 -1
  28. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +1 -1
  29. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +1 -1
  30. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +1 -1
  31. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +1 -1
  32. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +14 -14
  33. package/lib/cjs/test/coverage/lcov-report/src/index.html +1 -1
  34. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +1 -1
  35. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +1 -1
  36. package/lib/cjs/test/coverage/lcov.info +377 -370
  37. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  38. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  39. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +10 -15
  40. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  41. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +52 -52
  42. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  43. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  44. package/lib/test/junit_results.xml +46 -46
  45. package/map-layers-formats.build.log +2 -2
  46. package/package.json +12 -12
  47. package/src/ArcGisFeature/ArcGisFeatureProvider.ts +7 -14
  48. package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +45 -45
  49. package/lib/cjs/test/coverage/.nyc_output/f467b483-7a60-4740-a604-ffc7965ecd6c.json +0 -1
  50. package/lib/cjs/test/coverage/.nyc_output/processinfo/5915ac9b-d491-4417-9c9b-5f1c8af16991.json +0 -1
  51. package/lib/cjs/test/coverage/.nyc_output/processinfo/f467b483-7a60-4740-a604-ffc7965ecd6c.json +0 -1
@@ -1,121 +1,121 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites name="Mocha Tests" time="0.481" tests="69" failures="0">
3
- <testsuite name="Root Suite" timestamp="2022-12-09T05:18:57" tests="0" time="0.000" failures="0">
2
+ <testsuites name="Mocha Tests" time="0.464" tests="69" failures="0">
3
+ <testsuite name="Root Suite" timestamp="2023-01-31T05:15:07" tests="0" time="0.000" failures="0">
4
4
  </testsuite>
5
- <testsuite name="ArcGisFeaturePBF" timestamp="2022-12-09T05:18:57" tests="2" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureFeatureFormats.test.js" time="0.016" failures="0">
6
- <testcase name="ArcGisFeaturePBF should createImageryProvider" time="0.002" classname="should createImageryProvider">
5
+ <testsuite name="ArcGisFeaturePBF" timestamp="2023-01-31T05:15:07" tests="2" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureFeatureFormats.test.js" time="0.015" failures="0">
6
+ <testcase name="ArcGisFeaturePBF should createImageryProvider" time="0.001" classname="should createImageryProvider">
7
7
  </testcase>
8
- <testcase name="ArcGisFeaturePBF should validateSource" time="0.005" classname="should validateSource">
8
+ <testcase name="ArcGisFeaturePBF should validateSource" time="0.004" classname="should validateSource">
9
9
  </testcase>
10
10
  </testsuite>
11
- <testsuite name="ArcGisFeatureJSON" timestamp="2022-12-09T05:18:57" tests="9" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureJSON.test.js" time="0.034" failures="0">
11
+ <testsuite name="ArcGisFeatureJSON" timestamp="2023-01-31T05:15:07" tests="9" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureJSON.test.js" time="0.029" failures="0">
12
12
  <testcase name="ArcGisFeatureJSON should read FeatureInfo in JSON (phillyTansportation)" time="0.004" classname="should read FeatureInfo in JSON (phillyTansportation)">
13
13
  </testcase>
14
- <testcase name="ArcGisFeatureJSON should read FeatureInfo in JSON (phillyAirport)" time="0.000" classname="should read FeatureInfo in JSON (phillyAirport)">
14
+ <testcase name="ArcGisFeatureJSON should read FeatureInfo in JSON (phillyAirport)" time="0.001" classname="should read FeatureInfo in JSON (phillyAirport)">
15
15
  </testcase>
16
- <testcase name="ArcGisFeatureJSON should deflate coordinates array" time="0.002" classname="should deflate coordinates array">
16
+ <testcase name="ArcGisFeatureJSON should deflate coordinates array" time="0.001" classname="should deflate coordinates array">
17
17
  </testcase>
18
18
  <testcase name="ArcGisFeatureJSON should readAndRender single ring polygon feature" time="0.004" classname="should readAndRender single ring polygon feature">
19
19
  </testcase>
20
- <testcase name="ArcGisFeatureJSON should readAndRender multiple ring polygon feature" time="0.001" classname="should readAndRender multiple ring polygon feature">
20
+ <testcase name="ArcGisFeatureJSON should readAndRender multiple ring polygon feature" time="0.002" classname="should readAndRender multiple ring polygon feature">
21
21
  </testcase>
22
22
  <testcase name="ArcGisFeatureJSON should readAndRender simple path" time="0.001" classname="should readAndRender simple path">
23
23
  </testcase>
24
24
  <testcase name="ArcGisFeatureJSON should readAndRender multi path" time="0.001" classname="should readAndRender multi path">
25
25
  </testcase>
26
- <testcase name="ArcGisFeatureJSON should readAndRender simple point" time="0.006" classname="should readAndRender simple point">
26
+ <testcase name="ArcGisFeatureJSON should readAndRender simple point" time="0.005" classname="should readAndRender simple point">
27
27
  </testcase>
28
28
  <testcase name="ArcGisFeatureJSON should log error when readAndRender / readFeatureInfo is called invalid response Data" time="0.003" classname="should log error when readAndRender / readFeatureInfo is called invalid response Data">
29
29
  </testcase>
30
30
  </testsuite>
31
- <testsuite name="ArcGisFeaturePBF" timestamp="2022-12-09T05:18:57" tests="10" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeaturePBF.test.js" time="0.050" failures="0">
31
+ <testsuite name="ArcGisFeaturePBF" timestamp="2023-01-31T05:15:07" tests="10" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeaturePBF.test.js" time="0.058" failures="0">
32
32
  <testcase name="ArcGisFeaturePBF should convert pbf geometry type to Esri types" time="0.000" classname="should convert pbf geometry type to Esri types">
33
33
  </testcase>
34
- <testcase name="ArcGisFeaturePBF should read FeatureInfo in PBF" time="0.012" classname="should read FeatureInfo in PBF">
34
+ <testcase name="ArcGisFeaturePBF should read FeatureInfo in PBF" time="0.017" classname="should read FeatureInfo in PBF">
35
35
  </testcase>
36
- <testcase name="ArcGisFeaturePBF should read FeatureInfo from PBF (philly transportation)" time="0.009" classname="should read FeatureInfo from PBF (philly transportation)">
36
+ <testcase name="ArcGisFeaturePBF should read FeatureInfo from PBF (philly transportation)" time="0.010" classname="should read FeatureInfo from PBF (philly transportation)">
37
37
  </testcase>
38
38
  <testcase name="ArcGisFeaturePBF should read all data types from FeatureInfo " time="0.003" classname="should read all data types from FeatureInfo ">
39
39
  </testcase>
40
40
  <testcase name="ArcGisFeaturePBF should readAndRender single ring polygon feature" time="0.002" classname="should readAndRender single ring polygon feature">
41
41
  </testcase>
42
- <testcase name="ArcGisFeaturePBF should readAndRender multiple ring polygon feature" time="0.001" classname="should readAndRender multiple ring polygon feature">
42
+ <testcase name="ArcGisFeaturePBF should readAndRender multiple ring polygon feature" time="0.002" classname="should readAndRender multiple ring polygon feature">
43
43
  </testcase>
44
- <testcase name="ArcGisFeaturePBF should readAndRender simple path" time="0.001" classname="should readAndRender simple path">
44
+ <testcase name="ArcGisFeaturePBF should readAndRender simple path" time="0.002" classname="should readAndRender simple path">
45
45
  </testcase>
46
46
  <testcase name="ArcGisFeaturePBF should readAndRender multi path" time="0.001" classname="should readAndRender multi path">
47
47
  </testcase>
48
- <testcase name="ArcGisFeaturePBF should readAndRender simple point" time="0.003" classname="should readAndRender simple point">
48
+ <testcase name="ArcGisFeaturePBF should readAndRender simple point" time="0.005" classname="should readAndRender simple point">
49
49
  </testcase>
50
50
  <testcase name="ArcGisFeaturePBF should log error when readAndRender / readFeatureInfo is called invalid response Data" time="0.002" classname="should log error when readAndRender / readFeatureInfo is called invalid response Data">
51
51
  </testcase>
52
52
  </testsuite>
53
- <testsuite name="ArcGisFeatureProvider" timestamp="2022-12-09T05:18:57" tests="23" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureProvider.test.js" time="0.309" failures="0">
54
- <testcase name="ArcGisFeatureProvider should initialize with valid data" time="0.005" classname="should initialize with valid data">
53
+ <testsuite name="ArcGisFeatureProvider" timestamp="2023-01-31T05:15:07" tests="23" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureProvider.test.js" time="0.293" failures="0">
54
+ <testcase name="ArcGisFeatureProvider should initialize with valid data" time="0.004" classname="should initialize with valid data">
55
55
  </testcase>
56
56
  <testcase name="ArcGisFeatureProvider should not initialize with no service metadata" time="0.003" classname="should not initialize with no service metadata">
57
57
  </testcase>
58
- <testcase name="ArcGisFeatureProvider should update status when invalid token error from service" time="0.001" classname="should update status when invalid token error from service">
58
+ <testcase name="ArcGisFeatureProvider should update status when invalid token error from service" time="0.002" classname="should update status when invalid token error from service">
59
59
  </testcase>
60
60
  <testcase name="ArcGisFeatureProvider should throw query capability not supported" time="0.001" classname="should throw query capability not supported">
61
61
  </testcase>
62
- <testcase name="ArcGisFeatureProvider should pick the first visible sub-layer when multiple visible sub-layers" time="0.003" classname="should pick the first visible sub-layer when multiple visible sub-layers">
62
+ <testcase name="ArcGisFeatureProvider should pick the first visible sub-layer when multiple visible sub-layers" time="0.002" classname="should pick the first visible sub-layer when multiple visible sub-layers">
63
63
  </testcase>
64
64
  <testcase name="ArcGisFeatureProvider should pick sub-layers from service metadata if none provided on layer settings" time="0.002" classname="should pick sub-layers from service metadata if none provided on layer settings">
65
65
  </testcase>
66
66
  <testcase name="ArcGisFeatureProvider should throw error if no layers in capabilities" time="0.001" classname="should throw error if no layers in capabilities">
67
67
  </testcase>
68
- <testcase name="ArcGisFeatureProvider should throw if no layer metadata from service" time="0.001" classname="should throw if no layer metadata from service">
68
+ <testcase name="ArcGisFeatureProvider should throw if no layer metadata from service" time="0.002" classname="should throw if no layer metadata from service">
69
69
  </testcase>
70
- <testcase name="ArcGisFeatureProvider should read supported supported format" time="0.006" classname="should read supported supported format">
70
+ <testcase name="ArcGisFeatureProvider should read supported supported format" time="0.004" classname="should read supported supported format">
71
71
  </testcase>
72
- <testcase name="ArcGisFeatureProvider should compute minLod/maxLod" time="0.003" classname="should compute minLod/maxLod">
72
+ <testcase name="ArcGisFeatureProvider should compute minLod/maxLod" time="0.002" classname="should compute minLod/maxLod">
73
73
  </testcase>
74
74
  <testcase name="ArcGisFeatureProvider should construct empty url" time="0.000" classname="should construct empty url">
75
75
  </testcase>
76
- <testcase name="ArcGisFeatureProvider should construct feature query url" time="0.028" classname="should construct feature query url">
76
+ <testcase name="ArcGisFeatureProvider should construct feature query url" time="0.036" classname="should construct feature query url">
77
77
  </testcase>
78
- <testcase name="ArcGisFeatureProvider should log error when getFeatureInfo cannot be performed" time="0.003" classname="should log error when getFeatureInfo cannot be performed">
78
+ <testcase name="ArcGisFeatureProvider should log error when getFeatureInfo cannot be performed" time="0.005" classname="should log error when getFeatureInfo cannot be performed">
79
79
  </testcase>
80
- <testcase name="ArcGisFeatureProvider should process data in getFeatureInfo" time="0.019" classname="should process data in getFeatureInfo">
80
+ <testcase name="ArcGisFeatureProvider should process data in getFeatureInfo" time="0.020" classname="should process data in getFeatureInfo">
81
81
  </testcase>
82
- <testcase name="ArcGisFeatureProvider should log error when exceed transfert limit" time="0.140" classname="should log error when exceed transfert limit">
82
+ <testcase name="ArcGisFeatureProvider should log error when exceed transfert limit" time="0.130" classname="should log error when exceed transfert limit">
83
83
  </testcase>
84
84
  <testcase name="ArcGisFeatureProvider should log error when exceed exception thrown limit" time="0.012" classname="should log error when exceed exception thrown limit">
85
85
  </testcase>
86
- <testcase name="ArcGisFeatureProvider should debug Feature Geom" time="0.031" classname="should debug Feature Geom">
86
+ <testcase name="ArcGisFeatureProvider should debug Feature Geom" time="0.029" classname="should debug Feature Geom">
87
87
  </testcase>
88
88
  <testcase name="ArcGisFeatureProvider should compute computeTileWorld2CanvasTransform" time="0.003" classname="should compute computeTileWorld2CanvasTransform">
89
89
  </testcase>
90
- <testcase name="ArcGisFeatureProvider should loadTile from PBF request" time="0.008" classname="should loadTile from PBF request">
90
+ <testcase name="ArcGisFeatureProvider should loadTile from PBF request" time="0.007" classname="should loadTile from PBF request">
91
91
  </testcase>
92
92
  <testcase name="ArcGisFeatureProvider should loadTile from JSON request" time="0.005" classname="should loadTile from JSON request">
93
93
  </testcase>
94
- <testcase name="ArcGisFeatureProvider should make sub request if loadtile request return &apos;exceedTransferLimit&apos;" time="0.012" classname="should make sub request if loadtile request return &apos;exceedTransferLimit&apos;">
94
+ <testcase name="ArcGisFeatureProvider should make sub request if loadtile request return &apos;exceedTransferLimit&apos;" time="0.006" classname="should make sub request if loadtile request return &apos;exceedTransferLimit&apos;">
95
95
  </testcase>
96
96
  <testcase name="ArcGisFeatureProvider fetchTile should return undefined when to format defined" time="0.000" classname="fetchTile should return undefined when to format defined">
97
97
  </testcase>
98
98
  <testcase name="ArcGisFeatureProvider fetchTile should call fetch with the proper URL" time="0.002" classname="fetchTile should call fetch with the proper URL">
99
99
  </testcase>
100
100
  </testsuite>
101
- <testsuite name="ArcGisFeatureQuery" timestamp="2022-12-09T05:18:57" tests="3" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureQuery.test.js" time="0.016" failures="0">
101
+ <testsuite name="ArcGisFeatureQuery" timestamp="2023-01-31T05:15:07" tests="3" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureQuery.test.js" time="0.018" failures="0">
102
102
  <testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.003" classname="should not apply different switches if not needed">
103
103
  </testcase>
104
- <testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.008" classname="should not apply different switches if not needed">
104
+ <testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.006" classname="should not apply different switches if not needed">
105
105
  </testcase>
106
- <testcase name="ArcGisFeatureQuery should not include geometry only when applicable" time="0.003" classname="should not include geometry only when applicable">
106
+ <testcase name="ArcGisFeatureQuery should not include geometry only when applicable" time="0.002" classname="should not include geometry only when applicable">
107
107
  </testcase>
108
108
  </testsuite>
109
- <testsuite name="ArcGisFeatureRenderer" timestamp="2022-12-09T05:18:57" tests="12" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureRenderer.test.js" time="0.031" failures="0">
110
- <testcase name="ArcGisFeatureRenderer should render simple path, stride = 2" time="0.001" classname="should render simple path, stride = 2">
109
+ <testsuite name="ArcGisFeatureRenderer" timestamp="2023-01-31T05:15:07" tests="12" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureRenderer.test.js" time="0.030" failures="0">
110
+ <testcase name="ArcGisFeatureRenderer should render simple path, stride = 2" time="0.002" classname="should render simple path, stride = 2">
111
111
  </testcase>
112
112
  <testcase name="ArcGisFeatureRenderer should render simple filled path" time="0.001" classname="should render simple filled path">
113
113
  </testcase>
114
- <testcase name="ArcGisFeatureRenderer should render simple Path, stride = 3" time="0.001" classname="should render simple Path, stride = 3">
114
+ <testcase name="ArcGisFeatureRenderer should render simple Path, stride = 3" time="0.000" classname="should render simple Path, stride = 3">
115
115
  </testcase>
116
- <testcase name="ArcGisFeatureRenderer should render multiple Paths, stride = 2" time="0.001" classname="should render multiple Paths, stride = 2">
116
+ <testcase name="ArcGisFeatureRenderer should render multiple Paths, stride = 2" time="0.002" classname="should render multiple Paths, stride = 2">
117
117
  </testcase>
118
- <testcase name="ArcGisFeatureRenderer should not render invalid with stride value" time="0.001" classname="should not render invalid with stride value">
118
+ <testcase name="ArcGisFeatureRenderer should not render invalid with stride value" time="0.000" classname="should not render invalid with stride value">
119
119
  </testcase>
120
120
  <testcase name="ArcGisFeatureRenderer should render Path and apply transform, relativeCoords OFF" time="0.001" classname="should render Path and apply transform, relativeCoords OFF">
121
121
  </testcase>
@@ -125,33 +125,33 @@
125
125
  </testcase>
126
126
  <testcase name="ArcGisFeatureRenderer should render multi Point, transform, relativeCoords OFF" time="0.001" classname="should render multi Point, transform, relativeCoords OFF">
127
127
  </testcase>
128
- <testcase name="ArcGisFeatureRenderer should render multi Point and apply transform, relativeCoords OFF" time="0.001" classname="should render multi Point and apply transform, relativeCoords OFF">
128
+ <testcase name="ArcGisFeatureRenderer should render multi Point and apply transform, relativeCoords OFF" time="0.002" classname="should render multi Point and apply transform, relativeCoords OFF">
129
129
  </testcase>
130
130
  <testcase name="ArcGisFeatureRenderer should render multi Point and apply transform, relativeCoords ON" time="0.002" classname="should render multi Point and apply transform, relativeCoords ON">
131
131
  </testcase>
132
132
  <testcase name="ArcGisFeatureRenderer should render and apply transform, relativeCoords ON" time="0.001" classname="should render and apply transform, relativeCoords ON">
133
133
  </testcase>
134
134
  </testsuite>
135
- <testsuite name="ArcGisFeatureResponse" timestamp="2022-12-09T05:18:57" tests="7" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureResponse.test.js" time="0.015" failures="0">
135
+ <testsuite name="ArcGisFeatureResponse" timestamp="2023-01-31T05:15:07" tests="7" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureResponse.test.js" time="0.012" failures="0">
136
136
  <testcase name="ArcGisFeatureResponse should return undefined if http error" time="0.000" classname="should return undefined if http error">
137
137
  </testcase>
138
- <testcase name="ArcGisFeatureResponse should return undefined if invalid PBF data" time="0.001" classname="should return undefined if invalid PBF data">
138
+ <testcase name="ArcGisFeatureResponse should return undefined if invalid PBF data" time="0.000" classname="should return undefined if invalid PBF data">
139
139
  </testcase>
140
140
  <testcase name="ArcGisFeatureResponse should create FeatureCollectionPBuffer from PBF data" time="0.004" classname="should create FeatureCollectionPBuffer from PBF data">
141
141
  </testcase>
142
- <testcase name="ArcGisFeatureResponse should report exceededTransferLimit from PBF object" time="0.006" classname="should report exceededTransferLimit from PBF object">
142
+ <testcase name="ArcGisFeatureResponse should report exceededTransferLimit from PBF object" time="0.005" classname="should report exceededTransferLimit from PBF object">
143
143
  </testcase>
144
144
  <testcase name="ArcGisFeatureResponse should return undefined if invalid JSON" time="0.000" classname="should return undefined if invalid JSON">
145
145
  </testcase>
146
- <testcase name="ArcGisFeatureResponse should return JSON data" time="0.000" classname="should return JSON data">
146
+ <testcase name="ArcGisFeatureResponse should return JSON data" time="0.001" classname="should return JSON data">
147
147
  </testcase>
148
- <testcase name="ArcGisFeatureResponse should report exceededTransferLimit from JSON object" time="0.001" classname="should report exceededTransferLimit from JSON object">
148
+ <testcase name="ArcGisFeatureResponse should report exceededTransferLimit from JSON object" time="0.000" classname="should report exceededTransferLimit from JSON object">
149
149
  </testcase>
150
150
  </testsuite>
151
- <testsuite name="ArcGisSymbologyRenderer" timestamp="2022-12-09T05:18:57" tests="3" file="D:\vsts_a\2\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisSymbologyRenderer.test.js" time="0.005" failures="0">
151
+ <testsuite name="ArcGisSymbologyRenderer" timestamp="2023-01-31T05:15:07" tests="3" file="D:\vsts_b\1\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisSymbologyRenderer.test.js" time="0.004" failures="0">
152
152
  <testcase name="ArcGisSymbologyRenderer should construct renderer from incomplete drawing info" time="0.002" classname="should construct renderer from incomplete drawing info">
153
153
  </testcase>
154
- <testcase name="ArcGisSymbologyRenderer should construct renderer from unique value drawing info" time="0.001" classname="should construct renderer from unique value drawing info">
154
+ <testcase name="ArcGisSymbologyRenderer should construct renderer from unique value drawing info" time="0.000" classname="should construct renderer from unique value drawing info">
155
155
  </testcase>
156
156
  <testcase name="ArcGisSymbologyRenderer should construct renderer from point symbology drawing info" time="0.001" classname="should construct renderer from point symbology drawing info">
157
157
  </testcase>
@@ -1,10 +1,10 @@
1
1
  Invoking: betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/map-layers-formats/file.json --tsIndexFile=./map-layers-formats.ts --onlyJson --excludes=**/ArcGisFeature/*.ts,**/*.gen.ts
2
2
  Running command:
3
- node D:\vsts_a\2\s\tools\build\scripts\docs.js --json ../../generated-docs/core/map-layers-formats/file.json --includes ../../generated-docs/extract --excludes **/ArcGisFeature/*.ts,**/*.gen.ts --tsIndexFile ./map-layers-formats.ts --onlyJson
3
+ node "D:\vsts_b\1\s\tools\build\scripts\docs.js" --json ../../generated-docs/core/map-layers-formats/file.json --includes ../../generated-docs/extract --excludes **/ArcGisFeature/*.ts,**/*.gen.ts --tsIndexFile ./map-layers-formats.ts --onlyJson
4
4
  Arguments to TypeDoc: [
5
5
  "--entryPointStrategy",
6
6
  "expand",
7
- "D:\\vsts_a\\2\\s\\extensions\\map-layers-formats\\src",
7
+ "D:\\vsts_b\\1\\s\\extensions\\map-layers-formats\\src",
8
8
  "--excludePrivate",
9
9
  "--hideGenerator",
10
10
  "--logLevel",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/map-layers-formats",
3
- "version": "3.6.0-dev.8",
3
+ "version": "4.0.0-dev.1",
4
4
  "description": "Enables additional map-layers formats in iTwin.js",
5
5
  "main": "lib/cjs/map-layers-formats.js",
6
6
  "module": "lib/esm/map-layers-formats.js",
@@ -21,13 +21,13 @@
21
21
  "url": "http://www.bentley.com"
22
22
  },
23
23
  "devDependencies": {
24
- "@itwin/appui-abstract": "3.6.0-dev.8",
25
- "@itwin/build-tools": "3.6.0-dev.8",
26
- "@itwin/core-bentley": "3.6.0-dev.8",
27
- "@itwin/core-common": "3.6.0-dev.8",
28
- "@itwin/core-geometry": "3.6.0-dev.8",
29
- "@itwin/core-frontend": "3.6.0-dev.8",
30
- "@itwin/eslint-plugin": "3.6.0-dev.8",
24
+ "@itwin/appui-abstract": "4.0.0-dev.1",
25
+ "@itwin/build-tools": "4.0.0-dev.1",
26
+ "@itwin/core-bentley": "4.0.0-dev.1",
27
+ "@itwin/core-common": "4.0.0-dev.1",
28
+ "@itwin/core-geometry": "4.0.0-dev.1",
29
+ "@itwin/core-frontend": "4.0.0-dev.1",
30
+ "@itwin/eslint-plugin": "4.0.0-dev.1",
31
31
  "@types/chai": "4.3.1",
32
32
  "@types/chai-as-promised": "^7",
33
33
  "@types/google-protobuf": "~3.15.6",
@@ -48,10 +48,10 @@
48
48
  "typescript": "~4.4.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@itwin/appui-abstract": "3.6.0-dev.8",
52
- "@itwin/core-bentley": "3.6.0-dev.8",
53
- "@itwin/core-common": "3.6.0-dev.8",
54
- "@itwin/core-geometry": "3.6.0-dev.8"
51
+ "@itwin/appui-abstract": "4.0.0-dev.1",
52
+ "@itwin/core-bentley": "4.0.0-dev.1",
53
+ "@itwin/core-common": "4.0.0-dev.1",
54
+ "@itwin/core-geometry": "4.0.0-dev.1"
55
55
  },
56
56
  "dependencies": {
57
57
  "google-protobuf": "~3.20.1"
@@ -6,7 +6,7 @@
6
6
  import { Cartographic, ImageMapLayerSettings, ImageSource, ImageSourceFormat, ServerError } from "@itwin/core-common";
7
7
  import { assert, base64StringToUint8Array, IModelStatus, Logger } from "@itwin/core-bentley";
8
8
  import { Matrix4d, Point3d, Range2d, Transform } from "@itwin/core-geometry";
9
- import { ArcGisErrorCode, ArcGISImageryProvider, ArcGisUtilities, ImageryMapTileTree, MapCartoRectangle, MapLayerFeatureInfo, MapLayerImageryProviderStatus, QuadId } from "@itwin/core-frontend";
9
+ import { ArcGisErrorCode, ArcGISImageryProvider, ArcGISServiceMetadata, ArcGisUtilities, ImageryMapTileTree, MapCartoRectangle, MapLayerFeatureInfo, MapLayerImageryProviderStatus, QuadId } from "@itwin/core-frontend";
10
10
  import { ArcGisSymbologyRenderer } from "./ArcGisSymbologyRenderer";
11
11
  import { ArcGisExtent, ArcGisFeatureFormat, ArcGisFeatureQuery, ArcGisGeometry, FeatureQueryQuantizationParams } from "./ArcGisFeatureQuery";
12
12
  import { ArcGisFeatureRenderer } from "./ArcGisFeatureRenderer";
@@ -51,14 +51,8 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
51
51
  }
52
52
 
53
53
  public override async initialize(): Promise<void> {
54
-
55
- let json;
56
- try {
57
- json = await ArcGisUtilities.getServiceJson(this._settings.url, this._settings.formatId, this._settings.userName, this._settings.password);
58
-
59
- } catch (_e) {
60
-
61
- }
54
+ const metadata = await this.getServiceJson();
55
+ const json = metadata?.content;
62
56
 
63
57
  if (json === undefined) {
64
58
  Logger.logError(loggerCategory, "Could not get service JSON");
@@ -68,8 +62,7 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
68
62
  if (json?.error?.code === ArcGisErrorCode.TokenRequired || json?.error?.code === ArcGisErrorCode.InvalidToken) {
69
63
  // Check again layer status, it might have change during await.
70
64
  if (this.status === MapLayerImageryProviderStatus.Valid) {
71
- this.status = MapLayerImageryProviderStatus.RequireAuth;
72
- this.onStatusChanged.raiseEvent(this);
65
+ this.setStatus(MapLayerImageryProviderStatus.RequireAuth);
73
66
  return;
74
67
  }
75
68
  }
@@ -201,15 +194,15 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
201
194
  }
202
195
 
203
196
  protected async getLayerMetadata(layerId: number) {
204
- let json;
197
+ let metadata: ArcGISServiceMetadata|undefined;
205
198
  try {
206
199
  const url = new URL(this._settings.url);
207
200
  url.pathname = `${url.pathname}/${layerId}`;
208
- json = await ArcGisUtilities.getServiceJson(url.toString(), this._settings.formatId, this._settings.userName, this._settings.password);
201
+ metadata = await ArcGisUtilities.getServiceJson(url.toString(), this._settings.formatId, this._settings.userName, this._settings.password, this._accessTokenRequired);
209
202
  } catch {
210
203
 
211
204
  }
212
- return json;
205
+ return metadata?.content;
213
206
  }
214
207
 
215
208
  public override get tileSize(): number { return 512; }
@@ -34,8 +34,8 @@ describe("ArcGisFeatureProvider", () => {
34
34
 
35
35
  it("should initialize with valid data", async () => {
36
36
 
37
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
38
- return NewYorkDataset.serviceCapabilities;
37
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
38
+ return {accessTokenRequired: false, content:NewYorkDataset.serviceCapabilities};
39
39
  });
40
40
 
41
41
  sandbox.stub(ArcGisFeatureProvider.prototype, "getLayerMetadata" as any).callsFake(async function _(_layerId: number) {
@@ -52,7 +52,7 @@ describe("ArcGisFeatureProvider", () => {
52
52
 
53
53
  it("should not initialize with no service metadata", async () => {
54
54
 
55
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
55
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
56
56
  return undefined;
57
57
  });
58
58
 
@@ -65,8 +65,8 @@ describe("ArcGisFeatureProvider", () => {
65
65
 
66
66
  it("should update status when invalid token error from service", async () => {
67
67
 
68
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
69
- return {error: {code: 499}};
68
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
69
+ return {accessTokenRequired: false, content:{error: {code: 499}}};
70
70
  });
71
71
 
72
72
  const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
@@ -80,8 +80,8 @@ describe("ArcGisFeatureProvider", () => {
80
80
 
81
81
  it("should throw query capability not supported", async () => {
82
82
 
83
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
84
- return {capabilities: "Test"};
83
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
84
+ return {accessTokenRequired: false, content:{capabilities: "Test"}};
85
85
  });
86
86
 
87
87
  const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
@@ -91,8 +91,8 @@ describe("ArcGisFeatureProvider", () => {
91
91
 
92
92
  it("should pick the first visible sub-layer when multiple visible sub-layers", async () => {
93
93
 
94
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
95
- return {capabilities: "Query"};
94
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
95
+ return {accessTokenRequired: false, content: {capabilities: "Query"}};
96
96
  });
97
97
 
98
98
  const settings = ImageMapLayerSettings.fromJSON({
@@ -107,8 +107,8 @@ describe("ArcGisFeatureProvider", () => {
107
107
 
108
108
  it("should pick sub-layers from service metadata if none provided on layer settings", async () => {
109
109
 
110
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
111
- return {capabilities: "Query",
110
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
111
+ return {accessTokenRequired: false, content: {capabilities: "Query",
112
112
  layers: [
113
113
  {
114
114
  id : 0,
@@ -117,7 +117,8 @@ describe("ArcGisFeatureProvider", () => {
117
117
  {
118
118
  id : 1,
119
119
  },
120
- ]};
120
+ ]},
121
+ };
121
122
  });
122
123
 
123
124
  sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (id: number) {
@@ -137,9 +138,8 @@ describe("ArcGisFeatureProvider", () => {
137
138
 
138
139
  it("should throw error if no layers in capabilities", async () => {
139
140
 
140
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
141
- return {capabilities: "Query",
142
- layers: []};
141
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
142
+ return {accessTokenRequired: false, content: {capabilities: "Query", layers: []}};
143
143
  });
144
144
 
145
145
  const settings = ImageMapLayerSettings.fromJSON(esriFeatureSampleSource);
@@ -154,8 +154,8 @@ describe("ArcGisFeatureProvider", () => {
154
154
  subLayers: [{id: 0, name: "layer1", visible:true}, {id:2, name: "layer2", visible:true}]}
155
155
  );
156
156
 
157
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
158
- return {capabilities: "Query"};
157
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
158
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
159
159
  });
160
160
  sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (_id: number) {
161
161
  return undefined;
@@ -176,8 +176,8 @@ describe("ArcGisFeatureProvider", () => {
176
176
  return {defaultVisibility:true, supportedQueryFormats:"PBF, JSON"};
177
177
  });
178
178
 
179
- const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
180
- return {capabilities: "Query"};
179
+ const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
180
+ return {accessTokenRequired: false, content: {capabilities: "Query"}};
181
181
  });
182
182
 
183
183
  let provider = new ArcGisFeatureProvider(settings);
@@ -186,8 +186,8 @@ describe("ArcGisFeatureProvider", () => {
186
186
 
187
187
  // PBF requires 'supportsCoordinatesQuantization'
188
188
  getServiceJsonStub.restore();
189
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
190
- return { currentVersion: 11, capabilities: "Query"};
189
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
190
+ return {accessTokenRequired: false, content: { currentVersion: 11, capabilities: "Query"}};
191
191
  });
192
192
  getLayerMetadataStub.restore();
193
193
  getLayerMetadataStub = sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (_id: number) {
@@ -204,8 +204,8 @@ describe("ArcGisFeatureProvider", () => {
204
204
  });
205
205
 
206
206
  getServiceJsonStub.restore();
207
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
208
- return { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization:true};
207
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
208
+ return {accessTokenRequired: false, content: { currentVersion: 10.91, capabilities: "Query", supportsCoordinatesQuantization:true}};
209
209
  });
210
210
 
211
211
  provider = new ArcGisFeatureProvider(settings);
@@ -246,8 +246,8 @@ describe("ArcGisFeatureProvider", () => {
246
246
  };
247
247
  });
248
248
 
249
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
250
- return {capabilities: "Query"};
249
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
250
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
251
251
  });
252
252
 
253
253
  const provider = new ArcGisFeatureProvider(settings);
@@ -279,8 +279,8 @@ describe("ArcGisFeatureProvider", () => {
279
279
  };
280
280
  });
281
281
 
282
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
283
- return {currentVersion: 11, capabilities: "Query"};
282
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
283
+ return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
284
284
  });
285
285
 
286
286
  const provider = new ArcGisFeatureProvider(settings);
@@ -379,8 +379,8 @@ describe("ArcGisFeatureProvider", () => {
379
379
  };
380
380
  });
381
381
 
382
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
383
- return {currentVersion: 11, capabilities: "Query"};
382
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
383
+ return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
384
384
  });
385
385
  sandbox.stub(ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row: number, _column: number, _zoomLevel: number, _format: ArcGisFeatureFormat, _geomOverride?: ArcGisGeometry, _outFields?: string, _tolerance?: number, _returnGeometry?: boolean) {
386
386
  return undefined;
@@ -413,8 +413,8 @@ describe("ArcGisFeatureProvider", () => {
413
413
  };
414
414
  });
415
415
 
416
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
417
- return {currentVersion: 11, capabilities: "Query"};
416
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
417
+ return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
418
418
  });
419
419
  sandbox.stub((ArcGISImageryProvider.prototype as any), "fetch").callsFake(async function _(_url: URL, _options?: RequestInit) {
420
420
  const test = {
@@ -452,8 +452,8 @@ describe("ArcGisFeatureProvider", () => {
452
452
  maxScale: 5000,
453
453
  };
454
454
  });
455
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
456
- return {capabilities: "Query"};
455
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
456
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
457
457
  });
458
458
 
459
459
  sandbox.stub((ArcGisFeatureResponse.prototype as any), "getResponseData").callsFake(async function _() {
@@ -484,8 +484,8 @@ describe("ArcGisFeatureProvider", () => {
484
484
  maxScale: 5000,
485
485
  };
486
486
  });
487
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
488
- return {capabilities: "Query"};
487
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
488
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
489
489
  });
490
490
 
491
491
  sandbox.stub((ArcGisFeatureResponse.prototype as any), "getResponseData").callsFake(async function _() {
@@ -516,8 +516,8 @@ describe("ArcGisFeatureProvider", () => {
516
516
  maxScale: 5000,
517
517
  };
518
518
  });
519
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
520
- return {capabilities: "Query"};
519
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
520
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
521
521
  });
522
522
 
523
523
  sandbox.stub((ArcGisFeatureResponse.prototype as any), "getResponseData").callsFake(async function _() {
@@ -597,8 +597,8 @@ describe("ArcGisFeatureProvider", () => {
597
597
  supportsCoordinatesQuantization:true,
598
598
  };
599
599
  });
600
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
601
- return {currentVersion: 11, capabilities: "Query"};
600
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
601
+ return {accessTokenRequired: false, content:{currentVersion: 11, capabilities: "Query"}};
602
602
  });
603
603
  sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
604
604
  return {} as RenderingContext;
@@ -646,8 +646,8 @@ describe("ArcGisFeatureProvider", () => {
646
646
  supportedQueryFormats:"JSON",
647
647
  };
648
648
  });
649
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
650
- return {capabilities: "Query"};
649
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
650
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
651
651
  });
652
652
  sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
653
653
  return {} as RenderingContext;
@@ -693,8 +693,8 @@ describe("ArcGisFeatureProvider", () => {
693
693
  supportedQueryFormats:"JSON",
694
694
  };
695
695
  });
696
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
697
- return {capabilities: "Query"};
696
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
697
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
698
698
  });
699
699
  sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
700
700
  return {} as RenderingContext;
@@ -783,8 +783,8 @@ describe("ArcGisFeatureProvider", () => {
783
783
  supportedQueryFormats:"JSON",
784
784
  };
785
785
  });
786
- sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
787
- return {capabilities: "Query"};
786
+ sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean, _requireToken?: boolean) {
787
+ return {accessTokenRequired: false, content:{capabilities: "Query"}};
788
788
  });
789
789
  const fetchStub = sandbox.stub((ArcGISImageryProvider.prototype as any), "fetch");
790
790