OsethTrackVehicle

class OsethTrackVehicle(val routeId: RouteId, val shapeId: ShapeId, val period: Duration = 1000.milliseconds)

Background vehicle location tracker with a channel

Parameters

routeId

route to track

shapeId

shape to track

period

time to refresh

Constructors

Link copied to clipboard
constructor(routeId: RouteId, shapeId: ShapeId, period: Duration = 1000.milliseconds)

Properties

Link copied to clipboard
val channel: Channel<List<Coordinates>>

Broadcast channel with GPS coordinates. Argument is a list of coordinates - multiple vehicle support

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun stop()

Stop tracking