Class PointDataSource

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

public final class PointDataSource extends NativeBase

Point data source allows the rendering engine access to the user provided geographical locations and their attributes.

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 PointData point)

      Adds a new point to the data source. Altitude of the point coordinates is ignored.

      Parameters:
      point -

      Point to be added.

    • add

      public void add(@NonNull List<PointData> points)

      Adds new points to the data source. Altitude of the points coordinates is ignored.

      Parameters:
      points -

      Point positions.

    • removeAll

      public void removeAll()

      Removes all points from the data source.

    • forEach

      public void forEach(@NonNull PointDataSource.PointDataProcessor processor)

      Iterates through all the points from the data source and passes them to the given processor, one by one. The processor can update the point data.

      The iteration stops after all points have been processed or the processor returns false from the process call.

      Parameters:
      processor -

      Point data processor.

    • removeIf

      public void removeIf(@NonNull PointDataSource.PointDataProcessor processor)

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

      Parameters:
      processor -

      Point data processor.

    • destroy

      public void destroy()

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