MarkBillboard

MarkBillboard

布告牌标绘。

Constructor

new MarkBillboard(options)

Author:
  • wsy
Example
var billboardOption = {
     position : new GeoPosition(113.6591762373732890,34.8625017438331710,10),
     image : '../../../Apps/Sandcastle/images/Cesium_Logo_overlay.png',   
}
var billboard = new MarkBillboard(billboardOption);
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 Cesium.Color <optional>
Cesium.Color.WHITE 指定标绘的材质。
position GeoPosition 位置。
heading Number <optional>
0.0 偏航角(以角度为单位)。
pitch Number <optional>
0.0 俯仰角(以角度为单位)。
roll Number <optional>
0.0 翻滚角(以角度为单位)。
image String 图像的URL。
scale Number <optional>
1.0 指定要应用于图像尺寸的比例。
pixelOffset Cesium.Cartesian2 <optional>
Cesium.Cartesian2.ZERO 用于指定距目标位置的像素偏移量(单位为像素)。
eyeOffset Cesium.Cartesian3 <optional>
Cesium.Cartesian3.ZERO 用于指定距目标位置的偏移量(单位为米)。
verticalOrigin Cesium.VerticalOrigin <optional>
Cesium.VerticalOrigin.CENTER 用于指定相对于布告牌原点的垂直位置。
heightReference Cesium.HeightReference <optional>
Cesium.HeightReference.NONE 相对于地形的位置。
rotation Number <optional>
0 指定围绕alignedAxis的旋转角度(以角度为单位)。
alignedAxis Cesium.Cartesian3 <optional>
Cesium.Cartesian3.ZERO 用于指定单位矢量旋转轴。
sizeInMeters Boolean <optional>
指定是否应以米为单位测量此布告牌的大小。
width Number <optional>
用于指定布告牌的宽度(以像素为单位),并覆盖原始尺寸。
height Number <optional>
用于指定布告牌的高度(以像素为单位),并覆盖原始尺寸。
scaleByDistance Cesium.NearFarScalar <optional>
用于根据距相机的距离缩放布告牌。
translucencyByDistance Cesium.NearFarScalar <optional>
用于根据距相机的距离设置半透明性。
pixelOffsetScaleByDistance Cesium.NearFarScalar <optional>
根据距相机的距离设置偏移量,以像素为单位,不会超过pixelOffset。
imageSubRegion Cesium.BoundingRectangle <optional>
定义要用于布告牌的图像的子区域,而不是整个图像,以像素为单位从左下角开始。
disableDepthTestDistance Number <optional>
指定在距相机的某个距离范围内禁用深度测试。

Extends

Members

alignedAxis :Cesium.Cartesian3

Default Value:
  • Cesium.Cartesian3.ZERO
获取或设置单位矢量旋转轴。
Type:
  • Cesium.Cartesian3

allowPicking :Boolean

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

availability :Cesium.TimeIntervalCollection

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

(readonly) boundingSphereShow :Boolean

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

description :String|Map

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

disableDepthTestDistance :Number

获取或设置禁用深度测试的距离。
Type:
  • Number

distanceDisplayCondition :Cesium.DistanceDisplayCondition

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

eyeOffset :Cesium.Cartesian3

Default Value:
  • Cesium.Cartesian3.ZERO
获取或设置距离目标位置的偏移量(以米为单位)。
Type:
  • Cesium.Cartesian3

heading :Number

Overrides:
Default Value:
  • 0.0
获取/设置标绘实体偏航角。
Type:
  • Number

height :Boolean

获取或设置布告牌的高度(以像素为单位)。
Type:
  • Boolean

heightReference :Cesium.HeightReference

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

(readonly) id :String

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

image :String

获取或设置图像的URL。
Type:
  • String

imageSubRegion :Cesium.BoundingRectangle

获取或设置图像子区域。
Type:
  • Cesium.BoundingRectangle

material :MarkMaterial|Cesium.Color

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

name :String

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

pitch :Number

Overrides:
Default Value:
  • 0.0
获取/设置标绘实体俯仰角。
Type:
  • Number

pixelOffset :Cesium.Cartesian2

Default Value:
  • Cesium.Cartesian2.ZERO
获取或设置距离目标位置的像素偏移量。
Type:
  • Cesium.Cartesian2

pixelOffsetScaleByDistance :Cesium.NearFarScalar

获取或设置根据距相机的距离设置偏移量参数,以像素为单位,不会超过pixelOffset。
Type:
  • Cesium.NearFarScalar

position :GeoPosition

Overrides:
获取或设置标绘实体位置。
Type:

ready

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

roll :Number

Overrides:
Default Value:
  • 0.0
获取/设置标绘实体翻滚角。
Type:
  • Number

rotation :Number

Default Value:
  • 0
获取或设置围绕alignedAxis的旋转角度(以角度为单位)。
Type:
  • Number

scale :Number

Default Value:
  • 1.0
获取或设置要应用于图像尺寸的比例。
Type:
  • Number

scaleByDistance :Cesium.NearFarScalar

获取或设置根据距相机的距离缩放布告牌的参数。
Type:
  • Cesium.NearFarScalar

show :Boolean

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

sizeInMeters :Boolean

获取或设置是否以米为单位显示。
Type:
  • Boolean

translucencyByDistance :Cesium.NearFarScalar

获取或设置根据距相机的距离设置半透明性参数。
Type:
  • Cesium.NearFarScalar

verticalOrigin :Cesium.VerticalOrigin

Default Value:
  • Cesium.VerticalOrigin.CENTER
获取或设置相对于布告牌原点的垂直位置。
Type:
  • Cesium.VerticalOrigin

viewFrom :Cesium.Cartesian3

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

width :Boolean

获取或设置布告牌的宽度(以像素为单位)。
Type:
  • Boolean

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 是否显示包围球。