PlaneGraphic
大约 2 分钟
PlaneGraphic
VE.graphic.PlaneGraphic
平面
参数
new VE.graphic.PlaneGraphic(options)
options
参数名称 | 类型 | 描述信息 |
---|---|---|
position | VE.Point | 位置 |
style | VE.graphic.PlaneGraphic.StyleOption | 样式 |
属性
attr
当前属性
readonly
center- 类型: VE.Point
获取中心点
readonly
hpr- 类型: object
获取俯仰角
readonly
point- 类型: VE.Point | null
当前实际位置
position
- 类型: VE.Point | Array | String | Object
设置位置信息
readonly
style方法
addDynamicPosition (p)
移动到一个新点
参数名称 | 类型 | 描述信息 |
---|---|---|
p | VE.Point | 坐标 |
addTo (target)
添加到
参数名称 | 类型 | 描述信息 |
---|---|---|
target | Map | GroupGraphic |
clampToGround ()
手动贴地
clampToTerrain ()
手动贴地形
destroy ()
销毁
edit ()
编辑
flyTo ()
飞至
hide ()
隐藏
rotate (params)
旋转
参数名称 | 类型 | 描述信息 |
---|---|---|
params | object | 旋转 |
params.rotateX | object | x旋转(同roll) |
params.rotateY | object | y旋转(同pitch) |
params.rotateZ | object | z旋转(同heading) |
setOptions (options)
设置属性
参数名称 | 类型 | 描述信息 |
---|---|---|
options | object | |
options.position | VE.Point | 位置信息 |
options.positions | Array.<VE.Point> | 位置信息 |
options.attr | object | 属性 |
options.style | object | 样式 |
- 返回值:
BaseGraphic
show ()
显示
startPositionEdit (log)
开启位置编辑
参数名称 | 类型 | 描述信息 |
---|---|---|
log | boolean | 是否打印位置信息 |
stopPositionEdit ()
关闭位置编辑
toGeoJson ()
获取geoJson数据
- 返回值:
Feature.<Point, Properties>
类型定义
VE.graphic.PlaneGraphic.StyleOption
- 类型: Object
参数名称 | 类型 | 默认值 | 描述信息 |
---|---|---|---|
dimensions | array | 指定框的宽度和高度 | |
plane | String | z | 方向(x,y,z) |
color | String | #fff | 颜色 |
material | String | #fff | 材质 |
outlineColor | String | #000 | 边框的颜色 |
outlineWidth | number | 1 | 边框的宽度 |
fill | boolean | true | 是否可以填充 |
opacity | Number | 1 | 透明度 |
clampToGround | boolean | false | 是否 贴地、贴3dtiles. |
clampToTerrain | boolean | false | 是否贴地地形 为true时优先级高于clampToGround. |
下面的很少用 | |||
distanceDisplayCondition | Cesium.DistanceDisplayCondition | Array | |
下面的基本用不上 | |||
shadows | String | ShadowMode | ShadowMode.DISABLED |