@itwin/map-layers-formats 3.5.0-dev.52 → 3.5.0-dev.53

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 (71) hide show
  1. package/.rush/temp/operation/build_ci/state.json +1 -1
  2. package/.rush/temp/operation/docs/state.json +1 -1
  3. package/.rush/temp/package-deps_build_ci.json +7 -7
  4. package/.rush/temp/package-deps_docs.json +7 -7
  5. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  6. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +39 -17
  7. package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  8. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +0 -1
  9. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  10. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +19 -27
  11. package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  12. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  13. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +14 -11
  14. package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  15. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +34 -10
  16. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  17. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +4 -9
  18. package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -1
  19. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +5 -5
  20. package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -1
  21. package/lib/cjs/test/coverage/.nyc_output/{6d78e0cc-3049-49f9-9f29-97f2d2ce6c64.json → a7dcd2f7-e863-4162-8e25-d27e4921dfcc.json} +0 -0
  22. package/lib/cjs/test/coverage/.nyc_output/e498035c-a52d-4af9-b4fb-0a5c3a75efa3.json +1 -0
  23. package/lib/cjs/test/coverage/.nyc_output/processinfo/a7dcd2f7-e863-4162-8e25-d27e4921dfcc.json +1 -0
  24. package/lib/cjs/test/coverage/.nyc_output/processinfo/e498035c-a52d-4af9-b4fb-0a5c3a75efa3.json +1 -0
  25. package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
  26. package/lib/cjs/test/coverage/cobertura-coverage.xml +390 -387
  27. package/lib/cjs/test/coverage/lcov-report/index.html +18 -18
  28. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +1 -1
  29. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +5 -5
  30. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +9 -9
  31. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +146 -74
  32. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +32 -62
  33. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +1 -1
  34. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +1 -1
  35. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +1 -1
  36. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +64 -55
  37. package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +29 -29
  38. package/lib/cjs/test/coverage/lcov-report/src/index.html +1 -1
  39. package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +1 -1
  40. package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +1 -1
  41. package/lib/cjs/test/coverage/lcov.info +637 -612
  42. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  43. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
  44. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +41 -19
  45. package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
  46. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +0 -1
  47. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
  48. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +19 -27
  49. package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
  50. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
  51. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +14 -11
  52. package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
  53. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +34 -10
  54. package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
  55. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +4 -9
  56. package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -1
  57. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +6 -6
  58. package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -1
  59. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  60. package/lib/test/junit_results.xml +51 -53
  61. package/map-layers-formats.build.log +2 -2
  62. package/package.json +12 -12
  63. package/src/ArcGisFeature/ArcGisFeatureProvider.ts +39 -15
  64. package/src/ArcGisFeature/ArcGisFeatureQuery.ts +20 -30
  65. package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +15 -12
  66. package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +39 -10
  67. package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +4 -11
  68. package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +5 -5
  69. package/lib/cjs/test/coverage/.nyc_output/5f6e61f1-8da3-4cce-bc95-ee236ec2bb5b.json +0 -1
  70. package/lib/cjs/test/coverage/.nyc_output/processinfo/5f6e61f1-8da3-4cce-bc95-ee236ec2bb5b.json +0 -1
  71. package/lib/cjs/test/coverage/.nyc_output/processinfo/6d78e0cc-3049-49f9-9f29-97f2d2ce6c64.json +0 -1
@@ -1,43 +1,43 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites name="Mocha Tests" time="0.362" tests="70" failures="0">
3
- <testsuite name="Root Suite" timestamp="2022-11-18T05:16:12" tests="0" time="0.000" failures="0">
2
+ <testsuites name="Mocha Tests" time="0.467" tests="69" failures="0">
3
+ <testsuite name="Root Suite" timestamp="2022-11-19T05:15:33" tests="0" time="0.000" failures="0">
4
4
  </testsuite>
5
- <testsuite name="ArcGisFeaturePBF" timestamp="2022-11-18T05:16:12" tests="2" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureFeatureFormats.test.js" time="0.014" failures="0">
5
+ <testsuite name="ArcGisFeaturePBF" timestamp="2022-11-19T05:15:33" tests="2" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureFeatureFormats.test.js" time="0.016" failures="0">
6
6
  <testcase name="ArcGisFeaturePBF should createImageryProvider" time="0.002" classname="should createImageryProvider">
7
7
  </testcase>
8
- <testcase name="ArcGisFeaturePBF should validateSource" time="0.004" classname="should validateSource">
8
+ <testcase name="ArcGisFeaturePBF should validateSource" time="0.003" classname="should validateSource">
9
9
  </testcase>
10
10
  </testsuite>
11
- <testsuite name="ArcGisFeatureJSON" timestamp="2022-11-18T05:16:12" tests="9" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureJSON.test.js" time="0.026" failures="0">
11
+ <testsuite name="ArcGisFeatureJSON" timestamp="2022-11-19T05:15:33" tests="9" file="D:\vsts_a\3\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
16
  <testcase name="ArcGisFeatureJSON should deflate coordinates array" time="0.001" classname="should deflate coordinates array">
17
17
  </testcase>
18
- <testcase name="ArcGisFeatureJSON should readAndRender single ring polygon feature" time="0.003" classname="should readAndRender single ring polygon feature">
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.003" classname="should readAndRender simple point">
26
+ <testcase name="ArcGisFeatureJSON should readAndRender simple point" time="0.004" 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-11-18T05:16:12" tests="10" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeaturePBF.test.js" time="0.042" failures="0">
32
- <testcase name="ArcGisFeaturePBF should convert pbf geometry type to Esri types" time="0.000" classname="should convert pbf geometry type to Esri types">
31
+ <testsuite name="ArcGisFeaturePBF" timestamp="2022-11-19T05:15:33" tests="10" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeaturePBF.test.js" time="0.046" failures="0">
32
+ <testcase name="ArcGisFeaturePBF should convert pbf geometry type to Esri types" time="0.001" classname="should convert pbf geometry type to Esri types">
33
33
  </testcase>
34
34
  <testcase name="ArcGisFeaturePBF should read FeatureInfo in PBF" time="0.013" classname="should read FeatureInfo in PBF">
35
35
  </testcase>
36
- <testcase name="ArcGisFeaturePBF should read FeatureInfo from PBF (philly transportation)" time="0.010" classname="should read FeatureInfo from PBF (philly transportation)">
36
+ <testcase name="ArcGisFeaturePBF should read FeatureInfo from PBF (philly transportation)" time="0.011" classname="should read FeatureInfo from PBF (philly transportation)">
37
37
  </testcase>
38
- <testcase name="ArcGisFeaturePBF should read all data types from FeatureInfo " time="0.003" classname="should read all data types from FeatureInfo ">
38
+ <testcase name="ArcGisFeaturePBF should read all data types from FeatureInfo " time="0.004" classname="should read all data types from FeatureInfo ">
39
39
  </testcase>
40
- <testcase name="ArcGisFeaturePBF should readAndRender single ring polygon feature" time="0.002" classname="should readAndRender single ring polygon feature">
40
+ <testcase name="ArcGisFeaturePBF should readAndRender single ring polygon feature" time="0.003" classname="should readAndRender single ring polygon feature">
41
41
  </testcase>
42
42
  <testcase name="ArcGisFeaturePBF should readAndRender multiple ring polygon feature" time="0.002" classname="should readAndRender multiple ring polygon feature">
43
43
  </testcase>
@@ -45,15 +45,15 @@
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.002" classname="should readAndRender simple point">
48
+ <testcase name="ArcGisFeaturePBF should readAndRender simple point" time="0.003" 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-11-18T05:16:12" tests="23" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureProvider.test.js" time="0.223" failures="0">
54
- <testcase name="ArcGisFeatureProvider should initialize with valid data" time="0.003" classname="should initialize with valid data">
53
+ <testsuite name="ArcGisFeatureProvider" timestamp="2022-11-19T05:15:33" tests="23" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureProvider.test.js" time="0.295" failures="0">
54
+ <testcase name="ArcGisFeatureProvider should initialize with valid data" time="0.005" classname="should initialize with valid data">
55
55
  </testcase>
56
- <testcase name="ArcGisFeatureProvider should not initialize with no service metadata" time="0.002" classname="should not initialize with no service metadata">
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
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>
@@ -61,54 +61,52 @@
61
61
  </testcase>
62
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">
63
63
  </testcase>
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">
64
+ <testcase name="ArcGisFeatureProvider should pick sub-layers from service metadata if none provided on layer settings" time="0.003" classname="should pick sub-layers from service metadata if none provided on layer settings">
65
65
  </testcase>
66
- <testcase name="ArcGisFeatureProvider should throw error if no layers in capabilities" time="0.000" classname="should throw error if no layers in capabilities">
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.003" 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.001" classname="should compute minLod/maxLod">
72
+ <testcase name="ArcGisFeatureProvider should compute minLod/maxLod" time="0.003" classname="should compute minLod/maxLod">
73
73
  </testcase>
74
- <testcase name="ArcGisFeatureProvider should construct empty url" time="0.000" classname="should construct empty url">
74
+ <testcase name="ArcGisFeatureProvider should construct empty url" time="0.001" classname="should construct empty url">
75
75
  </testcase>
76
- <testcase name="ArcGisFeatureProvider should construct feature query url" time="0.008" classname="should construct feature query url">
76
+ <testcase name="ArcGisFeatureProvider should construct feature query url" time="0.029" classname="should construct feature query url">
77
77
  </testcase>
78
- <testcase name="ArcGisFeatureProvider should log error when getFeatureInfo cannot be performed" time="0.004" classname="should log error when getFeatureInfo cannot be performed">
78
+ <testcase name="ArcGisFeatureProvider should log error when getFeatureInfo cannot be performed" time="0.003" classname="should log error when getFeatureInfo cannot be performed">
79
79
  </testcase>
80
- <testcase name="ArcGisFeatureProvider should process data in getFeatureInfo" time="0.012" 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.111" classname="should log error when exceed transfert limit">
82
+ <testcase name="ArcGisFeatureProvider should log error when exceed transfert limit" time="0.127" classname="should log error when exceed transfert limit">
83
83
  </testcase>
84
- <testcase name="ArcGisFeatureProvider should log error when exceed exception thrown limit" time="0.010" classname="should log error when exceed exception thrown limit">
84
+ <testcase name="ArcGisFeatureProvider should log error when exceed exception thrown limit" time="0.013" classname="should log error when exceed exception thrown limit">
85
85
  </testcase>
86
- <testcase name="ArcGisFeatureProvider should debug Feature Geom" time="0.024" classname="should debug Feature Geom">
86
+ <testcase name="ArcGisFeatureProvider should debug Feature Geom" time="0.035" classname="should debug Feature Geom">
87
87
  </testcase>
88
- <testcase name="ArcGisFeatureProvider should compute computeTileWorld2CanvasTransform" time="0.004" classname="should compute computeTileWorld2CanvasTransform">
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.006" 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
- <testcase name="ArcGisFeatureProvider should loadTile from JSON request" time="0.003" classname="should loadTile from JSON request">
92
+ <testcase name="ArcGisFeatureProvider should loadTile from JSON request" time="0.004" 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.004" 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.005" 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-11-18T05:16:12" tests="4" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureQuery.test.js" time="0.006" failures="0">
102
- <testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.002" classname="should not apply different switches if not needed">
101
+ <testsuite name="ArcGisFeatureQuery" timestamp="2022-11-19T05:15:33" tests="3" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureQuery.test.js" time="0.015" failures="0">
102
+ <testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.004" 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.001" classname="should not apply different switches if not needed">
104
+ <testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.007" 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.001" classname="should not include geometry only when applicable">
107
- </testcase>
108
- <testcase name="ArcGisFeatureQuery should not include empty param" time="0.000" classname="should not include empty param">
106
+ <testcase name="ArcGisFeatureQuery should not include geometry only when applicable" time="0.003" classname="should not include geometry only when applicable">
109
107
  </testcase>
110
108
  </testsuite>
111
- <testsuite name="ArcGisFeatureRenderer" timestamp="2022-11-18T05:16:12" tests="12" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureRenderer.test.js" time="0.025" failures="0">
109
+ <testsuite name="ArcGisFeatureRenderer" timestamp="2022-11-19T05:15:33" tests="12" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureRenderer.test.js" time="0.041" failures="0">
112
110
  <testcase name="ArcGisFeatureRenderer should render simple path, stride = 2" time="0.001" classname="should render simple path, stride = 2">
113
111
  </testcase>
114
112
  <testcase name="ArcGisFeatureRenderer should render simple filled path" time="0.001" classname="should render simple filled path">
@@ -117,7 +115,7 @@
117
115
  </testcase>
118
116
  <testcase name="ArcGisFeatureRenderer should render multiple Paths, stride = 2" time="0.001" classname="should render multiple Paths, stride = 2">
119
117
  </testcase>
120
- <testcase name="ArcGisFeatureRenderer should not render invalid with stride value" time="0.000" classname="should not render invalid with stride value">
118
+ <testcase name="ArcGisFeatureRenderer should not render invalid with stride value" time="0.001" classname="should not render invalid with stride value">
121
119
  </testcase>
122
120
  <testcase name="ArcGisFeatureRenderer should render Path and apply transform, relativeCoords OFF" time="0.001" classname="should render Path and apply transform, relativeCoords OFF">
123
121
  </testcase>
@@ -125,37 +123,37 @@
125
123
  </testcase>
126
124
  <testcase name="ArcGisFeatureRenderer should render single Point and apply transform, relativeCoords OFF" time="0.001" classname="should render single Point and apply transform, relativeCoords OFF">
127
125
  </testcase>
128
- <testcase name="ArcGisFeatureRenderer should render multi Point, transform, relativeCoords OFF" time="0.001" classname="should render multi Point, transform, relativeCoords OFF">
126
+ <testcase name="ArcGisFeatureRenderer should render multi Point, transform, relativeCoords OFF" time="0.002" classname="should render multi Point, transform, relativeCoords OFF">
129
127
  </testcase>
130
- <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">
131
129
  </testcase>
132
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">
133
131
  </testcase>
134
- <testcase name="ArcGisFeatureRenderer should render and apply transform, relativeCoords ON" time="0.001" classname="should render and apply transform, relativeCoords ON">
132
+ <testcase name="ArcGisFeatureRenderer should render and apply transform, relativeCoords ON" time="0.002" classname="should render and apply transform, relativeCoords ON">
135
133
  </testcase>
136
134
  </testsuite>
137
- <testsuite name="ArcGisFeatureResponse" timestamp="2022-11-18T05:16:12" tests="7" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureResponse.test.js" time="0.017" failures="0">
135
+ <testsuite name="ArcGisFeatureResponse" timestamp="2022-11-19T05:15:33" tests="7" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisFeatureResponse.test.js" time="0.014" failures="0">
138
136
  <testcase name="ArcGisFeatureResponse should return undefined if http error" time="0.000" classname="should return undefined if http error">
139
137
  </testcase>
140
138
  <testcase name="ArcGisFeatureResponse should return undefined if invalid PBF data" time="0.000" classname="should return undefined if invalid PBF data">
141
139
  </testcase>
142
- <testcase name="ArcGisFeatureResponse should create FeatureCollectionPBuffer from PBF data" time="0.004" classname="should create FeatureCollectionPBuffer from PBF data">
140
+ <testcase name="ArcGisFeatureResponse should create FeatureCollectionPBuffer from PBF data" time="0.005" classname="should create FeatureCollectionPBuffer from PBF data">
143
141
  </testcase>
144
- <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">
145
143
  </testcase>
146
- <testcase name="ArcGisFeatureResponse should return undefined if invalid JSON" time="0.000" classname="should return undefined if invalid JSON">
144
+ <testcase name="ArcGisFeatureResponse should return undefined if invalid JSON" time="0.001" classname="should return undefined if invalid JSON">
147
145
  </testcase>
148
146
  <testcase name="ArcGisFeatureResponse should return JSON data" time="0.000" classname="should return JSON data">
149
147
  </testcase>
150
148
  <testcase name="ArcGisFeatureResponse should report exceededTransferLimit from JSON object" time="0.000" classname="should report exceededTransferLimit from JSON object">
151
149
  </testcase>
152
150
  </testsuite>
153
- <testsuite name="ArcGisSymbologyRenderer" timestamp="2022-11-18T05:16:12" tests="3" file="D:\vsts_a\539\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisSymbologyRenderer.test.js" time="0.005" failures="0">
154
- <testcase name="ArcGisSymbologyRenderer should construct renderer from incomplete drawing info" time="0.001" classname="should construct renderer from incomplete drawing info">
151
+ <testsuite name="ArcGisSymbologyRenderer" timestamp="2022-11-19T05:15:33" tests="3" file="D:\vsts_a\3\s\extensions\map-layers-formats\lib\cjs\test\ArcGisFeature\ArcGisSymbologyRenderer.test.js" time="0.006" failures="0">
152
+ <testcase name="ArcGisSymbologyRenderer should construct renderer from incomplete drawing info" time="0.002" classname="should construct renderer from incomplete drawing info">
155
153
  </testcase>
156
- <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">
157
155
  </testcase>
158
- <testcase name="ArcGisSymbologyRenderer should construct renderer from point symbology drawing info" time="0.001" classname="should construct renderer from point symbology drawing info">
156
+ <testcase name="ArcGisSymbologyRenderer should construct renderer from point symbology drawing info" time="0.000" classname="should construct renderer from point symbology drawing info">
159
157
  </testcase>
160
158
  </testsuite>
161
159
  </testsuites>
@@ -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\539\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_a\3\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\\539\\s\\extensions\\map-layers-formats\\src",
7
+ "D:\\vsts_a\\3\\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.5.0-dev.52",
3
+ "version": "3.5.0-dev.53",
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.5.0-dev.52",
25
- "@itwin/build-tools": "3.5.0-dev.52",
26
- "@itwin/core-bentley": "3.5.0-dev.52",
27
- "@itwin/core-common": "3.5.0-dev.52",
28
- "@itwin/core-geometry": "3.5.0-dev.52",
29
- "@itwin/core-frontend": "3.5.0-dev.52",
30
- "@itwin/eslint-plugin": "3.5.0-dev.52",
24
+ "@itwin/appui-abstract": "3.5.0-dev.53",
25
+ "@itwin/build-tools": "3.5.0-dev.53",
26
+ "@itwin/core-bentley": "3.5.0-dev.53",
27
+ "@itwin/core-common": "3.5.0-dev.53",
28
+ "@itwin/core-geometry": "3.5.0-dev.53",
29
+ "@itwin/core-frontend": "3.5.0-dev.53",
30
+ "@itwin/eslint-plugin": "3.5.0-dev.53",
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.5.0-dev.52",
52
- "@itwin/core-bentley": "3.5.0-dev.52",
53
- "@itwin/core-common": "3.5.0-dev.52",
54
- "@itwin/core-geometry": "3.5.0-dev.52"
51
+ "@itwin/appui-abstract": "3.5.0-dev.53",
52
+ "@itwin/core-bentley": "3.5.0-dev.53",
53
+ "@itwin/core-common": "3.5.0-dev.53",
54
+ "@itwin/core-geometry": "3.5.0-dev.53"
55
55
  },
56
56
  "dependencies": {
57
57
  "google-protobuf": "~3.20.1"
@@ -5,8 +5,8 @@
5
5
 
6
6
  import { Cartographic, ImageMapLayerSettings, ImageSource, ImageSourceFormat, ServerError } from "@itwin/core-common";
7
7
  import { assert, base64StringToUint8Array, IModelStatus, Logger } from "@itwin/core-bentley";
8
- import { Matrix4d, Point3d, Transform } from "@itwin/core-geometry";
9
- import { ArcGisErrorCode, ArcGISImageryProvider, ArcGisUtilities, ImageryMapTileTree, MapLayerFeatureInfo, MapLayerImageryProviderStatus, QuadId } from "@itwin/core-frontend";
8
+ import { Matrix4d, Point3d, Range2d, Transform } from "@itwin/core-geometry";
9
+ import { ArcGisErrorCode, ArcGISImageryProvider, 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";
@@ -139,11 +139,28 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
139
139
  }
140
140
  }
141
141
 
142
+ // Parse server version
143
+ let majorVersion: number|undefined;
144
+ if (this.serviceJson?.currentVersion) {
145
+ try {
146
+ majorVersion = Math.trunc(this.serviceJson?.currentVersion);
147
+ } catch {
148
+ }
149
+ }
150
+
151
+ // Coordinates Quantization: If supported, server will transform for us the coordinates in the Tile coordinate space (pixels, origin = upper left corner
152
+ // If not supported, transformation will be applied client side.
153
+ // Note: For some reasons, even though 'supportsCoordinatesQuantization' is set to 'true' on the layer metadata, server will give an error message for server version < 11
154
+ if (majorVersion && majorVersion >= 11 && this._layerMetadata.supportsCoordinatesQuantization) {
155
+ this._supportsCoordinatesQuantization = true;
156
+ }
157
+
142
158
  // Check supported query formats: JSON and PBF are currently implemented by this provider
143
159
  // Note: needs to be checked on the layer metadata, service metadata advertises a different set of formats
160
+ // Also, since PBF format does not support floating points, there is no point using this format if supportsCoordinatesQuantization is not available.
144
161
  if (this._layerMetadata.supportedQueryFormats) {
145
162
  const formats: string[] = this._layerMetadata.supportedQueryFormats.split(", ");
146
- if (formats.includes("PBF")) {
163
+ if (formats.includes("PBF") && this._supportsCoordinatesQuantization ) {
147
164
  this._format = "PBF";
148
165
  } else if (formats.includes ("JSON")) {
149
166
  this._format = "JSON";
@@ -151,24 +168,34 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
151
168
  }
152
169
 
153
170
  if (!this._format) {
154
- Logger.logError(loggerCategory, "Could not get service JSON");
171
+ Logger.logError(loggerCategory, "Could not get request format from service JSON");
155
172
  throw new ServerError(IModelStatus.ValidationFailed, "");
156
173
  }
157
174
 
158
- // Coordinates Quantization: If supported, server will transform for us the coordinates in the Tile coordinate space (pixels, origin = upper left corner
159
- // If not supported, transformation will be applied client side.
160
- if (this._layerMetadata.supportsCoordinatesQuantization) {
161
- this._supportsCoordinatesQuantization = true;
175
+ // Read range using full extent from service metadata
176
+ if (json.fullExtent) {
177
+ if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {
178
+ const range3857 = Range2d.createFrom({
179
+ low: {x: json.fullExtent.xmin, y: json.fullExtent.ymin},
180
+ high: {x: json.fullExtent.xmax, y: json.fullExtent.ymax} });
181
+
182
+ const west = this.getEPSG4326Lon(range3857.xLow);
183
+ const south = this.getEPSG4326Lat(range3857.yLow);
184
+ const east = this.getEPSG4326Lon(range3857.xHigh);
185
+ const north = this.getEPSG4326Lat(range3857.yHigh);
186
+ this.cartoRange = MapCartoRectangle.fromDegrees(west, south, east, north);
187
+ }
162
188
  }
163
189
 
164
190
  // Check for minScale / max scale
165
191
  const minScale = this._layerMetadata?.minScale || undefined; // undefined, 0 -> undefined
166
192
  const maxScale = this._layerMetadata?.maxScale || undefined; // undefined, 0 -> undefined
167
- const scales = ArcGisUtilities.getZoomLevelsScales(this.defaultMaximumZoomLevel, this.tileSize, minScale, maxScale);
193
+ const scales = ArcGisUtilities.getZoomLevelsScales(this.defaultMaximumZoomLevel, this.tileSize, minScale, maxScale, 1.0);
168
194
  if (scales.minLod)
169
195
  this._minDepthFromLod = scales.minLod;
170
- if (scales.maxLod)
171
- this._maxDepthFromLod = scales.maxLod;
196
+
197
+ // Some servers advertises a max LOD of 0, it should be interpreted as 'not defined' (otherwise a max lod of 0 would would mean never display anything)
198
+ this._maxDepthFromLod = (scales.maxLod ? scales.maxLod : this.defaultMaximumZoomLevel);
172
199
 
173
200
  this._symbologyRenderer = new ArcGisSymbologyRenderer(this._layerMetadata?.geometryType, this._layerMetadata?.drawingInfo?.renderer);
174
201
  }
@@ -205,7 +232,7 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
205
232
  // Actual spatial filter.
206
233
  // By default, we request the tile extent. If 'cartoPoint' is specified,
207
234
  // we restrict the spatial to specific point. (i.e. GetFeatureInfo requests)
208
- // We a refine envelope is provided, it has the priority over 'cartoPoint'
235
+ // If envelope is provided, it has the priority over 'cartoPoint'
209
236
  let geometry: ArcGisGeometry|undefined;
210
237
  if (geomOverride) {
211
238
  geometry = geomOverride;
@@ -324,9 +351,6 @@ export class ArcGisFeatureProvider extends ArcGISImageryProvider {
324
351
  }
325
352
 
326
353
  const response = this.fetch(new URL(tileUrl.url), { method: "GET" });
327
- // if ((await response).status !== 200){
328
- // return undefined;
329
- // }
330
354
  return new ArcGisFeatureResponse(this.format, response, tileUrl.envelope);
331
355
  }
332
356
 
@@ -157,80 +157,70 @@ export class ArcGisFeatureQuery {
157
157
  }
158
158
 
159
159
  public toString() {
160
- let customParams = "";
160
+ const url = new URL(`${this.baseUrl}/${this.layerIdx}/query`);
161
+
162
+ url.searchParams.append("f", this.format);
161
163
 
162
164
  if ( this.resultRecordCount !== undefined) {
163
- customParams = ArcGisFeatureQuery.appendParam(customParams, "resultRecordCount", `${this.resultRecordCount}`);
165
+ url.searchParams.append("resultRecordCount", `${this.resultRecordCount}`);
164
166
  }
165
167
 
166
168
  if ( this.resultOffset !== undefined) {
167
- customParams = ArcGisFeatureQuery.appendParam(customParams, "resultOffset", `${this.resultOffset}`);
169
+ url.searchParams.append( "resultOffset", `${this.resultOffset}`);
168
170
  }
169
171
 
170
172
  if ( this.returnGeometry !== undefined) {
171
- customParams = ArcGisFeatureQuery.appendParam(customParams, "returnGeometry", this.returnGeometry?"true":"false");
173
+ url.searchParams.append("returnGeometry", this.returnGeometry?"true":"false");
172
174
  }
173
175
 
174
176
  if ( this.resultType !== undefined) {
175
- customParams = ArcGisFeatureQuery.appendParam(customParams, "resultType", this.resultType);
177
+ url.searchParams.append("resultType", this.resultType);
176
178
  }
177
179
 
178
180
  if ( this.maxRecordCountFactor !== undefined) {
179
- customParams = ArcGisFeatureQuery.appendParam(customParams, "maxRecordCountFactor", `${this.maxRecordCountFactor}`);
181
+ url.searchParams.append( "maxRecordCountFactor", `${this.maxRecordCountFactor}`);
180
182
  }
181
183
 
182
184
  if ( this.returnExceededLimitFeatures !== undefined) {
183
- customParams = ArcGisFeatureQuery.appendParam(customParams, "returnExceededLimitFeatures", this.returnExceededLimitFeatures?"true":"false");
185
+ url.searchParams.append( "returnExceededLimitFeatures", this.returnExceededLimitFeatures?"true":"false");
184
186
  }
185
187
 
186
- customParams = ArcGisFeatureQuery.appendParam(customParams, "outSR", `${this.outSR}`);
188
+ url.searchParams.append( "outSR", `${this.outSR}`);
187
189
 
188
190
  if (this.geometry || this.spatialRel) {
189
191
 
190
192
  if (this.spatialRel) {
191
- customParams = ArcGisFeatureQuery.appendParam(customParams, "spatialRel", this.spatialRel);
193
+ url.searchParams.append( "spatialRel", this.spatialRel);
192
194
  }
193
195
 
194
196
  if (this.geometry) {
195
- customParams = ArcGisFeatureQuery.appendParam(customParams, "geometryType", this.geometry.type);
197
+ url.searchParams.append( "geometryType", this.geometry.type);
196
198
 
197
199
  const geomStr = JSON.stringify(this.geometry.geom);
198
- customParams = ArcGisFeatureQuery.appendParam(customParams, "geometry", geomStr);
200
+ url.searchParams.append( "geometry", geomStr);
201
+ url.searchParams.append( "units", "esriSRUnit_Meter"); // required on older server for get feature info
199
202
 
200
- customParams = ArcGisFeatureQuery.appendParam(customParams, "inSR", `${this.geometry.geom.spatialReference.wkid}`);
203
+ url.searchParams.append( "inSR", `${this.geometry.geom.spatialReference.wkid}`);
201
204
  }
202
205
  } else {
203
206
  // No custom params, fetch all geometries
204
- customParams = "where=1=1";
207
+ url.searchParams.append("where", "1=1");
205
208
  }
206
209
 
207
210
  if (this.quantizationParams) {
208
211
  const quantizationParamsStr = JSON.stringify(this.quantizationParams);
209
- customParams = ArcGisFeatureQuery.appendParam(customParams, "quantizationParameters", quantizationParamsStr);
212
+ url.searchParams.append("quantizationParameters", quantizationParamsStr);
210
213
  }
211
214
 
212
215
  if (this.outFields) {
213
- customParams = ArcGisFeatureQuery.appendParam(customParams, "outFields", this.outFields);
216
+ url.searchParams.append( "outFields", this.outFields);
214
217
  }
215
218
 
216
219
  if (this.distance) {
217
- customParams = ArcGisFeatureQuery.appendParam(customParams, "distance", `${this.distance}`);
218
- }
219
-
220
- return `${this.baseUrl}/${this.layerIdx}/query/?f=${this.format}&${customParams}`;
221
- }
222
-
223
- private static appendParam(urlToAppend: string, paramName: string, paramValue: string) {
224
- if (paramName.length === 0) {
225
- return urlToAppend;
226
- }
227
-
228
- let url = urlToAppend;
229
- if (urlToAppend.length > 0 && !urlToAppend.endsWith("&")) {
230
- url = `${urlToAppend }&`;
220
+ url.searchParams.append("distance", `${this.distance}`);
231
221
  }
232
222
 
233
- return `${url}${paramName}=${paramValue}`;
223
+ return url.toString();
234
224
  }
235
225
 
236
226
  }
@@ -130,21 +130,23 @@ export class ArcGisSymbologyRenderer {
130
130
  type: "esriPMS",
131
131
  url: "",
132
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,
133
+ imageData: "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAmBJREFUOE+Nk01IVFEUx//n3jfvOZOaJkMtiiJ7o9RG3LgoqKhFSFJBTS1ahFBBi0ijfJXCIyQr+hBbSIsoW7iQoKKFCw2CkAI3tZAgy8Ei+xhoTCbnje/NPfHGnA816KzuPR+/c8/HJRQJE7o+VUhym0DcCOYGgBQEXjOLlyqo+nHanCkMoaL4rslKjZwOQLT4ek3Mmz3FACFNLB67ut6M1nWphbg8wI6VyJK5KEH0EQFVJRKbwzokAW++p/ErraAYSQK3u47bC3vLnA+ZB9i2gHF0oyQMCfCGNaUa+vauxs71wWz2V18cnBj8gQ8J1/eeBnHUa4sMFQDGdGno+4gwEAoQzjVUon3rqlx1KY9x7+0MWobjAPg3QJ2eZV4tAEyFNCN5FkSXyw2B3j1hRGvLcgBXMV5MptA4MOXr0gT0u5bZnAf0jBsyiSgJPAxqhON1K3FlRxUMvwFAtv7u0Wl0jvwEmJNEuOhakTt5wKEBifr6Oo14BIBRpgt07w6jcVMIngKGY7NofR5HwlF+zDcpsC193vyYB/innvHywCzdZfAR/+onX1segBTAxHzzfPE7/8yzzIPLjJE1LTixHZx5CtCK4gXLzovBiDPUsYxVM7gUkB3nWKlm6DYEnQGzXARxCOK+a1WfKtQXb6LNAvr7iCboCUA1Ocdsdv5KLPe7F6pH/w3wLbc+BwOuc5IZ1wEE/jonQbjptZn24tKKX7BgvR2r0NKZRwDvAqCI+Z30VJPTURv7P4A9psuQcYAUPwAoReBLrmX2Lmls7i8sZ7kWLwuoxA1FVJGxzMPLufi6P2r+2xFbOUjGAAAAAElFTkSuQmCC",
134
+ width: 16,
135
+ height: 16,
136
+ xoffset: -8,
137
+ yoffset: -16,
136
138
  };
137
139
 
138
140
  private static readonly defaultSLS: EsriSLSProps = {
139
141
  type: "esriSLS",
140
- color: [0, 0.0],
142
+ color: [0, 0, 0, 255],
141
143
  width: 1,
142
144
  style: "esriSLSSolid",
143
145
  };
144
146
 
145
147
  private static readonly defaultSFS: EsriSFSProps = {
146
148
  type: "esriSFS",
147
- color: [0, 0.0],
149
+ color: [0, 0, 0, 255],
148
150
  style: "esriSFSSolid",
149
151
  };
150
152
 
@@ -172,11 +174,11 @@ export class ArcGisSymbologyRenderer {
172
174
  if (this._symbol === undefined) {
173
175
  Logger.logWarning(loggerCategory, "Symbology definition not supported, using default symbology");
174
176
  if (geometryType === "esriGeometryPoint" || geometryType === "esriGeometryMultipoint") {
175
- this._symbol = ArcGisSymbologyRenderer.defaultPMS;
177
+ this._symbol = EsriPMS.fromJSON(ArcGisSymbologyRenderer.defaultPMS);
176
178
  } else if (geometryType === "esriGeometryLine" || geometryType === "esriGeometryPolyline") {
177
- this._symbol = ArcGisSymbologyRenderer.defaultSLS;
179
+ this._symbol = EsriSLS.fromJSON(ArcGisSymbologyRenderer.defaultSLS);
178
180
  } else if (geometryType === "esriGeometryPolygon") {
179
- this._symbol = ArcGisSymbologyRenderer.defaultSFS;
181
+ this._symbol = EsriSFS.fromJSON(ArcGisSymbologyRenderer.defaultSFS);
180
182
  } else {
181
183
  Logger.logError(loggerCategory, "Could not determine default symbology: geometry type not supported");
182
184
  }
@@ -227,14 +229,15 @@ export class ArcGisSymbologyRenderer {
227
229
  let xOffset = 0, yOffset = 0;
228
230
  if (pms.xoffset)
229
231
  xOffset = pms.xoffset;
232
+ else if (pms.width)
233
+ xOffset = pms.width * -0.5; // if no offset center in the middle
234
+
230
235
  if (pms.yoffset)
231
236
  yOffset = pms.yoffset;
237
+ else if (pms.height)
238
+ yOffset = pms.height * -0.5; // if no offset center in the middle
232
239
 
233
240
  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
241
  context.drawImage(pms.image, ptX + xOffset, ptY + yOffset, pms.width, pms.height);
239
242
  } else {
240
243
  context.drawImage(pms.image, ptX + xOffset, ptY + yOffset);