@@ -54,8 +54,6 @@ describe('mapboxgl_WebMap', () => {
54
54
expect ( + center . lng . toFixed ( 4 ) ) . toEqual ( 110 ) ;
55
55
expect ( datavizWebmap . mapParams . title ) . toBe ( 'tianditu' ) ;
56
56
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
57
- datavizWebmap . map = null ;
58
- datavizWebmap = null ;
59
57
done ( ) ;
60
58
} , 1000 )
61
59
} ) ;
@@ -74,8 +72,6 @@ describe('mapboxgl_WebMap', () => {
74
72
var datavizWebmap = new WebMap ( id , options ) ;
75
73
setTimeout ( ( ) => {
76
74
datavizWebmap . resize ( ) ;
77
- datavizWebmap . map = null ;
78
- datavizWebmap = null ;
79
75
done ( ) ;
80
76
} , 1000 ) ;
81
77
} ) ;
@@ -94,8 +90,6 @@ describe('mapboxgl_WebMap', () => {
94
90
setTimeout ( ( ) => {
95
91
datavizWebmap . setMapId ( 'testID' ) ;
96
92
expect ( datavizWebmap . mapId ) . toEqual ( 'testID' ) ;
97
- datavizWebmap . map = null ;
98
- datavizWebmap = null ;
99
93
done ( ) ;
100
94
} , 1000 ) ;
101
95
} ) ;
@@ -114,8 +108,6 @@ describe('mapboxgl_WebMap', () => {
114
108
setTimeout ( ( ) => {
115
109
datavizWebmap . setWebMapOptions ( { server : 'http://www.test.com' } ) ;
116
110
expect ( datavizWebmap . server ) . toEqual ( 'http://www.test.com/' ) ;
117
- datavizWebmap . map = null ;
118
- datavizWebmap = null ;
119
111
done ( ) ;
120
112
} , 1000 ) ;
121
113
} ) ;
@@ -139,8 +131,6 @@ describe('mapboxgl_WebMap', () => {
139
131
} ;
140
132
setTimeout ( ( ) => {
141
133
datavizWebmap . setMapOptions ( mapOptions ) ;
142
- datavizWebmap . map = null ;
143
- datavizWebmap = null ;
144
134
done ( ) ;
145
135
} , 1000 ) ;
146
136
} ) ;
@@ -167,8 +157,6 @@ describe('mapboxgl_WebMap', () => {
167
157
expect ( map . getZoom ( ) ) . toBe ( 1 ) ;
168
158
expect ( datavizWebmap . mapParams . title ) . toBe ( 'image_tianditu' ) ;
169
159
expect ( datavizWebmap . mapParams . description ) . toBe ( 'This is a image' ) ;
170
- datavizWebmap . map = null ;
171
- datavizWebmap = null ;
172
160
done ( ) ;
173
161
} , 1000 )
174
162
} ) ;
@@ -188,8 +176,6 @@ describe('mapboxgl_WebMap', () => {
188
176
189
177
setTimeout ( ( ) => {
190
178
expect ( datavizWebmap . mapParams . description ) . toBe ( 'tianditu_ter' ) ;
191
- datavizWebmap . map = null ;
192
- datavizWebmap = null ;
193
179
done ( ) ;
194
180
} , 1000 )
195
181
} ) ;
@@ -217,8 +203,6 @@ describe('mapboxgl_WebMap', () => {
217
203
// expect(map.getCenter()).toEqual(new mapboxgl.LngLat(120.63222224999998, 30.389530096727963));
218
204
expect ( datavizWebmap . mapParams . title ) . toBe ( 'openstreet' ) ;
219
205
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
220
- datavizWebmap . map = null ;
221
- datavizWebmap = null ;
222
206
done ( ) ;
223
207
} , 1000 )
224
208
} ) ;
@@ -236,8 +220,6 @@ describe('mapboxgl_WebMap', () => {
236
220
237
221
expect ( datavizWebmap . credentialKey ) . toBeUndefined ( ) ;
238
222
expect ( datavizWebmap . credentialValue ) . toBeUndefined ( ) ;
239
- datavizWebmap . map = null ;
240
- datavizWebmap = null ;
241
223
done ( ) ;
242
224
} , 1000 )
243
225
} ) ;
@@ -265,8 +247,6 @@ describe('mapboxgl_WebMap', () => {
265
247
//expect(map.getCenter()).toEqual([0, -7.081154551613622e-10]);
266
248
expect ( datavizWebmap . mapParams . title ) . toBe ( 'GAOD' ) ;
267
249
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
268
- datavizWebmap . map = null ;
269
- datavizWebmap = null ;
270
250
done ( ) ;
271
251
} , 1000 )
272
252
} ) ;
@@ -294,8 +274,6 @@ describe('mapboxgl_WebMap', () => {
294
274
//expect(map.getCenter()).toEqual([0, -7.081154551613622e-10]);
295
275
expect ( datavizWebmap . mapParams . title ) . toBe ( 'google_map' ) ;
296
276
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
297
- datavizWebmap . map = null ;
298
- datavizWebmap = null ;
299
277
done ( ) ;
300
278
} , 1000 )
301
279
} ) ;
@@ -319,8 +297,6 @@ describe('mapboxgl_WebMap', () => {
319
297
expect ( datavizWebmap . credentialValue ) . toBeUndefined ( ) ;
320
298
expect ( datavizWebmap . mapParams . title ) . toBe ( 'undefinedMap' ) ;
321
299
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
322
- datavizWebmap . map = null ;
323
- datavizWebmap = null ;
324
300
done ( ) ;
325
301
} , 1000 )
326
302
} ) ;
@@ -349,8 +325,6 @@ describe('mapboxgl_WebMap', () => {
349
325
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 120.63222224999998 , 30.389530096727963 ) ) ;
350
326
expect ( datavizWebmap . mapParams . title ) . toBe ( 'theme_base' ) ;
351
327
expect ( datavizWebmap . mapParams . description ) . toBe ( 'base style' ) ;
352
- datavizWebmap . map = null ;
353
- datavizWebmap = null ;
354
328
done ( ) ;
355
329
} , 1000 )
356
330
} ) ;
@@ -379,8 +353,6 @@ describe('mapboxgl_WebMap', () => {
379
353
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 116.39560889343755 , 39.93917738600353 ) ) ;
380
354
expect ( datavizWebmap . mapParams . title ) . toBe ( 'Line_basis' ) ;
381
355
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
382
- datavizWebmap . map = null ;
383
- datavizWebmap = null ;
384
356
done ( ) ;
385
357
} , 1000 )
386
358
} ) ;
@@ -420,8 +392,6 @@ describe('mapboxgl_WebMap', () => {
420
392
var map = datavizWebmap . map ;
421
393
expect ( map . getZoom ( ) ) . toBe ( 6 ) ;
422
394
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 120.63222224999998 , 30.389530096727963 ) ) ;
423
- datavizWebmap . map = null ;
424
- datavizWebmap = null ;
425
395
done ( ) ;
426
396
} , 5000 )
427
397
} ) ;
@@ -451,8 +421,6 @@ describe('mapboxgl_WebMap', () => {
451
421
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 116.32442464111325 , 39.98897628932847 ) ) ;
452
422
expect ( datavizWebmap . mapParams . title ) . toBe ( 'Unique' ) ;
453
423
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
454
- datavizWebmap . map = null ;
455
- datavizWebmap = null ;
456
424
done ( ) ;
457
425
} , 1000 )
458
426
} ) ;
@@ -484,8 +452,6 @@ describe('mapboxgl_WebMap', () => {
484
452
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 116.40097798513068 , 39.900378604132094 ) ) ;
485
453
expect ( datavizWebmap . mapParams . title ) . toBe ( 'RANGE_LABEL' ) ;
486
454
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
487
- datavizWebmap . map = null ;
488
- datavizWebmap = null ;
489
455
done ( ) ;
490
456
} , 1000 )
491
457
} ) ;
@@ -516,8 +482,6 @@ describe('mapboxgl_WebMap', () => {
516
482
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 120.63222224999998 , 30.389530096727963 ) ) ;
517
483
expect ( datavizWebmap . mapParams . title ) . toBe ( 'Heat' ) ;
518
484
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
519
- datavizWebmap . map = null ;
520
- datavizWebmap = null ;
521
485
done ( ) ;
522
486
} , 1000 )
523
487
} ) ;
@@ -547,8 +511,6 @@ describe('mapboxgl_WebMap', () => {
547
511
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 8.437500000000002 , - 7.710991655433243 ) ) ;
548
512
expect ( datavizWebmap . mapParams . title ) . toBe ( '标注图层' ) ;
549
513
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
550
- datavizWebmap . map = null ;
551
- datavizWebmap = null ;
552
514
done ( ) ;
553
515
} , 1000 )
554
516
} ) ;
@@ -582,8 +544,6 @@ describe('mapboxgl_WebMap', () => {
582
544
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 116.46675928388001 , 40.15816517545865 ) ) ;
583
545
expect ( datavizWebmap . mapParams . title ) . toBe ( 'RestMap' ) ;
584
546
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
585
- datavizWebmap . map = null ;
586
- datavizWebmap = null ;
587
547
done ( ) ;
588
548
} , 1000 )
589
549
} ) ;
@@ -612,8 +572,6 @@ describe('mapboxgl_WebMap', () => {
612
572
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 116.872606854085 , 40.11626853496025 ) ) ;
613
573
expect ( datavizWebmap . mapParams . title ) . toBe ( 'RestMap' ) ;
614
574
expect ( datavizWebmap . mapParams . description ) . toBe ( 'restMap from jingjin' ) ;
615
- datavizWebmap . map = null ;
616
- datavizWebmap = null ;
617
575
done ( ) ;
618
576
} , 1000 )
619
577
} ) ;
@@ -647,8 +605,6 @@ describe('mapboxgl_WebMap', () => {
647
605
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 116.8995771532053 , 39.700527641334965 ) ) ;
648
606
expect ( datavizWebmap . mapParams . title ) . toBe ( 'RestData' ) ;
649
607
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
650
- datavizWebmap . map = null ;
651
- datavizWebmap = null ;
652
608
done ( ) ;
653
609
} , 1000 )
654
610
} ) ;
@@ -677,8 +633,6 @@ describe('mapboxgl_WebMap', () => {
677
633
expect ( map . getCenter ( ) ) . toEqual ( new mapboxgl . LngLat ( 0 , 0 ) ) ;
678
634
expect ( datavizWebmap . mapParams . title ) . toBe ( 'wms' ) ;
679
635
expect ( datavizWebmap . mapParams . description ) . toBe ( '' ) ;
680
- datavizWebmap . map = null ;
681
- datavizWebmap = null ;
682
636
done ( ) ;
683
637
} , 1000 )
684
638
} ) ;
@@ -711,8 +665,6 @@ describe('mapboxgl_WebMap', () => {
711
665
datavizWebmap . _changeWeight ( features , 'field' ) ;
712
666
// expect(feature.get('weight')).toBe(1);
713
667
done ( ) ;
714
- datavizWebmap . map = null ;
715
- datavizWebmap = null ;
716
668
} , 1000 )
717
669
} ) ;
718
670
@@ -747,8 +699,6 @@ describe('mapboxgl_WebMap', () => {
747
699
datavizWebmap . _getRangeStyleGroup ( JSON . parse ( params ) , features ) ;
748
700
expect ( ArrayStatistic . getArraySegments ) . toHaveBeenCalled ( ) ;
749
701
done ( ) ;
750
- datavizWebmap . map = null ;
751
- datavizWebmap = null ;
752
702
} , 1000 )
753
703
} ) ;
754
704
@@ -771,8 +721,6 @@ describe('mapboxgl_WebMap', () => {
771
721
expect ( datavizWebmap . _dashStyle ( style [ 3 ] ) . length ) . toBe ( 2 ) ;
772
722
expect ( datavizWebmap . _dashStyle ( style [ 5 ] ) . length ) . toBe ( 2 ) ;
773
723
expect ( datavizWebmap . _dashStyle ( style [ 6 ] ) . length ) . toBe ( 4 ) ;
774
- datavizWebmap . map = null ;
775
- datavizWebmap = null ;
776
724
done ( ) ;
777
725
} )
778
726
it ( 'vector_svg' , ( done ) => {
@@ -807,12 +755,9 @@ describe('mapboxgl_WebMap', () => {
807
755
} )
808
756
} )
809
757
setTimeout ( ( ) => {
810
-
811
758
expect ( datavizWebmap . credentialKey ) . toBeUndefined ( ) ;
812
759
expect ( datavizWebmap . credentialValue ) . toBeUndefined ( ) ;
813
- done ( ) ;
814
- datavizWebmap . map = null ;
815
- datavizWebmap = null ;
760
+ done ( ) ;
816
761
} , 1000 )
817
762
} )
818
763
it ( 'vector_symbol' , ( done ) => {
@@ -834,9 +779,7 @@ describe('mapboxgl_WebMap', () => {
834
779
835
780
expect ( datavizWebmap . credentialKey ) . toBeUndefined ( ) ;
836
781
expect ( datavizWebmap . credentialValue ) . toBeUndefined ( ) ;
837
- done ( ) ;
838
- datavizWebmap . map = null ;
839
- datavizWebmap = null ;
782
+ done ( ) ;
840
783
} , 1000 )
841
784
} )
842
785
it ( '_getFiterFeatures' , ( done ) => {
@@ -858,8 +801,6 @@ describe('mapboxgl_WebMap', () => {
858
801
859
802
expect ( datavizWebmap . credentialKey ) . toBeUndefined ( ) ;
860
803
expect ( datavizWebmap . credentialValue ) . toBeUndefined ( ) ;
861
- datavizWebmap . map = null ;
862
- datavizWebmap = null ;
863
804
done ( ) ;
864
805
} , 1000 )
865
806
} )
@@ -881,8 +822,6 @@ describe('mapboxgl_WebMap', () => {
881
822
setTimeout ( ( ) => {
882
823
expect ( datavizWebmap . credentialKey ) . toBeUndefined ( ) ;
883
824
expect ( datavizWebmap . credentialValue ) . toBeUndefined ( ) ;
884
- datavizWebmap . map = null ;
885
- datavizWebmap = null ;
886
825
done ( ) ;
887
826
} , 1000 )
888
827
} )
0 commit comments