# Class: GeoPolygon

## GeoPolygon()

#### new GeoPolygon()

Source:
  - GeoPolygon.js, line 13

### Methods

#### (async, static) append(ptLines) → {Promise}

添加多线

##### Parameters:

Name | Type | Description
--- | --- | ---
`ptLines` |  | 待添加的多线对象

Source:
  - GeoPolygon.js, line 123

##### Returns:

添加成功返回1，失败返回0

Type
  Promise

#### (async, static) calArea() → {Promise}

求多边形面积

Source:
  - GeoPolygon.js, line 199

##### Returns:

面积

Type
  Promise

#### (async, static) calAreaOfSRef(sRef) → {Promise}

求多边形面积

##### Parameters:

Name | Type | Description
--- | --- | ---
`sRef` |  | 投影系

Source:
  - GeoPolygon.js, line 186

##### Returns:

面积

Type
  Promise

#### (async, static) calLabel() → {Promise}

求label点

Source:
  - GeoPolygon.js, line 239

##### Returns:

周长

Type
  Promise

#### (async, static) calPerimeter() → {Promise}

求周长

Source:
  - GeoPolygon.js, line 226

##### Returns:

周长

Type
  Promise

#### (async, static) calPerimeterOfSRef(sRef) → {Promise}

求周长

##### Parameters:

Name | Type | Description
--- | --- | ---
`sRef` |  | 投影系

Source:
  - GeoPolygon.js, line 213

##### Returns:

周长

Type
  Promise

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

构造一个新的 GeoPolygon 对象

Source:
  - GeoPolygon.js, line 34

##### Returns:

Type
  Promise.<GeoPolygon>

#### (async, static) del(index) → {Promise}

删除多边形

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待删除多边形序号

Source:
  - GeoPolygon.js, line 96

##### Returns:

删除成功返回1，失败返回0

Type
  Promise

#### (async, static) distance(type, destGeom) → {Promise}

计算两个几何对象间的距离

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` |  | 距离计算方法
`destGeom` |  | 第二个几何对象

Source:
  - GeoPolygon.js, line 78

##### Returns:

距离长度

Type
  Promise

#### (async, static) get(index) → {Promise.<GeoLines>}

取多线

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待取的多线的序号

Source:
  - GeoPolygon.js, line 137

##### Returns:

获取的多线对象

Type
  Promise.<GeoLines>

#### (async, static) getCircleNum() → {Promise}

取圆线数目

Source:
  - GeoPolygon.js, line 109

##### Returns:

圆线的总个数

Type
  Promise

#### (async, static) getDimension() → {Promise}

取几何维数

Source:
  - GeoPolygon.js, line 63

##### Returns:

几何维数

Type
  Promise

#### (async, static) getDots(index) → {Promise.<Dots>}

获取一圈的点序列

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待取的点序列的序号

Source:
  - GeoPolygon.js, line 169

##### Returns:

获取的点序列

Type
  Promise.<Dots>

#### (async, static) getType() → {Promise}

获取几何对象的类型

Source:
  - GeoPolygon.js, line 50

##### Returns:

几何对象类型

Type
  Promise

#### (async, static) setDots(dots, numArray) → {Promise}

由点构造多边形

##### Parameters:

Name | Type | Description
--- | --- | ---
`dots` |  | 待设置的所有点序列
`numArray` | Array | 每条线的点个数列表

Source:
  - GeoPolygon.js, line 155

##### Returns:

构造成功返回1，失败返回0

Type
  Promise