Class LineDataBuilder

java.lang.Object
com.here.NativeBase
com.here.sdk.mapview.datasource.LineDataBuilder

public final class LineDataBuilder extends NativeBase

Builder of LineData instances.

Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

  • Constructor Details

    • LineDataBuilder

      public LineDataBuilder()

      Creates a builder instance.

  • Method Details

    • withGeometry

      @NonNull public LineDataBuilder withGeometry(@NonNull GeoPolyline geometry)

      Configures the builder with geometry for line to be created.

      Parameters:
      geometry -

      Geometry of the polyline. Each vertex defines two line segments: one with a previous vertex and one with a next vertex. First and last vertices don't have resp. previous and next vertices and thus belong to single line segments. Consecutive duplicate vertices are ignored. Altitude of polyline vertices is ignored.

      Returns:

      The builder.

    • withAttributes

      @NonNull public LineDataBuilder withAttributes(@NonNull DataAttributes attributes)

      Configures the builder with custom attributes for line to be created.

      Parameters:
      attributes -

      Custom data attributes to be associated with the line.

      Returns:

      The builder.

    • build

      @NonNull public LineData build()

      Builds an instance of LineData and resets the builder instance.

      Returns:

      Instance of LineData created with the configured parameters.