# Class: MapLayer

## MapLayer()

#### new MapLayer()

Source:
  - MapLayer.js, line 9

### Methods

#### (async, static) createObj() → {Promise.<MapLayer>}

构造一个新的 MapLayer 对象。

Source:
  - MapLayer.js, line 18

##### Returns:

Type
  Promise.<MapLayer>

#### (async, static) getIsValid() → {Promise.<*>}

查看图层是否有效

Source:
  - MapLayer.js, line 214

##### Returns:

Type
  Promise.<*>

#### (async, static) getIsVisible()

获取图层是否显示

Source:
  - MapLayer.js, line 125

#### (async, static) getMaxScale()

获取图层最大显示比率

Source:
  - MapLayer.js, line 162

#### (async, static) getMinScale()

获取图层最小显示比率

Source:
  - MapLayer.js, line 138

#### (async, static) getName() → {Promise.<*>}

获取图层名称

Source:
  - MapLayer.js, line 34

##### Returns:

Type
  Promise.<*>

#### (async, static) getRange() → {Promise.<Rect>}

获取地图范围

Source:
  - MapLayer.js, line 228

##### Returns:

Type
  Promise.<Rect>

#### (async, static) getState() → {Promise.<(*|NavigationPreloadState)>}

获取图层状态

Source:
  - MapLayer.js, line 89

##### Returns:

Type
  Promise.<(*|NavigationPreloadState)>

#### (async, static) getURL() → {Promise.<*>}

获取图层的URL

Source:
  - MapLayer.js, line 61

##### Returns:

Type
  Promise.<*>

#### (async, static) getWeight() → {Promise.<*>}

获取图层的权重

Source:
  - MapLayer.js, line 188

##### Returns:

Type
  Promise.<*>

#### (async, static) setMaxScale(MaxScale)

设置图层最大显示比率

##### Parameters:

Name | Type | Description
--- | --- | ---
`MaxScale` |  | 图层最大显示比率

Source:
  - MapLayer.js, line 175

#### (async, static) setMinScale(MinScale)

设置图层最小显示比率

##### Parameters:

Name | Type | Description
--- | --- | ---
`MinScale` |  | 图层最小显示比率

Source:
  - MapLayer.js, line 151

#### (async, static) setName() → {Promise.<*>}

获取图层名称

Source:
  - MapLayer.js, line 48

##### Returns:

Type
  Promise.<*>

#### (async, static) setState(State)

设置图层状态

##### Parameters:

Name | Type | Description
--- | --- | ---
`State` | Boolean | 图层状态

Source:
  - MapLayer.js, line 102

#### (async, static) setURL(URL) → {Promise.<void>}

设置图层URL地址

##### Parameters:

Name | Type | Description
--- | --- | ---
`URL` | String | 图层URL地址

Source:
  - MapLayer.js, line 76

##### Returns:

Type
  Promise.<void>

#### (async, static) setVisible(visible)

设置图层是否显示

##### Parameters:

Name | Type | Description
--- | --- | ---
`visible` | Boolean | 图层是否显示

Source:
  - MapLayer.js, line 114

#### (async, static) setWeight(Weight)

设置图层的权重

##### Parameters:

Name | Type | Description
--- | --- | ---
`Weight` | String | 权重

Source:
  - MapLayer.js, line 201