GridLayer

概述

与TileLayer类似的基础栅格层

选项(Options)

选项:

选项 类型 默认值 描述
pane String tilePane 单位栅格类型
tileSize Number 256 切片尺寸(宽度和高度的像素值,假设切片是正方形的)
opacity Number 1 切片图层的透明度
updateWhenIdle FMap.Browser.mobile FMap.Browser.mobile 如果此项为false,在平移过程中新的切片将会载入,其他的在其后载入(用以更好地显示),在移动设备webKit中默认是true,其他默认false
updateInterval Number 200 更新时间间隙
attribution null null 设置所有权,例如"© FMap"
zIndex null null 切片图层明确的叠置顺序,默认此项不会被设置
bounds null null 当这个选项被设置,TileLayer只装载砖是在特定地理范围
minZoom Number 0 最小级别数

方法(Methods)

方法:

方法 参数 返回值 描述
bringToFront() this 将此切片图层放到所有切片图层之上
bringToBack() this 将此切片图层放到所有切片图层之下
getAttribution() this.options.attribution 获取options.attribution内容
getContainer() HTMLElement 返回在这个图层上包含所有切片的HTML元素
setOpacity() <Number> opacity this 改变切片图层的透明度
setZIndex() <Number> zIndex this 设置切片图层的叠放顺序
isLoading() Boolean 是否在加载状态
redraw() this 清除所有的切片并重新向服务端申请他们
getEvents() events 获取图层绑定的事件
createTile() HTMLElement 创建瓦片

results matching ""

    No results matching ""