new ExtendProperty(options)
Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
new SuperMap.Plot.ExtendProperty(options);
</script>
// ES6 Import
import { ExtendProperty } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new ExtendProperty(options);
common/plot/ExtendProperty.js, line 2
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object |
参数。
|
Members
-
propertiesArray.<Property>
-
自定义属性列表。
Methods
-
addProperty(key, value){boolean}
common/plot/ExtendProperty.js, line 24 -
添加用户自定义属性,如果属性已存在,则修改相应的属性值。
Name Type Description key
string 属性的关键字。
value
string 属性的值。
Returns:
Type Description boolean 添加属性是否成功,如果已存在key的自定义属性,则更新,反之则添加,成功返回true。 -
deleteProperty(key){boolean}
common/plot/ExtendProperty.js, line 42 -
删除用户自定义属性。
Name Type Description key
string 属性的关键字。
Returns:
Type Description boolean 删除属性是否成功,成功返回true,失败返回false。 -
destroy()
common/plot/ExtendProperty.js, line 111 -
销毁该类,释放相关资源。
-
findProperty(key){Object}
common/plot/ExtendProperty.js, line 58 -
查找用户自定义属性。
Name Type Description key
string 属性的关键字。
Returns:
Type Description Object 查找成功则返回查找到的自定义属性Property,否则返回null。 -
getPropertyByIndex(index){Object}
common/plot/ExtendProperty.js, line 88 -
根据索引值查找用户自定义属性。
Name Type Description index
number 属性的索引值。
Returns:
Type Description Object 查找成功则返回查找到的自定义属性Property,否则返回null。 -
getPropertyCount(){number}
common/plot/ExtendProperty.js, line 102 -
返回自定义属性个数。
Returns:
Type Description number 返回自定义属性个数。 -
getPropertyValue(key){Object}
common/plot/ExtendProperty.js, line 73 -
根据索引值查找用户自定义属性的值。
Name Type Description key
string 属性的关键字。
Returns:
Type Description Object 查找成功则返回查找到的自定义属性的值,否则返回null。