PointGraphic
大约 2 分钟
PointGraphic
VE.graphic.PointGraphic
像素点
参数
new VE.graphic.PointGraphic(options)
options
参数名称 | 类型 | 描述信息 |
---|---|---|
primitive | VE.Point | 是否是 primitive |
position | VE.Point | 位置 |
style | VE.graphic.PointGraphic.StyleOption | 样式 |
属性
attr
当前属性
readonly
center- 类型: VE.Point
获取中心点
readonly
hpr- 类型: object
获取俯仰角
readonly
point- 类型: VE.Point | null
当前实际位置
position
- 类型: VE.Point | Array | String | Object
设置位置信息
readonly
stylereadonly
type- 类型: string
类型
方法
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
setStyle (style)
设置样式
参数名称 | 类型 | 描述信息 |
---|---|---|
style | VE.PointGraphic.StyleOption | 样式 |
show ()
显示
startPositionEdit (log)
开启位置编辑
参数名称 | 类型 | 描述信息 |
---|---|---|
log | boolean | 是否打印位置信息 |
stopPositionEdit ()
关闭位置编辑
toGeoJson ()
获取geoJson数据
- 返回值:
Feature.<Point, Properties>
类型定义
VE.graphic.PointGraphic.StyleOption
- 类型: Object
参数名称 | 类型 | 默认值 | 描述信息 |
---|---|---|---|
pixelSize | Number | 1 | 以像素为单位指定大小 |
color | Cesium.Color | String | #fff |
outlineColor | Cesium.Color | String | #000 |
outlineWidth | Number | 0 | 边框的宽度 |
opacity | Number | 1 | 透明度 |
clampToGround | boolean | false | 是否 贴地. |
visibleDepth | boolean | true | 是否被遮挡 |
下面的很少用 | |||
distanceDisplayCondition | Cesium.DistanceDisplayCondition | Array | |
scaleByDistance | Cesium.NearFarScalar | Array | |
下面的基本用不上 | |||
translucencyByDistance | Cesium.NearFarScalar | Array | |
disableDepthTestDistance | Number | 定要禁用深度测试的距离相机的距离 | |
heightReference | Cesium.HeightReference | HeightReference.NONE | 相对于高度的高度 |