@@ -115,7 +115,10 @@ export class DeckglLayer {
115
115
if ( map . getCRS && map . getCRS ( ) !== mapboxgl . CRS . EPSG3857 ) {
116
116
this . coordinateSystem = 3 ;
117
117
this . isGeographicCoordinateSystem = true ;
118
- }
118
+ } else {
119
+ this . coordinateSystem = 1 ;
120
+ this . isGeographicCoordinateSystem = false ;
121
+ }
119
122
//创建图层容器
120
123
this . _initContainer ( ) ;
121
124
@@ -340,6 +343,9 @@ export class DeckglLayer {
340
343
if ( map . getCRS && map . getCRS ( ) !== mapboxgl . CRS . EPSG3857 ) {
341
344
state . coordinateSystem = this . coordinateSystem ;
342
345
state . isGeographicCoordinateSystem = this . isGeographicCoordinateSystem ;
346
+ } else {
347
+ state . coordinateSystem = 1 ;
348
+ state . isGeographicCoordinateSystem = false
343
349
}
344
350
345
351
//更行数据
@@ -397,7 +403,7 @@ export class DeckglLayer {
397
403
var me = this ;
398
404
this . props . getPosition = this . callback . getPosition
399
405
? this . callback . getPosition
400
- : function ( point ) {
406
+ : function ( point ) {
401
407
if ( ! point ) {
402
408
return [ 0 , 0 , 0 ] ;
403
409
}
@@ -407,7 +413,7 @@ export class DeckglLayer {
407
413
if ( this . callback . getColor ) {
408
414
this . props . getColor = this . callback . getColor
409
415
? this . callback . getColor
410
- : function ( point ) {
416
+ : function ( point ) {
411
417
let style = point && point . getStyle ( ) ;
412
418
return ( style && style . color ) || me . props . color ;
413
419
} ;
@@ -416,7 +422,7 @@ export class DeckglLayer {
416
422
if ( this . callback . getRadius ) {
417
423
this . props . getRadius = this . callback . getRadius
418
424
? this . callback . getRadius
419
- : function ( point ) {
425
+ : function ( point ) {
420
426
let style = point && point . getStyle ( ) ;
421
427
return ( style && style . radius ) || me . props . radius ;
422
428
} ;
@@ -441,7 +447,7 @@ export class DeckglLayer {
441
447
_createPathLayer ( ) {
442
448
this . props . getPath = this . callback . getPath
443
449
? this . callback . getPath
444
- : function ( feature ) {
450
+ : function ( feature ) {
445
451
return feature . geometry . coordinates ;
446
452
} ;
447
453
//以下几个函数也可走默认值
@@ -465,7 +471,7 @@ export class DeckglLayer {
465
471
_createPolygonLayer ( ) {
466
472
this . props . getPolygon = this . callback . getPolygon
467
473
? this . callback . getPolygon
468
- : function ( feature ) {
474
+ : function ( feature ) {
469
475
return feature . geometry . coordinates ;
470
476
} ;
471
477
@@ -496,7 +502,7 @@ export class DeckglLayer {
496
502
//todo ArcLineLayer geojson coordinates数组中只能有一个线段
497
503
this . props . getSourcePosition = this . callback . getSourcePosition
498
504
? this . callback . getSourcePosition
499
- : function ( feature ) {
505
+ : function ( feature ) {
500
506
if ( ! feature ) {
501
507
return [ 0 , 0 , 0 ] ;
502
508
}
@@ -505,7 +511,7 @@ export class DeckglLayer {
505
511
} ;
506
512
this . props . getTargetPosition = this . callback . getTargetPosition
507
513
? this . callback . getTargetPosition
508
- : function ( feature ) {
514
+ : function ( feature ) {
509
515
if ( ! feature ) {
510
516
return [ 0 , 0 , 0 ] ;
511
517
}
@@ -533,7 +539,7 @@ export class DeckglLayer {
533
539
_createHexagonLayer ( ) {
534
540
this . props . getPosition = this . callback . getPosition
535
541
? this . callback . getPosition
536
- : function ( feature ) {
542
+ : function ( feature ) {
537
543
if ( ! feature ) {
538
544
return [ 0 , 0 , 0 ] ;
539
545
}
0 commit comments