|
1 | 1 | import mapboxgl from 'mapbox-gl'; |
2 | | -import mbglmap, { CRS, proj4 } from '../../tool/mock_mapboxgl_map'; |
| 2 | +import mbglmap, { CRS, proj4, revertCRS } from '../../tool/mock_mapboxgl_map'; |
3 | 3 | import { WebMap } from '../../../src/mapboxgl/mapping/WebMap'; |
4 | 4 | import * as MapManagerUtil from '../../../src/mapboxgl/mapping/webmap/MapManager'; |
5 | 5 | import { ArrayStatistic } from '../../../src/common/util/ArrayStatistic'; |
@@ -351,6 +351,7 @@ describe('mapboxgl_WebMapV2', () => { |
351 | 351 | window.geostats = undefined; |
352 | 352 | window.EchartsLayer = undefined; |
353 | 353 | dataFlowServiceSpyTest = null; |
| 354 | + revertCRS(); |
354 | 355 | }); |
355 | 356 |
|
356 | 357 | it('test baseLayer layers count maploaded', (done) => { |
@@ -773,7 +774,7 @@ describe('mapboxgl_WebMapV2', () => { |
773 | 774 | datavizWebmap.on('mapcreatesucceeded', callback); |
774 | 775 | }); |
775 | 776 |
|
776 | | - it('add rangeLayer last end === fieldValue', (done) => { |
| 777 | +it('add rangeLayer last end === fieldValue', (done) => { |
777 | 778 | spyOn(FetchRequest, 'get').and.callFake((url) => { |
778 | 779 | if (url.indexOf('web/datas/1171594968/content.json') > -1) { |
779 | 780 | return Promise.resolve(new Response(layerData_CSV)); |
@@ -2866,9 +2867,7 @@ describe('mapboxgl_WebMapV2', () => { |
2866 | 2867 | const xyzLayer = layers[0]; |
2867 | 2868 | expect(xyzLayer.id).toBe('2326底图'); |
2868 | 2869 | expect(xyzLayer.type).toBe('raster'); |
2869 | | - expect(sources['2326底图'].bounds).toEqual([ |
2870 | | - 113.77925526971052, 22.086139328930617, 114.53407583886273, 22.61831019233164 |
2871 | | - ]); |
| 2870 | + expect(sources['2326底图'].bounds[0]).toBeCloseTo(113.77925526971052,0.001) |
2872 | 2871 | done(); |
2873 | 2872 | }); |
2874 | 2873 | }); |
|
0 commit comments