Class: PolylineObject

PolylineObject


new PolylineObject(sdk, options, _Dialog)

折线
Parameters:
Name Type Description
sdk
options object 线属性
Properties
Name Type Default Description
name string 名称
width number 3 线宽
color string #ff0000 颜色
type number 0 材质类型 0-实线 1-虚线 2-泛光...
heightMode number 2 高度模式(0:海拔高度;1:相对高度;2:依附模式)
noseToTail boolean false 首尾相连
smooth boolean false 线段圆滑
extend boolean false 线缓冲
extendWidth number 10 线缓冲宽度
extendColor number rgba(255,255,80,0.3) 线缓冲颜色
show boolean true 显隐
positions Array.<object> 必填,经纬度和高度的列表,值交替 [{lon,lat,alt},...]
positions[].lng number 经度
positions[].lat number 纬度
positions[].alt number 高度
label object 标签对象
Properties
Name Type Default Description
text string 标签文本
show string 标签显隐
position string 标签位置
position object 标签位置
Properties
Name Type Description
lng number 经度
lat number 纬度
alt number 高度
fontSize number 20 字体大小
fontFamily number 0 字体项 0:黑体;1:思源黑体;2:庞门正道标题体;3:数黑体
color string #ffffff 字体颜色
lineWidth number 4 引线宽
lineColor string #00ffff80 引线颜色
pixelOffset number 20 字体偏移(引线长度)
backgroundColor array ['#00ffff80', '#00ffff80'] 背景颜色
scaleByDistance boolean 距离缩放
near number 2000 视野缩放最近距离
far number 100000 视野缩放最远距离
attribute object 属性内容
Properties
Name Type Default Description
link= {string} 链接
link.content array [] 链接内容
link.content[].name string 链接名称
link.content[].url string 链接地址
richTextContent string 富文本内容
_Dialog object 弹框事件
Properties
Name Type Description
confirmCallBack function 弹框确认时的回调

Methods


getSceenLine()

获取当前满屏横线速度

<async> edit(state)

编辑框
Parameters:
Name Type Description
state boolean true打开,false关闭

<async> flyTo()

飞到

openRichTextEditor()

打开富文本框

<async> remove()

删除