-
@UiThread() public class Symbol extends Annotation<Point>
-
-
Method Summary
Modifier and Type Method Description voidsetLatLng(LatLng latLng)Set the LatLng of the symbol, which represents the location of the symbol on the mapTo update the symbol on the map use update. LatLnggetLatLng()Get the LatLng of the symbol, which represents the location of the symbol on the map FloatgetSymbolSortKey()Get the SymbolSortKey propertySorts features in ascending order based on this value. voidsetSymbolSortKey(Float value)Set the SymbolSortKey propertySorts features in ascending order based on this value. FloatgetIconSize()Get the IconSize propertyScales the original size of the icon by the provided factor. voidsetIconSize(Float value)Set the IconSize propertyScales the original size of the icon by the provided factor. StringgetIconImage()Get the IconImage propertyName of image in sprite to use for drawing an image background. voidsetIconImage(String value)Set the IconImage propertyName of image in sprite to use for drawing an image background. FloatgetIconRotate()Get the IconRotate propertyRotates the icon clockwise. voidsetIconRotate(Float value)Set the IconRotate propertyRotates the icon clockwise. PointFgetIconOffset()Get the IconOffset propertyOffset distance of icon from its anchor. voidsetIconOffset(PointF pointF)Set the IconOffset property. StringgetIconAnchor()Get the IconAnchor propertyPart of the icon placed closest to the anchor. voidsetIconAnchor(String value)Set the IconAnchor propertyPart of the icon placed closest to the anchor. StringgetTextField()Get the TextField propertyValue to use for a text label. voidsetTextField(String value)Set the TextField propertyValue to use for a text label. Array<String>getTextFont()Get the TextFont propertyFont stack to use for displaying text. voidsetTextFont(Array<String> value)Set the TextFont property. FloatgetTextSize()Get the TextSize propertyFont size. voidsetTextSize(Float value)Set the TextSize propertyFont size. FloatgetTextMaxWidth()Get the TextMaxWidth propertyThe maximum line width for text wrapping. voidsetTextMaxWidth(Float value)Set the TextMaxWidth propertyThe maximum line width for text wrapping. FloatgetTextLetterSpacing()Get the TextLetterSpacing propertyText tracking amount. voidsetTextLetterSpacing(Float value)Set the TextLetterSpacing propertyText tracking amount. StringgetTextJustify()Get the TextJustify propertyText justification options. voidsetTextJustify(String value)Set the TextJustify propertyText justification options. FloatgetTextRadialOffset()Get the TextRadialOffset propertyRadial offset of text, in the direction of the symbol's anchor. voidsetTextRadialOffset(Float value)Set the TextRadialOffset propertyRadial offset of text, in the direction of the symbol's anchor. StringgetTextAnchor()Get the TextAnchor propertyPart of the text placed closest to the anchor. voidsetTextAnchor(String value)Set the TextAnchor propertyPart of the text placed closest to the anchor. FloatgetTextRotate()Get the TextRotate propertyRotates the text clockwise. voidsetTextRotate(Float value)Set the TextRotate propertyRotates the text clockwise. StringgetTextTransform()Get the TextTransform propertySpecifies how to capitalize text, similar to the CSS textTransform property. voidsetTextTransform(String value)Set the TextTransform propertySpecifies how to capitalize text, similar to the CSS textTransform property. PointFgetTextOffset()Get the TextOffset propertyOffset distance of text from its anchor. voidsetTextOffset(PointF pointF)Set the TextOffset property. FloatgetIconOpacity()Get the IconOpacity propertyThe opacity at which the icon will be drawn. voidsetIconOpacity(Float value)Set the IconOpacity propertyThe opacity at which the icon will be drawn. intgetIconColorAsInt()Get the IconColor propertyThe color of the icon. StringgetIconColor()Get the IconColor propertyThe color of the icon. voidsetIconColor(@ColorInt() int color)Set the IconColor propertyThe color of the icon. voidsetIconColor(@NonNull() String color)Set the IconColor propertyThe color of the icon. intgetIconHaloColorAsInt()Get the IconHaloColor propertyThe color of the icon's halo. StringgetIconHaloColor()Get the IconHaloColor propertyThe color of the icon's halo. voidsetIconHaloColor(@ColorInt() int color)Set the IconHaloColor propertyThe color of the icon's halo. voidsetIconHaloColor(@NonNull() String color)Set the IconHaloColor propertyThe color of the icon's halo. FloatgetIconHaloWidth()Get the IconHaloWidth propertyDistance of halo to the icon outline. voidsetIconHaloWidth(Float value)Set the IconHaloWidth propertyDistance of halo to the icon outline. FloatgetIconHaloBlur()Get the IconHaloBlur propertyFade out the halo towards the outside. voidsetIconHaloBlur(Float value)Set the IconHaloBlur propertyFade out the halo towards the outside. FloatgetTextOpacity()Get the TextOpacity propertyThe opacity at which the text will be drawn. voidsetTextOpacity(Float value)Set the TextOpacity propertyThe opacity at which the text will be drawn. intgetTextColorAsInt()Get the TextColor propertyThe color with which the text will be drawn. StringgetTextColor()Get the TextColor propertyThe color with which the text will be drawn. voidsetTextColor(@ColorInt() int color)Set the TextColor propertyThe color with which the text will be drawn. voidsetTextColor(@NonNull() String color)Set the TextColor propertyThe color with which the text will be drawn. intgetTextHaloColorAsInt()Get the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds. StringgetTextHaloColor()Get the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds. voidsetTextHaloColor(@ColorInt() int color)Set the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds. voidsetTextHaloColor(@NonNull() String color)Set the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds. FloatgetTextHaloWidth()Get the TextHaloWidth propertyDistance of halo to the font outline. voidsetTextHaloWidth(Float value)Set the TextHaloWidth propertyDistance of halo to the font outline. FloatgetTextHaloBlur()Get the TextHaloBlur propertyThe halo's fadeout distance towards the outside. voidsetTextHaloBlur(Float value)Set the TextHaloBlur propertyThe halo's fadeout distance towards the outside. -
Methods inherited from class org.maplibre.android.plugins.annotation.Annotation
equals, getData, getGeometry, getId, hashCode, isDraggable, setData, setDraggable, setGeometry, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setLatLng
void setLatLng(LatLng latLng)
Set the LatLng of the symbol, which represents the location of the symbol on the map
To update the symbol on the map use update.
- Parameters:
latLng- the location of the symbol in a latitude and longitude pair
-
getLatLng
@NonNull() LatLng getLatLng()
Get the LatLng of the symbol, which represents the location of the symbol on the map
-
getSymbolSortKey
Float getSymbolSortKey()
Get the SymbolSortKey property
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.
-
setSymbolSortKey
void setSymbolSortKey(Float value)
Set the SymbolSortKey property
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getIconSize
Float getIconSize()
Get the IconSize property
Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by iconSize. 1 is the original size; 3 triples the size of the image.
-
setIconSize
void setIconSize(Float value)
Set the IconSize property
Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by iconSize. 1 is the original size; 3 triples the size of the image.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getIconImage
String getIconImage()
Get the IconImage property
Name of image in sprite to use for drawing an image background.
-
setIconImage
void setIconImage(String value)
Set the IconImage property
Name of image in sprite to use for drawing an image background.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String
-
getIconRotate
Float getIconRotate()
Get the IconRotate property
Rotates the icon clockwise.
-
setIconRotate
void setIconRotate(Float value)
Set the IconRotate property
Rotates the icon clockwise.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getIconOffset
PointF getIconOffset()
Get the IconOffset property
Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of iconSize to obtain the final offset in density-independent pixels. When combined with iconRotate the offset will be as if the rotated direction was up.
-
setIconOffset
void setIconOffset(PointF pointF)
Set the IconOffset property.
Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of iconSize to obtain the final offset in density-independent pixels. When combined with iconRotate the offset will be as if the rotated direction was up.
To update the symbol on the map use update.
- Parameters:
pointF- value for Float[]
-
getIconAnchor
String getIconAnchor()
Get the IconAnchor property
Part of the icon placed closest to the anchor.
-
setIconAnchor
void setIconAnchor(String value)
Set the IconAnchor property
Part of the icon placed closest to the anchor.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String
-
getTextField
String getTextField()
Get the TextField property
Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
-
setTextField
void setTextField(String value)
Set the TextField property
Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String
-
getTextFont
Array<String> getTextFont()
Get the TextFont property
Font stack to use for displaying text.
-
setTextFont
void setTextFont(Array<String> value)
Set the TextFont property.
Font stack to use for displaying text.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String[]
-
getTextSize
Float getTextSize()
Get the TextSize property
Font size.
-
setTextSize
void setTextSize(Float value)
Set the TextSize property
Font size.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextMaxWidth
Float getTextMaxWidth()
Get the TextMaxWidth property
The maximum line width for text wrapping.
-
setTextMaxWidth
void setTextMaxWidth(Float value)
Set the TextMaxWidth property
The maximum line width for text wrapping.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextLetterSpacing
Float getTextLetterSpacing()
Get the TextLetterSpacing property
Text tracking amount.
-
setTextLetterSpacing
void setTextLetterSpacing(Float value)
Set the TextLetterSpacing property
Text tracking amount.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextJustify
String getTextJustify()
Get the TextJustify property
Text justification options.
-
setTextJustify
void setTextJustify(String value)
Set the TextJustify property
Text justification options.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String
-
getTextRadialOffset
Float getTextRadialOffset()
Get the TextRadialOffset property
Radial offset of text, in the direction of the symbol's anchor. Useful in combination with textVariableAnchor, which doesn't support the two-dimensional textOffset.
-
setTextRadialOffset
void setTextRadialOffset(Float value)
Set the TextRadialOffset property
Radial offset of text, in the direction of the symbol's anchor. Useful in combination with textVariableAnchor, which doesn't support the two-dimensional textOffset.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextAnchor
String getTextAnchor()
Get the TextAnchor property
Part of the text placed closest to the anchor.
-
setTextAnchor
void setTextAnchor(String value)
Set the TextAnchor property
Part of the text placed closest to the anchor.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String
-
getTextRotate
Float getTextRotate()
Get the TextRotate property
Rotates the text clockwise.
-
setTextRotate
void setTextRotate(Float value)
Set the TextRotate property
Rotates the text clockwise.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextTransform
String getTextTransform()
Get the TextTransform property
Specifies how to capitalize text, similar to the CSS textTransform property.
-
setTextTransform
void setTextTransform(String value)
Set the TextTransform property
Specifies how to capitalize text, similar to the CSS textTransform property.
To update the symbol on the map use update.
- Parameters:
value- constant property value for String
-
getTextOffset
PointF getTextOffset()
Get the TextOffset property
Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
-
setTextOffset
void setTextOffset(PointF pointF)
Set the TextOffset property.
Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
To update the symbol on the map use update.
- Parameters:
pointF- value for Float[]
-
getIconOpacity
Float getIconOpacity()
Get the IconOpacity property
The opacity at which the icon will be drawn.
-
setIconOpacity
void setIconOpacity(Float value)
Set the IconOpacity property
The opacity at which the icon will be drawn.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getIconColorAsInt
@ColorInt() int getIconColorAsInt()
Get the IconColor property
The color of the icon. This can only be used with sdf icons.
-
getIconColor
String getIconColor()
Get the IconColor property
The color of the icon. This can only be used with sdf icons.
-
setIconColor
void setIconColor(@ColorInt() int color)
Set the IconColor property
The color of the icon. This can only be used with sdf icons.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
setIconColor
void setIconColor(@NonNull() String color)
Set the IconColor property
The color of the icon. This can only be used with sdf icons.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
getIconHaloColorAsInt
@ColorInt() int getIconHaloColorAsInt()
Get the IconHaloColor property
The color of the icon's halo. Icon halos can only be used with SDF icons.
-
getIconHaloColor
String getIconHaloColor()
Get the IconHaloColor property
The color of the icon's halo. Icon halos can only be used with SDF icons.
-
setIconHaloColor
void setIconHaloColor(@ColorInt() int color)
Set the IconHaloColor property
The color of the icon's halo. Icon halos can only be used with SDF icons.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
setIconHaloColor
void setIconHaloColor(@NonNull() String color)
Set the IconHaloColor property
The color of the icon's halo. Icon halos can only be used with SDF icons.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
getIconHaloWidth
Float getIconHaloWidth()
Get the IconHaloWidth property
Distance of halo to the icon outline.
-
setIconHaloWidth
void setIconHaloWidth(Float value)
Set the IconHaloWidth property
Distance of halo to the icon outline.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getIconHaloBlur
Float getIconHaloBlur()
Get the IconHaloBlur property
Fade out the halo towards the outside.
-
setIconHaloBlur
void setIconHaloBlur(Float value)
Set the IconHaloBlur property
Fade out the halo towards the outside.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextOpacity
Float getTextOpacity()
Get the TextOpacity property
The opacity at which the text will be drawn.
-
setTextOpacity
void setTextOpacity(Float value)
Set the TextOpacity property
The opacity at which the text will be drawn.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextColorAsInt
@ColorInt() int getTextColorAsInt()
Get the TextColor property
The color with which the text will be drawn.
-
getTextColor
String getTextColor()
Get the TextColor property
The color with which the text will be drawn.
-
setTextColor
void setTextColor(@ColorInt() int color)
Set the TextColor property
The color with which the text will be drawn.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
setTextColor
void setTextColor(@NonNull() String color)
Set the TextColor property
The color with which the text will be drawn.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
getTextHaloColorAsInt
@ColorInt() int getTextHaloColorAsInt()
Get the TextHaloColor property
The color of the text's halo, which helps it stand out from backgrounds.
-
getTextHaloColor
String getTextHaloColor()
Get the TextHaloColor property
The color of the text's halo, which helps it stand out from backgrounds.
-
setTextHaloColor
void setTextHaloColor(@ColorInt() int color)
Set the TextHaloColor property
The color of the text's halo, which helps it stand out from backgrounds.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
setTextHaloColor
void setTextHaloColor(@NonNull() String color)
Set the TextHaloColor property
The color of the text's halo, which helps it stand out from backgrounds.
To update the symbol on the map use update.
- Parameters:
color- value for String
-
getTextHaloWidth
Float getTextHaloWidth()
Get the TextHaloWidth property
Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
-
setTextHaloWidth
void setTextHaloWidth(Float value)
Set the TextHaloWidth property
Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
getTextHaloBlur
Float getTextHaloBlur()
Get the TextHaloBlur property
The halo's fadeout distance towards the outside.
-
setTextHaloBlur
void setTextHaloBlur(Float value)
Set the TextHaloBlur property
The halo's fadeout distance towards the outside.
To update the symbol on the map use update.
- Parameters:
value- constant property value for Float
-
-
-
-