Summary
Methods:
| getAttributes |
获得要素的自定义属性 |
| getCenter |
获取中心点 |
| getCoordinates |
获取坐标数组 |
| getId |
获取唯一标识 |
| getSymbol |
获得定义的样式对象 |
| getType |
获取要素类型 |
| getVisibility |
获得要素的可见性 |
| setAttributes |
设置要素的自定义属性 |
| setCoordinates |
设置坐标数组 |
| setSymbol |
设置样式 |
| setVisibility |
设置 Point 的可见性 |
Constructor
new Point(coordinates, attributes, symbol)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coordinates |
Array.<Number> | 线的坐标数组[x,y]; |
|||||||||||||||||||||||||||
attributes |
Object | 自定义属性 |
|||||||||||||||||||||||||||
symbol |
Object | 多边形样式定义
|
Methods
-
getAttributes() → {Object}
-
获得要素的自定义属性
Returns:
Object -
getCenter() → {Array.<Number>}
-
获取中心点
Returns:
Array.<Number> -
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> 坐标数组
-
setSymbol(symbol)
-
设置样式
Parameters:
Name Type Description symbolObject 多边形样式定义
Name Type Description colorString 如果设置了icon,icon优先级高 默认红色
iconString 填充图片的URL,如果icon未定义,将用圆形展示
rotationNumber 旋转角度,单位是角度制。角度为正值进行逆时针旋转;角度为负值进行顺时针旋转
opacityNumber 透明度 默认1
offsetArray.<Number> 点要素的偏移量,单位是像素
sizeArray.<Number> 图片大小
-
setVisibility(visible)
-
设置 Point 的可见性
Parameters:
Name Type Description visibleBoolean