Class: SimpleLabel

cercalia.SimpleLabel

cercalia.SimpleLabel

new cercalia.SimpleLabel(options)

Name Type Description
options

Marker options

Name Type Description
color string | undefined optional

Text color.

fontBold boolean | undefined optional

Bold text. Default: false.

fontFamily string | undefined optional

Text font.

fontSize number | undefined optional

Text size, in pixels.

offsetX number | undefined optional

Simpel Label horizontal offset, in pixels. Default value: 0.

offsetY number | undefined optional

Simpel Label vertical offset, in pixels. Default value: 0.

strokeColor string | undefined optional

Stroke color.

strokeWidth string | undefined optional

Stroke width.

rotation number | undefined optional

Text rotation.

text string

Simple Label text (with no background).

visible boolean | undefined optional

Text visibility. Default value true.

Methods

Destroy object

Returns the object type.

Returns displacement on the vertical axis

Returns text font

Returns text font

Returns displacement on the horizontal axis

Returns displacement on the vertical axis

Returns SimpleLabel rotation

Returns outline color

Devuelve la anchura del contorno

Returns the text

Returns the textAux

getTextStyle(){ol.style.Text}

Returns:
visible Returns if SimpleLabel is visible

Assign a marker to this SimpleLabel

Name Type Description
feature cercalia.Feature

Change text color. If have an assigned marker updates it

Name Type Description
fillColor string

Change the text passed by parameter. If have an assigned marker updates it

Name Type Description
fontBold boolean

Change the text passed by parameter. If have an assigned marker updates it

Name Type Description
fontFamily string

Change the text size in pixels. If have an assigned marker updates it

Name Type Description
fontSize number

Assign a marker to this SimpleLabel

Name Type Description
marker cercalia.Marker

Change displacement on the horizontal axis. If have an assigned marker updates it

Name Type Description
offsetX number

Change displacement on the vertical axis. If have an assigned marker updates it

Name Type Description
offsetY number

Change the text passed by parameter. If have an assigned marker updates it

Name Type Description
rotation number

Change outline color. If have an assigned marker updates it

Name Type Description
strokeColor string

Change outline widht. If null, sets 0 value. If have an assigned marker updates it

Name Type Description
strokeWidth string

Change the text passed by parameter. If have an assigned marker updates it

Name Type Description
text string

Show / hide label

Name Type Description
visible boolean