Skip to content

Commit 8c128a9

Browse files
[fix]UT
1 parent 1f17b41 commit 8c128a9

2 files changed

Lines changed: 2 additions & 139 deletions

File tree

test/mapboxgl/mapping/WebMapV2Spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,14 @@ describe('mapboxgl_WebMapV2', () => {
345345
window.document.body.removeChild(testDiv);
346346
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
347347
mapboxgl.CRS = undefined;
348-
mapboxgl.proj4 = undefined;
349348
window.jsonsql = undefined;
350349
window.geostats = undefined;
351350
window.EchartsLayer = undefined;
352351
dataFlowServiceSpyTest = null;
353352
});
354353

355354
it('test baseLayer layers count maploaded', (done) => {
356-
spyOn(FetchRequest, 'get').and.callFake((url, params, options) => {
355+
spyOn(FetchRequest, 'get').and.callFake((url) => {
357356
if (url.indexOf('portal.json') > -1) {
358357
return Promise.resolve(new Response(JSON.stringify(iportal_serviceProxy)));
359358
}

test/resources/WebMapV3.js

Lines changed: 1 addition & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -4120,143 +4120,7 @@ const msPopupInfo = JSON.stringify({
41204120
status: null,
41214121
favoriteCount: 0
41224122
});
4123-
var mapstudioWebMap_filters = JSON.stringify({
4124-
metadata: {
4125-
layerCatalog: [
4126-
{
4127-
visible: true,
4128-
parts: ['ms_郑州POI_GBK_1774245016129_27', 'ms_郑州POI_GBK_1774245104313_105'],
4129-
id: 'layer_郑州POI_GBK_1774245011909_26',
4130-
title: '郑州POI_GBK',
4131-
type: 'composite'
4132-
},
4133-
{
4134-
visible: true,
4135-
id: 'OSM',
4136-
title: 'OpenStreetMap',
4137-
type: 'basic'
4138-
}
4139-
]
4140-
},
4141-
sources: {
4142-
ms_6977061_1774245011908_25: {
4143-
tiles: [
4144-
'http://fake:8190/iportal/web/datas/6977061/structureddata/tiles/{z}/{x}/{y}.mvt?epsgCode=3857&returnedFieldNames=%5B%22smpid%22%2C%22EntityHandle%22%2C%22EntityType%22%2C%22Layer%22%2C%22LayerFroze%22%2C%22LayerLocked%22%2C%22LayerOn%22%2C%22Elevation%22%2C%22Thickness%22%2C%22ColorIndex%22%2C%22LineStyle%22%2C%22BlockName%22%2C%22BlockRotation%22%2C%22LineWidth%22%2C%22UserID%22%2C%22Name%22%2C%22Name_PY%22%2C%22Ctype%22%2C%22Ntype%22%2C%22Code%22%2C%22Address%22%2C%22Telephone%22%2C%22Picture%22%2C%22URL%22%2C%22Link%22%2C%22%E6%B6%88%E9%98%B2%E5%B1%80%E5%90%8D%E7%A7%B0%22%2C%22XZQ%22%2C%22X%22%2C%22Y%22%5D&geometryFieldName=msgeometry'
4145-
],
4146-
bounds: [113.482306, 34.635322, 113.827295, 34.91074],
4147-
type: 'vector'
4148-
},
4149-
OSM: {
4150-
tiles: ['https://fake:8190/tiles/{z}/{x}/{y}.png'],
4151-
tileSize: 256,
4152-
attribution: '',
4153-
bounds: [-180, -90, 180, 90],
4154-
type: 'raster'
4155-
}
4156-
},
4157-
crs: 'EPSG:3857',
4158-
center: [113.5945719887909, 34.77314590347322],
4159-
zoom: 10.902814693892449,
4160-
glyphs: {},
4161-
version: '3.3.7',
4162-
rootUrl: 'http://fake:8190/iportal/',
4163-
maxzoom: 19,
4164-
name: '郑州POI',
4165-
viewExtent: [113.33896806325768, 34.62066566609361, 113.85017591431918, 34.925344909204746],
4166-
layers: [
4167-
{
4168-
maxzoom: 19,
4169-
id: 'OSM',
4170-
source: 'OSM',
4171-
type: 'raster',
4172-
minzoom: 0
4173-
},
4174-
{
4175-
filter: [
4176-
'all',
4177-
['all', ['==', 'Ctype', ''], ['!=', 'smpid', '']],
4178-
['all', ['all', ['all', ['all', ['!=', 'smpid', 121]]]]]
4179-
],
4180-
layout: {
4181-
'icon-allow-overlap': true,
4182-
'text-line-height': 1.2,
4183-
visibility: 'visible',
4184-
// "text-field": "{name}",
4185-
'text-anchor': 'center',
4186-
'text-size': 16,
4187-
'text-allow-overlap': true,
4188-
'icon-size': 0.08,
4189-
'symbol-placement': 'point',
4190-
'icon-image': [
4191-
'match',
4192-
['get', 'smpid'],
4193-
1,
4194-
'shape2'
4195-
],
4196-
'icon-ignore-placement': false,
4197-
'text-font': ['Open Sans Regular', 'Arial Unicode MS Regular'],
4198-
'text-rotate': 0,
4199-
'text-transform': 'none',
4200-
'text-justify': 'center',
4201-
'text-letter-spacing': 0,
4202-
'text-max-width': 10,
4203-
'icon-anchor': 'center',
4204-
'text-ignore-placement': false,
4205-
'icon-rotate': 0
4206-
},
4207-
metadata: {},
4208-
maxzoom: 24,
4209-
paint: {
4210-
'icon-translate': [0, 0],
4211-
'text-halo-color': '#242424',
4212-
'text-translate-anchor': 'map',
4213-
'icon-color': '#EE4D5A',
4214-
'text-halo-blur': 2,
4215-
'icon-translate-anchor': 'map',
4216-
'text-color': '#FFFFFF',
4217-
'text-halo-width': 1,
4218-
'icon-opacity': 0.9,
4219-
'text-opacity': 1,
4220-
'text-translate': [0, 0]
4221-
},
4222-
id: 'ms_郑州POI_GBK_1774245016129_27',
4223-
source: 'ms_6977061_1774245011908_25',
4224-
'source-layer': '6977061$msgeometry',
4225-
type: 'symbol',
4226-
minzoom: 0
4227-
},
4228-
{
4229-
filter: [
4230-
'all',
4231-
['all', ['==', 'Ctype', ''], ['!=', 'smpid', '']],
4232-
['all', ['all', ['all', ['any', ['==', 'smpid', 121]]]]]
4233-
],
4234-
layout: {
4235-
'icon-allow-overlap': true,
4236-
'text-line-height': 1.2,
4237-
visibility: 'visible',
4238-
// "text-field": "{name}",
4239-
'text-anchor': 'center',
4240-
'text-size': 16,
4241-
},
4242-
metadata: {},
4243-
maxzoom: 24,
4244-
paint: {
4245-
'icon-translate': [0, 0],
4246-
'text-halo-color': '#242424',
4247-
'text-translate-anchor': 'map',
4248-
},
4249-
id: 'ms_郑州POI_GBK_1774245104313_105',
4250-
source: 'ms_6977061_1774245011908_25',
4251-
'source-layer': '6977061$msgeometry',
4252-
type: 'symbol',
4253-
minzoom: 0
4254-
}
4255-
],
4256-
sprite: 'http://fake:8190/iportal/web/maps/932266699/sprites/sprite',
4257-
pitch: 0,
4258-
minzoom: 0
4259-
});
4123+
42604124
var msProjectINfo_filters = JSON.stringify({
42614125
extent: {
42624126
top: 34.925344909204746,

0 commit comments

Comments
 (0)