Class

FeatureGridLayer

FeatureGridLayer(id, url, options)

Constructor

# new FeatureGridLayer(id, url, options)

FeatureGrid图层

Parameters:
Name Type Attributes Description
id string

图层id

url string

图层地址

options Object

参考Cesium.CzmlDataSource参数

maximumLevel number <optional>

层级

tilingScheme string <optional>

Scheme

name string <optional>

name 名称

callback function <optional>

callback 回调

Author:
  • xyj

Extends

Members

# attr

Overrides:
string

# readonly credit

credit

string

# readonly hasAlphaChannel

hasAlphaChannel

string

# readonly id

唯一标识

Overrides:
Layer

# readonly layer

图层

Overrides:
LayerEvent

# readonly layerEvent

图层事件

Overrides:
string

# readonly layerId

图层id

Overrides:
number

# readonly maximumLevel

瓦片层级(最大)

number

# readonly minimumLevel

瓦片层级(最小)

string

# readonly ready

ready

string

# readonly rectangle

rectangle

# show

Overrides:
boolean

# readonly show

显示隐藏

Overrides:
string

# readonly state

状态

Overrides:
number

# readonly tileHeight

瓦片高度

number

# readonly tileWidth

瓦片宽度

string

# readonly tilingScheme

tilingScheme

string

# readonly token

token

string

# readonly type

图形类型

string

# readonly url

图层地址

Methods

# addGraphic(graphic) → {Layer}

添加实体

Parameters:
Name Type Description
graphic Graphic

实体

Overrides:
  • 当前对象
Layer

# addGraphics(graphics) → {Layer}

批量添加实体

Parameters:
Name Type Description
graphics Array.<Graphic>

实体数组

Overrides:
  • 当前对象
Layer

# addTo(viewer) → {Layer}

把当前图层添加至场景

Parameters:
Name Type Description
viewer Viewer

场景对象

Overrides:
  • 当前对象
Layer

# clear()

清除图层

# eachGraphic(method, context) → {Layer}

遍历实体

Parameters:
Name Type Description
method function

回调

context Context

上下文

Overrides:
  • 当前对象
Layer

# fire(type, params) → {Layer}

事件执行

Parameters:
Name Type Description
type String

事件类型

params Object | String

事件携带参数

Overrides:
  • 当前对象
Layer

# getGraphic(graphicId) → {Graphic}

根据id获取实体

Parameters:
Name Type Description
graphicId string

实体id

Overrides:
  • 实体对象
Graphic

# getGraphicById(graphicId) → {Graphic}

根据id获取实体

Parameters:
Name Type Description
graphicId string

实体id

Overrides:
  • 实体对象
Graphic

# getGraphics() → {Array.<Graphic>}

获取当前图层所有实体对象

Overrides:
  • 实体数组
Array.<Graphic>

# getGraphicsByAttr(attrName, attrVal) → {Array.<Graphic>}

根据属性获取实体

Parameters:
Name Type Description
attrName string

属性名字

attrVal string

属性值

Overrides:
  • 实体
Array.<Graphic>

# off(type, callback, context) → {Layer}

事件取消

Parameters:
Name Type Description
type String

事件类型

callback function

回调

context Context

上下文

Overrides:
  • 当前对象
Layer

# on(type, callback, context) → {Layer}

事件

Parameters:
Name Type Description
type String

事件类型

callback function

回调

context Context

上下文

Overrides:
  • 当前对象
Layer

# remove()

移出当前图层

Overrides:

# removeGraphic(graphic) → {Layer}

移出实体对象

Parameters:
Name Type Description
graphic Graphic

实体对象

Overrides:
  • 当前对象
Layer

# requestImage(x, y, level) → {Object}

图层请求

Parameters:
Name Type Description
x string

x

y string

y

level number

level

  • imagery
Object