Enum LabelTextLayout

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LabelTextLayout>

    public enum LabelTextLayout
    extends java.lang.Enum<LabelTextLayout>
    The layout to use for label text, which can be either horizontal, straight, perpendicular, or follow the line feature.
    Since:
    100.11.0
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AUTOMATIC
      The text layout will be determined by the individual feature type.
      FOLLOW_FEATURE
      Text will bend to follow a curved or multi-segment line feature.
      HORIZONTAL
      Text will be written horizontally (with respect to the screen).
      PERPENDICULAR
      Text will be written perpendicular to the STRAIGHT text layout.
      STRAIGHT
      Text will be written along a straight line, following the point positioning angle or at a tangent to the line feature.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static LabelTextLayout valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static LabelTextLayout[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • AUTOMATIC

        public static final LabelTextLayout AUTOMATIC
        The text layout will be determined by the individual feature type.

        For each label, the layout will be determined by the feature geometry type:

        Since:
        100.11.0
      • HORIZONTAL

        public static final LabelTextLayout HORIZONTAL
        Text will be written horizontally (with respect to the screen).

        If the map is rotated within the screen, then the text will be redrawn (and possibly repositioned) to remain horizontal with respect to the screen.

        Since:
        100.11.0
      • PERPENDICULAR

        public static final LabelTextLayout PERPENDICULAR
        Text will be written perpendicular to the STRAIGHT text layout.
        Since:
        100.11.0
      • STRAIGHT

        public static final LabelTextLayout STRAIGHT
        Text will be written along a straight line, following the point positioning angle or at a tangent to the line feature.

        An angle for placement and orientation will be calculated for each label if the "labelAngleInfo" JSON property for the LabelDefinition has been specified.

        Centered point labels will stay centered on the point feature, but will be rotated to the angle (or horizontal, if none has been defined).

        Offset point labels will be positioned around the point feature, at the position specified by the angle. The text will lie along this angle, so that it stretches radially from the edge of the point feature.

        Note that if a label has an angle of zero then its text will be drawn horizontally with respect to the map. If the map is rotated within the screen, the text will rotate with the map.

        Line labels will be positioned as usual, but then rotated (around their midpoint) to lie on a straight line at a tangent to the line geometry at that point.

        Since:
        100.11.0
      • FOLLOW_FEATURE

        public static final LabelTextLayout FOLLOW_FEATURE
        Text will bend to follow a curved or multi-segment line feature.

        Individual characters will be angled to follow the changes in angle of the line geometry. If the text overruns the beginning or end of the line geometry, then the remaining characters will be laid out in a straight line extrapolated from the last geometry segment.

        Since:
        100.11.0
    • Method Detail

      • values

        public static LabelTextLayout[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LabelTextLayout c : LabelTextLayout.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LabelTextLayout valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null