Skip to main content

interface

AudioDriver​

Interface for implementing an audio driver on the platform.

Methods
fun setReader(reader: AudioStreamReader): Unit

Sets the callback function that the audio driver calls to load data.

Calling this method repeatedly overwrites the previously saved callback function.

Parameters

reader

Returns
Unit
fun setAvailableCallback(callback: AvailableCallback): Unit
Parameters

callback

Returns
Unit
fun available(): Boolean

Whether the audio device is currently available to the application.

Returns
Boolean
fun play(): Unit

Launches the playing of the sound stream.

Once this method is called, a callback function must be called if it is set in the set_reader method.

If the callback function returns 0 written bytes, the playing of the sound stream can be stopped.

Returns
Unit

BufferedChannel​

Properties

val value​

T?

CameraMoveController​

Class that allows you to control the position of the camera for the needs of animation.

The class must be thread-safe.

Methods
fun position(time: Duration): CameraPosition

Position of the viewing area at a particular point in time. The controller must be prepared for the animation times to be passed in any order, not necessarily non-decreasing.

Parameters

time

Time from the start of the animation in milliseconds.

Returns
CameraPosition

Position of the viewing area at the specified point in time.

fun animationTime(): Duration

Animation duration in milliseconds.

Returns
Duration

Animation duration in milliseconds.

Channel​

Methods
@CheckResult
fun connect(executor: Executor, callback: ChannelCallback<T>): AutoCloseable
Parameters

executor

Executor

callback

Returns
AutoCloseable
@CheckResult
fun connect(callback: ChannelCallback<T>): AutoCloseable
Parameters

callback

Returns
AutoCloseable

CustomFollowController​

Interface that can be implemented on the platform to create custom controller for parameter tracking. To add a controller to a camera, you need to implement this interface and create a FollowController object passing an object that implements this interface as an argument.

Methods
fun availableValues(): EnumSet<FollowValue>

Set of value types that this controller can manage.

Returns
EnumSet<FollowValue>
fun requestValues(values: EnumSet<FollowValue>): Unit

Tells the controller which values it provides are in use. This frees up the resources associated with calculating unused values. The method can be called multiple times with different values, in which case the last one is considered relevant.

Parameters

values

EnumSet<FollowValue>
Returns
Unit
fun setNewValuesNotifier(notifier: NewValuesNotifier?): Unit

Installs a notifier that notifies about new values. The notifier must be stored in the implemented controller

Parameters

notifier

Returns
Unit
fun coordinates(): GeoPoint?

Geographical coordinates.

Returns
fun bearing(): Bearing?

Bearing. Method is called only after calling request_values with appropriate parameters.

Returns
fun tilt(): Tilt?

Map tilt.

Returns
fun styleZoom(): StyleZoom?

Map style zoom level.

Returns

Future​

Methods
fun onComplete(
executor: Executor,
resultCallback: FutureResultCallback<T>,
errorCallback: FutureErrorCallback
): Unit
Parameters

executor

Executor

resultCallback

errorCallback

Returns
Unit
fun onComplete(resultCallback: FutureResultCallback<T>, errorCallback: FutureErrorCallback): Unit
Parameters

resultCallback

errorCallback

Returns
Unit
fun onResult(executor: Executor, callback: FutureResultCallback<T>): Unit
Parameters

executor

Executor

callback

Returns
Unit
fun onResult(callback: FutureResultCallback<T>): Unit
Parameters

callback

Returns
Unit
fun onError(executor: Executor, callback: FutureErrorCallback): Unit
Parameters

executor

Executor

callback

Returns
Unit
fun onError(callback: FutureErrorCallback): Unit
Parameters

callback

Returns
Unit
fun map(transform: Function1): Future<R>

Returns a future with transform applied to the result. An error, including one thrown by transform, is delivered to the error callback. Closing the returned future closes the original one.

Parameters

transform

(T) -> R
Returns
suspend fun await(): T
Returns
T

HttpClient​

Interface for implementing a network client on a platform.

Methods
fun sendRequest(request: HttpRequest, callback: HttpResponseCallback): Unit

Method for handling requests from SDK.

Parameters

request

Request to be sent.

callback

Object with callbacks for sending and receiving data.

Returns
Unit

InstallFallback​

Behavior in case of an error during package installation or update.

Methods
fun process(targetPackage: Package): Unit
Parameters

targetPackage

The package which installation or update caused the error.

Returns
Unit

LocationChangeListener​

Interface for reporting changes in geolocation and its availability.

Methods
fun onLocationChanged(locations: Array<Location>): Unit
Parameters

locations

Array<Location>
Returns
Unit
fun onAvailabilityChanged(availability: Boolean): Unit
Parameters

availability

Boolean
Returns
Unit

LocationService​

Interface providing the last known geolocation.

Properties

val lastLocation​

Location?

Currently best known geolocation. If there is no currently known geolocation, null is returned. The returned geolocation may be unreliable, such as being out of date and/or not meeting the required accuracy.

LocationSource​

Methods
fun activate(listener: LocationChangeListener): Unit
Parameters

listener

Returns
Unit
fun deactivate(): Unit
Returns
Unit
fun setDesiredAccuracy(accuracy: DesiredAccuracy): Unit
Parameters

accuracy

Returns
Unit

LogSink​

Log sink.

Methods
fun write(message: LogMessage): Unit

Writes to log. Can be called from any thread.

Parameters

message

Returns
Unit

MagneticHeadingSource​

Methods
fun activate(listener: MagneticChangeListener): Unit
Parameters

listener

Returns
Unit
fun deactivate(): Unit
Returns
Unit

MapControllerFactory​

Methods
fun create(context: Context, options: MapControllerOptions): Future<MapController>
Parameters

MapControllerState​

State of the map provided by MapControllerViewModel.

MapControllerViewModel​

Owns a MapController and exposes it to a map view.

Attach it to a View using MapView.setMapControllerViewModel or MapComposable. The View only observes the state and never closes the controller: its lifecycle is managed by the View model implementation.

Main thread only.

Methods
suspend fun awaitController(): MapController

Suspends until the map is created and returns its controller.

suspend fun awaitMap(): Map

Same as awaitController(), but returns the controller's Map.

Returns
Properties

val state​

<ERROR CLASS><MapControllerState>

Current state of the map.

MapEventSender​

Interface that allows you to send an input event to the map.

Methods
fun sendEvent(event: Event): Unit
Parameters

event

Returns
Unit

MapGestureRecognitionEngine​

Interface for gesture recognition.

Methods
fun processMotionEvent(event: MotionEvent): Boolean
Parameters

event

MotionEvent
Returns
Boolean
fun resetRecognitionState(): Unit
Returns
Unit
fun onDevicePpiChanged(devicePpi: DevicePpi): Unit
Parameters

devicePpi

Returns
Unit
fun setMapEventSender(mapEventSender: MapEventSender): Unit
Parameters

mapEventSender

Returns
Unit

MutableChannel​

Methods
fun send(value: T): Unit
Parameters

value

T
Returns
Unit

MutableStatefulChannel​

Properties

var value​

T

RadarApiHttpClient​

HTTP client interface for Radar API.

Methods
fun post(
url: String,
body: String,
headers: Map
): RadarHttpResponse

Sends a POST request to the specified URL.

Parameters

url

String

Request URL.

body

String

Request body in JSON format.

headers

Map
Returns
RadarHttpResponse

Server response in the form of RadarHttpResponse.

RoadEventActionButtonModel​

Action button model for a traffic event.

Methods
fun onClicked(): Unit

Action on click.

Returns
Unit
Properties

val icon​

Icon?

Icon.

val name​

String?

Name, for example, "Confirm".

val countChannel​

Number of actions applied to the event by all users.

val highlightChannel​

RoadEventFilter​

Filter of displayed road events.

Methods
fun passes(event: RoadEventFilterData): Boolean
Parameters

event

Returns
Boolean

SafeLocationListener​

Methods
fun onProviderDisabled(provider: String): Unit
Parameters

provider

String
Returns
Unit
fun onProviderEnabled(provider: String): Unit
Parameters

provider

String
Returns
Unit
fun onStatusChanged(
provider: String,
status: Int,
extras: Bundle
): Unit
Parameters

provider

String

status

Int

extras

Bundle
Returns
Unit

SearchHistoryKeyStrategy​

Strategy for creating a key for a search history item. The key determines the uniqueness of the record in history.

Methods
fun create(item: SearchHistoryItem): String

Returns a key for the search history item.

Parameters

item

Returns
String

SearchViewCallback​

Interface for setting callback functions for SearchLayout.

Methods
fun directoryObjectChosen(obj: DirectoryObject): Unit

Method will be called when the user selects a result from the search results. The selected DirectoryObject will be returned.

Parameters

obj

Returns
Unit
fun searchCompletedSuccessfully(items: List<DirectoryObject>): Unit

Method will be called when the search is successful. A list of DirectoryObject results obtained from the search results will be returned.

Parameters

items

List<DirectoryObject>
Returns
Unit
fun searchCompletedWithException(message: String): Unit

Method will be called if an exception occurs during the search. The message from the exception will be returned.

Parameters

message

String
Returns
Unit
fun searchAborted(): Unit

Method will be called if the search string has been cleared of input.

Returns
Unit
fun searchClosed(): Unit

Method will be called if the user closed the search in the standard way: with the close button next to the search bar.

Returns
Unit

SearchViewConfigurator​

Interface for setting up search in SearchLayout.

Methods
fun setSuggestorType(suggestorType: SuggestorType): Unit

Sets the type of the suggester. Default: SuggestorType.GENERAL

Parameters

suggestorType

Returns
Unit
fun setSortingType(sortingType: SortingType): Unit

Sets the type of the search results. Default: SortingType.BY_RELEVANCE

Parameters

sortingType

Returns
Unit
fun setAllowedSearchResultTypes(allowedSearchResultTypes: List<ObjectType>): Unit

Sets the object types of ObjectType allowed in the search query result. Default: all except ObjectType.ROUTE

Parameters

allowedSearchResultTypes

List<ObjectType>
Returns
Unit
fun setAllowedSuggestedTypes(allowedSuggestedTypes: List<SuggestedType>): Unit

Sets the object types of SuggestedType allowed in the suggests. Default: all except SuggestedType.ROUTE.

Parameters

allowedSuggestedTypes

List<SuggestedType>
Returns
Unit
fun setPageSize(size: Int): Unit

Sets limit on the number of hints in suggest and of search results. Valid values ​​range from 1 to 50. Default: 10.

Parameters

size

Int
Returns
Unit
fun setSpatialRestrictions(spatialRestriction: List?<GeoPoint>): Unit

Set the search area limit in the form of a polygon. The first and the last points of the polygon do not have to match Default: missing.

Parameters

spatialRestriction

List?<GeoPoint>
Returns
Unit
fun setAreaOfInterest(rect: GeoRect?): Unit

Sets a rectangular area of interest in geographic coordinates. Default: missing.

Parameters

rect

Returns
Unit
fun setSearchType(type: SearchType): Unit

Sets the SearchType type of the search engine. Possible options and default values ​​depend on the SDK delivery type. See SearchType and SearchOptions for details.

Parameters

type

Returns
Unit
fun setLocationProvider(provider: LocationService?): Unit

Sets a geolocation provider to determine the distance to an object in the search results. Not set by default.

Parameters

provider

Returns
Unit

SimpleClusterRenderer​

Class for customizing cluster appearance in IMapObjectManager.

Methods
fun renderCluster(cluster: SimpleClusterObject): SimpleClusterOptions

Gets a marker for the cluster.

Parameters

cluster

Cluster object.

Returns
SimpleClusterOptions

Cluster marker object.

SpeechRecognizer​

Methods
fun recognize(onResult: Function1, onError: Function1): Unit

Runs speech recognition and handles the results via callback functions.

Parameters

onResult

(String) -> Unit

Callback function to get the recognized text as a String. Called when speech recognition is successful.

onError

(Exception) -> Unit

Callback function to get an Exception when a recognition error occurs. Called to process various errors during the recognition process.

Returns
Unit

StatefulChannel​

Properties

val value​

T

StyleZoomToTiltRelation​

Object for describing the dependence of the camera tilt angle on the style zoom level.

Methods
fun styleZoomToTilt(styleZoom: StyleZoom): Tilt

Gets camera tilt based on style zoom level.

Parameters

styleZoom

Style zoom.

Returns
Tilt

Camera tilt angle

The function should be continuous and monotonic.

The function should be thread-safe.

TouchEventsObserver​

Methods
fun onTap(point: ScreenPoint): Unit
Parameters

point

Returns
Unit
fun onLongTouch(point: ScreenPoint): Unit
Parameters

point

Returns
Unit
fun onDragBegin(data: DragBeginData): Unit
Parameters

data

Returns
Unit
fun onDragMove(point: ScreenPoint): Unit
Parameters

point

Returns
Unit
fun onDragEnd(): Unit
Returns
Unit