@@ -457,10 +457,7 @@ describe('mapboxgl_WebMapV2', () => {
457457 if ( url . indexOf ( 'map.json' ) > - 1 ) {
458458 return Promise . resolve ( new Response ( raster4490 ) ) ;
459459 }
460- if ( url . indexOf ( 'jubu4490.json' ) > - 1 ) {
461- return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
462- }
463- return Promise . resolve ( ) ;
460+ return Promise . resolve ( new Response ( RET_MAP_INFO_4490 ) ) ;
464461 } ) ;
465462 datavizWebmap = new WebMap (
466463 id ,
@@ -526,7 +523,7 @@ describe('mapboxgl_WebMapV2', () => {
526523 if ( url . indexOf ( 'web/datas/1920557079/content.json' ) > - 1 ) {
527524 return Promise . resolve ( new Response ( layerData_CSV ) ) ;
528525 }
529- return Promise . resolve ( ) ;
526+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
530527 } ) ;
531528 const id = heatLayer ;
532529 datavizWebmap = new WebMap ( id , { ...commonOption } ) ;
@@ -545,7 +542,7 @@ describe('mapboxgl_WebMapV2', () => {
545542 if ( url . indexOf ( 'China_Dark.json' ) > - 1 ) {
546543 return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
547544 }
548- return Promise . resolve ( ) ;
545+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
549546 } ) ;
550547 const id = rangeLayer ;
551548 const callback = function ( data ) {
@@ -598,8 +595,6 @@ describe('mapboxgl_WebMapV2', () => {
598595 return Promise . resolve ( new Response ( raster4490 ) ) ;
599596 } else if ( url . indexOf ( 'jubu4490.json' ) > - 1 ) {
600597 return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
601- } else if ( url . indexOf ( 'jubu4490.json' ) > - 1 ) {
602- return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
603598 }
604599 return Promise . resolve ( ) ;
605600 } ) ;
@@ -679,7 +674,7 @@ describe('mapboxgl_WebMapV2', () => {
679674
680675 it ( 'request wkt info and visibleExtend without EPSFG Prefix ' , ( done ) => {
681676 const epsgeCode =
682- 'PROJCS["Google Maps Global Mercator ",GEOGCS["WGS 84 ",DATUM["WGS_1984 ",SPHEROID["WGS 84 ",6378137,298.257223563,AUTHORITY["EPSG","7030" ]],AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]] ,UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122" ]],AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_2SP "],PARAMETER["standard_parallel_1",0 ],PARAMETER["latitude_of_origin",0 ],PARAMETER["central_meridian",0 ],PARAMETER["false_easting",0 ],PARAMETER["false_northing",0 ],AXIS["Northing", "NORTH"],AXIS["Easting", "EAST"],UNIT["Meter",1],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs" ],AUTHORITY["EPSG ","900913 "]]' ;
677+ 'PROJCS["unnamed ",GEOGCS["GRS 1980(IUGG, 1980) ",DATUM["unknown ",SPHEROID["GRS80 ",6378137,298.257222101 ]],PRIMEM["Greenwich",0] ,UNIT["degree",0.0174532925199433 ]],PROJECTION["Lambert_Conformal_Conic_1SP "],PARAMETER["latitude_of_origin",43.0695160375 ],PARAMETER["central_meridian",-89.42222222222223 ],PARAMETER["scale_factor",1.0000384786 ],PARAMETER["false_easting",811000 ],PARAMETER["false_northing",480943.886 ],AXIS["Northing", "NORTH"],AXIS["Easting", "EAST"],UNIT["Foot_US",0.3048006096012192 ],AUTHORITY["epsg ","7599 "]]' ;
683678 spyOn ( FetchRequest , 'get' ) . and . callFake ( ( url ) => {
684679 if ( url . indexOf ( 'web/datas/676516522/content.json' ) > - 1 ) {
685680 return Promise . resolve ( new Response ( layerData_CSV ) ) ;
@@ -788,7 +783,7 @@ describe('mapboxgl_WebMapV2', () => {
788783 if ( url . indexOf ( 'web/datas/1171594968/content.json' ) > - 1 ) {
789784 return Promise . resolve ( new Response ( layerData_CSV ) ) ;
790785 }
791- return Promise . resolve ( ) ;
786+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
792787 } ) ;
793788 const id = rangeLayer ;
794789 datavizWebmap = new WebMap ( id , { ...commonOption } ) ;
@@ -1102,7 +1097,7 @@ describe('mapboxgl_WebMapV2', () => {
11021097 if ( url . indexOf ( 'web/datas/123456/content.json' ) > - 1 ) {
11031098 return Promise . resolve ( new Response ( JSON . stringify ( layerData_geojson [ 'MARKER_GEOJSON' ] ) ) ) ;
11041099 }
1105- return Promise . resolve ( ) ;
1100+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
11061101 } ) ;
11071102 const id = markerLayer ;
11081103 datavizWebmap = new WebMap ( id , { ...commonOption } ) ;
@@ -1118,7 +1113,7 @@ describe('mapboxgl_WebMapV2', () => {
11181113 if ( url . indexOf ( 'web/datas/123456/content.json' ) > - 1 ) {
11191114 return Promise . resolve ( new Response ( JSON . stringify ( layerData_geojson [ 'MARKER_GEOJSON' ] ) ) ) ;
11201115 }
1121- return Promise . resolve ( ) ;
1116+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
11221117 } ) ;
11231118 const id = markerLayer ;
11241119 datavizWebmap = new WebMap ( id , { ...commonOption , map : commonMap } , { ...commonMapOptions } ) ;
@@ -1146,7 +1141,7 @@ describe('mapboxgl_WebMapV2', () => {
11461141 )
11471142 ) ;
11481143 }
1149- return Promise . resolve ( ) ;
1144+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
11501145 } ) ;
11511146 const id = markerLayer ;
11521147 datavizWebmap = new WebMap ( id , { ...commonOption } ) ;
@@ -1164,12 +1159,11 @@ describe('mapboxgl_WebMapV2', () => {
11641159 ...layerData_geojson [ 'MARKER_GEOJSON' ] ,
11651160 content
11661161 } ;
1167- const contentData = JSON . parse ( content ) ;
11681162 spyOn ( FetchRequest , 'get' ) . and . callFake ( ( url ) => {
11691163 if ( url . indexOf ( 'web/datas/1795361105/content.json' ) > - 1 ) {
11701164 return Promise . resolve ( new Response ( JSON . stringify ( newLayerData_geojson ) ) ) ;
11711165 }
1172- return Promise . resolve ( ) ;
1166+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
11731167 } ) ;
11741168 const layers = [
11751169 {
@@ -1229,7 +1223,7 @@ describe('mapboxgl_WebMapV2', () => {
12291223 if ( url . indexOf ( 'web/datas/676516522/content.json' ) > - 1 ) {
12301224 return Promise . resolve ( new Response ( layerData_CSV ) ) ;
12311225 }
1232- return Promise . resolve ( ) ;
1226+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
12331227 } ) ;
12341228 const id = ranksymbolLayer ;
12351229 datavizWebmap = new WebMap ( id , { ...commonOption } ) ;
@@ -1256,7 +1250,7 @@ describe('mapboxgl_WebMapV2', () => {
12561250 } else if ( url . indexOf ( 'iserver/services/dataflowTest/dataflow/subscribe' ) > - 1 ) {
12571251 return Promise . resolve ( new Response ( JSON . stringify ( dataflowLayerData . subscribe ) ) ) ;
12581252 }
1259- return Promise . resolve ( ) ;
1253+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
12601254 } ) ;
12611255 datavizWebmap = new WebMap ( dataflowLayer , { ...commonOption , map : commonMap } , undefined ) ;
12621256 const callback = function ( data ) {
@@ -1286,6 +1280,7 @@ describe('mapboxgl_WebMapV2', () => {
12861280 } else if ( url . indexOf ( 'datas/144371940/content.json' ) ) {
12871281 return Promise . resolve ( new Response ( JSON . stringify ( layerData_geojson [ 'LINE_GEOJSON' ] ) ) ) ;
12881282 }
1283+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
12891284 } ) ;
12901285 datavizWebmap = new WebMap ( id , { ...commonOption , map : commonMap } , { ...commonMapOptions } ) ;
12911286 datavizWebmap . on ( 'mapcreatesucceeded' , ( data ) => {
@@ -1477,7 +1472,7 @@ describe('mapboxgl_WebMapV2', () => {
14771472 } else if ( url . indexOf ( 'web/datas/13136933/content.json' ) > - 1 ) {
14781473 return Promise . resolve ( new Response ( JSON . stringify ( layerData_geojson [ 'POINT_GEOJSON' ] ) ) ) ;
14791474 }
1480- return Promise . resolve ( ) ;
1475+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
14811476 } ) ;
14821477 const id = vectorLayer_point ;
14831478 datavizWebmap = new WebMap ( id , { ...commonOption , map : commonMap } , undefined ) ;
@@ -1534,7 +1529,7 @@ describe('mapboxgl_WebMapV2', () => {
15341529 } else if ( url . indexOf ( '/map.json' ) > - 1 ) {
15351530 return Promise . resolve ( new Response ( datavizWebmap_ZXYTILE ) ) ;
15361531 }
1537- return Promise . resolve ( ) ;
1532+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
15381533 } ) ;
15391534 datavizWebmap = new WebMap (
15401535 'test' ,
@@ -1564,7 +1559,7 @@ describe('mapboxgl_WebMapV2', () => {
15641559 } else if ( url . indexOf ( 'web/maps/test/map.json' ) > - 1 ) {
15651560 return Promise . resolve ( new Response ( raster4490 ) ) ;
15661561 }
1567- return Promise . resolve ( ) ;
1562+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
15681563 } ) ;
15691564 datavizWebmap = new WebMap (
15701565 'test' ,
@@ -1755,7 +1750,7 @@ describe('mapboxgl_WebMapV2', () => {
17551750 if ( url . indexOf ( 'map-world/wms130' ) > - 1 ) {
17561751 return Promise . resolve ( new Response ( wmsCapabilitiesText ) ) ;
17571752 }
1758- return Promise . resolve ( ) ;
1753+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
17591754 } ) ;
17601755 const mapData = {
17611756 ...wmsLayer ,
@@ -1780,7 +1775,7 @@ describe('mapboxgl_WebMapV2', () => {
17801775 if ( url . indexOf ( 'map-world/wms130' ) > - 1 ) {
17811776 return Promise . resolve ( new Response ( wmsCapabilitiesTextWith130 ) ) ;
17821777 }
1783- return Promise . resolve ( ) ;
1778+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
17841779 } ) ;
17851780 const callback = function ( data ) {
17861781 expect ( data ) . not . toBeUndefined ( ) ;
@@ -1807,7 +1802,7 @@ describe('mapboxgl_WebMapV2', () => {
18071802 if ( url . indexOf ( 'map-china400/wmts100' ) > - 1 ) {
18081803 return Promise . resolve ( new Response ( wmtsCapabilitiesText ) ) ;
18091804 }
1810- return Promise . resolve ( ) ;
1805+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
18111806 } ) ;
18121807 datavizWebmap = new WebMap ( baseLayers [ 'WMTS' ] , { ...commonOption } ) ;
18131808 const callback = function ( data ) {
@@ -1853,6 +1848,9 @@ describe('mapboxgl_WebMapV2', () => {
18531848 } ) ;
18541849
18551850 it ( 'tile layer' , ( done ) => {
1851+ spyOn ( FetchRequest , 'get' ) . and . callFake ( ( ) => {
1852+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
1853+ } ) ;
18561854 datavizWebmap = new WebMap (
18571855 restmapLayer ,
18581856 { ...commonOption , ignoreBaseProjection : true , map : commonMap } ,
@@ -1869,7 +1867,7 @@ describe('mapboxgl_WebMapV2', () => {
18691867 if ( url . indexOf ( 'web/datas/1920557079/content.json' ) > - 1 ) {
18701868 return Promise . resolve ( new Response ( layerData_CSV ) ) ;
18711869 }
1872- return Promise . resolve ( ) ;
1870+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
18731871 } ) ;
18741872 datavizWebmap = new WebMap ( heatLayer , { ...commonOption , map : commonMap } , { ...commonMapOptions } ) ;
18751873 const callback = function ( ) {
@@ -1880,6 +1878,9 @@ describe('mapboxgl_WebMapV2', () => {
18801878 } ) ;
18811879
18821880 it ( 'different projection' , ( done ) => {
1881+ spyOn ( FetchRequest , 'get' ) . and . callFake ( ( url ) => {
1882+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
1883+ } ) ;
18831884 const callback = function ( data ) {
18841885 expect ( data ) . not . toBeUndefined ( ) ;
18851886 done ( ) ;
@@ -1898,6 +1899,9 @@ describe('mapboxgl_WebMapV2', () => {
18981899 } ) ;
18991900
19001901 it ( 'add online map' , ( done ) => {
1902+ spyOn ( FetchRequest , 'get' ) . and . callFake ( ( url ) => {
1903+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
1904+ } ) ;
19011905 datavizWebmap = new WebMap ( baseLayers [ 'TILE' ] , {
19021906 isSuperMapOnline : true ,
19031907 serverUrl : 'https://www.supermapol.com'
@@ -2052,7 +2056,7 @@ describe('mapboxgl_WebMapV2', () => {
20522056 if ( url . indexOf ( 'web/datas/1920557079/content.json' ) > - 1 ) {
20532057 return Promise . resolve ( new Response ( layerData_CSV ) ) ;
20542058 }
2055- return Promise . resolve ( ) ;
2059+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
20562060 } ) ;
20572061 datavizWebmap = new WebMap (
20582062 vectorLayer_line ,
@@ -2079,7 +2083,7 @@ describe('mapboxgl_WebMapV2', () => {
20792083 if ( url . indexOf ( 'web/datas/13136933/content.json' ) > - 1 ) {
20802084 return Promise . resolve ( new Response ( JSON . stringify ( layerData_geojson [ 'POINT_GEOJSON' ] ) ) ) ;
20812085 }
2082- return Promise . resolve ( ) ;
2086+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
20832087 } ) ;
20842088 const id = {
20852089 ...uniqueLayer_multi_points ,
@@ -2115,6 +2119,7 @@ describe('mapboxgl_WebMapV2', () => {
21152119 } else if ( url . indexOf ( 'China.json' ) > - 1 ) {
21162120 return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
21172121 }
2122+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
21182123 } ) ;
21192124 datavizWebmap = new WebMap ( id , { ...commonOption } ) ;
21202125 const callback = function ( data ) {
@@ -2178,6 +2183,7 @@ describe('mapboxgl_WebMapV2', () => {
21782183 } else if ( url . indexOf ( 'China.json' ) > - 1 ) {
21792184 return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
21802185 }
2186+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
21812187 } ) ;
21822188 const map = {
21832189 ...commonMap ,
@@ -2423,7 +2429,7 @@ describe('mapboxgl_WebMapV2', () => {
24232429 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
24242430 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
24252431 }
2426- return Promise . resolve ( ) ;
2432+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
24272433 } ) ;
24282434 datavizWebmap = new WebMap ( id , {
24292435 server : server
@@ -2443,7 +2449,7 @@ describe('mapboxgl_WebMapV2', () => {
24432449 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
24442450 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
24452451 }
2446- return Promise . resolve ( ) ;
2452+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
24472453 } ) ;
24482454 datavizWebmap = new WebMap ( 123456 , {
24492455 server : server
@@ -2471,7 +2477,7 @@ describe('mapboxgl_WebMapV2', () => {
24712477 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
24722478 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
24732479 }
2474- return Promise . resolve ( ) ;
2480+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
24752481 } ) ;
24762482 datavizWebmap = new WebMap ( id , {
24772483 server : server
@@ -2498,7 +2504,7 @@ describe('mapboxgl_WebMapV2', () => {
24982504 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
24992505 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
25002506 }
2501- return Promise . resolve ( ) ;
2507+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
25022508 } ) ;
25032509 datavizWebmap = new WebMap ( id , {
25042510 server : server
@@ -2523,7 +2529,7 @@ describe('mapboxgl_WebMapV2', () => {
25232529 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
25242530 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
25252531 }
2526- return Promise . resolve ( ) ;
2532+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
25272533 } ) ;
25282534 datavizWebmap = new WebMap ( id , {
25292535 server : server
@@ -2550,7 +2556,7 @@ describe('mapboxgl_WebMapV2', () => {
25502556 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
25512557 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
25522558 }
2553- return Promise . resolve ( ) ;
2559+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
25542560 } ) ;
25552561 spyOn ( ArrayStatistic , 'getArraySegments' ) . and . callFake ( function ( array , type , segNum ) {
25562562 return [
@@ -2584,7 +2590,7 @@ describe('mapboxgl_WebMapV2', () => {
25842590 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
25852591 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
25862592 }
2587- return Promise . resolve ( ) ;
2593+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
25882594 } ) ;
25892595 datavizWebmap = new WebMap ( id , {
25902596 server : server
@@ -2613,7 +2619,7 @@ describe('mapboxgl_WebMapV2', () => {
26132619 } else if ( url . indexOf ( 'portal.json' ) > - 1 ) {
26142620 return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
26152621 }
2616- return Promise . resolve ( ) ;
2622+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
26172623 } ) ;
26182624 datavizWebmap = new WebMap ( id , {
26192625 server : server
@@ -2825,6 +2831,7 @@ describe('mapboxgl_WebMapV2', () => {
28252831 if ( url . indexOf ( 'T202007210600.json' ) > - 1 || url . indexOf ( 'T202007210700.json' ) > - 1 ) {
28262832 return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
28272833 }
2834+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
28282835 } ) ;
28292836 datavizWebmap = new WebMap (
28302837 '' ,
@@ -2910,6 +2917,7 @@ describe('mapboxgl_WebMapV2', () => {
29102917 if ( url . indexOf ( '/content.json' ) > - 1 ) {
29112918 return Promise . resolve ( new Response ( JSON . stringify ( projection_4548_content ) ) ) ;
29122919 }
2920+ return Promise . resolve ( new Response ( JSON . stringify ( { } ) ) ) ;
29132921 } ) ;
29142922 spyOn ( FetchRequest , 'post' ) . and . callFake ( ( url ) => {
29152923 if ( url . indexOf ( '/featureResults' ) > - 1 ) {
0 commit comments