@@ -115,7 +115,10 @@ export class DeckglLayer {
115115 if ( map . getCRS && map . getCRS ( ) !== mapboxgl . CRS . EPSG3857 ) {
116116 this . coordinateSystem = 3 ;
117117 this . isGeographicCoordinateSystem = true ;
118- }
118+ } else {
119+ this . coordinateSystem = 1 ;
120+ this . isGeographicCoordinateSystem = false ;
121+ }
119122 //创建图层容器
120123 this . _initContainer ( ) ;
121124
@@ -340,6 +343,9 @@ export class DeckglLayer {
340343 if ( map . getCRS && map . getCRS ( ) !== mapboxgl . CRS . EPSG3857 ) {
341344 state . coordinateSystem = this . coordinateSystem ;
342345 state . isGeographicCoordinateSystem = this . isGeographicCoordinateSystem ;
346+ } else {
347+ state . coordinateSystem = 1 ;
348+ state . isGeographicCoordinateSystem = false
343349 }
344350
345351 //更行数据
@@ -397,7 +403,7 @@ export class DeckglLayer {
397403 var me = this ;
398404 this . props . getPosition = this . callback . getPosition
399405 ? this . callback . getPosition
400- : function ( point ) {
406+ : function ( point ) {
401407 if ( ! point ) {
402408 return [ 0 , 0 , 0 ] ;
403409 }
@@ -407,7 +413,7 @@ export class DeckglLayer {
407413 if ( this . callback . getColor ) {
408414 this . props . getColor = this . callback . getColor
409415 ? this . callback . getColor
410- : function ( point ) {
416+ : function ( point ) {
411417 let style = point && point . getStyle ( ) ;
412418 return ( style && style . color ) || me . props . color ;
413419 } ;
@@ -416,7 +422,7 @@ export class DeckglLayer {
416422 if ( this . callback . getRadius ) {
417423 this . props . getRadius = this . callback . getRadius
418424 ? this . callback . getRadius
419- : function ( point ) {
425+ : function ( point ) {
420426 let style = point && point . getStyle ( ) ;
421427 return ( style && style . radius ) || me . props . radius ;
422428 } ;
@@ -441,7 +447,7 @@ export class DeckglLayer {
441447 _createPathLayer ( ) {
442448 this . props . getPath = this . callback . getPath
443449 ? this . callback . getPath
444- : function ( feature ) {
450+ : function ( feature ) {
445451 return feature . geometry . coordinates ;
446452 } ;
447453 //以下几个函数也可走默认值
@@ -465,7 +471,7 @@ export class DeckglLayer {
465471 _createPolygonLayer ( ) {
466472 this . props . getPolygon = this . callback . getPolygon
467473 ? this . callback . getPolygon
468- : function ( feature ) {
474+ : function ( feature ) {
469475 return feature . geometry . coordinates ;
470476 } ;
471477
@@ -496,7 +502,7 @@ export class DeckglLayer {
496502 //todo ArcLineLayer geojson coordinates数组中只能有一个线段
497503 this . props . getSourcePosition = this . callback . getSourcePosition
498504 ? this . callback . getSourcePosition
499- : function ( feature ) {
505+ : function ( feature ) {
500506 if ( ! feature ) {
501507 return [ 0 , 0 , 0 ] ;
502508 }
@@ -505,7 +511,7 @@ export class DeckglLayer {
505511 } ;
506512 this . props . getTargetPosition = this . callback . getTargetPosition
507513 ? this . callback . getTargetPosition
508- : function ( feature ) {
514+ : function ( feature ) {
509515 if ( ! feature ) {
510516 return [ 0 , 0 , 0 ] ;
511517 }
@@ -533,7 +539,7 @@ export class DeckglLayer {
533539 _createHexagonLayer ( ) {
534540 this . props . getPosition = this . callback . getPosition
535541 ? this . callback . getPosition
536- : function ( feature ) {
542+ : function ( feature ) {
537543 if ( ! feature ) {
538544 return [ 0 , 0 , 0 ] ;
539545 }
0 commit comments