|
楼主 |
发表于 2022-6-17 08:44:46
|
显示全部楼层
本帖最后由 tzbm123456 于 2022-6-29 23:06 编辑
Polygon:
1、hierarchy
2、height
3、stRotaion
4、material
5、show
6、classificationType
>案例:
var polygonEnt= viewer.entities.add({ //添加一个实体,仅需要传递一个简单JSON对象,返回值是一个Entity对象
name : 'Polygon',
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray([//一组地理坐标
-109.080842,45.002073,
-105.91517,45.002073,
-104.058488,44.996596,
-104.053011,43.002989,
-104.053011,41.003906,
-105.728954,40.998429,
-107.919731,41.003906,
-109.04798,40.998429,
-111.047063,40.998429,
-111.047063,42.000709,
-111.047063,44.476286,
-111.05254,45.002073]),
fill : false,
material : Cesium.Color.RED.withAlpha(1.0), //材质
outline : true, //是否显示轮廓
outlineColor : Cesium.Color.RED, //轮廓的颜色
outlineWidth : 1.0,
}
});
|
|