描述由构成外部形状和任何嵌套孔的线性环层次结构定义的多边形。多边形符合地球的曲率,可以放置在表面或高空,并且可以选择挤压成体积。 Describes a polygon defined by an hierarchy of linear rings which make up the outer shape and any nested holes. The polygon conforms to the curvature of the globe and can be placed on the surface or at altitude and can optionally be extruded into a volume.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
options |
PolygonGraphics.ConstructorOptions | 可选 optional 描述初始化选项的对象 Object describing initialization options |
演示: Demo:
另见: See:
成员 Members
arcType : Property|undefined
获取或设置 Gets or sets the
ArcType 指定多边形边使用的线类型的属性。 Property specifying the type of lines the polygon edges use.
-
默认值: Default Value:
ArcType.GEODESIC
classificationType : Property|undefined
获取或设置 Gets or sets the
ClassificationType 指定此多边形在地面上时是否对地形、3D 切片或两者进行分类的属性。 Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground.
-
默认值: Default Value:
ClassificationType.BOTH
closeBottom : Property|undefined
获取或设置一个布尔值,指定是否包含拉伸多边形的底部。 Gets or sets a boolean specifying whether or not the bottom of an extruded polygon is included.
closeTop : Property|undefined
获取或设置一个布尔值,指定是否包含拉伸多边形的顶部。 Gets or sets a boolean specifying whether or not the top of an extruded polygon is included.
readonly definitionChanged : Event
获取每当更改或修改属性或子属性时引发的事件。 Gets the event that is raised whenever a property or sub-property is changed or modified.
distanceDisplayCondition : Property|undefined
获取或设置 Gets or sets the
DistanceDisplayCondition 属性指定该多边形将在距相机的距离处显示。 Property specifying at what distance from the camera that this polygon will be displayed.
extrudedHeight : Property|undefined
获取或设置指定多边形拉伸高度的数值属性。如果 Gets or sets the numeric Property specifying the altitude of the polygon extrusion. If
PolygonGraphics#perPositionHeight 为 false,音量开始于 is false, the volume starts at PolygonGraphics#height 并在此高度结束。如果 and ends at this altitude. If PolygonGraphics#perPositionHeight 为真,体积从每个的高度开始 is true, the volume starts at the height of each PolygonGraphics#hierarchy 位置并在此高度结束。 position and ends at this altitude.
extrudedHeightReference : Property|undefined
获取或设置指定拉伸的属性 Gets or sets the Property specifying the extruded
HeightReference.
-
默认值: Default Value:
HeightReference.NONE
fill : Property|undefined
获取或设置布尔属性,指定多边形是否用提供的材质填充。 Gets or sets the boolean Property specifying whether the polygon is filled with the provided material.
-
默认值: Default Value:
true
granularity : Property|undefined
获取或设置指定多边形上点之间的角距离的数值属性。 Gets or sets the numeric Property specifying the angular distance between points on the polygon.
-
默认值: Default Value:
{CesiumMath.RADIANS_PER_DEGREE}
height : Property|undefined
获取或设置指定多边形恒定高度的数值属性。 Gets or sets the numeric Property specifying the constant altitude of the polygon.
-
默认值: Default Value:
0.0
heightReference : Property|undefined
获取或设置指定的属性 Gets or sets the Property specifying the
HeightReference.
-
默认值: Default Value:
HeightReference.NONE
hierarchy : Property|undefined
获取或设置指定的属性 Gets or sets the Property specifying the
PolygonHierarchy.
获取或设置指定用于填充多边形的材质的属性。 Gets or sets the Property specifying the material used to fill the polygon.
-
默认值: Default Value:
Color.WHITE
outline : Property|undefined
获取或设置指定多边形是否为轮廓的属性。 Gets or sets the Property specifying whether the polygon is outlined.
-
默认值: Default Value:
false
outlineColor : Property|undefined
-
默认值: Default Value:
Color.BLACK
outlineWidth : Property|undefined
获取或设置指定轮廓宽度的数字属性。 Gets or sets the numeric Property specifying the width of the outline.
注意:此属性在 Windows 平台上的所有主要浏览器上都将被忽略。有关详细信息,请参阅(@link https://github.com/CesiumGS/cesium/issues/40}。 Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}.
-
默认值: Default Value:
1.0
perPositionHeight : Property|undefined
获取或设置指定是否使用每个位置的高度的布尔值。如果为真,则该形状将具有由每个形状的高度定义的不均匀高度 Gets or sets the boolean specifying whether or not the the height of each position is used. If true, the shape will have non-uniform altitude defined by the height of each
PolygonGraphics#hierarchy 位置。如果为 false,则该形状将具有由下式指定的恒定高度 position. If false, the shape will have a constant altitude as specified by PolygonGraphics#height.
shadows : Property|undefined
获取或设置枚举属性,指定多边形是否投射或接收来自光源的阴影。 Get or sets the enum Property specifying whether the polygon casts or receives shadows from light sources.
-
默认值: Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置指定多边形可见性的布尔属性。 Gets or sets the boolean Property specifying the visibility of the polygon.
-
默认值: Default Value:
true
stRotation : Property|undefined
获取或设置数字属性,指定多边形纹理从北逆时针旋转。仅当纹理坐标未定义时才有效。 Gets or sets the numeric property specifying the rotation of the polygon texture counter-clockwise from north. Only has an effect if textureCoordinates is not defined.
-
默认值: Default Value:
0
textureCoordinates : Property|undefined
将纹理坐标指定为的属性 A Property specifying texture coordinates as a
PolygonHierarchy of Cartesian2 点。对地面基元没有影响。 points. Has no effect for ground primitives.
zIndex : ConstantProperty|undefined
获取或设置指定地面几何体顺序的 zIndex 属性。仅当多边形恒定并且未指定高度或 extrudedHeight 时才有效。 Gets or sets the zIndex Prperty specifying the ordering of ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified.
-
默认值: Default Value:
0
方法 Methods
clone(result) → PolygonGraphics
复制此实例。 Duplicates this instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
PolygonGraphics | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新实例(如果未提供)。 The modified result parameter or a new instance if one was not provided.
将此对象上每个未分配的属性分配给所提供的源对象上相同属性的值。 Assigns each unassigned property on this object to the value of the same property on the provided source object.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
source |
PolygonGraphics | 要合并到此对象中的对象。 The object to be merged into this object. |
类型定义 Type Definitions
PolygonGraphics 构造函数的初始化选项 Initialization options for the PolygonGraphics constructor
属性: Properties:
| 名称 Name | 类型 Type | Attributes | 默认值 Default | 说明 Description |
|---|---|---|---|---|
show |
Property | boolean |
<可选> <optional> |
true | 指定多边形可见性的布尔属性。 A boolean Property specifying the visibility of the polygon. |
hierarchy |
Property | PolygonHierarchy | Array.<Cartesian3> |
<可选> <optional> |
指定的属性 A Property specifying the PolygonHierarchy. |
|
height |
Property | number |
<可选> <optional> |
0 | 一个数字属性,指定多边形相对于椭球面的高度。 A numeric Property specifying the altitude of the polygon relative to the ellipsoid surface. |
heightReference |
Property | HeightReference |
<可选> <optional> |
HeightReference.NONE | 指定高度相对值的属性。 A Property specifying what the height is relative to. |
extrudedHeight |
Property | number |
<可选> <optional> |
一个数字属性,指定多边形的拉伸面相对于椭球面的高度。 A numeric Property specifying the altitude of the polygon's extruded face relative to the ellipsoid surface. | |
extrudedHeightReference |
Property | HeightReference |
<可选> <optional> |
HeightReference.NONE | 指定 extrudedHeight 相对于什么的属性。 A Property specifying what the extrudedHeight is relative to. |
stRotation |
Property | number |
<可选> <optional> |
0.0 | 一个数字属性,指定多边形纹理从北逆时针旋转。仅当纹理坐标未定义时才有效。 A numeric property specifying the rotation of the polygon texture counter-clockwise from north. Only has an effect if textureCoordinates is not defined. |
granularity |
Property | number |
<可选> <optional> |
Cesium.Math.RADIANS_PER_DEGREE | 指定每个纬度和经度点之间的角距离的数字属性。 A numeric Property specifying the angular distance between each latitude and longitude point. |
fill |
Property | boolean |
<可选> <optional> |
true | 一个布尔属性,指定多边形是否用提供的材质填充。 A boolean Property specifying whether the polygon is filled with the provided material. |
material |
MaterialProperty | Color |
<可选> <optional> |
Color.WHITE | 指定用于填充多边形的材质的属性。 A Property specifying the material used to fill the polygon. |
outline |
Property | boolean |
<可选> <optional> |
false | 一个布尔属性,指定多边形是否有轮廓。 A boolean Property specifying whether the polygon is outlined. |
outlineColor |
Property | Color |
<可选> <optional> |
Color.BLACK | 指定的属性 A Property specifying the Color 的轮廓。 of the outline. |
outlineWidth |
Property | number |
<可选> <optional> |
1.0 | 指定轮廓宽度的数字属性。 A numeric Property specifying the width of the outline. |
perPositionHeight |
Property | boolean |
<可选> <optional> |
false | 一个布尔值,指定是否使用每个位置的高度。 A boolean specifying whether or not the height of each position is used. |
closeTop |
boolean | boolean |
<可选> <optional> |
true | 当为 false 时,使挤出多边形的顶部保持打开状态。 When false, leaves off the top of an extruded polygon open. |
closeBottom |
boolean | boolean |
<可选> <optional> |
true | 当为 false 时,使挤出多边形的底部保持打开状态。 When false, leaves off the bottom of an extruded polygon open. |
arcType |
Property | ArcType |
<可选> <optional> |
ArcType.GEODESIC | 多边形边必须遵循的线的类型。 The type of line the polygon edges must follow. |
shadows |
Property | ShadowMode |
<可选> <optional> |
ShadowMode.DISABLED | 一个枚举属性,指定多边形是否投射或接收来自光源的阴影。 An enum Property specifying whether the polygon casts or receives shadows from light sources. |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<可选> <optional> |
一个属性,指定该多边形将在距相机的距离处显示。 A Property specifying at what distance from the camera that this polygon will be displayed. | |
classificationType |
Property | ClassificationType |
<可选> <optional> |
ClassificationType.BOTH | 一个枚举属性,指定此多边形在地面上时是否对地形、3D 切片或两者进行分类。 An enum Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground. |
zIndex |
ConstantProperty | number |
<可选> <optional> |
0 | 指定用于排序地面几何体的 zIndex 的属性。仅当多边形恒定并且未指定高度或 extrudedHeight 时才有效。 A property specifying the zIndex used for ordering ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified. |
textureCoordinates |
Property | PolygonHierarchy |
<可选> <optional> |
将纹理坐标指定为的属性 A Property specifying texture coordinates as a PolygonHierarchy of Cartesian2 点。对地面基元没有影响。 points. Has no effect for ground primitives. |
