Class: FMCADLayer

FMCADLayer

FMCADLayer CAD图层插件类,属于fengmap.plugin.layers.min.js

new fengmap.FMCADLayer(options)

Name Type Description
options json

参数

Name Type Description
url string

dxf文件地址

scale number

缩放比例,默认为1

x number

地图位置x值,默认为所在层中心点x

y number

地图位置y值,默认为所在层中心点y

heading number

旋转角度,默认为0

height number

离地高度, 默认 1

opacity number

透明度,默认为1

fonts array

字体文件路径,默认为[],即不显示文字,如果要显示文字必须设置文字文件路径。字体资源可从对应版本的SDK包里获取

Members

readonlybuildingID

Properties:
Name Type Description
buildingID string

建筑物ID

readonlyheading

Properties:
Name Type Description
heading number

旋转角度

height

Properties:
Name Type Description
height number

离地高度

readonlylevel

Properties:
Name Type Description
level number

所在层级

opacity

Properties:
Name Type Description
opacity number

透明度

scale

Properties:
Name Type Description
scale number

缩放比例

readonlyx

Properties:
Name Type Description
x number

x坐标

readonlyy

Properties:
Name Type Description
y number

y坐标

Methods

addTo(floor)

添加到楼层,一个楼层仅允许添加一个FMCADLayer实例

Name Type Description
floor Object

楼层

moveTo(options)

移动到指定位置

Name Type Description
options Object
Name Type Description
x number

图片地图位置x值,必填

y number

图片地图位置y值,必填

finish function

移动到指定位置后的回调函数

remove()

从楼层中移除

rotateTo(options)

水平旋转至特定角度

Name Type Description
options json
Name Type Description
heading number

角度,必填

finish function

水平旋转至特定角度后的回调函数