Class Expression.FormatOption

java.lang.Object
com.trimblemaps.mapsdk.style.expressions.Expression.FormatOption
Enclosing class:
Expression

public static class Expression.FormatOption extends Object
Holds format options used in a Expression.formatEntry(Expression, FormatOption...) that builds a Expression.format(FormatEntry...) expression.

If an option is not set, it defaults to the base value defined for the symbol.

  • Method Details

    • formatFontScale

      @NonNull public static Expression.FormatOption formatFontScale(@NonNull Expression expression)
      If set, the font-scale argument specifies a scaling factor relative to the text-size specified in the root layout properties.

      "font-scale" is required to be of a resulting type number.

      Parameters:
      expression - expression
      Returns:
      format option
    • formatFontScale

      @NonNull public static Expression.FormatOption formatFontScale(double scale)
      If set, the font-scale argument specifies a scaling factor relative to the text-size specified in the root layout properties.

      "font-scale" is required to be of a resulting type number.

      Parameters:
      scale - value
      Returns:
      format option
    • formatTextFont

      @NonNull public static Expression.FormatOption formatTextFont(@NonNull Expression expression)
      If set, the text-font argument overrides the font specified by the root layout properties.

      "text-font" is required to be a literal array.

      The requested font stack has to be a part of the used style. For more information see the documentation.

      Parameters:
      expression - expression
      Returns:
      format option
    • formatTextFont

      @NonNull public static Expression.FormatOption formatTextFont(@NonNull String[] fontStack)
      If set, the text-font argument overrides the font specified by the root layout properties.

      "text-font" is required to be a literal array.

      The requested font stack has to be a part of the used style. For more information see the documentation.

      Parameters:
      fontStack - value
      Returns:
      format option
    • formatTextColor

      @NonNull public static Expression.FormatOption formatTextColor(@NonNull Expression expression)
      If set, the text-color argument overrides the color specified by the root paint properties.
      Parameters:
      expression - expression
      Returns:
      format option
    • formatTextColor

      @NonNull public static Expression.FormatOption formatTextColor(@ColorInt int color)
      If set, the text-color argument overrides the color specified by the root paint properties.
      Parameters:
      color - value
      Returns:
      format option