11require ( '../../../src/leaflet/overlay/EChartsLayer' ) ;
22
33var url = GlobeParameter . imageURL ;
4- describe ( 'leaflet_EChartsLayerTest ' , function ( ) {
4+ describe ( 'leaflet_EChartsLayer ' , function ( ) {
55 var originalTimeout ;
66 var testDiv , map ;
77 beforeAll ( function ( ) {
@@ -33,7 +33,7 @@ describe('leaflet_EChartsLayerTest', function () {
3333 map . remove ( ) ;
3434 } ) ;
3535
36- it ( 'echartsLayer constructor test ' , function ( ) {
36+ it ( 'initialize ' , function ( ) {
3737 var echartsLayer ;
3838 var geoCoordMap = {
3939 '上海' : [ 121.4648 , 31.2891 ] ,
@@ -151,7 +151,6 @@ describe('leaflet_EChartsLayerTest', function () {
151151 '青岛' : [ 120.4651 , 36.3373 ] ,
152152 '韶关' : [ 113.7964 , 24.7028 ]
153153 } ;
154-
155154 var BJData = [
156155 [ { name : '北京' } , { name : '上海' , value : 95 } ] ,
157156 [ { name : '北京' } , { name : '广州' , value : 90 } ] ,
@@ -164,7 +163,6 @@ describe('leaflet_EChartsLayerTest', function () {
164163 [ { name : '北京' } , { name : '重庆' , value : 20 } ] ,
165164 [ { name : '北京' } , { name : '常州' , value : 10 } ]
166165 ] ;
167-
168166 var SHData = [
169167 [ { name : '上海' } , { name : '包头' , value : 95 } ] ,
170168 [ { name : '上海' } , { name : '昆明' , value : 90 } ] ,
@@ -177,7 +175,6 @@ describe('leaflet_EChartsLayerTest', function () {
177175 [ { name : '上海' } , { name : '丹东' , value : 20 } ] ,
178176 [ { name : '上海' } , { name : '大连' , value : 10 } ]
179177 ] ;
180-
181178 var GZData = [
182179 [ { name : '广州' } , { name : '福州' , value : 95 } ] ,
183180 [ { name : '广州' } , { name : '太原' , value : 90 } ] ,
@@ -190,9 +187,7 @@ describe('leaflet_EChartsLayerTest', function () {
190187 [ { name : '广州' } , { name : '北海' , value : 20 } ] ,
191188 [ { name : '广州' } , { name : '海口' , value : 10 } ]
192189 ] ;
193-
194190 var planePath = 'path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z' ;
195-
196191 var convertData = function ( data ) {
197192 var res = [ ] ;
198193 for ( var i = 0 ; i < data . length ; i ++ ) {
@@ -209,7 +204,6 @@ describe('leaflet_EChartsLayerTest', function () {
209204 }
210205 return res ;
211206 } ;
212-
213207 var color = [ '#a6c84c' , '#ffa022' , '#46bee9' ] ;
214208 var series = [ ] ;
215209 [ [ '北京' , BJData ] , [ '上海' , SHData ] , [ '广州' , GZData ] ] . forEach ( function ( item , i ) {
@@ -289,8 +283,7 @@ describe('leaflet_EChartsLayerTest', function () {
289283 } )
290284 } ) ;
291285 } ) ;
292-
293- option = {
286+ var option = {
294287 title : {
295288 text : '模拟迁徙' ,
296289 subtext : '数据纯属虚构' ,
@@ -310,11 +303,9 @@ describe('leaflet_EChartsLayerTest', function () {
310303 selectedMode : 'multiple' ,
311304 backgroundColor : 'rgba(128, 128, 128, 0.5)'
312305 } ,
313-
314306 series : series
315307 } ;
316308 echartsLayer = L . supermap . echartsLayer ( option ) . addTo ( map ) ;
317-
318309 expect ( echartsLayer ) . not . toBeNull ( ) ;
319310 expect ( echartsLayer . _echartsOptions . series . length ) . toBe ( 9 ) ;
320311 expect ( echartsLayer . _echartsOptions . series [ 0 ] . name ) . toBe ( "北京 Top10" ) ;
0 commit comments