java.lang.Object | ||||
↳ | com.carto.vectorelements.VectorElement | |||
↳ | com.carto.vectorelements.Billboard | |||
↳ | com.carto.vectorelements.Label | |||
↳ | com.carto.vectorelements.Text |
A text element that can be displayed on the map.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Text(Billboard baseBillboard, TextStyle style, String text)
Constructs a Text object with the specified style and attaches it to a billboard element.
| |||||||||||
Text(Geometry geometry, TextStyle style, String text)
Constructs a Text object from a geometry object and a style.
| |||||||||||
Text(MapPos pos, TextStyle style, String text)
Constructs a Text object from a map position and a style.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
Bitmap |
drawBitmap(float dpToPX)
Draws a custom bitmap for this label that will be used for drawing the label on the map.
| ||||||||||
TextStyle |
getStyle()
Returns the style of this text label.
| ||||||||||
String |
getText()
Returns the display text.
| ||||||||||
void |
setStyle(TextStyle style)
Sets the style for this text label.
| ||||||||||
void |
setText(String text)
Sets the display text.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a Text object with the specified style and attaches it to a billboard element.
baseBillboard | The billboard this text label will be attached to. |
---|---|
style | The style that defines what this text label looks like. |
text | The text to be displayed. |
Constructs a Text object from a geometry object and a style.
geometry | The geometry object that defines the location of this text label. |
---|---|
style | The style that defines what this text label looks like. |
text | The text to be displayed. |
Constructs a Text object from a map position and a style.
pos | The map position that defines the location of this text label. |
---|---|
style | The style that defines what this text label looks like. |
text | The text to be displayed. |
Draws a custom bitmap for this label that will be used for drawing the label on the map.
The method is called each time the label gets reloaded internally.
dpToPX | The value used for converting display independent pixels (dp) to pixels (px). |
---|
Returns the style of this text label.
Returns the display text.
Sets the style for this text label.
style | The new style that defines what this text label looks like. |
---|
Sets the display text.
text | The text to be displayed. |
---|