Class SymbolLayer

java.lang.Object
com.trimblemaps.mapsdk.style.layers.Layer
com.trimblemaps.mapsdk.style.layers.SymbolLayer

@UiThread public class SymbolLayer extends Layer
An icon or a text label.
  • Constructor Details

    • SymbolLayer

      public SymbolLayer(String layerId, String sourceId)
      Creates a SymbolLayer.
      Parameters:
      layerId - the id of the layer
      sourceId - the id of the source
  • Method Details

    • initialize

      protected void initialize(String layerId, String sourceId)
    • setSourceLayer

      public void setSourceLayer(String sourceLayer)
      Set the source layer.
      Parameters:
      sourceLayer - the source layer to set
    • withSourceLayer

      @NonNull public SymbolLayer withSourceLayer(String sourceLayer)
      Set the source Layer.
      Parameters:
      sourceLayer - the source layer to set
      Returns:
      This
    • getSourceId

      @NonNull public String getSourceId()
      Get the source id.
      Returns:
      id of the source
    • getSourceLayer

      @NonNull public String getSourceLayer()
      Get the source layer.
      Returns:
      sourceLayer the source layer to get
    • setFilter

      public void setFilter(@NonNull Expression filter)
      Set a single expression filter.
      Parameters:
      filter - the expression filter to set
    • withFilter

      @NonNull public SymbolLayer withFilter(@NonNull Expression filter)
      Set a single expression filter.
      Parameters:
      filter - the expression filter to set
      Returns:
      This
    • getFilter

      @Nullable public Expression getFilter()
      Get a single expression filter.
      Returns:
      the expression filter to get
    • withProperties

      @NonNull public SymbolLayer withProperties(@NonNull PropertyValue<?>... properties)
      Set a property or properties.
      Parameters:
      properties - the var-args properties
      Returns:
      This
    • getSymbolPlacement

      @NonNull public PropertyValue<String> getSymbolPlacement()
      Get the SymbolPlacement property
      Returns:
      property wrapper value around String
    • getSymbolSpacing

      @NonNull public PropertyValue<Float> getSymbolSpacing()
      Get the SymbolSpacing property
      Returns:
      property wrapper value around Float
    • getSymbolAvoidEdges

      @NonNull public PropertyValue<Boolean> getSymbolAvoidEdges()
      Get the SymbolAvoidEdges property
      Returns:
      property wrapper value around Boolean
    • getSymbolSortKey

      @NonNull public PropertyValue<Float> getSymbolSortKey()
      Get the SymbolSortKey property
      Returns:
      property wrapper value around Float
    • getSymbolZOrder

      @NonNull public PropertyValue<String> getSymbolZOrder()
      Get the SymbolZOrder property
      Returns:
      property wrapper value around String
    • getIconAllowOverlap

      @NonNull public PropertyValue<Boolean> getIconAllowOverlap()
      Get the IconAllowOverlap property
      Returns:
      property wrapper value around Boolean
    • getIconIgnorePlacement

      @NonNull public PropertyValue<Boolean> getIconIgnorePlacement()
      Get the IconIgnorePlacement property
      Returns:
      property wrapper value around Boolean
    • getIconOptional

      @NonNull public PropertyValue<Boolean> getIconOptional()
      Get the IconOptional property
      Returns:
      property wrapper value around Boolean
    • getIconRotationAlignment

      @NonNull public PropertyValue<String> getIconRotationAlignment()
      Get the IconRotationAlignment property
      Returns:
      property wrapper value around String
    • getIconSize

      @NonNull public PropertyValue<Float> getIconSize()
      Get the IconSize property
      Returns:
      property wrapper value around Float
    • getIconTextFit

      @NonNull public PropertyValue<String> getIconTextFit()
      Get the IconTextFit property
      Returns:
      property wrapper value around String
    • getIconTextFitPadding

      @NonNull public PropertyValue<Float[]> getIconTextFitPadding()
      Get the IconTextFitPadding property
      Returns:
      property wrapper value around Float[]
    • getIconImage

      @NonNull public PropertyValue<String> getIconImage()
      Get the IconImage property
      Returns:
      property wrapper value around String
    • getIconRotate

      @NonNull public PropertyValue<Float> getIconRotate()
      Get the IconRotate property
      Returns:
      property wrapper value around Float
    • getIconPadding

      @NonNull public PropertyValue<Float> getIconPadding()
      Get the IconPadding property
      Returns:
      property wrapper value around Float
    • getIconKeepUpright

      @NonNull public PropertyValue<Boolean> getIconKeepUpright()
      Get the IconKeepUpright property
      Returns:
      property wrapper value around Boolean
    • getIconOffset

      @NonNull public PropertyValue<Float[]> getIconOffset()
      Get the IconOffset property
      Returns:
      property wrapper value around Float[]
    • getIconAnchor

      @NonNull public PropertyValue<String> getIconAnchor()
      Get the IconAnchor property
      Returns:
      property wrapper value around String
    • getIconPitchAlignment

      @NonNull public PropertyValue<String> getIconPitchAlignment()
      Get the IconPitchAlignment property
      Returns:
      property wrapper value around String
    • getTextPitchAlignment

      @NonNull public PropertyValue<String> getTextPitchAlignment()
      Get the TextPitchAlignment property
      Returns:
      property wrapper value around String
    • getTextRotationAlignment

      @NonNull public PropertyValue<String> getTextRotationAlignment()
      Get the TextRotationAlignment property
      Returns:
      property wrapper value around String
    • getTextField

      @NonNull public PropertyValue<com.trimblemaps.mapsdk.style.types.Formatted> getTextField()
      Get the TextField property
      Returns:
      property wrapper value around Formatted
    • getTextFont

      @NonNull public PropertyValue<String[]> getTextFont()
      Get the TextFont property
      Returns:
      property wrapper value around String[]
    • getTextSize

      @NonNull public PropertyValue<Float> getTextSize()
      Get the TextSize property
      Returns:
      property wrapper value around Float
    • getTextMaxWidth

      @NonNull public PropertyValue<Float> getTextMaxWidth()
      Get the TextMaxWidth property
      Returns:
      property wrapper value around Float
    • getTextLineHeight

      @NonNull public PropertyValue<Float> getTextLineHeight()
      Get the TextLineHeight property
      Returns:
      property wrapper value around Float
    • getTextLetterSpacing

      @NonNull public PropertyValue<Float> getTextLetterSpacing()
      Get the TextLetterSpacing property
      Returns:
      property wrapper value around Float
    • getTextJustify

      @NonNull public PropertyValue<String> getTextJustify()
      Get the TextJustify property
      Returns:
      property wrapper value around String
    • getTextRadialOffset

      @NonNull public PropertyValue<Float> getTextRadialOffset()
      Get the TextRadialOffset property
      Returns:
      property wrapper value around Float
    • getTextVariableAnchor

      @NonNull public PropertyValue<String[]> getTextVariableAnchor()
      Get the TextVariableAnchor property
      Returns:
      property wrapper value around String[]
    • getTextAnchor

      @NonNull public PropertyValue<String> getTextAnchor()
      Get the TextAnchor property
      Returns:
      property wrapper value around String
    • getTextMaxAngle

      @NonNull public PropertyValue<Float> getTextMaxAngle()
      Get the TextMaxAngle property
      Returns:
      property wrapper value around Float
    • getTextWritingMode

      @NonNull public PropertyValue<String[]> getTextWritingMode()
      Get the TextWritingMode property
      Returns:
      property wrapper value around String[]
    • getTextRotate

      @NonNull public PropertyValue<Float> getTextRotate()
      Get the TextRotate property
      Returns:
      property wrapper value around Float
    • getTextPadding

      @NonNull public PropertyValue<Float> getTextPadding()
      Get the TextPadding property
      Returns:
      property wrapper value around Float
    • getTextKeepUpright

      @NonNull public PropertyValue<Boolean> getTextKeepUpright()
      Get the TextKeepUpright property
      Returns:
      property wrapper value around Boolean
    • getTextTransform

      @NonNull public PropertyValue<String> getTextTransform()
      Get the TextTransform property
      Returns:
      property wrapper value around String
    • getTextOffset

      @NonNull public PropertyValue<Float[]> getTextOffset()
      Get the TextOffset property
      Returns:
      property wrapper value around Float[]
    • getTextAllowOverlap

      @NonNull public PropertyValue<Boolean> getTextAllowOverlap()
      Get the TextAllowOverlap property
      Returns:
      property wrapper value around Boolean
    • getTextIgnorePlacement

      @NonNull public PropertyValue<Boolean> getTextIgnorePlacement()
      Get the TextIgnorePlacement property
      Returns:
      property wrapper value around Boolean
    • getTextOptional

      @NonNull public PropertyValue<Boolean> getTextOptional()
      Get the TextOptional property
      Returns:
      property wrapper value around Boolean
    • getIconOpacity

      @NonNull public PropertyValue<Float> getIconOpacity()
      Get the IconOpacity property
      Returns:
      property wrapper value around Float
    • getIconOpacityTransition

      @NonNull public TransitionOptions getIconOpacityTransition()
      Get the IconOpacity property transition options
      Returns:
      transition options for Float
    • setIconOpacityTransition

      public void setIconOpacityTransition(@NonNull TransitionOptions options)
      Set the IconOpacity property transition options
      Parameters:
      options - transition options for Float
    • getIconColor

      @NonNull public PropertyValue<String> getIconColor()
      Get the IconColor property
      Returns:
      property wrapper value around String
    • getIconColorAsInt

      @ColorInt public int getIconColorAsInt()
      The color of the icon. This can only be used with sdf icons.
      Returns:
      int representation of a rgba string color
      Throws:
      RuntimeException - thrown if property isn't a value
    • getIconColorTransition

      @NonNull public TransitionOptions getIconColorTransition()
      Get the IconColor property transition options
      Returns:
      transition options for String
    • setIconColorTransition

      public void setIconColorTransition(@NonNull TransitionOptions options)
      Set the IconColor property transition options
      Parameters:
      options - transition options for String
    • getIconHaloColor

      @NonNull public PropertyValue<String> getIconHaloColor()
      Get the IconHaloColor property
      Returns:
      property wrapper value around String
    • getIconHaloColorAsInt

      @ColorInt public int getIconHaloColorAsInt()
      The color of the icon's halo. Icon halos can only be used with SDF icons.
      Returns:
      int representation of a rgba string color
      Throws:
      RuntimeException - thrown if property isn't a value
    • getIconHaloColorTransition

      @NonNull public TransitionOptions getIconHaloColorTransition()
      Get the IconHaloColor property transition options
      Returns:
      transition options for String
    • setIconHaloColorTransition

      public void setIconHaloColorTransition(@NonNull TransitionOptions options)
      Set the IconHaloColor property transition options
      Parameters:
      options - transition options for String
    • getIconHaloWidth

      @NonNull public PropertyValue<Float> getIconHaloWidth()
      Get the IconHaloWidth property
      Returns:
      property wrapper value around Float
    • getIconHaloWidthTransition

      @NonNull public TransitionOptions getIconHaloWidthTransition()
      Get the IconHaloWidth property transition options
      Returns:
      transition options for Float
    • setIconHaloWidthTransition

      public void setIconHaloWidthTransition(@NonNull TransitionOptions options)
      Set the IconHaloWidth property transition options
      Parameters:
      options - transition options for Float
    • getIconHaloBlur

      @NonNull public PropertyValue<Float> getIconHaloBlur()
      Get the IconHaloBlur property
      Returns:
      property wrapper value around Float
    • getIconHaloBlurTransition

      @NonNull public TransitionOptions getIconHaloBlurTransition()
      Get the IconHaloBlur property transition options
      Returns:
      transition options for Float
    • setIconHaloBlurTransition

      public void setIconHaloBlurTransition(@NonNull TransitionOptions options)
      Set the IconHaloBlur property transition options
      Parameters:
      options - transition options for Float
    • getIconTranslate

      @NonNull public PropertyValue<Float[]> getIconTranslate()
      Get the IconTranslate property
      Returns:
      property wrapper value around Float[]
    • getIconTranslateTransition

      @NonNull public TransitionOptions getIconTranslateTransition()
      Get the IconTranslate property transition options
      Returns:
      transition options for Float[]
    • setIconTranslateTransition

      public void setIconTranslateTransition(@NonNull TransitionOptions options)
      Set the IconTranslate property transition options
      Parameters:
      options - transition options for Float[]
    • getIconTranslateAnchor

      @NonNull public PropertyValue<String> getIconTranslateAnchor()
      Get the IconTranslateAnchor property
      Returns:
      property wrapper value around String
    • getTextOpacity

      @NonNull public PropertyValue<Float> getTextOpacity()
      Get the TextOpacity property
      Returns:
      property wrapper value around Float
    • getTextOpacityTransition

      @NonNull public TransitionOptions getTextOpacityTransition()
      Get the TextOpacity property transition options
      Returns:
      transition options for Float
    • setTextOpacityTransition

      public void setTextOpacityTransition(@NonNull TransitionOptions options)
      Set the TextOpacity property transition options
      Parameters:
      options - transition options for Float
    • getTextColor

      @NonNull public PropertyValue<String> getTextColor()
      Get the TextColor property
      Returns:
      property wrapper value around String
    • getTextColorAsInt

      @ColorInt public int getTextColorAsInt()
      The color with which the text will be drawn.
      Returns:
      int representation of a rgba string color
      Throws:
      RuntimeException - thrown if property isn't a value
    • getTextColorTransition

      @NonNull public TransitionOptions getTextColorTransition()
      Get the TextColor property transition options
      Returns:
      transition options for String
    • setTextColorTransition

      public void setTextColorTransition(@NonNull TransitionOptions options)
      Set the TextColor property transition options
      Parameters:
      options - transition options for String
    • getTextHaloColor

      @NonNull public PropertyValue<String> getTextHaloColor()
      Get the TextHaloColor property
      Returns:
      property wrapper value around String
    • getTextHaloColorAsInt

      @ColorInt public int getTextHaloColorAsInt()
      The color of the text's halo, which helps it stand out from backgrounds.
      Returns:
      int representation of a rgba string color
      Throws:
      RuntimeException - thrown if property isn't a value
    • getTextHaloColorTransition

      @NonNull public TransitionOptions getTextHaloColorTransition()
      Get the TextHaloColor property transition options
      Returns:
      transition options for String
    • setTextHaloColorTransition

      public void setTextHaloColorTransition(@NonNull TransitionOptions options)
      Set the TextHaloColor property transition options
      Parameters:
      options - transition options for String
    • getTextHaloWidth

      @NonNull public PropertyValue<Float> getTextHaloWidth()
      Get the TextHaloWidth property
      Returns:
      property wrapper value around Float
    • getTextHaloWidthTransition

      @NonNull public TransitionOptions getTextHaloWidthTransition()
      Get the TextHaloWidth property transition options
      Returns:
      transition options for Float
    • setTextHaloWidthTransition

      public void setTextHaloWidthTransition(@NonNull TransitionOptions options)
      Set the TextHaloWidth property transition options
      Parameters:
      options - transition options for Float
    • getTextHaloBlur

      @NonNull public PropertyValue<Float> getTextHaloBlur()
      Get the TextHaloBlur property
      Returns:
      property wrapper value around Float
    • getTextHaloBlurTransition

      @NonNull public TransitionOptions getTextHaloBlurTransition()
      Get the TextHaloBlur property transition options
      Returns:
      transition options for Float
    • setTextHaloBlurTransition

      public void setTextHaloBlurTransition(@NonNull TransitionOptions options)
      Set the TextHaloBlur property transition options
      Parameters:
      options - transition options for Float
    • getTextTranslate

      @NonNull public PropertyValue<Float[]> getTextTranslate()
      Get the TextTranslate property
      Returns:
      property wrapper value around Float[]
    • getTextTranslateTransition

      @NonNull public TransitionOptions getTextTranslateTransition()
      Get the TextTranslate property transition options
      Returns:
      transition options for Float[]
    • setTextTranslateTransition

      public void setTextTranslateTransition(@NonNull TransitionOptions options)
      Set the TextTranslate property transition options
      Parameters:
      options - transition options for Float[]
    • getTextTranslateAnchor

      @NonNull public PropertyValue<String> getTextTranslateAnchor()
      Get the TextTranslateAnchor property
      Returns:
      property wrapper value around String
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Layer
      Throws:
      Throwable