LineDataSource (API Reference)
Class LineDataSource
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCalled for each line, allowing inspection, removal or update of coordinates and attributes. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new line to the data source.voidAdds new lines to the data source.voiddestroy()Frees all internally used resources.voidforEach(LineDataSource.LineDataProcessor processor) Iterates through all the lines from the data source and passes them to the given processor, one by one.voidRemoves all lines from the data source.voidremoveIf(LineDataSource.LineDataProcessor inspector) Iterates through all the lines from the data source and passes them to the given inspector, one by one.
-
Method Details
-
add
Adds a new line to the data source.
- Parameters:
line-Line to add.
-
add
Adds new lines to the data source.
- Parameters:
lines-Lines to add.
-
removeAll
public void removeAll()Removes all lines from the data source.
-
forEach
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
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
trueget 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.
-