实现的思路是面带洞,添加两个半圆polygon覆盖整个地球,在有需要突出提亮部分的polygon中使用holes属性挖空,最后添加polyline高亮边界范围。
addMasker(viewer) {
var point = [];
//point数组中放你自己提亮范围的边界经纬度
for (let i = 0; i < Test.features[0].geometry.coordinates[0][0].length; i++) {
point = point.concat(Test.features[0].geometry.coordinates[0][0][i]);
}
var hole = Cesium.Cartesian3.fromDegreesArray(point); //地球需要高亮突出的边界坐标
//新建dataSources
var dataSource = new Cesium.CustomDataSource("inverseShade");
viewer.dataSources.add(dataSource);
dataSource.entities.add({
polygon: {
hierarchy: {
//左下左上右上右下
// 对应经纬度[-0,60],[-0,-60],[-180,-60],[-180,60],[-0,60]
positions: [
{
x: 3197104.586923899,
y: -0.5580000157243585,
z: 5500477.1339386385,
},
{


4071

被折叠的 条评论
为什么被折叠?



