描述由构成外部形状和任何嵌套孔的线性环层次结构定义的多边形。
多边形符合地球的曲率,可以放置在表面或
在高度处,并且可以选择将其拉伸到体积中。
Name | Type | Description |
---|---|---|
options |
PolygonGraphics.ConstructorOptions | optional 描述初始化选项的对象 |
Demo:
See:
Members
arcType : Property|undefined
获取或设置
ArcType
指定多边形边使用的线条类型的属性。
-
Default Value:
ArcType.GEODESIC
classificationType : Property|undefined
获取或设置
ClassificationType
属性指定此多边形在地面上时是分类地形、3D 瓦片还是两者。
-
Default Value:
ClassificationType.BOTH
closeBottom : Property|undefined
获取或设置一个布尔值,用于指定是否包含挤出多边形的底部。
closeTop : Property|undefined
获取或设置一个布尔值,用于指定是否包含拉伸多边形的顶部。
readonly definitionChanged : Event
获取在更改或修改属性或子属性时引发的事件。
distanceDisplayCondition : Property|undefined
获取或设置
DistanceDisplayCondition
属性指定此多边形将在距摄像机多远处显示。
extrudedHeight : Property|undefined
获取或设置numeric 指定多边形拉伸高度的属性。
如果
PolygonGraphics#perPositionHeight
为 false,则体积从 PolygonGraphics#height
开始,到此高度结束。
如果 PolygonGraphics#perPositionHeight
为 true,则体积从每个 PolygonGraphics#hierarchy
位置的高度开始,并在此高度结束。
extrudedHeightReference : Property|undefined
获取或设置指定拉伸
HeightReference
的属性。
-
Default Value:
HeightReference.NONE
fill : Property|undefined
获取或设置boolean 属性,指定是否使用提供的材质填充多边形。
-
Default Value:
true
granularity : Property|undefined
获取或设置numeric 属性,用于指定多边形上点之间的角度距离。
-
Default Value:
{CesiumMath.RADIANS_PER_DEGREE}
height : Property|undefined
获取或设置numeric 指定多边形的恒定高度的属性。
-
Default Value:
0.0
heightReference : Property|undefined
获取或设置指定
HeightReference
的属性。
-
Default Value:
HeightReference.NONE
hierarchy : Property|undefined
获取或设置指定
PolygonHierarchy
的属性。
获取或设置指定用于填充多边形的材料的属性。
-
Default Value:
Color.WHITE
outline : Property|undefined
获取或设置指定是否对多边形进行轮廓划分的属性。
-
Default Value:
false
outlineColor : Property|undefined
获取或设置指定轮廓的
Color
的属性。
-
Default Value:
Color.BLACK
outlineWidth : Property|undefined
获取或设置numeric 指定轮廓宽度的属性。
Note: 在 Windows 平台上的所有主要浏览器上都将忽略此属性。有关详细信息, see (@link https://github.com/CesiumGS/cesium/issues/40}.
-
Default Value:
1.0
perPositionHeight : Property|undefined
获取或设置boolean 指定是否使用每个位置的高度。
如果为 true,则形状将具有由每个
PolygonGraphics#hierarchy
位置的高度定义的非均匀高度。
如果为 false,则形状将具有由 PolygonGraphics#height
指定的恒定高度。
shadows : Property|undefined
获取或设置 enum 属性,指定多边形
从光源投射或接收阴影。
-
Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置boolean 指定多边形可见性的属性。
-
Default Value:
true
stRotation : Property|undefined
获取或设置numeric 属性指定多边形纹理从北逆时针旋转。仅在未定义 textureCoordinates 时有效。
-
Default Value:
0
textureCoordinates : Property|undefined
将纹理坐标指定为
Cartesian2
点的 PolygonHierarchy
的属性。对 Ground Primitives 没有影响。
zIndex : ConstantProperty|undefined
获取或设置zIndex Prperty 指定地面几何的顺序。 仅当多边形为 constant 且未指定 height 或 extrudedHeight 时才有效。
-
Default Value:
0
Methods
clone(result) → PolygonGraphics
复制实例。
Name | Type | Description |
---|---|---|
result |
PolygonGraphics | optional 要在其上存储结果的对象。 |
Returns:
修改后的结果参数或者一个新实例(如果未提供)。
将此对象上的每个未分配的属性分配给值
的 API 值。
Name | Type | Description |
---|---|---|
source |
PolygonGraphics | 要合并到此对象中的对象。 |
Type Definitions
PolygonGraphics 构造函数的初始化选项
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
show |
Property | boolean |
<optional> |
true | 指定多边形可见性的布尔属性。 |
hierarchy |
Property | PolygonHierarchy | Array.<Cartesian3> |
<optional> |
指定 PolygonHierarchy 的属性。 |
|
height |
Property | number |
<optional> |
0 | 一个数字属性,指定多边形相对于椭球体表面的高度。 |
heightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 指定高度相对于什么的属性。 |
extrudedHeight |
Property | number |
<optional> |
一个数值属性,用于指定多边形的凸出面相对于椭球体表面的高度。 | |
extrudedHeightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 指定 extrudedHeight 相对于什么的属性。 |
stRotation |
Property | number |
<optional> |
0.0 | 一个数值属性,指定多边形纹理从北逆时针旋转。仅在未定义 textureCoordinates 时有效。 |
granularity |
Property | number |
<optional> |
Cesium.Math.RADIANS_PER_DEGREE | 一个数字属性,指定每个纬度和经度点之间的角度距离。 |
fill |
Property | boolean |
<optional> |
true | 一个布尔属性,指定多边形是否使用提供的材质填充。 |
material |
MaterialProperty | Color |
<optional> |
Color.WHITE | 指定用于填充多边形的材质的属性。 |
outline |
Property | boolean |
<optional> |
false | 一个布尔属性,指定是否对多边形进行轮廓划分。 |
outlineColor |
Property | Color |
<optional> |
Color.BLACK | 指定轮廓的 Color 的属性。 |
outlineWidth |
Property | number |
<optional> |
1.0 | 指定轮廓宽度的数字属性。 |
perPositionHeight |
Property | boolean |
<optional> |
false | 一个布尔值,指定是否使用每个位置的高度。 |
closeTop |
boolean | boolean |
<optional> |
true | 如果为 false,则挤出多边形的顶部保持打开状态。 |
closeBottom |
boolean | boolean |
<optional> |
true | 当为 false 时,挤出多边形的底部保持开放状态。 |
arcType |
Property | ArcType |
<optional> |
ArcType.GEODESIC | 多边形边缘必须遵循的线类型。 |
shadows |
Property | ShadowMode |
<optional> |
ShadowMode.DISABLED | 一个枚举属性,指定多边形是投射还是接收来自光源的阴影。 |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<optional> |
一个属性,指定在距摄像机多远处显示此多边形。 | |
classificationType |
Property | ClassificationType |
<optional> |
ClassificationType.BOTH | 一个枚举属性,指定此多边形在地面上时是分类地形、3D 瓦片,还是两者兼而有之。 |
zIndex |
ConstantProperty | number |
<optional> |
0 | 一个属性,用于指定用于对地面几何体进行排序的 zIndex。 仅当多边形为 constant 且未指定 height 或 extrudedHeight 时才有效。 |
textureCoordinates |
Property | PolygonHierarchy |
<optional> |
一个属性,将纹理坐标指定为 Cartesian2 点的 PolygonHierarchy 。对 Ground Primitives 没有影响。 |