描述
Rectangle 的图形。
该矩形贴合地球的曲率,可以放置在地球表面或
一定高度处,并且可以选择性地拉伸为体积。
| Name | Type | Description |
|---|---|---|
options |
RectangleGraphics.ConstructorOptions | optional 描述初始化选项的对象。 |
Demo:
See:
Members
classificationType : Property|undefined
获取或设置
ClassificationType Property,指定当矩形位于地面时,是对地形、3D Tiles 还是两者进行分类。
-
Default Value:
ClassificationType.BOTH
coordinates : Property|undefined
获取或设置指定
Rectangle 的 Property。
readonly definitionChanged : Event
获取当任意 property 或子 property 被更改或修改时引发的事件。
distanceDisplayCondition : Property|undefined
获取或设置
DistanceDisplayCondition Property,指定距离相机多远时显示此矩形。
extrudedHeight : Property|undefined
获取或设置指定矩形拉伸高度的数值型 Property。
设置此 property 会创建从 height 开始、到此高度结束的体积。
extrudedHeightReference : Property|undefined
获取或设置指定拉伸
HeightReference 的 Property。
-
Default Value:
HeightReference.NONE
fill : Property|undefined
获取或设置布尔型 Property,指定矩形是否使用所提供的材质进行填充。
-
Default Value:
true
granularity : Property|undefined
获取或设置指定矩形上点之间角距离的数值型 Property。
-
Default Value:
{CesiumMath.RADIANS_PER_DEGREE}
height : Property|undefined
获取或设置指定矩形高度的数值型 Property。
-
Default Value:
0.0
heightReference : Property|undefined
获取或设置指定
HeightReference 的 Property。
-
Default Value:
HeightReference.NONE
获取或设置指定用于填充矩形的材质的 Property。
-
Default Value:
Color.WHITE
outline : Property|undefined
获取或设置指定矩形是否带轮廓的 Property。
-
Default Value:
false
outlineColor : Property|undefined
获取或设置指定轮廓
Color 的 Property。
-
Default Value:
Color.BLACK
outlineWidth : Property|undefined
获取或设置指定轮廓宽度的数值型 Property。
注意:在 Windows 平台上的所有主流浏览器中,此 property 将被忽略。详情参见 (@link https://github.com/CesiumGS/cesium/issues/40}。
-
Default Value:
1.0
rotation : Property|undefined
获取或设置指定矩形从正北方向顺时针旋转角度的数值型 property。
-
Default Value:
0
shadows : Property|undefined
获取或设置枚举型 Property,指定矩形是否投射或接收来自光源的阴影。
-
Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置指定矩形可见性的布尔型 Property。
-
Default Value:
true
stRotation : Property|undefined
获取或设置指定矩形纹理从正北方向逆时针旋转角度的数值型 property。
-
Default Value:
0
zIndex : ConstantProperty|undefined
获取或设置指定矩形排序的 zIndex Property。仅当矩形为常量,且既未指定 height 也未指定 extrudedHeight 时才生效。
-
Default Value:
0
Methods
clone(result) → RectangleGraphics
复制此实例。
| Name | Type | Description |
|---|---|---|
result |
RectangleGraphics | optional 用于存储结果的对象。 |
Returns:
修改后的 result 参数,如果未提供则返回新实例。
将此对象上每个未赋值的 property 设为
所提供的源对象上同名 property 的值。
| Name | Type | Description |
|---|---|---|
source |
RectangleGraphics | 要合并到此对象中的对象。 |
Type Definitions
RectangleGraphics 构造函数的初始化选项。
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
show |
Property | boolean |
<optional> |
true | 指定矩形可见性的布尔型 Property。 |
coordinates |
Property | Rectangle |
<optional> |
指定 Rectangle 的 Property。 |
|
height |
Property | number |
<optional> |
0 | 指定矩形相对于椭球表面高度的数值型 Property。 |
heightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 指定 height 相对位置的 Property。 |
extrudedHeight |
Property | number |
<optional> |
指定矩形拉伸面相对于椭球表面高度的数值型 Property。 | |
extrudedHeightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 指定 extrudedHeight 相对位置的 Property。 |
rotation |
Property | number |
<optional> |
0.0 | 指定矩形从正北方向顺时针旋转角度的数值型 property。 |
stRotation |
Property | number |
<optional> |
0.0 | 指定矩形纹理从正北方向逆时针旋转角度的数值型 property。 |
granularity |
Property | number |
<optional> |
Cesium.Math.RADIANS_PER_DEGREE | 指定矩形上点之间角距离的数值型 Property。 |
fill |
Property | boolean |
<optional> |
true | 指定矩形是否使用所提供的材质进行填充的布尔型 Property。 |
material |
MaterialProperty | Color |
<optional> |
Color.WHITE | 指定用于填充矩形的材质的 Property。 |
outline |
Property | boolean |
<optional> |
false | 指定矩形是否带轮廓的布尔型 Property。 |
outlineColor |
Property | Color |
<optional> |
Color.BLACK | 指定轮廓 Color 的 Property。 |
outlineWidth |
Property | number |
<optional> |
1.0 | 指定轮廓宽度的数值型 Property。 |
shadows |
Property | ShadowMode |
<optional> |
ShadowMode.DISABLED | 指定矩形是否投射或接收来自光源阴影的枚举型 Property。 |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<optional> |
指定距离相机多远时显示此矩形的 Property。 | |
classificationType |
Property | ClassificationType |
<optional> |
ClassificationType.BOTH | 指定当矩形位于地面时,是对地形、3D Tiles 还是两者进行分类的枚举型 Property。 |
zIndex |
Property | number |
<optional> |
0 | 指定用于排序地面几何的 zIndex 的 Property。仅当矩形为常量,且既未指定 height 也未指定 extrudedHeight 时才生效。 |
