Class: Feature

Feature()

new Feature()

Source:

Methods

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

无参构造。构造一个新的 Feature 对象。
Source:
Returns:
Type
Promise.<Feature>

(async, static) createObjByParam(attribute, geometry, geomInfo) → {Promise.<Feature>}

有参构造。通过attribute、geometry、geomInfo构造一个新的 Feature 对象。
Parameters:
Name Type Description
attribute Object 存有属性字段及对应值的对象,不可为null。例:let array = {name: '张三', age: 14};
geometry Geometry 几何对象
geomInfo GeomInfo 图形对象
Source:
Returns:
Type
Promise.<Feature>

(async, static) getAttributes()

获取要素属性
Source:

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

获取几何数据
Source:
Returns:
几何数据
Type
Promise.<Geometry>

(async, static) getID() → {Promise.<(*|*)>}

获取要素ID
Source:
Returns:
Type
Promise.<(*|*)>

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

获取几何信息
Source:
Returns:
几何信息
Type
Promise.<GeomInfo>

(async, static) modifyFeatureValue(attribute, geometry, geomInfo) → {Promise.<Number>}

修改要素值(包括属性信息,图形信息,几何信息)
Parameters:
Name Type Description
attribute Object 属性信息,JSON格式的字符串,暂不支持null。例let attribute = {"LayerID":"0","ID":"1"}
geometry Geometry 图形信息
geomInfo GeomInfo 几何信息
Source:
Returns:
大于0成功,否则失败
Type
Promise.<Number>

(async, static) reSet() → {Promise.<long>}

清空
Source:
Returns:
大于0成功,否则失败
Type
Promise.<long>

(async, static) toGraphics() → {Promise.<Array>}

要素转Graphic
Source:
Returns:
Type
Promise.<Array>