Class: ExtendProperty

SuperMap.Plot.ExtendProperty

标绘对象的自定义属性类,维护 SuperMap.Plot.Property 的列表。

new SuperMap.Plot.ExtendProperty(options)

common/plot/ExtendProperty.js, line 2
Name Type Description
options Object

参数。

Name Type Description
properties Array.<SuperMap.Plot.Property> 可选

自定义属性列表。

Members

propertiesArray.<SuperMap.Plot.Property>

自定义属性列表。

Methods

addProperty(key, value){boolean}

common/plot/ExtendProperty.js, line 22

添加用户自定义属性,如果属性已存在,则修改相应的属性值。

Name Type Description
key string

属性的关键字。

value string

属性的值。

Returns:
Type Description
boolean 添加属性是否成功,如果已存在key的自定义属性,则更新,反之则添加,成功返回true。

deleteProperty(key){boolean}

common/plot/ExtendProperty.js, line 40

删除用户自定义属性。

Name Type Description
key string

属性的关键字。

Returns:
Type Description
boolean 删除属性是否成功,成功返回true,失败返回false。

destroy()

common/plot/ExtendProperty.js, line 109

销毁该类,释放相关资源。

findProperty(key){Object}

common/plot/ExtendProperty.js, line 56

查找用户自定义属性。

Name Type Description
key string

属性的关键字。

Returns:
Type Description
Object 查找成功则返回查找到的自定义属性Property,否则返回null。

getPropertyByIndex(index){Object}

common/plot/ExtendProperty.js, line 86

根据索引值查找用户自定义属性。

Name Type Description
index number

属性的索引值。

Returns:
Type Description
Object 查找成功则返回查找到的自定义属性Property,否则返回null。

getPropertyCount(){number}

common/plot/ExtendProperty.js, line 100

返回自定义属性个数。

Returns:
Type Description
number 返回自定义属性个数。

getPropertyValue(key){Object}

common/plot/ExtendProperty.js, line 71

根据索引值查找用户自定义属性的值。

Name Type Description
key string

属性的关键字。

Returns:
Type Description
Object 查找成功则返回查找到的自定义属性的值,否则返回null。