@itwin/map-layers-formats 3.5.0-dev.51 → 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.
- package/.rush/temp/operation/build_ci/state.json +1 -1
- package/.rush/temp/operation/docs/state.json +1 -1
- package/.rush/temp/package-deps_build_ci.json +7 -7
- package/.rush/temp/package-deps_docs.json +7 -7
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js +39 -17
- package/lib/cjs/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts +0 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js +19 -27
- package/lib/cjs/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js +14 -11
- package/lib/cjs/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js +34 -10
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js +4 -9
- package/lib/cjs/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -1
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +5 -5
- package/lib/cjs/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -1
- package/lib/cjs/test/coverage/.nyc_output/{c8c8cab6-1a13-4b72-94f2-ab73ed9c126a.json → a7dcd2f7-e863-4162-8e25-d27e4921dfcc.json} +0 -0
- package/lib/cjs/test/coverage/.nyc_output/e498035c-a52d-4af9-b4fb-0a5c3a75efa3.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/a7dcd2f7-e863-4162-8e25-d27e4921dfcc.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/e498035c-a52d-4af9-b4fb-0a5c3a75efa3.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/index.json +1 -1
- package/lib/cjs/test/coverage/cobertura-coverage.xml +390 -387
- package/lib/cjs/test/coverage/lcov-report/index.html +18 -18
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureFormat.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureJSON.ts.html +5 -5
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeaturePBF.ts.html +9 -9
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureProvider.ts.html +146 -74
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureQuery.ts.html +32 -62
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureReader.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureRenderer.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisFeatureResponse.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/ArcGisSymbologyRenderer.ts.html +64 -55
- package/lib/cjs/test/coverage/lcov-report/src/ArcGisFeature/index.html +29 -29
- package/lib/cjs/test/coverage/lcov-report/src/index.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/map-layers-formats.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov-report/src/mapLayersFormats.ts.html +1 -1
- package/lib/cjs/test/coverage/lcov.info +637 -612
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js +41 -19
- package/lib/esm/ArcGisFeature/ArcGisFeatureProvider.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts +0 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js +19 -27
- package/lib/esm/ArcGisFeature/ArcGisFeatureQuery.js.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.d.ts.map +1 -1
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js +14 -11
- package/lib/esm/ArcGisFeature/ArcGisSymbologyRenderer.js.map +1 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js +34 -10
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureProvider.test.js.map +1 -1
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js +4 -9
- package/lib/esm/test/ArcGisFeature/ArcGisFeatureQuery.test.js.map +1 -1
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js +6 -6
- package/lib/esm/test/ArcGisFeature/ArcGisSymbologyRenderer.test.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/test/junit_results.xml +43 -45
- package/map-layers-formats.build.log +2 -2
- package/package.json +12 -12
- package/src/ArcGisFeature/ArcGisFeatureProvider.ts +39 -15
- package/src/ArcGisFeature/ArcGisFeatureQuery.ts +20 -30
- package/src/ArcGisFeature/ArcGisSymbologyRenderer.ts +15 -12
- package/src/test/ArcGisFeature/ArcGisFeatureProvider.test.ts +39 -10
- package/src/test/ArcGisFeature/ArcGisFeatureQuery.test.ts +4 -11
- package/src/test/ArcGisFeature/ArcGisSymbologyRenderer.test.ts +5 -5
- package/lib/cjs/test/coverage/.nyc_output/20fab392-54c0-4c77-9557-835e118f017b.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/20fab392-54c0-4c77-9557-835e118f017b.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/c8c8cab6-1a13-4b72-94f2-ab73ed9c126a.json +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<testsuites name="Mocha Tests" time="0.
|
|
3
|
-
<testsuite name="Root Suite" timestamp="2022-11-
|
|
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-
|
|
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.
|
|
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-
|
|
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
14
|
<testcase name="ArcGisFeatureJSON should read FeatureInfo in JSON (phillyAirport)" time="0.001" classname="should read FeatureInfo in JSON (phillyAirport)">
|
|
@@ -17,31 +17,31 @@
|
|
|
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.
|
|
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.
|
|
26
|
+
<testcase name="ArcGisFeatureJSON should readAndRender simple point" time="0.004" classname="should readAndRender simple point">
|
|
27
27
|
</testcase>
|
|
28
|
-
<testcase name="ArcGisFeatureJSON should log error when readAndRender / readFeatureInfo is called invalid response Data" time="0.
|
|
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-
|
|
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
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.
|
|
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.
|
|
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.
|
|
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>
|
|
44
|
-
<testcase name="ArcGisFeaturePBF should readAndRender simple path" time="0.
|
|
44
|
+
<testcase name="ArcGisFeaturePBF should readAndRender simple path" time="0.001" 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>
|
|
@@ -50,8 +50,8 @@
|
|
|
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-
|
|
54
|
-
<testcase name="ArcGisFeatureProvider should initialize with valid data" time="0.
|
|
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
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>
|
|
@@ -61,35 +61,35 @@
|
|
|
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.
|
|
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.
|
|
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
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.
|
|
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.
|
|
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.
|
|
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.
|
|
76
|
+
<testcase name="ArcGisFeatureProvider should construct feature query url" time="0.029" classname="should construct feature query url">
|
|
77
77
|
</testcase>
|
|
78
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.
|
|
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.
|
|
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.
|
|
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.
|
|
86
|
+
<testcase name="ArcGisFeatureProvider should debug Feature Geom" time="0.035" 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.
|
|
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.
|
|
92
|
+
<testcase name="ArcGisFeatureProvider should loadTile from JSON request" time="0.004" classname="should loadTile from JSON request">
|
|
93
93
|
</testcase>
|
|
94
94
|
<testcase name="ArcGisFeatureProvider should make sub request if loadtile request return 'exceedTransferLimit'" time="0.005" classname="should make sub request if loadtile request return 'exceedTransferLimit'">
|
|
95
95
|
</testcase>
|
|
@@ -98,18 +98,16 @@
|
|
|
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-
|
|
102
|
-
<testcase name="ArcGisFeatureQuery should not apply different switches if not needed" time="0.
|
|
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.
|
|
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.
|
|
107
|
-
</testcase>
|
|
108
|
-
<testcase name="ArcGisFeatureQuery should not include empty param" time="0.001" 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-
|
|
112
|
-
<testcase name="ArcGisFeatureRenderer should render simple path, stride = 2" time="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">
|
|
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">
|
|
115
113
|
</testcase>
|
|
@@ -131,31 +129,31 @@
|
|
|
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.
|
|
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-
|
|
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
|
-
<testcase name="ArcGisFeatureResponse should return undefined if invalid PBF data" time="0.
|
|
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.
|
|
140
|
+
<testcase name="ArcGisFeatureResponse should create FeatureCollectionPBuffer from PBF data" time="0.005" classname="should create FeatureCollectionPBuffer from PBF data">
|
|
143
141
|
</testcase>
|
|
144
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.
|
|
144
|
+
<testcase name="ArcGisFeatureResponse should return undefined if invalid JSON" time="0.001" classname="should return undefined if invalid JSON">
|
|
147
145
|
</testcase>
|
|
148
|
-
<testcase name="ArcGisFeatureResponse should return JSON data" time="0.
|
|
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-
|
|
154
|
-
<testcase name="ArcGisSymbologyRenderer should construct renderer from incomplete drawing info" time="0.
|
|
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.
|
|
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.
|
|
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:\
|
|
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:\\
|
|
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.
|
|
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.
|
|
25
|
-
"@itwin/build-tools": "3.5.0-dev.
|
|
26
|
-
"@itwin/core-bentley": "3.5.0-dev.
|
|
27
|
-
"@itwin/core-common": "3.5.0-dev.
|
|
28
|
-
"@itwin/core-geometry": "3.5.0-dev.
|
|
29
|
-
"@itwin/core-frontend": "3.5.0-dev.
|
|
30
|
-
"@itwin/eslint-plugin": "3.5.0-dev.
|
|
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
|
-
"@itwin/core-bentley": "3.5.0-dev.
|
|
53
|
-
"@itwin/core-common": "3.5.0-dev.
|
|
54
|
-
"@itwin/core-geometry": "3.5.0-dev.
|
|
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
|
-
//
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
|
|
171
|
-
|
|
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
|
-
//
|
|
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
|
-
|
|
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
|
-
|
|
165
|
+
url.searchParams.append("resultRecordCount", `${this.resultRecordCount}`);
|
|
164
166
|
}
|
|
165
167
|
|
|
166
168
|
if ( this.resultOffset !== undefined) {
|
|
167
|
-
|
|
169
|
+
url.searchParams.append( "resultOffset", `${this.resultOffset}`);
|
|
168
170
|
}
|
|
169
171
|
|
|
170
172
|
if ( this.returnGeometry !== undefined) {
|
|
171
|
-
|
|
173
|
+
url.searchParams.append("returnGeometry", this.returnGeometry?"true":"false");
|
|
172
174
|
}
|
|
173
175
|
|
|
174
176
|
if ( this.resultType !== undefined) {
|
|
175
|
-
|
|
177
|
+
url.searchParams.append("resultType", this.resultType);
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
if ( this.maxRecordCountFactor !== undefined) {
|
|
179
|
-
|
|
181
|
+
url.searchParams.append( "maxRecordCountFactor", `${this.maxRecordCountFactor}`);
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
if ( this.returnExceededLimitFeatures !== undefined) {
|
|
183
|
-
|
|
185
|
+
url.searchParams.append( "returnExceededLimitFeatures", this.returnExceededLimitFeatures?"true":"false");
|
|
184
186
|
}
|
|
185
187
|
|
|
186
|
-
|
|
188
|
+
url.searchParams.append( "outSR", `${this.outSR}`);
|
|
187
189
|
|
|
188
190
|
if (this.geometry || this.spatialRel) {
|
|
189
191
|
|
|
190
192
|
if (this.spatialRel) {
|
|
191
|
-
|
|
193
|
+
url.searchParams.append( "spatialRel", this.spatialRel);
|
|
192
194
|
}
|
|
193
195
|
|
|
194
196
|
if (this.geometry) {
|
|
195
|
-
|
|
197
|
+
url.searchParams.append( "geometryType", this.geometry.type);
|
|
196
198
|
|
|
197
199
|
const geomStr = JSON.stringify(this.geometry.geom);
|
|
198
|
-
|
|
200
|
+
url.searchParams.append( "geometry", geomStr);
|
|
201
|
+
url.searchParams.append( "units", "esriSRUnit_Meter"); // required on older server for get feature info
|
|
199
202
|
|
|
200
|
-
|
|
203
|
+
url.searchParams.append( "inSR", `${this.geometry.geom.spatialReference.wkid}`);
|
|
201
204
|
}
|
|
202
205
|
} else {
|
|
203
206
|
// No custom params, fetch all geometries
|
|
204
|
-
|
|
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
|
-
|
|
212
|
+
url.searchParams.append("quantizationParameters", quantizationParamsStr);
|
|
210
213
|
}
|
|
211
214
|
|
|
212
215
|
if (this.outFields) {
|
|
213
|
-
|
|
216
|
+
url.searchParams.append( "outFields", this.outFields);
|
|
214
217
|
}
|
|
215
218
|
|
|
216
219
|
if (this.distance) {
|
|
217
|
-
|
|
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
|
|
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: "
|
|
134
|
-
width:
|
|
135
|
-
height:
|
|
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
|
|
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:
|
|
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);
|