Polygon

面封装

new TS.Polygon(positions)

面封装
Name Type Description
positions

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:

positions : Array.<Position>|String|Array.<(Position|Number|String)>

获取 或 设置坐标
获取 或 设置是否显示
Inherited From:
获取状态
Inherited From:

Methods

static TS.Polygon.fromEntity(entity)Polygon|undefined

从Entity中获取
Name Type Description
entity Cesium.Entity
Returns:
快速添加到图层中
Name Type Description
layer Layer
Returns:
Inherited From:
删除图层
Returns:
Inherited From:
飞行到覆盖物
Inherited From:

setLabel(text, textStyle)Polygon

设置文字
Name Type Description
text
textStyle
Returns:
设置样式
Name Type Description
style
Returns:
Example:
{
  "height": 1, //高度
  "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
  "extrudedHeight": 0, //拉升高度
  "stRotation": 0, //旋转角度
  "fill": true, //是否用提供的材料填充多边形。
  "material": DC.Color.WHITE, //材质
  "outline": false, //是否显示边框
  "outlineColor": DC.Color.BLACK, //边框颜色
  "outlineWidth": 0, //边框宽度
  "closeTop": true, //顶面是否闭合
  "closeBottom": true, //底面是否闭合
  "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: