Package 

Class Symbol

    • Method Summary

      Modifier and Type Method Description
      void setLatLng(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.
      LatLng getLatLng() Get the LatLng of the symbol, which represents the location of the symbol on the map
      Float getSymbolSortKey() Get the SymbolSortKey propertySorts features in ascending order based on this value.
      void setSymbolSortKey(Float value) Set the SymbolSortKey propertySorts features in ascending order based on this value.
      Float getIconSize() Get the IconSize propertyScales the original size of the icon by the provided factor.
      void setIconSize(Float value) Set the IconSize propertyScales the original size of the icon by the provided factor.
      String getIconImage() Get the IconImage propertyName of image in sprite to use for drawing an image background.
      void setIconImage(String value) Set the IconImage propertyName of image in sprite to use for drawing an image background.
      Float getIconRotate() Get the IconRotate propertyRotates the icon clockwise.
      void setIconRotate(Float value) Set the IconRotate propertyRotates the icon clockwise.
      PointF getIconOffset() Get the IconOffset propertyOffset distance of icon from its anchor.
      void setIconOffset(PointF pointF) Set the IconOffset property.
      String getIconAnchor() Get the IconAnchor propertyPart of the icon placed closest to the anchor.
      void setIconAnchor(String value) Set the IconAnchor propertyPart of the icon placed closest to the anchor.
      String getTextField() Get the TextField propertyValue to use for a text label.
      void setTextField(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.
      void setTextFont(Array<String> value) Set the TextFont property.
      Float getTextSize() Get the TextSize propertyFont size.
      void setTextSize(Float value) Set the TextSize propertyFont size.
      Float getTextMaxWidth() Get the TextMaxWidth propertyThe maximum line width for text wrapping.
      void setTextMaxWidth(Float value) Set the TextMaxWidth propertyThe maximum line width for text wrapping.
      Float getTextLetterSpacing() Get the TextLetterSpacing propertyText tracking amount.
      void setTextLetterSpacing(Float value) Set the TextLetterSpacing propertyText tracking amount.
      String getTextJustify() Get the TextJustify propertyText justification options.
      void setTextJustify(String value) Set the TextJustify propertyText justification options.
      Float getTextRadialOffset() Get the TextRadialOffset propertyRadial offset of text, in the direction of the symbol's anchor.
      void setTextRadialOffset(Float value) Set the TextRadialOffset propertyRadial offset of text, in the direction of the symbol's anchor.
      String getTextAnchor() Get the TextAnchor propertyPart of the text placed closest to the anchor.
      void setTextAnchor(String value) Set the TextAnchor propertyPart of the text placed closest to the anchor.
      Float getTextRotate() Get the TextRotate propertyRotates the text clockwise.
      void setTextRotate(Float value) Set the TextRotate propertyRotates the text clockwise.
      String getTextTransform() Get the TextTransform propertySpecifies how to capitalize text, similar to the CSS textTransform property.
      void setTextTransform(String value) Set the TextTransform propertySpecifies how to capitalize text, similar to the CSS textTransform property.
      PointF getTextOffset() Get the TextOffset propertyOffset distance of text from its anchor.
      void setTextOffset(PointF pointF) Set the TextOffset property.
      Float getIconOpacity() Get the IconOpacity propertyThe opacity at which the icon will be drawn.
      void setIconOpacity(Float value) Set the IconOpacity propertyThe opacity at which the icon will be drawn.
      int getIconColorAsInt() Get the IconColor propertyThe color of the icon.
      String getIconColor() Get the IconColor propertyThe color of the icon.
      void setIconColor(@ColorInt() int color) Set the IconColor propertyThe color of the icon.
      void setIconColor(@NonNull() String color) Set the IconColor propertyThe color of the icon.
      int getIconHaloColorAsInt() Get the IconHaloColor propertyThe color of the icon's halo.
      String getIconHaloColor() Get the IconHaloColor propertyThe color of the icon's halo.
      void setIconHaloColor(@ColorInt() int color) Set the IconHaloColor propertyThe color of the icon's halo.
      void setIconHaloColor(@NonNull() String color) Set the IconHaloColor propertyThe color of the icon's halo.
      Float getIconHaloWidth() Get the IconHaloWidth propertyDistance of halo to the icon outline.
      void setIconHaloWidth(Float value) Set the IconHaloWidth propertyDistance of halo to the icon outline.
      Float getIconHaloBlur() Get the IconHaloBlur propertyFade out the halo towards the outside.
      void setIconHaloBlur(Float value) Set the IconHaloBlur propertyFade out the halo towards the outside.
      Float getTextOpacity() Get the TextOpacity propertyThe opacity at which the text will be drawn.
      void setTextOpacity(Float value) Set the TextOpacity propertyThe opacity at which the text will be drawn.
      int getTextColorAsInt() Get the TextColor propertyThe color with which the text will be drawn.
      String getTextColor() Get the TextColor propertyThe color with which the text will be drawn.
      void setTextColor(@ColorInt() int color) Set the TextColor propertyThe color with which the text will be drawn.
      void setTextColor(@NonNull() String color) Set the TextColor propertyThe color with which the text will be drawn.
      int getTextHaloColorAsInt() Get the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
      String getTextHaloColor() Get the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
      void setTextHaloColor(@ColorInt() int color) Set the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
      void setTextHaloColor(@NonNull() String color) Set the TextHaloColor propertyThe color of the text's halo, which helps it stand out from backgrounds.
      Float getTextHaloWidth() Get the TextHaloWidth propertyDistance of halo to the font outline.
      void setTextHaloWidth(Float value) Set the TextHaloWidth propertyDistance of halo to the font outline.
      Float getTextHaloBlur() Get the TextHaloBlur propertyThe halo's fadeout distance towards the outside.
      void setTextHaloBlur(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
      • 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[]
      • 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
      • 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
      • 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