# Class: GroupLayer

## GroupLayer()

#### new GroupLayer()

组图层对象功能组件

Source:
  - GroupLayer.js, line 20

### Methods

#### (async, static) append(mapLayer) → {int}

添加图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`mapLayer` | Object | 添加的MapLayer

Source:
  - GroupLayer.js, line 109

##### Returns:

图层ID

Type
  int

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

构造一个新GroupLayer对象

Source:
  - GroupLayer.js, line 42

##### Returns:

Type
  Promise.<GroupLayer>

#### (async, static) dragIn(index, mapLayer) → {boolean}

移入图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 移入的索引
`mapLayer` | Object | 图层对象

Source:
  - GroupLayer.js, line 224

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) dragOut(mapLayer) → {boolean}

移除图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`mapLayer` | Object | 图层对象

Source:
  - GroupLayer.js, line 208

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) getCount() → {int}

获取组图层个数

Source:
  - GroupLayer.js, line 59

##### Returns:

Type
  int

#### (async, static) getLayerEnum() → {LayerEnum}

获取图层枚举对象

Source:
  - GroupLayer.js, line 74

##### Returns:

Type
  LayerEnum

#### (async, static) indexOfByLayer(mapLayer) → {int}

图层索引

##### Parameters:

Name | Type | Description
--- | --- | ---
`mapLayer` | Object | 图层对象

Source:
  - GroupLayer.js, line 258

##### Returns:

成功：返回图层索引

Type
  int

#### (async, static) indexOfByLayerName(layerName) → {int}

图层索引

##### Parameters:

Name | Type | Description
--- | --- | ---
`layerName` | String | 图层名称

Source:
  - GroupLayer.js, line 243

##### Returns:

成功：返回图层索引

Type
  int

#### (async, static) insert(index, mapLayer) → {int}

插入图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 插入的索引
`mapLayer` | Object | 插入的图层对象

Source:
  - GroupLayer.js, line 125

##### Returns:

图层ID

Type
  int

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

通过 索引 获取GroupLayer中的图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`i` | int | 索引

Source:
  - GroupLayer.js, line 91

##### Returns:

Type
  Promise.<MapLayer>

#### (async, static) move(fromIndex, toIndex) → {boolean}

移动图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`fromIndex` | String |
`toIndex` | String |

Source:
  - GroupLayer.js, line 337

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) moveToBottom(index) → {boolean}

移动图层到最下面（最后绘制）

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 图层ID

Source:
  - GroupLayer.js, line 276

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) moveToDown(index) → {boolean}

下移图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 图层ID

Source:
  - GroupLayer.js, line 306

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) moveToTop(index) → {boolean}

移动图层到最上面（最先绘制）

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 图层ID

Source:
  - GroupLayer.js, line 291

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) moveToUp(index) → {boolean}

上移图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 图层ID

Source:
  - GroupLayer.js, line 321

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) remove(fromIndex, nCount) → {boolean}

移除多个图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`fromIndex` | int | 移除开始的索引
`nCount` | int | 移除的个数

Source:
  - GroupLayer.js, line 163

##### Returns:

true/false : 成功/失败

Type
  boolean

#### (async, static) removeByLayer(mapLayer) → {boolean}

移除图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`mapLayer` | Object | 移除的图层对象

Source:
  - GroupLayer.js, line 144

##### Returns:

true/false ：成功/失败

Type
  boolean

#### (async, static) removeByLayerIndex(layerIndex) → {boolean}

移除图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`layerIndex` | int | 移除的图层ID

Source:
  - GroupLayer.js, line 178

##### Returns:

true/false : 成功/失败

Type
  boolean