feature~Point(coordinates, attributes, symbol)

点要素

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

多边形样式定义

Name Type Description
icon String

填充图片的URL,如果icon为定义,将用圆形展示

color String

如果设置了icon,icon优先级高(此项将无效) 默认 #ff0000

strokeColor String

如果设置了icon,icon优先级高(此项将无效) 默认 #000000

strokeWidth String

如果设置了icon,icon优先级高(此项将无效) 默认 1

rotation Number

旋转角度,单位是角度制。角度为正值进行逆时针旋转;角度为负值进行顺时针旋转

opacity Number

透明度 默认1

offset Array.<Number>

点要素的偏移量,单位是像素

size Array.<Number>

图片大小

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
attributes Object

setCoordinates(coordinates)

设置坐标数组

Parameters:
Name Type Description
coordinates Array.<Number>

坐标数组

setSymbol(symbol)

设置样式

Parameters:
Name Type Description
symbol Object

多边形样式定义

Name Type Description
color String

如果设置了icon,icon优先级高 默认红色

icon String

填充图片的URL,如果icon未定义,将用圆形展示

rotation Number

旋转角度,单位是角度制。角度为正值进行逆时针旋转;角度为负值进行顺时针旋转

opacity Number

透明度 默认1

offset Array.<Number>

点要素的偏移量,单位是像素

size Array.<Number>

图片大小

setVisibility(visible)

设置 Point 的可见性

Parameters:
Name Type Description
visible Boolean