二维样式受高程影响显示异常

遇到个问题,二维样式在三维下,显示异常:显示不全,样式随地图拖拽会闪烁、变化。如下图:

image-20200814105022173

image-20200814105110911

代码中symbol设置:

1
2
3
4
5
6
7
8
9
var symbol = {
type: "simple-fill", // autocasts as new SimpleFillSymbol()
color: [ 51,51, 204, 0.9 ],
style: "solid",
outline: { // autocasts as new SimpleLineSymbol()
color: "white",
width: 1
}
};

问题原因及解决方法:

受到高程影响,导致部分面要素被遮盖。

设置FeatureLayerelevationInfo属性:

1
2
3
4
5
6
const layer = new FeatureLayer({
...,
elevationInfo: {
mode: "on-the-ground"
},
});
posted @ 2021-03-18 19:37  李海家  阅读(64)  评论(0编辑  收藏  举报