Class 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  PointDataSource.PointDataProcessor
      Called for each point, allowing inspection, removal or update of coordinates and attributes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(PointData point)
      Adds a new point to the data source.
      void add​(java.util.List<PointData> points)
      Adds new points to the data source.
      void destroy()
      Frees all internally used resources.
      void forEach​(PointDataSource.PointDataProcessor processor)
      Iterates through all the points from the data source and passes them to the given processor, one by one.
      void removeAll()
      Removes all points from the data source.
      void removeIf​(PointDataSource.PointDataProcessor processor)
      Iterates through all the points from the data source and passes them to the given inspector, one by one.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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
                        java.util.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.