new cercalia.SimpleLabel(options)
Name | Type | Description |
---|---|---|
options |
cercaliax.SimpleLabelOptions |
Marker options |
Methods
-
destroy()
-
Destroy object
-
getClass(){string}
-
Returns the object type.
-
getFillColor(){number}
-
Returns displacement on the vertical axis
-
getFontFamily(){string}
-
Returns text font
-
getFontSize(){number}
-
Returns text font
-
getOffsetX(){number}
-
Returns displacement on the horizontal axis
-
getOffsetY(){number}
-
Returns displacement on the vertical axis
-
getRotation(){number}
-
Returns SimpleLabel rotation
-
getStrokeColor(){number}
-
Returns outline color
-
getStrokeWidth(){number}
-
Devuelve la anchura del contorno
-
getText(){string}
-
Returns the text
-
getTextAux(){string}
-
Returns the textAux
-
getTextStyle(){ol.style.Text}
-
-
isFontBold(){boolean}
-
-
isVisible(){boolean}
-
Returns:
visible Returns if SimpleLabel is visible
-
setFeature(feature)
-
Assign a marker to this SimpleLabel
Name Type Description feature
cercalia.Feature -
setFillColor(fillColor)
-
Change text color. If have an assigned marker updates it
Name Type Description fillColor
string -
setFontBold(fontBold)
-
Change the text passed by parameter. If have an assigned marker updates it
Name Type Description fontBold
boolean -
setFontFamily(fontFamily)
-
Change the text passed by parameter. If have an assigned marker updates it
Name Type Description fontFamily
string -
setFontSize(fontSize)
-
Change the text size in pixels. If have an assigned marker updates it
Name Type Description fontSize
number -
setMarker(marker)
-
Assign a marker to this SimpleLabel
Name Type Description marker
cercalia.Marker -
setOffsetX(offsetX)
-
Change displacement on the horizontal axis. If have an assigned marker updates it
Name Type Description offsetX
number -
setOffsetY(offsetY)
-
Change displacement on the vertical axis. If have an assigned marker updates it
Name Type Description offsetY
number -
setRotation(rotation)
-
Change the text passed by parameter. If have an assigned marker updates it
Name Type Description rotation
number -
setStrokeColor(strokeColor)
-
Change outline color. If have an assigned marker updates it
Name Type Description strokeColor
string -
setStrokeWidth(strokeWidth)
-
Change outline widht. If null, sets 0 value. If have an assigned marker updates it
Name Type Description strokeWidth
string -
setText(text)
-
Change the text passed by parameter. If have an assigned marker updates it
Name Type Description text
string -
setVisible(visible)
-
Show / hide label
Name Type Description visible
boolean