【mars3d】new mars3d.layer.GeoJsonLayer({实现多孔面遮罩mask: true,

【mars3d】new mars3d.layer.GeoJsonLayer({实现多孔面遮罩

官网测试示例:

1.功能示例(Vue版) | Mars3D三维可视化平台 | 火星科技

测试代码:

export function showDraw(isFlyTo) {

removeLayer()

const geoJsonLayer = new mars3d.layer.GeoJsonLayer({

data: {

type: "FeatureCollection",

features: [

{

type: "Feature",

properties: {},

geometry: {

type: "MultiPolygon",

coordinates: [

\[ \[116.572718, 32.038626, 14.4\], \[118.079673, 31.18226, 11.2\], \[116.932438, 30.87228, 4.2\], \[116.362336, 31.417173, 148.8

]

],

\[ \[117.788689, 32.729397, -585\], \[118.825616, 31.834101, -742.5\], \[119.59371, 32.769803, -455.4\], \[118.600367, 33.462162, -599.5

]

]

]

}

}

]

},

mask: true, // 标识为遮罩层【重点参数】

symbol: {

styleOptions: {

fill: true,

color: "rgb(2,26,79)",

opacity: 0.9,

outline: true,

outlineColor: "#39E09B",

outlineWidth: 8,

outlineOpacity: 0.8,

arcType: Cesium.ArcType.GEODESIC,

clampToGround: true

}

}

// flyTo: true

})

map.addLayer(geoJsonLayer)

}

测试效果:

相关推荐
Code_Solitude16 小时前
c语言:二分法的完整补充
c语言·开发语言·算法
智鸟科技GemeOpen开发者智能设备16 小时前
MQTT智能通断器GSCW1M2P · 开发者实战指南
开发语言·物联网·智能家居
青柠之夏cc17 小时前
前端拖拽功能原生实现,不引入拖拽库完成业务
开发语言·前端·python
ym hyd 11117 小时前
题库建立与考试系统源码 Java+SpringBoot+Vue3 前后分离
java·开发语言·vue.js·spring boot·毕设
OKkankan17 小时前
Python 高阶语法(一):高阶函数、闭包、lambda 与 functools——从底层真正理解装饰器
开发语言·python
geovindu17 小时前
rust: Facade Pattern
开发语言·后端·设计模式·rust·外观模式
liangshanbo121517 小时前
前端大文件切片上传怎么做?
前端
福大大架构师每日一题18 小时前
Rust 1.99.0发布:C 可变参数、裸函数、Cargo 配置、Rustdoc 性能与大量兼容性调整全解析
c语言·开发语言·rust
智鸟科技GemeOpen开发者智能设备18 小时前
平安校园 AI 智能实时告警系统 智鸟科技·GemeOpen + 谷华科技·融合创新方案白皮书
java·开发语言·python·物联网·智能家居
Wang's Blog18 小时前
Java框架 SpringCloud 快速入门: Feign 的自定义配置与日志级别
java·开发语言·spring cloud