Class MapPolyline.DashRepresentation

  • Enclosing class:
    MapPolyline

    public static final class MapPolyline.DashRepresentation
    extends MapPolyline.Representation

    Represents a dash pattern for map polyline where the dash can be rendered as a colored line and the gap can be either empty or colored.

    The length of the dash and gap are set independently, allowing for patterns like ' — — — —' (dash length = gap length) or ' ——— ——— ———' (dash length != gap length).

    • Method Detail

      • getLineWidth

        @NonNull
        public MapMeasureDependentRenderSize getLineWidth()

        Gets the map measure dependent polyline width.

        At map measures smaller than smallest map measure in the lineWidth line width is constant and equal to the width given for the smallest map measure in the lineWidth.

        At map measures bigger than biggest map measure in the lineWidth line width is constant and equal to the width given for the biggest map measure in the lineWidth.

        At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.

        Returns:

        The width of the polyline depending on the map measure.

      • getDashLength

        @NonNull
        public MapMeasureDependentRenderSize getDashLength()

        Gets the map measure dependent polyline dash length.

        At map measures smaller than smallest map measure in the dashLength line width is constant and equal to the width given for the smallest map measure in the dashLength.

        At map measures bigger than biggest map measure in the dashLength line width is constant and equal to the width given for the biggest map measure in the dashLength.

        At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.

        Returns:

        The dash length of the polyline depending on the map measure.

      • getGapLength

        @NonNull
        public MapMeasureDependentRenderSize getGapLength()

        Gets the map measure dependent polyline gap length.

        At map measures smaller than smallest map measure in the gapLength line width is constant and equal to the width given for the smallest map measure in the gapLength.

        At map measures bigger than biggest map measure in the gapLength line width is constant and equal to the width given for the biggest map measure in the gapLength.

        At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.

        Returns:

        The gap length of the polyline depending on the map measure.

      • getDashColor

        @NonNull
        public Color getDashColor()

        Gets the color of the dashes of the polyline.

        Returns:

        The color of the dashes of the polyline.

      • getGapColor

        @Nullable
        public Color getGapColor()

        Gets the color for the gaps of the polyline. Returns null if no color is used.

        Returns:

        The color for the gaps of the polyline. The default value is null and no color is used.