new fengmap.FM3DInstancedMeshMarker(options)
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
json |
参数
|
Members
-
readonlybound
-
Properties:
Name Type Description boundfengmap.FMBound 边界
-
readonlyisFM3DInstancedMeshMarker
-
是否为批处理3D模型标注
Properties:
Type Description bool -
readonlylevel
-
Properties:
Name Type Description levelnumber 楼层等级,初始化完成后可以获取当前值
-
readonlytype
-
Properties:
Name Type Description typefengmap.FMType 节点类型 fengmap.FMType.DYNAMIC_MODEL_MARKER
-
readonlyvisible
-
Properties:
Name Type Description visibleBoolean true 显示 false 隐藏
Methods
-
addTo(floor)
-
添加到楼层
Name Type Description floorObject 楼层等级
-
getInstance(id)
-
获取单个实例信息
Name Type Description idstring 实例ID
-
moveTo(options){fengmap.FMAnimation}
-
动画移动到指定位置
Name Type Description optionsObject Name Type Description idstring 实例id,必填
xnumber 图片地图位置x值,默认对应楼层中心点坐标,必填
ynumber 图片地图位置y值,默认对应楼层中心点坐标,必填
animateboolean 是否需要动画,默认false
durationnumber 移动到指定位置所用的时间(秒),默认0.5
finishfunction 移动到指定位置后的回调函数
Returns:
Type Description fengmap.FMAnimation animation 返回动画 -
remove(id)
-
从楼层中移除
Name Type Description idstring 实例ID,默认为删除全部
-
rotateTo(options){fengmap.FMAnimation}
-
水平旋转至特定角度,带动画
Name Type Description optionsjson Name Type Description idstring 实例id,必填
headingnumber 角度
animateboolean 是否需要动画,默认false
durationnumber 动画持续时间,默认0.5
finishfunction 移动到指定位置后的回调函数
Returns:
Type Description fengmap.FMAnimation animation 返回动画 -
setColor(id, color)
-
设置单个实例颜色
Name Type Description idstring 实例ID
colorstring 颜色
-
setHeight(id, height)
-
设置单个实例颜色
Name Type Description idstring 实例ID
heightnumber 离地高度
-
setScale(id, scale)
-
设置单个实例大小
Name Type Description idstring 实例ID
scalenumber 大小值
-
setVisible(id, visible)
-
显示隐藏单个实例
Name Type Description idstring 实例ID
visiblebool true为显示,false为隐藏
-
tiltTo(options){fengmap.FMAnimation}
-
倾斜旋转至特定角度,带动画
Name Type Description optionsObject Name Type Description idstring 实例id,必填
tiltnumber 角度
animateboolean 是否需要动画,默认false
durationnumber 移动到指定位置所用的时间(秒),默认0.5
finishfunction 移动到指定位置后的回调函数
Returns:
Type Description fengmap.FMAnimation animation 返回动画