Class Symbol
-
Field Summary
Fields inherited from class com.trimblemaps.mapsdk.plugins.annotation.Annotation
geometry, jsonObject -
Method Summary
Modifier and TypeMethodDescriptionGet the IconAnchor propertyGet the IconColor propertyintGet the IconColor propertyGet the IconHaloBlur propertyGet the IconHaloColor propertyintGet the IconHaloColor propertyGet the IconHaloWidth propertyGet the IconImage propertyandroid.graphics.PointFGet the IconOffset propertyGet the IconOpacity propertyGet the IconRotate propertyGet the IconSize propertycom.trimblemaps.mapsdk.geometry.LatLngGet the LatLng of the symbol, which represents the location of the symbol on the mapGet the SymbolSortKey propertyGet the TextAnchor propertyGet the TextColor propertyintGet the TextColor propertyGet the TextField propertyString[]Get the TextFont propertyGet the TextHaloBlur propertyGet the TextHaloColor propertyintGet the TextHaloColor propertyGet the TextHaloWidth propertyGet the TextJustify propertyGet the TextLetterSpacing propertyGet the TextMaxWidth propertyandroid.graphics.PointFGet the TextOffset propertyGet the TextOpacity propertyGet the TextRadialOffset propertyGet the TextRotate propertyGet the TextSize propertyGet the TextTransform propertyvoidsetIconAnchor(String value) Set the IconAnchor propertyvoidsetIconColor(int color) Set the IconColor propertyvoidsetIconColor(String color) Set the IconColor propertyvoidsetIconHaloBlur(Float value) Set the IconHaloBlur propertyvoidsetIconHaloColor(int color) Set the IconHaloColor propertyvoidsetIconHaloColor(String color) Set the IconHaloColor propertyvoidsetIconHaloWidth(Float value) Set the IconHaloWidth propertyvoidsetIconImage(String value) Set the IconImage propertyvoidsetIconOffset(android.graphics.PointF pointF) Set the IconOffset property.voidsetIconOpacity(Float value) Set the IconOpacity propertyvoidsetIconRotate(Float value) Set the IconRotate propertyvoidsetIconSize(Float value) Set the IconSize propertyvoidsetLatLng(com.trimblemaps.mapsdk.geometry.LatLng latLng) Set the LatLng of the symbol, which represents the location of the symbol on the mapvoidsetSymbolSortKey(Float value) Set the SymbolSortKey propertyvoidsetTextAnchor(String value) Set the TextAnchor propertyvoidsetTextColor(int color) Set the TextColor propertyvoidsetTextColor(String color) Set the TextColor propertyvoidsetTextField(String value) Set the TextField propertyvoidsetTextFont(String[] value) Set the TextFont property.voidsetTextHaloBlur(Float value) Set the TextHaloBlur propertyvoidsetTextHaloColor(int color) Set the TextHaloColor propertyvoidsetTextHaloColor(String color) Set the TextHaloColor propertyvoidsetTextHaloWidth(Float value) Set the TextHaloWidth propertyvoidsetTextJustify(String value) Set the TextJustify propertyvoidsetTextLetterSpacing(Float value) Set the TextLetterSpacing propertyvoidsetTextMaxWidth(Float value) Set the TextMaxWidth propertyvoidsetTextOffset(android.graphics.PointF pointF) Set the TextOffset property.voidsetTextOpacity(Float value) Set the TextOpacity propertyvoidsetTextRadialOffset(Float value) Set the TextRadialOffset propertyvoidsetTextRotate(Float value) Set the TextRotate propertyvoidsetTextSize(Float value) Set the TextSize propertyvoidsetTextTransform(String value) Set the TextTransform propertyMethods inherited from class com.trimblemaps.mapsdk.plugins.annotation.Annotation
equals, getData, getGeometry, getId, hashCode, isDraggable, setData, setDraggable, setGeometry, toString
-
Method Details
-
setLatLng
public void setLatLng(com.trimblemaps.mapsdk.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.trimblemaps.mapsdk.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
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
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
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
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
Get the IconImage propertyName of image in sprite to use for drawing an image background.
- Returns:
- property wrapper value around String
-
setIconImage
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
Get the IconRotate propertyRotates the icon clockwise.
- Returns:
- property wrapper value around Float
-
setIconRotate
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
Get the IconAnchor propertyPart of the icon placed closest to the anchor.
- Returns:
- property wrapper value around String
-
setIconAnchor
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
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
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
Get the TextFont propertyFont stack to use for displaying text.
- Returns:
- property wrapper value around String[]
-
setTextFont
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
Get the TextSize propertyFont size.
- Returns:
- property wrapper value around Float
-
setTextSize
Set the TextSize propertyFont size.
To update the symbol on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getTextMaxWidth
Get the TextMaxWidth propertyThe maximum line width for text wrapping.
- Returns:
- property wrapper value around Float
-
setTextMaxWidth
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
Get the TextLetterSpacing propertyText tracking amount.
- Returns:
- property wrapper value around Float
-
setTextLetterSpacing
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
Get the TextJustify propertyText justification options.
- Returns:
- property wrapper value around String
-
setTextJustify
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
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
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
Get the TextAnchor propertyPart of the text placed closest to the anchor.
- Returns:
- property wrapper value around String
-
setTextAnchor
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
Get the TextRotate propertyRotates the text clockwise.
- Returns:
- property wrapper value around Float
-
setTextRotate
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
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
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
Get the IconOpacity propertyThe opacity at which the icon will be drawn.
- Returns:
- property wrapper value around Float
-
setIconOpacity
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
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
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
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
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
Get the IconHaloWidth propertyDistance of halo to the icon outline.
- Returns:
- property wrapper value around Float
-
setIconHaloWidth
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
Get the IconHaloBlur propertyFade out the halo towards the outside.
- Returns:
- property wrapper value around Float
-
setIconHaloBlur
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
Get the TextOpacity propertyThe opacity at which the text will be drawn.
- Returns:
- property wrapper value around Float
-
setTextOpacity
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
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
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
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
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
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
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
Get the TextHaloBlur propertyThe halo's fadeout distance towards the outside.
- Returns:
- property wrapper value around Float
-
setTextHaloBlur
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
-