Skip to main content

class

ActivityTracker

ActivityTracker(
platformContext: Context,
model: Model,
speedBound: Double = 4.2,
timeThreshold: Duration = Duration.ofMilliseconds(20000)
)

Navigator extension that monitors user activity and emits a signal when the user has stopped using the navigator and can be turned off.

Parameters

platformContext

Context.

model

Model of the navigator which status is being monitored.

speedBound

Upper speed limit in m/s, above which in the Finished state of the navigator it is considered that the navigator is active, i.e. the movement continues.

timeThreshold

The amount of time the navigator's Finished state monitors movement below the threshold to determine if the navigator is inactive. If during this time the movement rate is below the set threshold, or there is no location and speed data, the Navigator is considered inactive.

Properties

val stopChannel

Active state of this flag indicates that the navigator needs to be stopped. If navigation stops in the Finished state, (the movement stops or its speed falls below the threshold) and this state persists for some time, the flag is set to true, otherwise it is set to false.

val stop

Active state of this flag indicates that the navigator needs to be stopped. If navigation stops in the Finished state, (the movement stops or its speed falls below the threshold) and this state persists for some time, the flag is set to true, otherwise it is set to false.

AddEventResult

Result of adding an event (event object or error).

AddEventResult(event: RoadEvent)
Parameters
AddEventResult(error: AddEventError)
Parameters
Methods
fun match(event: Function1, error: Function1): T
Parameters
fun toString(): String
Returns
fun hashCode(): Int
Returns
fun equals(other: Any?): Boolean
Parameters

other

Returns
Properties

val isEvent

val asEvent

val isError

val asError

val value

Address

Address as a set of separate components.

Address(
drillDown: List<AddressAdmDiv>,
components: List<AddressComponent>,
buildingName: String?,
postCode: String?,
buildingCode: String?,
addressComment: String?
)

Address as a set of separate components.

Parameters

drillDown

components

buildingName

postCode

buildingCode

addressComment

Properties

val drillDown

Set of administrative division objects where the described object is located.

val components

Full address of an object may contain several separate address components.

val buildingName

Name of the building.

val postCode

ZIP code.

val buildingCode

Unique ZIP code of the building.

val addressComment

Comment on the address. Example: "office 301; 9th floor"

AddressAdmDiv

Object of administrative division.

AddressAdmDiv(type: String, name: String)

Object of administrative division.

Parameters

type

name

Properties

val type

The type of the administrative unit. One of the following:

  • country
  • region (province/territory/republic, etc.)
  • district_area - district of the region
  • city
  • settlement
  • division
  • district
  • living_area - residential estate, microdistrict
  • place

val name

AddressComponent

Address component: street, house number, or verbal description of location.

AddressComponent(streetAddress: AddressStreet)
Parameters

streetAddress

AddressComponent(number: AddressNumber)
Parameters
AddressComponent(location: AddressLocation)
Parameters
Methods
fun match(
streetAddress: Function1,
number: Function1,
location: Function1
): T
Parameters
fun toString(): String
Returns
fun hashCode(): Int
Returns
fun equals(other: Any?): Boolean
Parameters

other

Returns
Properties

val isStreetAddress

val asStreetAddress

val isNumber

val asNumber

val isLocation

val asLocation

val value

AddressLocation

Used for components that are difficult to describe with a specific address.

AddressLocation(comment: String)

Used for components that are difficult to describe with a specific address.

Parameters

comment

Properties

val comment

Text description of the building location.

AddressNumber

House number used as a full address. In some settlements, only the house number is indicated, without the street (for example, Krasnoobsk).

AddressNumber(number: String)

House number used as a full address. In some settlements, only the house number is indicated, without the street (for example, Krasnoobsk).

Parameters

number

Properties

val number

House number, including fractions and letters. Can be a proper noun if it is a common practice in the location.

AddressStreet

Regular address with a street name and a building number.

AddressStreet(street: String, number: String)

Regular address with a street name and a building number.

Parameters

street

number

Properties

val street

Street name.

val number

House number, including fractions, building numbers, and letters.

AddRoadEventButton

Button for adding a road event.

AddRoadEventButton(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)

Button for adding a road event.

Parameters

context

attrs

defStyle

Methods
fun attachToModel(model: AddRoadEventCardModel): Unit
Parameters

AddRoadEventCard

Card for adding a road event.

AddRoadEventCard(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)

Card for adding a road event.

Parameters

context

attrs

defStyle

Methods
fun attachToModel(model: AddRoadEventCardModel): Unit
Parameters
Properties

const MAX_DESCRIPTION_LENGTH

AddRoadEventCardModel

Model of the card for adding a road event.

Implements: java.lang.AutoCloseable
AddRoadEventCardModel(roadEventManager: RoadEventManager, map: Map)

Model of the card for adding a road event.

Parameters

roadEventManager

map

Methods
fun onEventTypeClicked(type: RoadEventType): Unit

Action that occurs when the event type selection control is clicked.

Parameters
fun onLaneClicked(lane: Lane): Unit

Action that occurs when the lane selection control is clicked.

Parameters

lane

Returns
fun onDescriptionEntered(description: String): Unit

Action that occurs when entering description.

Parameters

description

Returns
fun onSendClicked(): Unit

Action that occurs when the submit button is clicked.

Returns
fun close(): Unit
Returns
Properties

val eventTypeChannel

Selected event type.

val lanesChannel

val canSelectLanesChannel

Whether it is possible to set lanes.

val descriptionChannel

Entered description.

val markerPositionChannel

Marker position on the screen.

val canSendChannel

Whether it is possible to send an event.

val resultChannel

Result of sending the event.

AddRoadEventControl

Base class for controls for adding road events.

Extends: android.widget.FrameLayout
AddRoadEventControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)

Base class for controls for adding road events.

Parameters

context

attrs

defStyle

Methods
fun attachToModel(model: AddRoadEventCardModel): Unit
Parameters
@CallSuper
fun detachFromModel(): Unit
Returns
fun onAttachedToWindow(): Unit
Returns
fun onDetachedFromWindow(): Unit
Returns

AddRoadEventControls

Set of controls for adding road events. Consists of a card with event parameters, a "Submit" button, and a marker indicating the location of adding an event on the map.

AddRoadEventControls(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)

Set of controls for adding road events. Consists of a card with event parameters, a "Submit" button, and a marker indicating the location of adding an event on the map.

Parameters

context

attrs

defStyle

Methods
fun show(): Unit
Returns
fun hide(): Unit
Returns
fun attachToMap(map: Map): Unit
Parameters

map

Returns
fun detachFromMap(map: Map): Unit
Parameters

map

Returns
Properties

val cardHeightChannel

Height in pixels to which the card is expanded.

AddRoadEventMarker

Marker for adding a road event.

AddRoadEventMarker(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)

Marker for adding a road event.

Parameters

context

attrs

defStyle

Methods
fun attachToModel(model: AddRoadEventCardModel): Unit
Parameters
fun detachFromModel(): Unit
Returns

AlternativeRouteSelector

Selects an alternative route.

Methods
fun selectAlternativeRoute(trafficRoute: TrafficRoute): Unit

Selects an alternative route. If the passed route does not match one of the current alternative routes, nothing happens. Otherwise, the appropriate alternative route becomes the current active route.

Parameters

trafficRoute

Alternative route which should be selected as a current active route.

Returns

AlternativeRoutesProviderSettings

Properties

var alternativeRoutesEnabled

Flag to enable/disable suggesting alternative routes. By default, this option is enabled.

var betterRouteEnabled

Flag to enable/disable suggesting a better route. By default, this option is enabled.

var routeSearchDelay

Delay before searching for alternative routes when starting a trip on a route or after switching to another route. Must be not less than 5 seconds. The default value is 20 seconds.

var betterRouteTimeCostThreshold

Minimum travel time difference between the original route and the alternative route for which the alternative route is considered a better route.

var betterRouteLengthThreshold

Minimum tot