MarkCorridor

MarkCorridor

廊道,廊道是由中心线和宽度定义的形状,符合地球的曲率。 它可以放置在表面或高度,也可以选择挤压成一个体。

Constructor

new MarkCorridor(options)

Author:
  • wsy
Example
var position = [];
 position[0] = new GeoPosition(-120.0, 45.0,);
 position[1] = new GeoPosition(-125.0, 50.00,);
 position[2] = new GeoPosition(-125.0, 55.0);
 var corridor = new MarkCorridor({
     positions : position,
     material : Cesium.Color.RED,
     fill : true,
     outline : true,
     outlineWidth : 20,
     width : 1000,
     // height : 100,
     shadows : Cesium.ShadowMode.ENABLED,
     zIndex : 2
 });
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 指定标绘的材质。
positions Array.<GeoPosition> 位置数组。
width Number <optional>
用于指定廊道宽度。
height Number <optional>
0 用于指定廊道相对于椭球表面的高度。
heightReference Cesium.HeightReference <optional>
Cesium.HeightReference.NONE 相对于地形的位置。
extrudedHeight Number <optional>
指定廊道的挤出面相对于椭球面的高度。
extrudedHeightReference Cesium.HeightReference <optional>
Cesium.HeightReference.NONE 指定廊道的挤出面相对于地形的位置。
cornerType Cesium.CornerType <optional>
Cesium.CornerType.ROUNDED 指定拐角的样式。
granularity Number <optional>
Cesium.Math.RADIANS_PER_DEGREE 指定每个纬度和经度点之间的角度距离。
fill Boolean <optional>
true 指定是否使用提供的材质填充。
outline Boolean <optional>
false 是否显示边框。
outlineColor Cesium.Color <optional>
Cesium.Color.BLACK 指定边框颜色。
outlineWidth Number <optional>
1.0 边框宽度。
classificationType Cesium.ClassificationType <optional>
Cesium.ClassificationType.BOTH 指定将它贴到地形,3D Tiles上或者两者都贴。
shadows Cesium.ShadowMode <optional>
Cesium.ShadowMode.DISABLED 从每个光源投射或接收阴影的模式。
zIndex Number <optional>
0 指定用于排序地面几何的zIndex。只有当该对象是恒定的且没有高度才有效。

Extends

Members

allowPicking :Boolean

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

availability :Cesium.TimeIntervalCollection

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

(readonly) boundingSphereShow :Boolean

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

classificationType :Cesium.ClassificationType

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

cornerType :Cesium.CornerType

Default Value:
  • Cesium.CornerType.ROUNDED
获取或设置拐角的样式。
Type:
  • Cesium.CornerType

description :String|Map

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

distanceDisplayCondition :Cesium.DistanceDisplayCondition

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

extrudedHeight :Number

获取或设置廊道的挤出面相对于椭球面的高度。
Type:
  • Number

extrudedHeightReference :Cesium.HeightReference

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

fill :Boolean

Overrides:
Default Value:
  • true
获取或设置是否使用提供的材质填充。
Type:
  • Boolean

granularity :Number

Overrides:
Default Value:
  • Cesium.Math.RADIANS_PER_DEGREE
获取或设置每个纬度和经度点之间的角度距离。
Type:
  • Number

height :Number

Default Value:
  • 1.0
获取或设置廊道相对于椭球表面的高度。
Type:
  • Number

heightReference :Cesium.HeightReference

Default Value:
  • Cesium.HeightReference.NONE
获取或设置相对于地形的位置。
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

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

outlineColor :Cesium.Color

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

outlineWidth :Number

Overrides:
Default Value:
  • 1.0
获取或设置边框宽度。
Type:
  • Number

positions :Array.<GeoPosition>

Overrides:
获取或设置位置数组。
Type:

ready

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

shadows :Cesium.ShadowMode

Overrides:
Default Value:
  • Cesium.ShadowMode.DISABLED
获取或设置从每个光源投射或接收阴影的模式。
Type:
  • Cesium.ShadowMode

show :Boolean

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

viewFrom :Cesium.Cartesian3

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

width :Number

获取或设置廊道宽度。
Type:
  • Number

zIndex :Number

Overrides:
Default Value:
  • 0
获取或设置用于排序地面几何的zIndex。只有当该对象是恒定的且没有高度才有效。
Type:
  • Number

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