Documentation for maplib/Track.kt¶
- data class TrackInfo¶
Track information class.
- data class Location¶
GPS location class.
- fun constructor(longitude: Double, latitude: Double, altitude: Double, accuracy: Float, speed: Float, course: Float, time: Long, provider: String, bearing: Float, satelliteCount: Int)¶
Main constructor
- Параметры
longitude – e Longitude of location.
latitude – e Latitude of location.
altitude – e Altitude of location.
accuracy – y Accuracy.
speed – d Speed at point.
time – e Timestamp.
satelliteCount – t Satellite count.
- class Track¶
Track. GPS Track class.
- static fun getId(regenerate: Boolean = false) : String¶
Get tracker identifier.
- Параметры
regenerate – If true, the new identifier will be generated.
- Результат
String with tracker identifier.
- static fun isRegistered() : Boolean¶
Is current tracker identifier registered at NextGIS Tracker Hub.
- Результат
true if registered at NextGIS Tracker Hub.
- val count : Long
Track count readonly property.
- fun sync()¶
Sync coordinates with NextGIS tracker service.
- fun getTracks() : Array<TrackInfo>¶
Get available tracks list.
- Результат
Array of tracks information.
- fun export(start: Date, stop: Date, name: String, destination: Object, callback: ((status: StatusCode, complete: Double, message: String) -> Boolean)? = null) : Boolean¶
Export track to GPX
- Параметры
start – Track start date.
stop – Track stop date.
name – GPX file name.
destination – Destination path (must be folder)
callback – Export progress
- Результат
True on success.
- fun addPoint(name: String, location: Location, startTrack: Boolean, startSegment: Boolean) : Boolean¶
Add new point to current track
- Параметры
name – Track name
location – Point coordinates and other options
startTrack – Is this new point starts new track
startSegment – Is this point starts new track segment
- Результат
True on success.