Polyline

线段的创建

new TS.Polyline(positions)

线段的创建
Name Type Description
positions Array.<Position> | String | Array.<Array> 点位提供
Example:
// 通过数组添加
new TS.Polyline([[120,30,50],[120,40,60]]);
// 通过文本添加
new TS.Polyline("120,30,50;120,40,60;");
// 通过Position对象添加
new TS.Polyline([new TS.Position(120,30,50),new TS.Position(120,40,60)]);

Extends

Members

allowDrillPick : Boolean

获取 或 设置 是否支持穿透选择
Inherited From:
获取 或 设置属性
Inherited From:

delegate : Cesium.Entity

获取CesiumEntity对象
Inherited From:

description : String

描述
Inherited From:

editabled : Boolean

获取 或 设置 是否可编辑
Inherited From:
获取 name
Inherited From:
获取父类
Inherited From:
鼠标点击订阅
Inherited From:
鼠标双击订阅
Inherited From:
鼠标离开订阅
Inherited From:
鼠标悬浮订阅
Inherited From:

onMouseRightClick

订阅鼠标右键点击
Inherited From:
覆盖物添加订阅
Inherited From:

onOverlayRemoved : Event

覆盖物移除订阅
Inherited From:

readonly overlayId : String

获取底层Id
Inherited From:
获取坐标信息
获取 或 设置是否显示
Inherited From:
获取状态
Inherited From:

Methods

static TS.Polyline.fromEntity(entity)Polyline

从Entity中获取
Name Type Description
entity Cesium.Entity 要获取的Entity
Returns:
快速添加到图层中
Name Type Description
layer Layer
Returns:
Inherited From:
获取几何体的中心点
Returns:
删除图层
Returns:
Inherited From:

distance()Number

获取长度
Returns:
飞行到覆盖物
Inherited From:

setLabel(text, textStyle)Polyline

设置文本
Name Type Description
text string 设置的标签
textStyle style 可选的 标签的样式
Returns:
设置样式
Name Type Description
style 线路的样式
Returns:
Example:
{
  "width": 1, //线宽
  "material": DC.Color.WHITE, //材质
  "clampToGround": false, //是否贴地
  "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
  "distanceDisplayCondition": {
    "near": 0, //最近距离
    "far": Number.MAX_VALUE //最远距离
  }, //根据距离设置可见
  "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
  "zIndex": 0 //层级
}

toGeojson()string

保存为Geojson
Returns:
Inherited From:
缩放到覆盖物
Inherited From: