描述
Rectangle
.
矩形符合地球仪的曲率,可以放置在表面上或
在高度处,并且可以选择将其拉伸到体积中。
Name | Type | Description |
---|---|---|
options |
RectangleGraphics.ConstructorOptions | optional 描述初始化选项的对象 |
Demo:
See:
Members
classificationType : Property|undefined
获取或设置
ClassificationType
指定此矩形在地面上时是分类地形、3D 瓦片还是两者的属性。
-
Default Value:
ClassificationType.BOTH
coordinates : Property|undefined
获取或设置指定
Rectangle
的属性。
readonly definitionChanged : Event
获取在更改或修改属性或子属性时引发的事件。
distanceDisplayCondition : Property|undefined
获取或设置
DistanceDisplayCondition
指定此矩形将在距摄像机多远处显示的属性。
extrudedHeight : Property|undefined
获取或设置numeric 指定矩形拉伸高度的属性。
设置此属性将创建从高度开始到此高度结束的体积。
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
获取或设置指定用于填充矩形的材料的属性。
-
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
rotation : Property|undefined
获取或设置numeric 属性指定矩形从北顺时针方向旋转。
-
Default Value:
0
shadows : Property|undefined
获取或设置 enum 属性,指定矩形是否
从光源投射或接收阴影。
-
Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置boolean 指定矩形可见性的属性。
-
Default Value:
true
stRotation : Property|undefined
获取或设置numeric 属性指定矩形纹理从北逆时针旋转。
-
Default Value:
0
zIndex : ConstantProperty|undefined
获取或设置指定矩形顺序的 zIndex 属性。 仅当矩形为 constant 且未指定 height 或 extrudedHeight 时才有效。
-
Default Value:
0
Methods
clone(result) → RectangleGraphics
复制instance.
Name | Type | Description |
---|---|---|
result |
RectangleGraphics | optional 要在其上存储结果的对象。 |
Returns:
修改后的结果参数或者一个新实例(如果未提供)。
将此对象上每个未分配的属性分配给值
的 API 值。
Name | Type | Description |
---|---|---|
source |
RectangleGraphics | 要合并到此对象中的对象。 |
Type Definitions
RectangleGraphics 构造函数的初始化选项
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
show |
Property | boolean |
<optional> |
true | 一个布尔属性,指定矩形的可见性。 |
coordinates |
Property | Rectangle |
<optional> |
指定 Rectangle 的属性。 |
|
height |
Property | number |
<optional> |
0 | 一个数字属性,指定矩形相对于椭球体表面的高度。 |
heightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 指定高度相对于什么的属性。 |
extrudedHeight |
Property | number |
<optional> |
一个数字属性,用于指定矩形的凸出面相对于椭球体表面的高度。 | |
extrudedHeightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 指定 extrudedHeight 相对于什么的属性。 |
rotation |
Property | number |
<optional> |
0.0 | 一个数值属性,指定矩形从北顺时针方向旋转。 |
stRotation |
Property | number |
<optional> |
0.0 | 一个数值属性,指定矩形纹理从北逆时针旋转。 |
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 | 指定轮廓宽度的数字属性。 |
shadows |
Property | ShadowMode |
<optional> |
ShadowMode.DISABLED | 一个枚举属性,指定矩形是投射还是接收来自光源的阴影。 |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<optional> |
一个属性,指定在距相机多远处显示此矩形。 | |
classificationType |
Property | ClassificationType |
<optional> |
ClassificationType.BOTH | 一个枚举属性,指定此矩形在地面上时是分类地形、3D 瓦片,还是两者兼而有之。 |
zIndex |
Property | number |
<optional> |
0 | 指定用于对地面几何图形进行排序的 zIndex 的属性。 仅当矩形为 constant 且未指定 height 或 extrudedHeight 时才有效。 |