8000 Merge branch 'master' of https://github.com.cnpmjs.org/SuperMap/iClie… · SuperMap/iClient-JavaScript@ebde523 · GitHub
[go: up one dir, main page]

Skip to content

Commit ebde523

Browse files
2 parents 3b367cf + 3527547 commit ebde523

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

examples/mapboxgl/deckglLayer_pathLayer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@
7777
data: features,
7878
props: {
7979
widthScale: 20, //线宽比例
80-
widthMinPixels: 2 //线宽最小像素值
80+
widthMinPixels: 2, //线宽最小像素值
81+
fp64:true // 以高精度64位模式呈现图层
8182
//该类型可配置的其他参数有:
8283
//widthMaxPixels 线宽最大像素值,默认为 Number.MAX_SAFE_INTEGER;
8384
//rounded 节点是否绘制为弧形,可选参数,默认为 false;
8485
//miterLimit 节点相对于线宽的最大范围,默认为 4,仅在 rounded 为 false 时有效;
85-
//fp64 否应以高精度64位模式呈现图层,默认为 false;
8686
//dashJustified 是否虚线形式显示,默认为 false,仅在 getDashArray() 回调函数被指定时有效;
8787
},
8888
callback: {

src/mapboxgl/overlay/DeckglLayer.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)
0