Summary
Methods:
| getAttributes |
获得要素的自定义属性 |
| getCoordinates |
获取坐标数组 |
| getId |
获取唯一标识 |
| getSymbol |
获得定义的样式对象 |
| getType |
获取要素类型 |
| getVisibility |
获得要素的可见性 |
| setAttributes |
设置要素的自定义属性 |
| setCoordinates |
设置坐标数组 |
| setSymbol |
设置样式对象 |
| setVisibility |
设置要素的可见性 |
Constructor
new abstract BaseFeature(coordinates, attributes, symbol)
Parameters:
| Name | Type | Description |
|---|---|---|
coordinates |
Array.<Number> | Array.<Array.<Number>> | 坐标数组 |
attributes |
Object | 自定义属性 |
symbol |
Object | 要素的样式 |
Throws:
PanoError
-
coordinates不是数据的时候抛出异常
Methods
-
getAttributes() → {Object}
-
获得要素的自定义属性
Returns:
Object -
getCoordinates()
-
获取坐标数组
-
getId() → {String}
-
获取唯一标识
Returns:
String -
getSymbol() → {Object}
-
获得定义的样式对象
Returns:
Object -
getType() → {String}
-
获取要素类型
Returns:
String -
getVisibility() → {Boolean}
-
获得要素的可见性
Returns:
Boolean -
setAttributes(attributes)
-
设置要素的自定义属性
Parameters:
Name Type Description attributesObject -
setCoordinates(coordinates)
-
设置坐标数组
Parameters:
Name Type Description coordinatesArray.<Number> | Array.<Array.<Number>> 坐标数组
-
setSymbol(symbol;)
-
设置样式对象
Parameters:
Name Type Description symbol;Object -
setVisibility(visible)
-
设置要素的可见性
Parameters:
Name Type Description visibleBoolean