Class Symbol
- java.lang.Object
-
- com.mapbox.mapboxsdk.plugins.annotation.Annotation<com.mapbox.geojson.Point>
-
- com.mapbox.mapboxsdk.plugins.annotation.Symbol
-
@UiThread public class Symbol extends Annotation<com.mapbox.geojson.Point>
-
-
Field Summary
-
Fields inherited from class com.mapbox.mapboxsdk.plugins.annotation.Annotation
geometry, jsonObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetIconAnchor()Get the IconAnchor propertyjava.lang.StringgetIconColor()Get the IconColor propertyintgetIconColorAsInt()Get the IconColor propertyjava.lang.FloatgetIconHaloBlur()Get the IconHaloBlur propertyjava.lang.StringgetIconHaloColor()Get the IconHaloColor propertyintgetIconHaloColorAsInt()Get the IconHaloColor propertyjava.lang.FloatgetIconHaloWidth()Get the IconHaloWidth propertyjava.lang.StringgetIconImage()Get the IconImage propertyandroid.graphics.PointFgetIconOffset()Get the IconOffset propertyjava.lang.FloatgetIconOpacity()Get the IconOpacity propertyjava.lang.FloatgetIconRotate()Get the IconRotate propertyjava.lang.FloatgetIconSize()Get the IconSize propertycom.mapbox.mapboxsdk.geometry.LatLnggetLatLng()Get the LatLng of the symbol, which represents the location of the symbol on the mapjava.lang.FloatgetSymbolSortKey()Get the SymbolSortKey propertyjava.lang.StringgetTextAnchor()Get the TextAnchor propertyjava.lang.StringgetTextColor()Get the TextColor propertyintgetTextColorAsInt()Get the TextColor propertyjava.lang.StringgetTextField()Get the TextField propertyjava.lang.String[]getTextFont()Get the TextFont propertyjava.lang.FloatgetTextHaloBlur()Get the TextHaloBlur propertyjava.lang.StringgetTextHaloColor()Get the TextHaloColor propertyintgetTextHaloColorAsInt()Get the TextHaloColor propertyjava.lang.FloatgetTextHaloWidth()Get the TextHaloWidth propertyjava.lang.StringgetTextJustify()Get the TextJustify propertyjava.lang.FloatgetTextLetterSpacing()Get the TextLetterSpacing propertyjava.lang.FloatgetTextMaxWidth()Get the TextMaxWidth propertyandroid.graphics.PointFgetTextOffset()Get the TextOffset propertyjava.lang.FloatgetTextOpacity()Get the TextOpacity propertyjava.lang.FloatgetTextRadialOffset()Get the TextRadialOffset propertyjava.lang.FloatgetTextRotate()Get the TextRotate propertyjava.lang.FloatgetTextSize()Get the TextSize propertyjava.lang.StringgetTextTransform()Get the TextTransform propertyvoidsetIconAnchor(java.lang.String value)Set the IconAnchor propertyvoidsetIconColor(int color)Set the IconColor propertyvoidsetIconColor(java.lang.String color)Set the IconColor propertyvoidsetIconHaloBlur(java.lang.Float value)Set the IconHaloBlur propertyvoidsetIconHaloColor(int color)Set the IconHaloColor propertyvoidsetIconHaloColor(java.lang.String color)Set the IconHaloColor propertyvoidsetIconHaloWidth(java.lang.Float value)Set the IconHaloWidth propertyvoidsetIconImage(java.lang.String value)Set the IconImage propertyvoidsetIconOffset(android.graphics.PointF pointF)Set the IconOffset property.voidsetIconOpacity(java.lang.Float value)Set the IconOpacity propertyvoidsetIconRotate(java.lang.Float value)Set the IconRotate propertyvoidsetIconSize(java.lang.Float value)Set the IconSize propertyvoidsetLatLng(com.mapbox.mapboxsdk.geometry.LatLng latLng)Set the LatLng of the symbol, which represents the location of the symbol on the mapvoidsetSymbolSortKey(java.lang.Float value)Set the SymbolSortKey propertyvoidsetTextAnchor(java.lang.String value)Set the TextAnchor propertyvoidsetTextColor(int color)Set the TextColor propertyvoidsetTextColor(java.lang.String color)Set the TextColor propertyvoidsetTextField(java.lang.String value)Set the TextField propertyvoidsetTextFont(java.lang.String[] value)Set the TextFont property.voidsetTextHaloBlur(java.lang.Float value)Set the TextHaloBlur propertyvoidsetTextHaloColor(int color)Set the TextHaloColor propertyvoidsetTextHaloColor(java.lang.String color)Set the TextHaloColor propertyvoidsetTextHaloWidth(java.lang.Float value)Set the TextHaloWidth propertyvoidsetTextJustify(java.lang.String value)Set the TextJustify propertyvoidsetTextLetterSpacing(java.lang.Float value)Set the TextLetterSpacing propertyvoidsetTextMaxWidth(java.lang.Float value)Set the TextMaxWidth propertyvoidsetTextOffset(android.graphics.PointF pointF)Set the TextOffset property.voidsetTextOpacity(java.lang.Float value)Set the TextOpacity propertyvoidsetTextRadialOffset(java.lang.Float value)Set the TextRadialOffset propertyvoidsetTextRotate(java.lang.Float value)Set the TextRotate propertyvoidsetTextSize(java.lang.Float value)Set the TextSize propertyvoidsetTextTransform(java.lang.String value)Set the TextTransform property-
Methods inherited from class com.mapbox.mapboxsdk.plugins.annotation.Annotation
equals, getData, getGeometry, getId, hashCode, isDraggable, setData, setDraggable, setGeometry, toString
-
-
-
-
Method Detail
-
setLatLng
public void setLatLng(com.mapbox.mapboxsdk.geometry.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
AnnotationManager.update(Annotation).- Parameters:
latLng- the location of the symbol in a latitude and longitude pair
-
getLatLng
@NonNull public com.mapbox.mapboxsdk.geometry.LatLng getLatLng()
Get the LatLng of the symbol, which represents the location of the symbol on the map- Returns:
- the location of the symbol
-
getSymbolSortKey
public java.lang.Float getSymbolSortKey()
Get the SymbolSortKey propertySorts 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.
- Returns:
- property wrapper value around Float
-
setSymbolSortKey
public void setSymbolSortKey(java.lang.Float value)
Set the SymbolSortKey propertySorts 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
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getIconSize
public java.lang.Float getIconSize()
Get the IconSize propertyScales 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
PropertyFactory.iconSize(java.lang.Float). 1 is the original size; 3 triples the size of the image.- Returns:
- property wrapper value around Float
-
setIconSize
public void setIconSize(java.lang.Float value)
Set the IconSize propertyScales 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
PropertyFactory.iconSize(java.lang.Float). 1 is the original size; 3 triples the size of the image.To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getIconImage
public java.lang.String getIconImage()
Get the IconImage propertyName of image in sprite to use for drawing an image background.
- Returns:
- property wrapper value around String
-
setIconImage
public void setIconImage(java.lang.String value)
Set the IconImage propertyName of image in sprite to use for drawing an image background.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getIconRotate
public java.lang.Float getIconRotate()
Get the IconRotate propertyRotates the icon clockwise.
- Returns:
- property wrapper value around Float
-
setIconRotate
public void setIconRotate(java.lang.Float value)
Set the IconRotate propertyRotates the icon clockwise.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getIconOffset
public android.graphics.PointF getIconOffset()
Get the IconOffset propertyOffset 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
PropertyFactory.iconSize(java.lang.Float)to obtain the final offset in density-independent pixels. When combined withPropertyFactory.iconRotate(java.lang.Float)the offset will be as if the rotated direction was up.- Returns:
- PointF value for Float[]
-
setIconOffset
public void setIconOffset(android.graphics.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
PropertyFactory.iconSize(java.lang.Float)to obtain the final offset in density-independent pixels. When combined withPropertyFactory.iconRotate(java.lang.Float)the offset will be as if the rotated direction was up.To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
pointF- value for Float[]
-
getIconAnchor
public java.lang.String getIconAnchor()
Get the IconAnchor propertyPart of the icon placed closest to the anchor.
- Returns:
- property wrapper value around String
-
setIconAnchor
public void setIconAnchor(java.lang.String value)
Set the IconAnchor propertyPart of the icon placed closest to the anchor.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getTextField
public java.lang.String getTextField()
Get the TextField propertyValue to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
- Returns:
- property wrapper value around String
-
setTextField
public void setTextField(java.lang.String value)
Set the TextField propertyValue 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
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getTextFont
public java.lang.String[] getTextFont()
Get the TextFont propertyFont stack to use for displaying text.
- Returns:
- property wrapper value around String[]
-
setTextFont
public void setTextFont(java.lang.String[] value)
Set the TextFont property.Font stack to use for displaying text.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String[]
-
getTextSize
public java.lang.Float getTextSize()
Get the TextSize propertyFont size.
- Returns:
- property wrapper value around Float
-
setTextSize
public void setTextSize(java.lang.Float value)
Set the TextSize propertyFont size.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextMaxWidth
public java.lang.Float getTextMaxWidth()
Get the TextMaxWidth propertyThe maximum line width for text wrapping.
- Returns:
- property wrapper value around Float
-
setTextMaxWidth
public void setTextMaxWidth(java.lang.Float value)
Set the TextMaxWidth propertyThe maximum line width for text wrapping.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextLetterSpacing
public java.lang.Float getTextLetterSpacing()
Get the TextLetterSpacing propertyText tracking amount.
- Returns:
- property wrapper value around Float
-
setTextLetterSpacing
public void setTextLetterSpacing(java.lang.Float value)
Set the TextLetterSpacing propertyText tracking amount.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextJustify
public java.lang.String getTextJustify()
Get the TextJustify propertyText justification options.
- Returns:
- property wrapper value around String
-
setTextJustify
public void setTextJustify(java.lang.String value)
Set the TextJustify propertyText justification options.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getTextRadialOffset
public java.lang.Float getTextRadialOffset()
Get the TextRadialOffset propertyRadial offset of text, in the direction of the symbol's anchor. Useful in combination with
PropertyFactory.textVariableAnchor(java.lang.String[]), which doesn't support the two-dimensionalPropertyFactory.textOffset(java.lang.Float[]).- Returns:
- property wrapper value around Float
-
setTextRadialOffset
public void setTextRadialOffset(java.lang.Float value)
Set the TextRadialOffset propertyRadial offset of text, in the direction of the symbol's anchor. Useful in combination with
PropertyFactory.textVariableAnchor(java.lang.String[]), which doesn't support the two-dimensionalPropertyFactory.textOffset(java.lang.Float[]).To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextAnchor
public java.lang.String getTextAnchor()
Get the TextAnchor propertyPart of the text placed closest to the anchor.
- Returns:
- property wrapper value around String
-
setTextAnchor
public void setTextAnchor(java.lang.String value)
Set the TextAnchor propertyPart of the text placed closest to the anchor.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getTextRotate
public java.lang.Float getTextRotate()
Get the TextRotate propertyRotates the text clockwise.
- Returns:
- property wrapper value around Float
-
setTextRotate
public void setTextRotate(java.lang.Float value)
Set the TextRotate propertyRotates the text clockwise.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextTransform
public java.lang.String getTextTransform()
Get the TextTransform propertySpecifies how to capitalize text, similar to the CSS
PropertyFactory.textTransform(java.lang.String)property.- Returns:
- property wrapper value around String
-
setTextTransform
public void setTextTransform(java.lang.String value)
Set the TextTransform propertySpecifies how to capitalize text, similar to the CSS
PropertyFactory.textTransform(java.lang.String)property.To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getTextOffset
public android.graphics.PointF getTextOffset()
Get the TextOffset propertyOffset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
- Returns:
- PointF value for Float[]
-
setTextOffset
public void setTextOffset(android.graphics.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
AnnotationManager.update(Annotation).- Parameters:
pointF- value for Float[]
-
getIconOpacity
public java.lang.Float getIconOpacity()
Get the IconOpacity propertyThe opacity at which the icon will be drawn.
- Returns:
- property wrapper value around Float
-
setIconOpacity
public void setIconOpacity(java.lang.Float value)
Set the IconOpacity propertyThe opacity at which the icon will be drawn.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getIconColorAsInt
@ColorInt public int getIconColorAsInt()
Get the IconColor propertyThe color of the icon. This can only be used with sdf icons.
- Returns:
- color value for String
-
getIconColor
public java.lang.String getIconColor()
Get the IconColor propertyThe color of the icon. This can only be used with sdf icons.
- Returns:
- color value for String
-
setIconColor
public void setIconColor(@ColorInt int color)Set the IconColor propertyThe color of the icon. This can only be used with sdf icons.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setIconColor
public void setIconColor(@NonNull java.lang.String color)Set the IconColor propertyThe color of the icon. This can only be used with sdf icons.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getIconHaloColorAsInt
@ColorInt public int getIconHaloColorAsInt()
Get the IconHaloColor propertyThe color of the icon's halo. Icon halos can only be used with SDF icons.
- Returns:
- color value for String
-
getIconHaloColor
public java.lang.String getIconHaloColor()
Get the IconHaloColor propertyThe color of the icon's halo. Icon halos can only be used with SDF icons.
- Returns:
- color value for String
-
setIconHaloColor
public void setIconHaloColor(@ColorInt int color)Set the IconHaloColor propertyThe color of the icon's halo. Icon halos can only be used with SDF icons.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setIconHaloColor
public void setIconHaloColor(@NonNull java.lang.String color)Set the IconHaloColor propertyThe color of the icon's halo. Icon halos can only be used with SDF icons.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getIconHaloWidth
public java.lang.Float getIconHaloWidth()
Get the IconHaloWidth propertyDistance of halo to the icon outline.
- Returns:
- property wrapper value around Float
-
setIconHaloWidth
public void setIconHaloWidth(java.lang.Float value)
Set the IconHaloWidth propertyDistance of halo to the icon outline.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getIconHaloBlur
public java.lang.Float getIconHaloBlur()
Get the IconHaloBlur propertyFade out the halo towards the outside.
- Returns:
- property wrapper value around Float
-
setIconHaloBlur
public void setIconHaloBlur(java.lang.Float value)
Set the IconHaloBlur propertyFade out the halo towards the outside.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextOpacity
public java.lang.Float getTextOpacity()
Get the TextOpacity propertyThe opacity at which the text will be drawn.
- Returns:
- property wrapper value around Float
-
setTextOpacity
public void setTextOpacity(java.lang.Float value)
Set the TextOpacity propertyThe opacity at which the text will be drawn.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextColorAsInt
@ColorInt public int getTextColorAsInt()
Get the TextColor propertyThe color with which the text will be drawn.
- Returns:
- color value for String
-
getTextColor
public java.lang.String getTextColor()
Get the TextColor propertyThe color with which the text will be drawn.
- Returns:
- color value for String
-
setTextColor
public void setTextColor(@ColorInt int color)Set the TextColor propertyThe color with which the text will be drawn.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setTextColor
public void setTextColor(@NonNull java.lang.String color)Set the TextColor propertyThe color with which the text will be drawn.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getTextHaloColorAsInt
@ColorInt public int getTextHaloColorAsInt()
Get the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
- Returns:
- color value for String
-
getTextHaloColor
public java.lang.String getTextHaloColor()
Get the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
- Returns:
- color value for String
-
setTextHaloColor
public void setTextHaloColor(@ColorInt int color)Set the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setTextHaloColor
public void setTextHaloColor(@NonNull java.lang.String color)Set the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getTextHaloWidth
public java.lang.Float getTextHaloWidth()
Get the TextHaloWidth propertyDistance of halo to the font outline. Max text halo width is 1/4 of the font-size.
- Returns:
- property wrapper value around Float
-
setTextHaloWidth
public void setTextHaloWidth(java.lang.Float value)
Set the TextHaloWidth propertyDistance 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
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextHaloBlur
public java.lang.Float getTextHaloBlur()
Get the TextHaloBlur propertyThe halo's fadeout distance towards the outside.
- Returns:
- property wrapper value around Float
-
setTextHaloBlur
public void setTextHaloBlur(java.lang.Float value)
Set the TextHaloBlur propertyThe halo's fadeout distance towards the outside.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
-