# Class: VectorLabel

## VectorLabel()

#### new VectorLabel()

矢量标注

Source:
  - VectorLabel.js, line 15

### Methods

#### (async, static) fromXML(strXML) → {boolean}

从XML导入

##### Parameters:

Name | Type | Description
--- | --- | ---
`strXML` |  | XML串

Source:
  - VectorLabel.js, line 281

##### Returns:

成功/失败 true/false

Type
  boolean

#### (async, static) getLabelClientOutSide() → {boolean}

获取是否屏幕外标注,允许存在不完整的标注

Source:
  - VectorLabel.js, line 235

##### Returns:

Type
  boolean

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

获取标注类型

Source:
  - VectorLabel.js, line 98

##### Returns:

标注类型，例：1-LabelGeomType.PointGeom

Type
  int

#### (async, static) getLinPlaceInfo() → {Promise.<LinePlaceInfo>}

获取线放置样式

Source:
  - VectorLabel.js, line 165

##### Returns:

Type
  Promise.<LinePlaceInfo>

#### (async, static) getMaxScale() → {double}

获取最大显示比

Source:
  - VectorLabel.js, line 68

##### Returns:

最大显示比

Type
  double

#### (async, static) getMinScale() → {double}

获取最小显示比

Source:
  - VectorLabel.js, line 38

##### Returns:

最小显示比

Type
  double

#### (async, static) getPntPlaceInfo() → {Promise.<PointPlaceInfo>}

获取点放置样式

Source:
  - VectorLabel.js, line 128

##### Returns:

Type
  Promise.<PointPlaceInfo>

#### (async, static) getRegPlaceInfo() → {Promise.<RegionPlaceInfo>}

获取区放置样式

Source:
  - VectorLabel.js, line 200

##### Returns:

Type
  Promise.<RegionPlaceInfo>

#### (async, static) setLabelClientOutSide(labelClientOutSide) → {Promise.<Void>}

设置是否屏幕外标注,允许存在不完整的标注

##### Parameters:

Name | Type | Description
--- | --- | ---
`labelClientOutSide` | boolean | 是否屏幕外标注

Source:
  - VectorLabel.js, line 251

##### Returns:

Type
  Promise.<Void>

#### (async, static) setLabelGeomType(labelGeomType) → {Promise.<Void>}

设置标注类型

##### Parameters:

Name | Type | Description
--- | --- | ---
`labelGeomType` | int | 标注类型，例：1-LabelGeomType.PointGeom

Source:
  - VectorLabel.js, line 114

##### Returns:

Type
  Promise.<Void>

#### (async, static) setLinPlaceInfo(linPlaceInfo) → {Promise.<Void>}

设置线放置样式

##### Parameters:

Name | Type | Description
--- | --- | ---
`linPlaceInfo` | Object | 线放置样式 (Object--LinePlaceInfo)

Source:
  - VectorLabel.js, line 183

##### Returns:

Type
  Promise.<Void>

#### (async, static) setMaxScale(maxScale) → {Promise.<Void>}

设置最大显示比

##### Parameters:

Name | Type | Description
--- | --- | ---
`maxScale` | double | 最大显示比

Source:
  - VectorLabel.js, line 84

##### Returns:

Type
  Promise.<Void>

#### (async, static) setMinScale(minScale) → {Promise.<Void>}

设置最小显示比

##### Parameters:

Name | Type | Description
--- | --- | ---
`minScale` | double | 最小显示比

Source:
  - VectorLabel.js, line 54

##### Returns:

Type
  Promise.<Void>

#### (async, static) setPntPlaceInfo(pointPlaceInfo) → {Promise.<Void>}

设置点放置样式

##### Parameters:

Name | Type | Description
--- | --- | ---
`pointPlaceInfo` | Object | 点放置样式 (object--PointPlaceInfo)

Source:
  - VectorLabel.js, line 148

##### Returns:

Type
  Promise.<Void>

#### (async, static) setRegPlaceInfo(regPlaceInfo) → {Promise.<Void>}

设置区放置样式

##### Parameters:

Name | Type | Description
--- | --- | ---
`regPlaceInfo` | Object | 区放置样式 （Object--RegionPlaceInfo）

Source:
  - VectorLabel.js, line 218

##### Returns:

Type
  Promise.<Void>

#### (async, static) toXML() → {String}

保存为XML

Source:
  - VectorLabel.js, line 265

##### Returns:

成功返回XML

Type
  String