@@ -1847,9 +1847,7 @@ describe('maplibregl_WebMapV2', () => {
18471847 center : [ 107.7815 , 39.9788 ] ,
18481848 zoom : 5 ,
18491849 renderWorldCopies : false ,
1850- crs : {
1851- epsgCode : 'EPSG:3857'
1852- } ,
1850+ crs : 'EPSG:3857' ,
18531851 minzoom : 0 ,
18541852 maxzoom : 22
18551853 } ;
@@ -1887,9 +1885,7 @@ describe('maplibregl_WebMapV2', () => {
18871885 center : [ 107.7815 , 39.9788 ] ,
18881886 zoom : 5 ,
18891887 renderWorldCopies : false ,
1890- crs : {
1891- epsgCode : 'EPSG:3857'
1892- } ,
1888+ crs : 'EPSG:3857' ,
18931889 minzoom : 0 ,
18941890 maxzoom : 22
18951891 } ;
@@ -1928,9 +1924,7 @@ describe('maplibregl_WebMapV2', () => {
19281924 center : [ 107.7815 , 39.9788 ] ,
19291925 zoom : 5 ,
19301926 renderWorldCopies : false ,
1931- crs : {
1932- epsgCode : 'EPSG:3857'
1933- } ,
1927+ crs : 'EPSG:3857' ,
19341928 minzoom : 0 ,
19351929 maxzoom : 22
19361930 } ;
@@ -2734,4 +2728,55 @@ describe('maplibregl_WebMapV2', () => {
27342728 } ;
27352729 datavizWebmap . once ( 'mapcreatesucceeded' , callback ) ;
27362730 } ) ;
2731+
2732+ it ( 'overlay projection is no EPSG:4326' , ( done ) => {
2733+ spyOn ( FetchRequest , 'get' ) . and . callFake ( ( url ) => {
2734+ if ( url . indexOf ( 'portal.json' ) > - 1 ) {
2735+ return Promise . resolve ( new Response ( JSON . stringify ( iportal_serviceProxy ) ) ) ;
2736+ }
2737+ if ( url . indexOf ( 'map.json' ) > - 1 ) {
2738+ return Promise . resolve ( new Response ( JSON . stringify ( projection4548 ) ) ) ;
2739+ }
2740+ if ( url . indexOf ( 'map4548%40fl-new/prjCoordSys.wkt' ) > - 1 ) {
2741+ return Promise . resolve ( new Response ( projection_4548_wkt ) ) ;
2742+ }
2743+ if ( url . indexOf ( '/map4548%40fl-new.json' ) > - 1 ) {
2744+ return Promise . resolve (
2745+ new Response ( JSON . stringify ( {
2746+ bounds : {
2747+ top : 5178663.047080055 ,
2748+ left : 328182.9260637246 ,
2749+ bottom : 2289622.79728123 ,
2750+ leftBottom : {
2751+ x : 328182.9260637246 ,
2752+ y : 2289622.79728123
2753+ } ,
2754+ right : 629000.9570381088 ,
2755+ rightTop : {
2756+ x : 629000.9570381088 ,
2757+ y : 5178663.047080055
2758+ }
2759+ }
2760+ } ) )
2761+ ) ;
2762+ }
2763+ if ( url . indexOf ( '/content.json' ) > - 1 ) {
2764+ return Promise . resolve ( new Response ( JSON . stringify ( projection_4548_content ) ) ) ;
2765+ }
2766+ } ) ;
2767+ spyOn ( FetchRequest , 'post' ) . and . callFake ( url => {
2768+ if ( url . indexOf ( '/featureResults' ) > - 1 ) {
2769+ return Promise . resolve ( new Response ( JSON . stringify ( projection_4548_featureResults ) ) ) ;
2770+ }
2771+ } ) ;
2772+ datavizWebmap = new WebMap ( id , {
2773+ server : server
2774+ } ) ;
2775+
2776+ datavizWebmap . on ( 'mapcreatesucceeded' , ( { layers, map } ) => {
2777+ expect ( layers . length ) . toBe ( 3 ) ;
2778+ expect ( datavizWebmap . _handler . _unprojectProjection ) . toBe ( 'EPSG:4548' ) ;
2779+ done ( ) ;
2780+ } ) ;
2781+ } ) ;
27372782} ) ;
0 commit comments