Class: FMModel

FMModel

FMModel 模型对象,是一种地图内置图层的对象,只读,不可实例化。

Members

readonlyheight

模型高度

Properties:
Type Description
number

readonlyID

模型ID

Properties:
Type Description
number

readonlylevel

模型所在层级

Properties:
Type Description
string

readonlyname

模型名称

Properties:
Type Description
string

readonlytype

模型类型

Properties:
Name Type Description
type fengmap.FMType

4096

visible

模型显示隐藏属性

readonlyx

模型中点X轴坐标

Properties:
Name Type Description
返回该层的中点X轴坐标 number

readonlyy

模型中点Y轴坐标

Properties:
Name Type Description
返回该层的中点Y轴坐标 number

readonlyzoomRange

模型比例尺范围属性

Properties:
Type Description
object

Methods

clearTopImage()

移除顶面贴图

flash(color)

闪烁

Name Type Description
color string | number

颜色值

getBound(){Object}

获取模型边界

Returns:
Type Description
Object 获取模型边界 minX: mbound.minX, maxX: mbound.maxX, minY: mbound.minY, maxY: mbound.maxY

getData(){Object}

获取模型数据属性

Returns:
Name Type Description
Object Object 模型的数据属性
Name Type Description
typeID string 数据类型ID
FID string 模型FID
height number 高度
name string 模型名字
eName string 模型英文名字
minLevel int 最小显示级别
maxLevel int 最大显示级别
pass int 通过标识

resetBorderColor()

重置回模型线默认颜色

resetColor()

重置回模型默认颜色

setBorderColor(color, opacity)

设置线颜色

Name Type Description
color string | int

颜色值

opacity number

透明度

setColor(color, opacity)

设置模型颜色

Name Type Description
color string | number

颜色值

opacity number

透明度

setTopImage(param)

添加顶面贴图

Name Type Description
param json
Name Type Description
mapCoord json

地图坐标

image string

贴图图片路径

offSet array

贴图图片偏移值。[offsetx,offsety]

size array

贴图图片尺寸。[width,height]

angle number

旋转角度

stopFlash()

取消闪烁