Class: Model

Model


new Model(sdk, options)

加载模型
Parameters:
Name Type Description
sdk object sdk
options object 模型参数
Properties
Name Type Default Description
id string 唯一标识
show boolean true 模型显隐
name string 名称
url string 资源地址
position object 模型位置
Properties
Name Type Description
lng number 经度
lat number 纬度
alt number 高度
scale object 比例
Properties
Name Type Default Description
x number 1 x轴比例
y number 1 y轴比例
z number 1 z轴比例
maximumScale number 100 最大比例
minimumPixelSize number 60 最小像素
scaleByDistance boolean true 随视野缩放
rotate object 旋转角度
Properties
Name Type Description
x number x轴旋转度数
y number y轴旋转度数
z number z轴旋转度数
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 object {} 链接
Properties
Name Type Default Description
content array [] 链接内容
content[].name string 链接名称
content[].url string 链接地址
richTextContent string 富文本内容
customView object 默认视角
Properties
Name Type Description
orientation object 默认视角方位
Properties
Name Type Description
heading number 航向角
pitch number 俯仰角
roll number 翻滚角
relativePosition object 视角相对位置
Properties
Name Type Description
lng number 经度
lat number 纬度
alt number 高度

Members


rotationEditing

打开模型旋转功能

Methods


<async> edit(state)

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