# Class: AnnotationCls

## AnnotationCls()

#### new AnnotationCls()

注记类对象

Source:
  - AnnotationCls.js, line 19

### Methods

#### (async, static) annToField(fldIndex, whereClause) → {Promise}

保存注记文本到属性

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` |  | 属性序号
`whereClause` |  | 注记文本

Source:
  - AnnotationCls.js, line 646

##### Returns:

成功：>0；失败:<=0

Type
  Promise

#### (async, static) append(geom, rcd, inf) → {Promise}

添加对象

##### Parameters:

Name | Type | Description
--- | --- | ---
`geom` |  | 对象几何信息
`rcd` |  | 对象属性信息
`inf` |  | 对象的图形信息

Source:
  - AnnotationCls.js, line 257

##### Returns:

成功：添加的对象ID；失败:<=0

Type
  Promise

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

清空类

Source:
  - AnnotationCls.js, line 125

##### Returns:

成功：>0;失败：<=0

Type
  Promise

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

关闭类

Source:
  - AnnotationCls.js, line 138

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) create(gdb, name, annType, dsID, srID, flds) → {Promise}

创建注记类

##### Parameters:

Name | Type | Description
--- | --- | ---
`gdb` |  | 地理数据库对象
`name` |  | 类对象名称
`annType` |  | 几何形态约束类型
`dsID` |  | 数据集ID
`srID` |  | 空间参考系ID
`flds` |  | 属性结构

Source:
  - AnnotationCls.js, line 64

##### Returns:

创建类对象ID

Type
  Promise

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

构造一个新的 AnnotationCls 对象。

Source:
  - AnnotationCls.js, line 41

##### Returns:

注记类对象

Type
  Promise.<AnnotationCls>

#### (async, static) deleteByID(objID) → {Promise}

删除一个注记要素类

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 注记要素类ID

Source:
  - AnnotationCls.js, line 538

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) deleteByIDs(objIDs) → {Promise}

删除一组注记要素类

##### Parameters:

Name | Type | Description
--- | --- | ---
`objIDs` |  | 一组注记要素类ID

Source:
  - AnnotationCls.js, line 552

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) get(objID, ptGeom, ptRcd, ptInf) → {Promise}

取对象信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID
`ptGeom` |  | 对象几何信息
`ptRcd` |  | 对象属性信息
`ptInf` |  | 对象的图形信息

Source:
  - AnnotationCls.js, line 316

##### Returns:

成功：>0;失败：<=0

Type
  Promise

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

取类别名

Source:
  - AnnotationCls.js, line 443

##### Returns:

类别名

Type
  Promise

#### (async, static) getAnnType(objID)

获取要素几何类型

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 要素ID

Source:
  - AnnotationCls.js, line 390

#### (async, static) getAtt(objID) → {Promise.<Record>}

取对象的属性信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID

Source:
  - AnnotationCls.js, line 336

##### Returns:

对象的属性信息

Type
  Promise.<Record>

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

取当前注记类对应的要素类ID

Source:
  - AnnotationCls.js, line 209

##### Returns:

要素类ID

Type
  Promise

#### (async, static) getClsInfo() → {Promise.<AnnClsInfo>}

获取当前注记类的信息

Source:
  - AnnotationCls.js, line 222

##### Returns:

注记类的信息

Type
  Promise.<AnnClsInfo>

#### (async, static) getClsName()

获取注记要素类名称

Source:
  - AnnotationCls.js, line 403

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

获取注记类的要素类类型

Source:
  - AnnotationCls.js, line 196

##### Returns:

要素类类型

Type
  Promise

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

获取注记类要素数目

Source:
  - AnnotationCls.js, line 167

##### Returns:

要素数目

Type
  Promise

#### (async, static) getFields() → {Promise.<Fields>}

获取当前注记类的属性结构

Source:
  - AnnotationCls.js, line 238

##### Returns:

属性结构

Type
  Promise.<Fields>

#### (async, static) getGDataBase() → {Promise.<DataBase>}

获取地理数据库

Source:
  - AnnotationCls.js, line 151

##### Returns:

地理数据库对象

Type
  Promise.<DataBase>

#### (async, static) getGeometry(objID) → {Promise.<Geometry>}

取对象几何信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID

Source:
  - AnnotationCls.js, line 353

##### Returns:

对象几何信息

Type
  Promise.<Geometry>

#### (async, static) getInfo(objID) → {Promise.<GeomInfo>}

获取对象图形信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID

Source:
  - AnnotationCls.js, line 373

##### Returns:

对象图形信息

Type
  Promise.<GeomInfo>

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

获取注记类的矩形范围

Source:
  - AnnotationCls.js, line 180

##### Returns:

矩形范围

Type
  Promise.<Rect>

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

取要素矩形范围

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID

Source:
  - AnnotationCls.js, line 296

##### Returns:

矩形范围

Type
  Promise.<Rect>

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

获取X方向符号比

Source:
  - AnnotationCls.js, line 497

##### Returns:

X方向符号比

Type
  Promise

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

获取Y方向符号比

Source:
  - AnnotationCls.js, line 510

##### Returns:

Y方向符号比

Type
  Promise

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

取空间参考系ID

Source:
  - AnnotationCls.js, line 470

##### Returns:

空间参考系ID

Type
  Promise

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

取类URL

Source:
  - AnnotationCls.js, line 430

##### Returns:

URL串

Type
  Promise

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

是否已经打开

Source:
  - AnnotationCls.js, line 112

##### Returns:

是否打开

Type
  Promise

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

是否具有同步能力

Source:
  - AnnotationCls.js, line 714

##### Returns:

是否具有同步能力

Type
  Promise

#### (async, static) openByID(id) → {Promise}

打开注记要素类图层

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` |  | 图层ID

Source:
  - AnnotationCls.js, line 85

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) openByName(name) → {Promise}

打开注记要素类

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` |  | 注记要素类名称

Source:
  - AnnotationCls.js, line 99

##### Returns:

成功：类对象ID;失败：<=0

Type
  Promise

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

注册同步能力

Source:
  - AnnotationCls.js, line 701

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) removeByID(db, clsID) → {Promise}

根据注记要素类ID删除类

##### Parameters:

Name | Type | Description
--- | --- | ---
`db` |  | 地理数据库对象
`clsID` |  | 类ID

Source:
  - AnnotationCls.js, line 684

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) removeByName(db, clsName) → {Promise}

根据注记要素类名删除类

##### Parameters:

Name | Type | Description
--- | --- | ---
`db` |  | 地理数据库对象
`clsName` |  | 类名

Source:
  - AnnotationCls.js, line 665

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) select(def) → {Promise.<RecordSet>}

查询

##### Parameters:

Name | Type | Description
--- | --- | ---
`def` |  | 查询条件

Source:
  - AnnotationCls.js, line 276

##### Returns:

记录集对象

Type
  Promise.<RecordSet>

#### (async, static) setAliasName(newVal) → {Promise}

设置类别名

##### Parameters:

Name | Type | Description
--- | --- | ---
`newVal` |  | 类别名

Source:
  - AnnotationCls.js, line 457

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) setClsName(newVal) → {Promise.<void>}

设置注记要素类名称

##### Parameters:

Name | Type | Description
--- | --- | ---
`newVal` |  | 类名称

Source:
  - AnnotationCls.js, line 417

##### Returns:

Type
  Promise.<void>

#### (async, static) setScaleXY(scale) → {Promise}

设置X,Y方向符号比

##### Parameters:

Name | Type | Description
--- | --- | ---
`scale` |  | 符号比

Source:
  - AnnotationCls.js, line 524

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) setSrID(newVal) → {Promise}

设置要素数据集ID

##### Parameters:

Name | Type | Description
--- | --- | ---
`newVal` |  | 要素数据集ID

Source:
  - AnnotationCls.js, line 484

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) update(objID, geom, rcd, inf) → {Promise}

更新对象

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID
`geom` |  | 对象几何信息
`rcd` |  | 对象属性信息
`inf` |  | 对象的图形信息

Source:
  - AnnotationCls.js, line 569

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) updateAtt(objID, rcd) → {Promise}

更新对象的属性

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID
`rcd` |  | 对象属性信息

Source:
  - AnnotationCls.js, line 590

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) updateFields(fields) → {Promise}

更新注记要素类类

##### Parameters:

Name | Type | Description
--- | --- | ---
`fields` |  | 属性信息

Source:
  - AnnotationCls.js, line 728

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) updateGeometry(objID, geom) → {Promise}

更新几何图形信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID
`geom` |  | 几何对象

Source:
  - AnnotationCls.js, line 609

##### Returns:

成功：>0;失败：<=0

Type
  Promise

#### (async, static) updateInfo(objID, inf) → {Promise}

更新对象图形信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`objID` |  | 对象记录ID
`inf` |  | 对象的图形信息

Source:
  - AnnotationCls.js, line 628

##### Returns:

成功：>0;失败：<=0

Type
  Promise