Class: Linestring

cercalia.Linestring

LineString Calss. This class lets you create a LineString on the map, with a defined style.

new cercalia.Linestring(options)

Name Type Description
options cercaliax.LinestringOptions

Opciones del label

Methods

Destroy the object and its atributes to clean up memory

Returns:
LineString extension

getClass(){string}

Returns:
Object ClassName.

getFeature(){ol.Feature}

Returns:
Objeto OpenLayers3 ol.Feature

Returns Linestring path

Returns:
path

getStrokeColor(){string}

Returns:
Current line color

getStrokeOpacity(){number}

Returns:
Line opacity. Values between [0..1]

getStrokeWidth(){number}

Returns:
line width.

getZIndex(){number}

Returns:
CSS zIndex del Linestring

isDraggable(){boolean}

Returns:
If feature is draggable or not. Values true o false.

setDraggable(draggable)

Name Type Description
draggable boolean
Name Type Description
map cercalia.Map

Change Linestring path sended by parameter

Name Type Description
path Array.<cercalia.LonLat>

setStrokeColor(strokeColor)

Change the line color

Name Type Description
strokeColor string

setStrokeOpacity(strokeOpacity)

Change the line opacity (0-1)

Name Type Description
strokeOpacity number

setStrokeWidth(strokeWidth)

Change line width

Name Type Description
strokeWidth number

setZIndex(zIndex)

Change the zIndex

Name Type Description
zIndex number