@@ -464,7 +464,7 @@ describe('Map.Camera', function () {
464464 expect ( map . getCenter ( ) . y ) . to . be . eql ( 0 ) ;
465465 expect ( map . getPitch ( ) ) . to . be . eql ( 0 ) ;
466466 expect ( map . getBearing ( ) ) . to . be . eql ( 0 ) ;
467- expect ( map . getZoom ( ) ) . to . be . within ( 8 , 9 ) ;
467+ expect ( map . getZoom ( ) ) . to . be . within ( 9 , 10 ) ;
468468 } ) ;
469469
470470 it ( 'pitch 45, bearing 45' , function ( ) {
@@ -473,11 +473,11 @@ describe('Map.Camera', function () {
473473 pitch : 45 ,
474474 bearing : 45 ,
475475 } )
476- expect ( map . getCenter ( ) . x ) . to . be . within ( 0.07 , 0.08 ) ;
477- expect ( map . getCenter ( ) . y ) . to . be . within ( 0.07 , 0.08 ) ;
476+ expect ( map . getCenter ( ) . x ) . to . be . within ( 0.08 , 0.09 ) ;
477+ expect ( map . getCenter ( ) . y ) . to . be . within ( 0.08 , 0.09 ) ;
478478 expect ( map . getPitch ( ) ) . to . be . eql ( 45 ) ;
479479 expect ( map . getBearing ( ) ) . to . be . eql ( 45 ) ;
480- expect ( map . getZoom ( ) ) . to . be . within ( 7 , 8 ) ;
480+ expect ( map . getZoom ( ) ) . to . be . within ( 8 , 9 ) ;
481481 } ) ;
482482
483483 it ( 'pitch 45, bearing 135' , function ( ) {
@@ -486,11 +486,11 @@ describe('Map.Camera', function () {
486486 pitch : 45 ,
487487 bearing : 135 ,
488488 } )
489- expect ( map . getCenter ( ) . x ) . to . be . within ( 0.07 , 0.08 ) ;
490- expect ( map . getCenter ( ) . y ) . to . be . within ( - 0.08 , 0.07 ) ;
489+ expect ( map . getCenter ( ) . x ) . to . be . within ( 0.08 , 0.09 ) ;
490+ expect ( map . getCenter ( ) . y ) . to . be . within ( - 0.09 , - 0.08 ) ;
491491 expect ( map . getPitch ( ) ) . to . be . eql ( 45 ) ;
492492 expect ( map . getBearing ( ) ) . to . be . eql ( 135 ) ;
493- expect ( map . getZoom ( ) ) . to . be . within ( 7 , 8 ) ;
493+ expect ( map . getZoom ( ) ) . to . be . within ( 8 , 9 ) ;
494494 } ) ;
495495
496496 it ( 'pitch 45, bearing -45' , function ( ) {
@@ -499,11 +499,11 @@ describe('Map.Camera', function () {
499499 pitch : 45 ,
500500 bearing : - 45 ,
501501 } )
502- expect ( map . getCenter ( ) . x ) . to . be . within ( - 0.08 , 0.07 ) ;
503- expect ( map . getCenter ( ) . y ) . to . be . within ( 0.07 , 0.08 ) ;
502+ expect ( map . getCenter ( ) . x ) . to . be . within ( - 0.09 , - 0.08 ) ;
503+ expect ( map . getCenter ( ) . y ) . to . be . within ( 0.08 , 0.09 ) ;
504504 expect ( map . getPitch ( ) ) . to . be . eql ( 45 ) ;
505505 expect ( map . getBearing ( ) ) . to . be . eql ( - 45 ) ;
506- expect ( map . getZoom ( ) ) . to . be . within ( 7 , 8 ) ;
506+ expect ( map . getZoom ( ) ) . to . be . within ( 8 , 9 ) ;
507507 } ) ;
508508
509509 it ( 'pitch 45, bearing -135' , function ( ) {
@@ -512,11 +512,11 @@ describe('Map.Camera', function () {
512512 pitch : 45 ,
513513 bearing : - 135 ,
514514 } )
515- expect ( map . getCenter ( ) . x ) . to . be . within ( - 0.08 , - 0.07 ) ;
516- expect ( map . getCenter ( ) . y ) . to . be . within ( - 0.08 , - 0.07 ) ;
515+ expect ( map . getCenter ( ) . x ) . to . be . within ( - 0.09 , - 0.08 ) ;
516+ expect ( map . getCenter ( ) . y ) . to . be . within ( - 0.09 , - 0.08 ) ;
517517 expect ( map . getPitch ( ) ) . to . be . eql ( 45 ) ;
518518 expect ( map . getBearing ( ) ) . to . be . eql ( - 135 ) ;
519- expect ( map . getZoom ( ) ) . to . be . within ( 7 , 8 ) ;
519+ expect ( map . getZoom ( ) ) . to . be . within ( 8 , 9 ) ;
520520 } ) ;
521521
522522 it ( 'position z' , function ( ) {
@@ -529,7 +529,7 @@ describe('Map.Camera', function () {
529529 expect ( map . getCenter ( ) . y ) . to . be . eql ( 0 ) ;
530530 expect ( map . getPitch ( ) ) . to . be . eql ( 0 ) ;
531531 expect ( map . getBearing ( ) ) . to . be . eql ( 0 ) ;
532- expect ( map . getZoom ( ) ) . to . be . within ( 14 , 15 ) ;
532+ expect ( map . getZoom ( ) ) . to . be . within ( 15 , 16 ) ;
533533 } ) ;
534534
535535 it ( 'map.lookAt' , function ( ) {
@@ -669,7 +669,7 @@ describe('Map.Camera', function () {
669669 map . setPitch ( 75 ) ;
670670 map . setBearing ( 45 ) ;
671671 // expect(maptalks.Util.join(map.domCssMatrix)).to.be.eql([31.819805153394643, -8.235571585149868, 0.7139488752261732, 0.6830127018922193, 31.819805153394636, 8.23557158514987, -0.7139488752261733, -0.6830127018922194, 0, -43.466662183008076, -0.27054191763364316, -0.25881904510252074, 0, 0, 46.83368719036461, 45].join());
672- expect ( maptalks . Util . join ( map . domCssMatrix ) ) . to . be . eql ( [ 31.819805153394643 , - 8.235571585149868 , 0.6834126770126959 , 0.6830127018922193 , 31.819805153394636 , 8.23557158514987 , - 0.683412677012696 , - 0.6830127018922194 , 0 , - 43.466662183008076 , - 0.2589706106275245 , - 0.25881904510252074 , 0 , 0 , 44.956019102246906 , 45 ] . join ( ) ) ;
672+ expect ( maptalks . Util . join ( map . domCssMatrix ) ) . to . be . eql ( [ 31.819805153394643 , - 8.235571585149868 , 0.6833747672629105 , 0.6830127018922193 , 31.819805153394636 , 8.23557158514987 , - 0.6833747672629105 , - 0.6830127018922194 , 0 , - 43.466662183008076 , - 0.25895624520618993 , - 0.25881904510252074 , 0 , 0 , 44.9535233858847 , 45 ] . join ( ) ) ;
673673 } ) ;
674674
675675 it ( 'setCameraPosition' , function ( ) {
@@ -679,9 +679,9 @@ describe('Map.Camera', function () {
679679 const zoom = map . getZoom ( ) ;
680680 const pitch = map . getPitch ( ) ;
681681 const bearing = map . getBearing ( ) ;
682- expect ( zoom ) . to . be . eql ( 14.899641034986649 ) ;
683- expect ( pitch ) . to . be . eql ( 85.67228588474566 ) ;
684- expect ( bearing ) . to . be . eql ( 139.8095157874954 ) ;
682+ expect ( zoom . toFixed ( 3 ) ) . to . be . eql ( 15.785 ) ;
683+ expect ( pitch . toFixed ( 1 ) ) . to . be . eql ( 85.7 ) ;
684+ expect ( bearing . toFixed ( 1 ) ) . to . be . eql ( 139.8 ) ;
685685 } ) ;
686686} ) ;
687687
0 commit comments