Class LineDataSource

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

public final class LineDataSource extends NativeBase

Polyline data source allows the rendering engine access to the user provided polylines geometry and their attributes.

Polyline segments are rendered following the shortest path between their end vertices.

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.

  • Method Details

    • add

      public void add(@NonNull LineData line)

      Adds a new line to the data source.

      Parameters:
      line -

      Line to add.

    • add

      public void add(@NonNull List<LineData> lines)

      Adds new lines to the data source.

      Parameters:
      lines -

      Lines to add.

    • removeAll

      public void removeAll()

      Removes all lines from the data source.

    • forEach

      public void forEach(@NonNull LineDataSource.LineDataProcessor processor)

      Iterates through all the lines from the data source and passes them to the given processor, one by one. The processor can update the line data. The iteration stops after all lines have been processed or the processor returns false from the process call.

      Parameters:
      processor -

      Line processor.

    • removeIf

      public void removeIf(@NonNull LineDataSource.LineDataProcessor inspector)

      Iterates through all the lines from the data source and passes them to the given inspector, one by one. All lines for which the inspector returns true get removed from the data source. The inspector cannot update the line data.

      Parameters:
      inspector -

      Line data processor.

    • destroy

      public void destroy()

      Frees all internally used resources. After calling this method, the object is not usable anymore.