Class Symbol


  • @UiThread
    public class Symbol
    extends Annotation<org.maplibre.geojson.Point>
    • Method Detail

      • setLatLng

        public void setLatLng​(org.maplibre.android.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 org.maplibre.android.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 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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.Float getIconRotate()
        Get the IconRotate property

        Rotates the icon clockwise.

        Returns:
        property wrapper value around Float
      • setIconRotate

        public void setIconRotate​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.String[] getTextFont()
        Get the TextFont property

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

        Font size.

        Returns:
        property wrapper value around Float
      • setTextSize

        public void setTextSize​(java.lang.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 java.lang.Float getTextMaxWidth()
        Get the TextMaxWidth property

        The maximum line width for text wrapping.

        Returns:
        property wrapper value around Float
      • setTextMaxWidth

        public void setTextMaxWidth​(java.lang.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 java.lang.Float getTextLetterSpacing()
        Get the TextLetterSpacing property

        Text tracking amount.

        Returns:
        property wrapper value around Float
      • setTextLetterSpacing

        public void setTextLetterSpacing​(java.lang.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 java.lang.String getTextJustify()
        Get the TextJustify property

        Text justification options.

        Returns:
        property wrapper value around String
      • setTextJustify

        public void setTextJustify​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.Float getTextRotate()
        Get the TextRotate property

        Rotates the text clockwise.

        Returns:
        property wrapper value around Float
      • setTextRotate

        public void setTextRotate​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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
                                 java.lang.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 java.lang.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
                                     java.lang.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 java.lang.Float getIconHaloWidth()
        Get the IconHaloWidth property

        Distance of halo to the icon outline.

        Returns:
        property wrapper value around Float
      • setIconHaloWidth

        public void setIconHaloWidth​(java.lang.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 java.lang.Float getIconHaloBlur()
        Get the IconHaloBlur property

        Fade out the halo towards the outside.

        Returns:
        property wrapper value around Float
      • setIconHaloBlur

        public void setIconHaloBlur​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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
                                 java.lang.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 java.lang.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
                                     java.lang.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 java.lang.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​(java.lang.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 java.lang.Float getTextHaloBlur()
        Get the TextHaloBlur property

        The halo's fadeout distance towards the outside.

        Returns:
        property wrapper value around Float
      • setTextHaloBlur

        public void setTextHaloBlur​(java.lang.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