java.lang.Object
com.trimblemaps.mapsdk.plugins.annotation.Annotation<com.trimblemaps.geojson.Point>
com.trimblemaps.mapsdk.plugins.annotation.Symbol

@UiThread public class Symbol extends Annotation<com.trimblemaps.geojson.Point>
  • 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 map

      To 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

      public 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.

      Returns:
      property wrapper value around Float
    • setSymbolSortKey

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getIconSize

      public 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 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(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 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 String getIconImage()
      Get the IconImage property

      Name of image in sprite to use for drawing an image background.

      Returns:
      property wrapper value around String
    • setIconImage

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for String
    • getIconRotate

      public Float getIconRotate()
      Get the IconRotate property

      Rotates the icon clockwise.

      Returns:
      property wrapper value around Float
    • setIconRotate

      public void setIconRotate(Float value)
      Set the IconRotate property

      Rotates 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 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 with PropertyFactory.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 with PropertyFactory.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 String getIconAnchor()
      Get the IconAnchor property

      Part of the icon placed closest to the anchor.

      Returns:
      property wrapper value around String
    • setIconAnchor

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for String
    • getTextField

      public 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.

      Returns:
      property wrapper value around String
    • setTextField

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for String
    • getTextFont

      public String[] getTextFont()
      Get the TextFont property

      Font stack to use for displaying text.

      Returns:
      property wrapper value around String[]
    • setTextFont

      public void setTextFont(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 Float getTextSize()
      Get the TextSize property

      Font size.

      Returns:
      property wrapper value around Float
    • setTextSize

      public void setTextSize(Float value)
      Set the TextSize property

      Font size.

      To update the symbol on the map use AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getTextMaxWidth

      public Float getTextMaxWidth()
      Get the TextMaxWidth property

      The maximum line width for text wrapping.

      Returns:
      property wrapper value around Float
    • setTextMaxWidth

      public void setTextMaxWidth(Float value)
      Set the TextMaxWidth property

      The 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 Float getTextLetterSpacing()
      Get the TextLetterSpacing property

      Text tracking amount.

      Returns:
      property wrapper value around Float
    • setTextLetterSpacing

      public void setTextLetterSpacing(Float value)
      Set the TextLetterSpacing property

      Text tracking amount.

      To update the symbol on the map use AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getTextJustify

      public String getTextJustify()
      Get the TextJustify property

      Text justification options.

      Returns:
      property wrapper value around String
    • setTextJustify

      public void setTextJustify(String value)
      Set the TextJustify property

      Text justification options.

      To update the symbol on the map use AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for String
    • getTextRadialOffset

      public Float getTextRadialOffset()
      Get the TextRadialOffset property

      Radial 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-dimensional PropertyFactory.textOffset(java.lang.Float[]).

      Returns:
      property wrapper value around Float
    • setTextRadialOffset

      public void setTextRadialOffset(Float value)
      Set the TextRadialOffset property

      Radial 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-dimensional PropertyFactory.textOffset(java.lang.Float[]).

      To update the symbol on the map use AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getTextAnchor

      public String getTextAnchor()
      Get the TextAnchor property

      Part of the text placed closest to the anchor.

      Returns:
      property wrapper value around String
    • setTextAnchor

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for String
    • getTextRotate

      public Float getTextRotate()
      Get the TextRotate property

      Rotates the text clockwise.

      Returns:
      property wrapper value around Float
    • setTextRotate

      public void setTextRotate(Float value)
      Set the TextRotate property

      Rotates the text clockwise.

      To update the symbol on the map use AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getTextTransform

      public String getTextTransform()
      Get the TextTransform property

      Specifies how to capitalize text, similar to the CSS PropertyFactory.textTransform(java.lang.String) property.

      Returns:
      property wrapper value around String
    • setTextTransform

      public void setTextTransform(String value)
      Set the TextTransform property

      Specifies 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 property

      Offset 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 Float getIconOpacity()
      Get the IconOpacity property

      The opacity at which the icon will be drawn.

      Returns:
      property wrapper value around Float
    • setIconOpacity

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getIconColorAsInt

      @ColorInt public int getIconColorAsInt()
      Get the IconColor property

      The color of the icon. This can only be used with sdf icons.

      Returns:
      color value for String
    • getIconColor

      public String getIconColor()
      Get the IconColor property

      The 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 property

      The 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 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 AnnotationManager.update(Annotation).

      Parameters:
      color - value for String
    • getIconHaloColorAsInt

      @ColorInt public int getIconHaloColorAsInt()
      Get the IconHaloColor property

      The color of the icon's halo. Icon halos can only be used with SDF icons.

      Returns:
      color value for String
    • getIconHaloColor

      public String getIconHaloColor()
      Get the IconHaloColor property

      The 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 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 AnnotationManager.update(Annotation).

      Parameters:
      color - value for String
    • setIconHaloColor

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      color - value for String
    • getIconHaloWidth

      public Float getIconHaloWidth()
      Get the IconHaloWidth property

      Distance of halo to the icon outline.

      Returns:
      property wrapper value around Float
    • setIconHaloWidth

      public void setIconHaloWidth(Float value)
      Set the IconHaloWidth property

      Distance 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 Float getIconHaloBlur()
      Get the IconHaloBlur property

      Fade out the halo towards the outside.

      Returns:
      property wrapper value around Float
    • setIconHaloBlur

      public void setIconHaloBlur(Float value)
      Set the IconHaloBlur property

      Fade 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 Float getTextOpacity()
      Get the TextOpacity property

      The opacity at which the text will be drawn.

      Returns:
      property wrapper value around Float
    • setTextOpacity

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getTextColorAsInt

      @ColorInt public int getTextColorAsInt()
      Get the TextColor property

      The color with which the text will be drawn.

      Returns:
      color value for String
    • getTextColor

      public String getTextColor()
      Get the TextColor property

      The color with which the text will be drawn.

      Returns:
      color value for String
    • setTextColor

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      color - value for String
    • setTextColor

      public 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 AnnotationManager.update(Annotation).

      Parameters:
      color - value for String
    • getTextHaloColorAsInt

      @ColorInt public int getTextHaloColorAsInt()
      Get the TextHaloColor property

      The color of the text's halo, which helps it stand out from backgrounds.

      Returns:
      color value for String
    • getTextHaloColor

      public String getTextHaloColor()
      Get the TextHaloColor property

      The 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 property

      The 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 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 AnnotationManager.update(Annotation).

      Parameters:
      color - value for String
    • getTextHaloWidth

      public Float getTextHaloWidth()
      Get the TextHaloWidth property

      Distance 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(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 AnnotationManager.update(Annotation).

      Parameters:
      value - constant property value for Float
    • getTextHaloBlur

      public Float getTextHaloBlur()
      Get the TextHaloBlur property

      The halo's fadeout distance towards the outside.

      Returns:
      property wrapper value around Float
    • setTextHaloBlur

      public void setTextHaloBlur(Float value)
      Set the TextHaloBlur property

      The 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