MarkSector

MarkSector

扇形标绘。

Constructor

new MarkSector(options)

Author:
  • zpc
Example
var sector = new MarkSector({
     position : new GeoPosition(102.738373,31.163876),
     radius : 100,
     material : Cesium.Color.RED,
  });
Parameters:
Name Type Description
options Object 拥有以下属性的对象:
Properties
Name Type Attributes Default Description
id String <optional>
指定标绘的唯一标识符。如果没有提供,则生成GUID。
name String <optional>
"" 指定标绘的名称,名称不必是唯一的。
show Boolean <optional>
true 指定标绘的可见性。
allowPicking Boolean <optional>
false 指定标绘是否可选中。
availability Cesium.TimeIntervalCollection <optional>
指定标绘在某段时间可用。
description String | Map <optional>
"" 指定描述这个标绘的HTML或Map键值对。
viewFrom Cesium.Cartesian3 <optional>
用于查看该标绘的建议初始偏移量。
distanceDisplayCondition Cesium.DistanceDisplayCondition <optional>
指定在距像机的某个距离内显示此标绘。
material MarkMaterial | Cesium.Color <optional>
Cesium.Color.WHITE 指定标绘的材质。
position GeoPosition 扇形的位置。
radius Number 扇形的半径。
startAngle Number <optional>
0 扇形的起始角度,默认为正北方向。
angle Number <optional>
45 扇形的角度。
height Number <optional>
0.0 扇形相对于椭球面的高度。
fill Boolean <optional>
true 指定是否使用提供的材质填充。
closeTop Boolean <optional>
true 挤出的时候顶部是否封口。
closeBottom Boolean <optional>
true 挤出的时候底部是否封口。
heightReference Cesium.HeightReference <optional>
Cesium.HeightReference.NONE 扇形相对于地形的位置。
extrudedHeight Number <optional>
0.0 扇形拔高高度。
extrudedHeightReference Cesium.HeightReference <optional>
Cesium.HeightReference.NONE 扇形自身高度相对于地形的位置。
outline Boolean <optional>
false 是否显示边框。
outlineColor Cesium.Color <optional>
Color.BLACK 边框颜色。
outlineWidth Number <optional>
1.0 边框宽度。
classificationType Cesium.ClassificationType <optional>
Cesium.ClassificationType.BOTH 指定将扇形贴到地形,3D Tiles上或者两者都贴。

Extends

Members

allowPicking :Boolean

Overrides:
获取或设置标绘是否可选中。
Type:
  • Boolean

angle :Number

Default Value:
  • 45
获取或设置扇形的角度,默认为45度。以角度为单位。
Type:
  • Number

availability :Cesium.TimeIntervalCollection

Overrides:
在指定的时间里可用。
Type:
  • Cesium.TimeIntervalCollection

(readonly) boundingSphereShow :Boolean

Overrides:
Default Value:
  • false
获取是否显示包围球。
Type:
  • Boolean

classificationType :Cesium.ClassificationType

Default Value:
  • Cesium.ClassificationType.BOTH
获取或设置扇形贴到地形,3D Tiles上或者两者都贴。
Type:
  • Cesium.ClassificationType

closeBottom :Boolean

Default Value:
  • true
获取或设置扇形挤出的时候底部是否封口。
Type:
  • Boolean

closeTop :Boolean

Default Value:
  • true
获取或设置扇形挤出的时候顶部是否封口。
Type:
  • Boolean

description :String|Map

Overrides:
Default Value:
  • ""
获取或设置描述这个标绘的HTML或Map键值对。
Type:
  • String | Map

distanceDisplayCondition :Cesium.DistanceDisplayCondition

Overrides:
在距像机的某个距离内显示。
Type:
  • Cesium.DistanceDisplayCondition

extrudedHeight :Number

Default Value:
  • 0.0
获取或设置扇形的拔高高度。以米为单位。
Type:
  • Number

extrudedHeightReference :Cesium.HeightReference

Default Value:
  • HeightReference.NONE
设置/获取挤出高度相对于地形的位置HeightReference
Type:
  • Cesium.HeightReference

fill :Boolean

Default Value:
  • true
获取或设置扇形是否用指定的材质填充。
Type:
  • Boolean

height :Number

Default Value:
  • 0.0
获取或设置扇形的离地高度。以米为单位。
Type:
  • Number

heightReference :Cesium.HeightReference

Default Value:
  • HeightReference.NONE
设置/获取相对于地形的位置HeightReference
Type:
  • Cesium.HeightReference

(readonly) id :String

Overrides:
获取标绘实体的ID。
Type:
  • String

material :MarkMaterial|Cesium.Color

Overrides:
Default Value:
  • Cesium.Color.WHITE
获取或设置标绘的材质。
Type:

name :String

Overrides:
获取或设置标绘实体的名称。
Type:
  • String

outline :Boolean

Default Value:
  • false
获取或设置扇形的边框是否显示。
Type:
  • Boolean

outlineColor :Cesium.Color

Default Value:
  • Cesium.Color.BLACK
获取或设置扇形的边框颜色。
Type:
  • Cesium.Color

outlineWidth :Number

Default Value:
  • 1
获取或设置扇形的边框宽度。
Type:
  • Number

position :GeoPosition

获取或设置扇形的位置。
Type:

radius :Number

获取或设置扇形的半径。以米为单位。
Type:
  • Number

ready

Overrides:
获取是否已经准备就绪好下一次渲染。

show :Boolean

Overrides:
Default Value:
  • true
获取或设置标绘实体的显示或隐藏。
Type:
  • Boolean

startAngle :Number

Default Value:
  • 0
获取或设置扇形的起始角度,默认为0,既正东方向。以角度为单位。
Type:
  • Number

viewFrom :Cesium.Cartesian3

Overrides:
Default Value:
  • undefined
查看该标绘实例的建议初始偏移量。
Type:
  • Cesium.Cartesian3

Methods

getBoundingSphere(viewer) → {Cesium.BoundingSphere}

Overrides:
获取此标绘实例的包围球。使用时必须调用getReadyPromise()方法。
Example
// box为已经创建好的Mark
box.getReadyPromise(viewer).then(function(box){
     console.log(box.getBoundingSphere(viewer));
})
Parameters:
Name Type Description
viewer Cesium.Viewer Cesium可视化器。
Returns:
获取的包围球。
Type
Cesium.BoundingSphere

getReadyPromise(viewer) → {Promise.Mark}

Overrides:
获取ReadyPromise
Parameters:
Name Type Description
viewer Cesium.Viewer
Returns:
Type
Promise.Mark

showBoundingSphere(viewer, show)

Overrides:
设置是否显示包围球。
Parameters:
Name Type Description
viewer Cesium.Viewer Cesium可视化器。
show Boolean 是否显示包围球。