PointDataSource
public class PointDataSource
extension PointDataSource: NativeBase
extension PointDataSource: Hashable
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.
-
Called for each point, allowing inspection, removal or update of coordinates and attributes.
Declaration
Swift
public typealias PointDataProcessor = (_ pointAccessor: PointDataAccessor) -> BoolParameters
pointAccessorthe point data accessor.
Return Value
value indicating the result of the processing.
-
Adds a new point to the data source. Altitude of the point coordinates is ignored.
Declaration
Swift
public func add(_ point: PointData)Parameters
pointPoint to be added.
-
Adds new points to the data source. Altitude of the points coordinates is ignored.
Declaration
Swift
public func add(_ points: [PointData])Parameters
pointsPoint positions.
-
Removes all points from the data source.
Declaration
Swift
public func removeAll() -
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.
Declaration
Swift
public func forEach(_ processor: @escaping PointDataSource.PointDataProcessor)Parameters
processorPoint data 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.Declaration
Swift
public func removeIf(_ processor: @escaping PointDataSource.PointDataProcessor)Parameters
processorPoint data processor.