Class PointDataSource
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePointDataSource.PointDataProcessorCalled 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 voidadd(PointData point)Adds a new point to the data source.voidadd(java.util.List<PointData> points)Adds new points to the data source.voiddestroy()Frees all internally used resources.voidforEach(PointDataSource.PointDataProcessor processor)Iterates through all the points from the data source and passes them to the given processor, one by one.voidremoveAll()Removes all points from the data source.voidremoveIf(PointDataSource.PointDataProcessor processor)Iterates through all the points from the data source and passes them to the given inspector, one by one.
-
-
-
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
trueget 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.
-
-