GridLayer

BaseLayer. GridLayer

new GridLayer(viewer, opt)

Example
let gridLayer = new GridLayer(viewer,{
                show: true,
                glowColor : "#FF0000",
                alpha: 1,
        });
        gridLayer.load();
Parameters:
Name Type Description
viewer Cesium.Viewer 地图viewer对象
opt Object 基础配置,其它参数见BaseLayer的Parameters。
Properties
Name Type Attributes Default Description
cells cells <optional>
4 网格单元的数量
color String <optional>
'#33FFFF' 网格线颜色
glowColor String <optional>
'#33FFFF' 网格线发光色
glowWidth Number <optional>
3 网格线发光宽度
backgroundColor String <optional>
'#CCCCCC' 背景色
tileWidth Number <optional>
256 服务切片宽度
tileHeight Number <optional>
256 服务切片高度
canvasSize Number <optional>
=256 渲染的canvas尺寸

Extends

Members

_layer

Overrides:
Properties:
Name Type Description
layer Cesium.ImageryLayer 图层

_provider

Overrides:
Properties:
Name Type Description
provider Cesium.ImageryProvider 图层

id

Overrides:
Properties:
Name Type Description
id String | Number 图层id

imageryLayerAttr

Overrides:
Properties:
Name Type Description
imageryLayerAttr Object imageryLayer相关配置

providerAttr

Overrides:
Properties:
Name Type Description
providerAttr Object provider相关配置

type

Properties:
Name Type Description
type String 类型

Methods

hide()

Description:
  • 隐藏
Overrides:

load()

Description:
  • 加载
Overrides:

remove()

Description:
  • 移除
Overrides:

setAlpha(alpha)

Description:
  • 设置透明度
Overrides:
Parameters:
Name Type Description
alpha Number 透明度(0~1)

setVisible(visible)

Overrides:
Parameters:
Name Type Description
visible Boolean 是否显示

show()

Description:
  • 展示
Overrides:

zoomTo()

Description:
  • 缩放至图层
Overrides: