/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.map/TripResultMapViewModel

TripResultMapViewModel

\ class TripResultMapViewModel : RxViewModel

Types

Name Summary
Companion object Companion

Properties

Name Summary
alertMarkerViewModelsStream val alertMarkerViewModelsStream: PublishSubject<List<AlertMarkerViewModel>>
mapHeightPx var mapHeightPx: Int
mapTilesStream val mapTilesStream: PublishSubject<List<String>>
mapWidthPx var mapWidthPx: Int
nonTravelledStopMarkerViewModelsStream val nonTravelledStopMarkerViewModelsStream: PublishSubject<List<StopMarkerViewModel>>
segmentsStream val segmentsStream: PublishSubject<List<TripSegment>>
selectedTrip @VisibleForTesting
val selectedTrip: BehaviorRelay<Trip>
timeLabelExtentPx var timeLabelExtentPx: Int
Horizontal space (px) taken by time labels drawn beside trip markers, and the map size. Set by the map contributor; when known, the trip camera leaves room for those labels so they are not clipped at the screen edge (Redmine #19351). Zero keeps the previous framing.
travelledStopMarkerViewModelsStream val travelledStopMarkerViewModelsStream: PublishSubject<List<StopMarkerViewModel>>
tripCameraUpdateStream val tripCameraUpdateStream: PublishSubject<CameraUpdate>
vehicleMarkerViewModelsStream val vehicleMarkerViewModelsStream: PublishSubject<List<VehicleMarkerViewModel>>

Functions

Name Summary
addCloseable open fun addCloseable(@NonNullp0: Closeable)
autoClear fun <T> Observable<T>.autoClear(): Observable<T>
fun Disposable.autoClear()
onCleared open override fun onCleared()
This method will be called when this ViewModel is no longer used and will be destroyed.
onTripSegmentTapped fun onTripSegmentTapped(): Observable<Pair<CameraUpdate, Long>>
processCameraUpdate @VisibleForTesting
fun Trip.processCameraUpdate()
processMapTiles @VisibleForTesting
fun Trip.processMapTiles()
processMarkerViewModels @VisibleForTesting
fun Trip.processMarkerViewModels()
processSegments @VisibleForTesting
fun Trip.processSegments()
processTravelledStopMarkerViewModels @VisibleForTesting
fun Trip.processTravelledStopMarkerViewModels()
setTripGroupId fun setTripGroupId(tripGroupId: String, tripId: Long? = null, skipCamera: Boolean = false, tripKey: String? = null)
Shows a trip of the group on the map. tripId is often 0 for parsed trips, so tripKey (see com.skedgo.tripkit.ui.tripresult.stableKey) identifies the selected trip reliably; without either the group's display trip is shown.