Class LineDataSourceBuilder

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

public final class LineDataSourceBuilder extends NativeBase

Builder of lines data source.

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

    • LineDataSourceBuilder

      public LineDataSourceBuilder(@NonNull MapContext context)

      Creates a data source builder instance in the given context.

      Parameters:
      context -

      Map context to associate the data source with.

  • Method Details

    • withName

      @NonNull public LineDataSourceBuilder withName(@NonNull String dataSourceName)

      Configures the builder to use the given name for data source.

      Parameters:
      dataSourceName -

      Name of the created data source. Must be unique.

      Returns:

      This data source builder instance.

    • withPolyline

      @NonNull public LineDataSourceBuilder withPolyline(@NonNull LineData polyline)

      Configures the builder to insert the given polyline in the data source.

      Parameters:
      polyline -

      Polyline to add.

      Returns:

      This data source builder instance.

    • withPolylines

      @NonNull public LineDataSourceBuilder withPolylines(@NonNull List<LineData> polylines)

      Configures the builder to insert the given polylines in the data source.

      Parameters:
      polylines -

      Polylines to add.

      Returns:

      This data source builder instance.

    • build

      @NonNull public LineDataSource build()

      Builds instance of LineDataSource.

      Returns:

      Instance of the data source created with given polylines and attributes.