@itwin/map-layers-formats 3.5.0-dev.52 → 3.5.0-dev.57
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/{6d78e0cc-3049-49f9-9f29-97f2d2ce6c64.json → 40575325-e7ef-4a2f-b122-96c4919282f9.json} +0 -0
- package/lib/cjs/test/coverage/.nyc_output/94c48ef9-6b3d-4238-8893-892fa0244386.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/40575325-e7ef-4a2f-b122-96c4919282f9.json +1 -0
- package/lib/cjs/test/coverage/.nyc_output/processinfo/94c48ef9-6b3d-4238-8893-892fa0244386.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 +44 -46
- 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/5f6e61f1-8da3-4cce-bc95-ee236ec2bb5b.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/5f6e61f1-8da3-4cce-bc95-ee236ec2bb5b.json +0 -1
- package/lib/cjs/test/coverage/.nyc_output/processinfo/6d78e0cc-3049-49f9-9f29-97f2d2ce6c64.json +0 -1
|
@@ -47,7 +47,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
47
47
|
await provider.initialize();
|
|
48
48
|
|
|
49
49
|
expect((provider as any)._minDepthFromLod).to.equals(11);
|
|
50
|
-
expect((provider as any)._maxDepthFromLod).to.equals(
|
|
50
|
+
expect((provider as any)._maxDepthFromLod).to.equals(22);
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
it("should not initialize with no service metadata", async () => {
|
|
@@ -176,12 +176,26 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
176
176
|
return {defaultVisibility:true, supportedQueryFormats:"PBF, JSON"};
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
179
|
+
const getServiceJsonStub = sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
180
180
|
return {capabilities: "Query"};
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
let provider = new ArcGisFeatureProvider(settings);
|
|
184
184
|
await provider.initialize();
|
|
185
|
+
expect(provider.format).to.equals("JSON");
|
|
186
|
+
|
|
187
|
+
// PBF requires 'supportsCoordinatesQuantization'
|
|
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"};
|
|
191
|
+
});
|
|
192
|
+
getLayerMetadataStub.restore();
|
|
193
|
+
getLayerMetadataStub = sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (_id: number) {
|
|
194
|
+
return {defaultVisibility:true, supportsCoordinatesQuantization:true, supportedQueryFormats:"PBF, JSON"};
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
provider = new ArcGisFeatureProvider(settings);
|
|
198
|
+
await provider.initialize();
|
|
185
199
|
expect(provider.format).to.equals("PBF");
|
|
186
200
|
|
|
187
201
|
getLayerMetadataStub.restore();
|
|
@@ -189,6 +203,20 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
189
203
|
return {defaultVisibility:true, supportedQueryFormats:"JSON"};
|
|
190
204
|
});
|
|
191
205
|
|
|
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};
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
provider = new ArcGisFeatureProvider(settings);
|
|
212
|
+
await provider.initialize();
|
|
213
|
+
expect(provider.format).to.equals("JSON");
|
|
214
|
+
|
|
215
|
+
getLayerMetadataStub.restore();
|
|
216
|
+
getLayerMetadataStub = sandbox.stub((ArcGisFeatureProvider.prototype as any), "getLayerMetadata").callsFake(async function (_id: number) {
|
|
217
|
+
return {defaultVisibility:true, supportedQueryFormats:"JSON"};
|
|
218
|
+
});
|
|
219
|
+
|
|
192
220
|
provider = new ArcGisFeatureProvider(settings);
|
|
193
221
|
await provider.initialize();
|
|
194
222
|
expect(provider.format).to.equals("JSON");
|
|
@@ -252,7 +280,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
252
280
|
});
|
|
253
281
|
|
|
254
282
|
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
255
|
-
return {capabilities: "Query"};
|
|
283
|
+
return {currentVersion: 11, capabilities: "Query"};
|
|
256
284
|
});
|
|
257
285
|
|
|
258
286
|
const provider = new ArcGisFeatureProvider(settings);
|
|
@@ -269,7 +297,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
269
297
|
latestWkid: 3857,
|
|
270
298
|
},
|
|
271
299
|
};
|
|
272
|
-
expect(url?.url).to.equals(`https://dummy.com/0/query
|
|
300
|
+
expect(url?.url).to.equals(`https://dummy.com/0/query?f=PBF&resultType=tile&maxRecordCountFactor=3&returnExceededLimitFeatures=false&outSR=102100&geometryType=esriGeometryEnvelope&geometry=%7B%22xmin%22%3A-20037508.34%2C%22ymin%22%3A-20037508.339999996%2C%22xmax%22%3A20037508.34%2C%22ymax%22%3A20037508.340000004%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&units=esriSRUnit_Meter&inSR=102100`);
|
|
273
301
|
expect(url?.envelope?.xmin).to.be.closeTo(extent.xmin, 0.01);
|
|
274
302
|
expect(url?.envelope?.ymin).to.be.closeTo(extent.ymin, 0.01);
|
|
275
303
|
expect(url?.envelope?.xmax).to.be.closeTo(extent.xmax, 0.01);
|
|
@@ -290,7 +318,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
290
318
|
const provider2 = new ArcGisFeatureProvider(settings);
|
|
291
319
|
await provider2.initialize();
|
|
292
320
|
url = provider2.constructFeatureUrl(0,0,0, "PBF");
|
|
293
|
-
expect(url?.url).to.equals(`https://dummy.com/0/query
|
|
321
|
+
expect(url?.url).to.equals(`https://dummy.com/0/query?f=PBF&resultType=tile&maxRecordCountFactor=3&returnExceededLimitFeatures=false&outSR=102100&geometryType=esriGeometryEnvelope&geometry=%7B%22xmin%22%3A-20037508.34%2C%22ymin%22%3A-20037508.339999996%2C%22xmax%22%3A20037508.34%2C%22ymax%22%3A20037508.340000004%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&units=esriSRUnit_Meter&inSR=102100&quantizationParameters=%7B%22mode%22%3A%22view%22%2C%22originPosition%22%3A%22upperLeft%22%2C%22tolerance%22%3A78271.516953125%2C%22extent%22%3A%7B%22xmin%22%3A-20037508.34%2C%22ymin%22%3A-20037508.339999996%2C%22xmax%22%3A20037508.34%2C%22ymax%22%3A20037508.340000004%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D`);
|
|
294
322
|
expect(url?.envelope?.xmin).to.be.closeTo(extent.xmin, 0.01);
|
|
295
323
|
expect(url?.envelope?.ymin).to.be.closeTo(extent.ymin, 0.01);
|
|
296
324
|
expect(url?.envelope?.xmax).to.be.closeTo(extent.xmax, 0.01);
|
|
@@ -315,7 +343,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
315
343
|
const provider3 = new ArcGisFeatureProvider(settings);
|
|
316
344
|
await provider3.initialize();
|
|
317
345
|
url = provider3.constructFeatureUrl(0,0,0, "PBF", overrideGeom);
|
|
318
|
-
expect(url?.url).to.equals(`https://dummy.com/0/query
|
|
346
|
+
expect(url?.url).to.equals(`https://dummy.com/0/query?f=PBF&resultType=tile&maxRecordCountFactor=3&returnExceededLimitFeatures=false&outSR=102100&geometryType=esriGeometryEnvelope&geometry=%7B%22xmin%22%3A-50%2C%22ymin%22%3A-50%2C%22xmax%22%3A50%2C%22ymax%22%3A50%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&units=esriSRUnit_Meter&inSR=102100&quantizationParameters=%7B%22mode%22%3A%22view%22%2C%22originPosition%22%3A%22upperLeft%22%2C%22tolerance%22%3A78271.516953125%2C%22extent%22%3A%7B%22xmin%22%3A-20037508.34%2C%22ymin%22%3A-20037508.339999996%2C%22xmax%22%3A20037508.34%2C%22ymax%22%3A20037508.340000004%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D`);
|
|
319
347
|
expect(url?.envelope?.xmin).to.be.closeTo((overrideGeom.geom as ArcGisExtent).xmin, 0.01);
|
|
320
348
|
expect(url?.envelope?.ymin).to.be.closeTo((overrideGeom.geom as ArcGisExtent).ymin, 0.01);
|
|
321
349
|
expect(url?.envelope?.xmax).to.be.closeTo((overrideGeom.geom as ArcGisExtent).xmax, 0.01);
|
|
@@ -325,7 +353,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
325
353
|
|
|
326
354
|
// Now test with a different tolerance value
|
|
327
355
|
url = provider3.constructFeatureUrl(0,0,0, "PBF", overrideGeom, undefined, 10);
|
|
328
|
-
expect(url?.url).to.equals(`https://dummy.com/0/query
|
|
356
|
+
expect(url?.url).to.equals(`https://dummy.com/0/query?f=PBF&resultType=tile&maxRecordCountFactor=3&returnExceededLimitFeatures=false&outSR=102100&geometryType=esriGeometryEnvelope&geometry=%7B%22xmin%22%3A-50%2C%22ymin%22%3A-50%2C%22xmax%22%3A50%2C%22ymax%22%3A50%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&units=esriSRUnit_Meter&inSR=102100&quantizationParameters=%7B%22mode%22%3A%22view%22%2C%22originPosition%22%3A%22upperLeft%22%2C%22tolerance%22%3A78271.516953125%2C%22extent%22%3A%7B%22xmin%22%3A-20037508.34%2C%22ymin%22%3A-20037508.339999996%2C%22xmax%22%3A20037508.34%2C%22ymax%22%3A20037508.340000004%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D&distance=782715.16953125`);
|
|
329
357
|
expect(url?.envelope?.xmin).to.be.closeTo((overrideGeom.geom as ArcGisExtent).xmin, 0.01);
|
|
330
358
|
expect(url?.envelope?.ymin).to.be.closeTo((overrideGeom.geom as ArcGisExtent).ymin, 0.01);
|
|
331
359
|
expect(url?.envelope?.xmax).to.be.closeTo((overrideGeom.geom as ArcGisExtent).xmax, 0.01);
|
|
@@ -352,7 +380,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
352
380
|
});
|
|
353
381
|
|
|
354
382
|
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
355
|
-
return {capabilities: "Query"};
|
|
383
|
+
return {currentVersion: 11, capabilities: "Query"};
|
|
356
384
|
});
|
|
357
385
|
sandbox.stub(ArcGisFeatureProvider.prototype, "constructFeatureUrl").callsFake(function _(_row: number, _column: number, _zoomLevel: number, _format: ArcGisFeatureFormat, _geomOverride?: ArcGisGeometry, _outFields?: string, _tolerance?: number, _returnGeometry?: boolean) {
|
|
358
386
|
return undefined;
|
|
@@ -379,13 +407,14 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
379
407
|
return {
|
|
380
408
|
defaultVisibility:true,
|
|
381
409
|
supportedQueryFormats:"PBF, JSON",
|
|
410
|
+
supportsCoordinatesQuantization:true,
|
|
382
411
|
minScale: 600000,
|
|
383
412
|
maxScale: 5000,
|
|
384
413
|
};
|
|
385
414
|
});
|
|
386
415
|
|
|
387
416
|
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
388
|
-
return {capabilities: "Query"};
|
|
417
|
+
return {currentVersion: 11, capabilities: "Query"};
|
|
389
418
|
});
|
|
390
419
|
sandbox.stub((ArcGISImageryProvider.prototype as any), "fetch").callsFake(async function _(_url: URL, _options?: RequestInit) {
|
|
391
420
|
const test = {
|
|
@@ -569,7 +598,7 @@ describe("ArcGisFeatureProvider", () => {
|
|
|
569
598
|
};
|
|
570
599
|
});
|
|
571
600
|
sandbox.stub(ArcGisUtilities, "getServiceJson").callsFake(async function _(_url: string, _formatId: string, _userName?: string, _password?: string, _ignoreCache?: boolean) {
|
|
572
|
-
return {capabilities: "Query"};
|
|
601
|
+
return {currentVersion: 11, capabilities: "Query"};
|
|
573
602
|
});
|
|
574
603
|
sandbox.stub(HTMLCanvasElement.prototype, "getContext").callsFake( function _(_contextId: any, _options?: any) {
|
|
575
604
|
return {} as RenderingContext;
|
|
@@ -32,7 +32,7 @@ describe("ArcGisFeatureQuery", () => {
|
|
|
32
32
|
expect(queryUrl).to.not.contains("geometry");
|
|
33
33
|
expect(queryUrl).to.not.contains("inSR");
|
|
34
34
|
expect(queryUrl).to.not.contains("inSR");
|
|
35
|
-
expect(queryUrl).to.contains("where=1
|
|
35
|
+
expect(queryUrl).to.contains("where=1%3D1");
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
it("should not apply different switches if not needed", async () => {
|
|
@@ -75,10 +75,11 @@ describe("ArcGisFeatureQuery", () => {
|
|
|
75
75
|
expect(queryUrl).to.contains("maxRecordCountFactor=1000");
|
|
76
76
|
expect(queryUrl).to.contains("returnExceededLimitFeatures=false");
|
|
77
77
|
expect(queryUrl).to.contains("geometryType=esriGeometryEnvelope");
|
|
78
|
-
expect(queryUrl).to.contains(`geometry
|
|
78
|
+
expect(queryUrl).to.contains(`geometry=%7B%22xmin%22%3A0%2C%22ymin%22%3A0%2C%22xmax%22%3A100%2C%22ymax%22%3A100%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D`);
|
|
79
79
|
expect(queryUrl).to.contains("inSR=102100");
|
|
80
80
|
expect(queryUrl).to.contains("outFields=test");
|
|
81
81
|
expect(queryUrl).to.contains("distance=100");
|
|
82
|
+
expect(queryUrl).to.contains("units=esriSRUnit_Meter");
|
|
82
83
|
|
|
83
84
|
});
|
|
84
85
|
|
|
@@ -108,17 +109,9 @@ describe("ArcGisFeatureQuery", () => {
|
|
|
108
109
|
query.geometry = {type:"esriGeometryEnvelope", geom:fakeEnvelope};
|
|
109
110
|
queryUrl = query.toString();
|
|
110
111
|
expect(queryUrl).to.contains("geometryType=esriGeometryEnvelope");
|
|
111
|
-
expect(queryUrl).to.contains(`geometry
|
|
112
|
+
expect(queryUrl).to.contains(`geometry=%7B%22xmin%22%3A0%2C%22ymin%22%3A0%2C%22xmax%22%3A100%2C%22ymax%22%3A100%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D`);
|
|
112
113
|
expect(queryUrl).to.contains("inSR=102100");
|
|
113
114
|
|
|
114
115
|
});
|
|
115
116
|
|
|
116
|
-
it("should not include empty param", async () => {
|
|
117
|
-
|
|
118
|
-
const url = "https://test.com/rest/";
|
|
119
|
-
const clonedUrl = url.slice();
|
|
120
|
-
(ArcGisFeatureQuery as any).appendParam(clonedUrl, "", "value");
|
|
121
|
-
expect(url).to.equals(clonedUrl);
|
|
122
|
-
});
|
|
123
|
-
|
|
124
117
|
});
|
|
@@ -39,19 +39,19 @@ describe("ArcGisSymbologyRenderer", () => {
|
|
|
39
39
|
|
|
40
40
|
it("should construct renderer from incomplete drawing info", async () => {
|
|
41
41
|
let provider = new ArcGisSymbologyRenderer("esriGeometryPoint", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
42
|
-
comparePointSymbol((provider as any)._symbol, (ArcGisSymbologyRenderer as any).defaultPMS);
|
|
42
|
+
comparePointSymbol((provider as any)._symbol, EsriPMS.fromJSON((ArcGisSymbologyRenderer as any).defaultPMS));
|
|
43
43
|
|
|
44
44
|
provider = new ArcGisSymbologyRenderer("esriGeometryMultipoint", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
45
|
-
comparePointSymbol((provider as any)._symbol, (ArcGisSymbologyRenderer as any).defaultPMS);
|
|
45
|
+
comparePointSymbol((provider as any)._symbol, EsriPMS.fromJSON((ArcGisSymbologyRenderer as any).defaultPMS));
|
|
46
46
|
|
|
47
47
|
provider = new ArcGisSymbologyRenderer("esriGeometryPolyline", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
48
|
-
compareLineSymbol((provider as any)._symbol, (ArcGisSymbologyRenderer as any).defaultSLS);
|
|
48
|
+
compareLineSymbol((provider as any)._symbol, EsriSLS.fromJSON((ArcGisSymbologyRenderer as any).defaultSLS));
|
|
49
49
|
|
|
50
50
|
provider = new ArcGisSymbologyRenderer("esriGeometryLine", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
51
|
-
compareLineSymbol((provider as any)._symbol,
|
|
51
|
+
compareLineSymbol((provider as any)._symbol, EsriSLS.fromJSON((ArcGisSymbologyRenderer as any).defaultSLS));
|
|
52
52
|
|
|
53
53
|
provider = new ArcGisSymbologyRenderer("esriGeometryPolygon", NewYorkDataset.incompleteDrawingInfo.drawingInfo.renderer);
|
|
54
|
-
comparePolySymbol((provider as any)._symbol, (ArcGisSymbologyRenderer as any).defaultSFS);
|
|
54
|
+
comparePolySymbol((provider as any)._symbol, EsriSFS.fromJSON((ArcGisSymbologyRenderer as any).defaultSFS));
|
|
55
55
|
|
|
56
56
|
});
|
|
57
57
|
|