Class: FMModel

FMModel

FMModel 模型对象, 是一种地图内置图层的对象,只读, 不可实例化。属于fengmap.map.min.js

new fengmap.FMModel()

Members

readonlybound

Properties:
Name Type Description
bound fengmap.FMBound

边界

readonlyeName

英文名称

Properties:
Type Description
string

readonlyFID

模型FID

Properties:
Type Description
string

readonlyheight

模型高度

Properties:
Type Description
number

readonlyID

模型ID

Properties:
Type Description
number

readonlylevel

模型所在层级

Properties:
Type Description
string

readonlyname

模型名称

Properties:
Type Description
string

readonlypass

Properties:
Name Type Description
pass

路径通行标识

readonlytype

Properties:
Name Type Description
type fengmap.FMType

节点类型

readonlytypeID

数据类型ID

Properties:
Type Description
string

visible

Properties:
Name Type Description
visible Boolean

true 显示 false 隐藏

readonlyx

模型中点X轴坐标

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

readonlyy

模型中点Y轴坐标

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

readonlyzoomRange

模型比例尺范围属性

Properties:
Type Description
object

Methods

clearTopImage()

移除顶面贴图

inherited dispose()

废置地图对象

flash(color)

闪烁

Name Type Description
color string | number

颜色值

getArea(){number}

获取计算的面积

Returns:
Type Description
number 面积

getBound(){Object}

获取模型边界

Deprecated
  • 3.1.5 版本及以后版本将不可用
    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
    ID number 数据ID
    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(options)

    添加顶面贴图

    Name Type Description
    options json
    Name Type Description
    coords json

    地图坐标

    image string

    贴图图片路径

    offset array

    贴图图片偏移值。[x,y]

    size array

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

    angle number

    旋转角度

    stopFlash()

    取消闪烁

    inherited traverse(callback)

    遍历返回子节点

    Name Type Description
    callback