Skip to main content

method

no_name_provided

fun <no name provided>(): Unit
Functional interface for speech recognition in search UI elements.<p>Allows to process voice input and convert it into text that can be used as a search query. Implemented with one abstract method.</p>
Returns

AttributeValue(value)

fun AttributeValue(value: Int): AttributeValue
Parameters
value
Returns

calcPosition(camera,geometry,styleZoomToTiltRelation,screenArea,tilt,bearing,size)

fun calcPosition(
camera: BaseCamera,
geometry: Geometry,
styleZoomToTiltRelation: StyleZoomToTiltRelation? = null,
screenArea: Padding? = null,
tilt: Tilt? = null,
bearing: Bearing? = null,
size: ScreenSize? = null
): CameraPosition
Calculating the camera position such that, given a constant camera installation point, the geometric object located on the map fits into the screen area specified by the camera padding.<p>If you do not need to change the settings of the original camera, then you can configure the camera copied via IBaseCamera::clone().</p>
Parameters
camera
Camera used for calculating the position.
geometry
Geometric object to fit into the screen area, specified by the screen_area parameter.
styleZoomToTiltRelation
Dependence function of the camera tilt angle on the style zoom level.
screenArea
Screen area into which to fit the geometry. If not specified, the camera padding is used for calculation.
tilt
Map tilt. If not specified, the current camera tilt is used.
bearing
Bearing of the map. If not specified, the current camera bearing is used.
size
Size of the viewing area. If not specified, the current value of ICamera::size() is used.
Returns

calcPosition(camera,objects,styleZoomToTiltRelation,screenArea,tilt,bearing,size)

fun calcPosition(
camera: BaseCamera,
objects: List<SimpleMapObject>,
styleZoomToTiltRelation: StyleZoomToTiltRelation? = null,
screenArea: Padding? = null,
tilt: Tilt? = null,
bearing: Bearing? = null,
size: ScreenSize? = null
): CameraPosition
Calculating the camera position such that map objects are completely fit into the screen area, specified by the screen_area parameter.
Parameters
camera
Camera used to calculate the position.
objects
Map objects to fit into the screen area specified by the screen_area parameter.
styleZoomToTiltRelation
Dependence function of the camera tilt angle on the style zoom level.
screenArea
The screen area where it is necessary to fit the geometry. If not specified, then the camera padding is used for calculation.
tilt
Map tilt. If not specified, the current camera tilt is used.
bearing
Bearing of the map. If not specified, the current camera bearing is used.
size
Size of the viewing area. If not specified, the current value of ICamera::size() is used.
Returns

Color(red,green,blue,alpha)

fun Color(
red: Int,
green: Int,
blue: Int,
alpha: Int = 255
): Color
Parameters
red
green
blue
alpha
Returns

createDefaultMaxTiltRestriction()

fun createDefaultMaxTiltRestriction(): StyleZoomToTiltRelation

createDefaultStyleZoomToTiltRelation()

fun createDefaultStyleZoomToTiltRelation(): StyleZoomToTiltRelation
Gets a dependence of the camera tilt angle on the style zoom level for a standard tilt follow controller.

createModelData(context,data)

fun createModelData(context: Context, data: ByteArray): ModelData
Parameters
context
data
Returns

createModelData(context,loader)

fun createModelData(context: Context, loader: Function0<ByteArray>): ModelData
Parameters

createStyleZoomToTiltRelation(points)

fun createStyleZoomToTiltRelation(points: Map): StyleZoomToTiltRelation
Creates a dependency of the camera tilt angle on the style zoom level.
Parameters
points
Points on which the dependency is built.
Returns
StyleZoomToTiltRelationDependency of the camera tilt angle on the style zoom level, if the dependency could not be created - throws an exception. <p>The dependency must be a monotonic continuous function. If a dependency that does not satisfy the conditions is specified by the points, the function throws an exception . A dependency, similar to 2GIS, can be specified by a sequence of points <a href="#">17,0,19,15,20,25</a> in map mode and <a href="# ">15,0,16,34,17,48</a> in navigator mode. Let's get the camera tilt angle T for the Z style zoom level, so that Z0 < = Z < Z1 and dependency is given by the points <a href="#">Z0,T0,Z1,T1</a>. Then the desired value is calculated by the formula T = T0 + k * (T1 - T0), where k = (Z - Z0) / (Z1 - Z0).If Z < Z0, then T = T0. If Z >= Z1, then T = T1.</p>

createTrafficLineDrawable(context,height,routeLength,entries,colors)

suspend fun createTrafficLineDrawable(
context: Context,
height: Int,
routeLength: Double,
entries: List<TrafficSpeedColorRouteLongEntry>,
colors: TrafficLineColors
): Drawable?
Parameters

formatMeters(meters,context)

fun formatMeters(meters: Int, context: Context): FormattedMeasure
Converts a size (in meters) to FormattedMeasure for displaying in UI elements in the navigator.
Parameters
meters
context
Returns

GeoPoint(latitude,longitude)

fun GeoPoint(latitude: Double, longitude: Double): GeoPoint
Parameters
latitude
longitude
Returns

GeoPointWithElevation(latitude,longitude,elevation)

fun GeoPointWithElevation(
latitude: Double,
longitude: Double,
elevation: Elevation = Elevation(0.0f)
): GeoPointWithElevation
Parameters
latitude
longitude
elevation
Returns

GeoPointWithElevation(point,elevation)

fun GeoPointWithElevation(point: GeoPoint, elevation: Elevation = Elevation(0.0f)): GeoPointWithElevation
Parameters

getAudioSettings(context)

fun getAudioSettings(context: Context): AudioSettings?
Parameters
context
Returns

getHttpCacheManager(context)

fun getHttpCacheManager(context: Context): HttpCacheManager?
HTTP cache management interface. Null if HTTP cache is not used.
Parameters

getInstructionManeuver(extraInstructionInfo)

fun getInstructionManeuver(extraInstructionInfo: ExtraInstructionInfo): InstructionManeuver
Gets the maneuver to be performed to move along the route.
Parameters
extraInstructionInfo
Returns

getLanesControlImages(laneSign,maxCount,ignoreActiveManeuver)

fun getLanesControlImages(
laneSign: RouteLaneSign,
maxCount: Int,
ignoreActiveManeuver: Boolean
): List<LanesControlImage>
Gets a list of images to display in the lanes control. The number of images (excluding separators and ellipsis) is limited by maxCount, if it is exceeded, images are cropped from one or both sides so that as many images of active maneuvers as possible are left. On the side where the deletion occurred, an ellipsis is displayed. If the ignoreActiveManeuver parameter is set to true, the active maneuver is ignored, and an image corresponding to all allowed directions of movement is returned.
Parameters
laneSign
maxCount
ignoreActiveManeuver
Returns

getLocaleManager(context)

fun getLocaleManager(context: Context): LocaleManager
Application locale management interface.
Parameters
context
Returns

getPackageManager(context)

fun getPackageManager(context: Context): PackageManager
Gets an object for working with packages from the context.
Parameters
context
Returns

getPointObjects(routeLength,events,intermediatePoints)

fun getPointObjects(
routeLength: Double,
events: List<RoadEventRouteEntry>,
intermediatePoints: List<GeoPointRouteEntry>
): List<TrafficLinePointObject>
Parameters

getRoadMacroGraph(context)

fun getRoadMacroGraph(context: Context): RoadMacroGraph
Gets an object to manage the global road graph from the context.
Parameters
context
Returns

getSystemMemoryManager(context)

fun getSystemMemoryManager(context: Context): SystemMemoryManager
Gets an object to manage the system memory usage.
Parameters

getTerritoriesAlongRouteProvider(context)

fun getTerritoriesAlongRouteProvider(context: Context): TerritoriesAlongRouteProvider
Gets an object to get a list of territories along the route from the context.
Parameters

getTerritoryManager(context)

fun getTerritoryManager(context: Context): TerritoryManager
Gets an object for working with territories from the context.
Parameters

getVoiceManager(context)

fun getVoiceManager(context: Context): VoiceManager
Gets an object to manage voices from the context.
Parameters
context
Returns

imageFromAsset(context,assetName,size)

fun imageFromAsset(
context: Context,
assetName: String,
size: Size? = null
): Image
context - Android context. assetName - image file. size - target image size (ignored for SVG and Lottie).
Parameters
context
assetName
size
Returns

imageFromBitmap(context,bitmap)

fun imageFromBitmap(context: Context, bitmap: Bitmap): Image
Parameters
context
bitmap
Returns

imageFromBitmap(context,loader)

fun imageFromBitmap(context: Context, loader: Function0<Bitmap>): Image
Parameters
context
loader
Returns

imageFromCanvas(context,size,block)

fun imageFromCanvas(
context: Context,
size: Size,
block: Function1
): Image
Parameters
context
size
block
Returns

imageFromLottieJSON(context,data)

fun imageFromLottieJSON(context: Context, data: ByteArray): Image
Parameters
context
data
Returns

imageFromLottieJSON(context,loader)

fun imageFromLottieJSON(context: Context, loader: Function0<ByteArray>): Image
Parameters
context
loader
Returns

imageFromResource(context,resourceId,size)

fun imageFromResource(
context: Context,
resourceId: Int,
size: Size? = null
): Image
Context - Android context. resourceId - Android resource. size - target image size (ignored for SVG and Lottie).
Parameters
context
resourceId
size
Returns

imageFromSvg(context,data)

fun imageFromSvg(context: Context, data: ByteArray): Image
Parameters
context
data
Returns

imageFromSvg(context,loader)

fun imageFromSvg(context: Context, loader: Function0<ByteArray>): Image
Parameters
context
loader
Returns

isBetterLocation(location,currentBestLocation)

fun isBetterLocation(location: Location, currentBestLocation: Location?): Boolean
Parameters
location
currentBestLocation
Returns

kilometersPerHourToMetersPerSecond(kilometersPerHour)

fun kilometersPerHourToMetersPerSecond(kilometersPerHour: Double): Double
Converts speed in kilometers per hour to speed in meters per second.
Parameters
kilometersPerHour
Returns

max(a,b)

fun max(a: TimePoint, b: TimePoint): TimePoint
Parameters

metersPerSecondToKilometersPerHour(metersPerSecond)

fun metersPerSecondToKilometersPerHour(metersPerSecond: Double): Double
Converts speed in meters per second to speed in kilometers per hour.
Parameters
metersPerSecond
Returns

metersToUiString(meters,context)

fun metersToUiString(meters: Int, context: Context): String
Converts the size in meters to a string for displaying in navigator UI controls.
Parameters
meters
context
Returns

min(a,b)

fun min(a: TimePoint, b: TimePoint): TimePoint
Parameters

modelDataFromAsset(context,assetName)

fun modelDataFromAsset(context: Context, assetName: String): ModelData
context - Android context. assetName — model file.
Parameters
context
assetName
Returns

MutableChannel()

fun MutableChannel(): MutableChannel<T>

MutableStatefulChannel(initialValue)

fun MutableStatefulChannel(initialValue: T): MutableStatefulChannel<T>
Parameters
initialValue
T
Returns

parseGeoJson(geoJsonData)

fun parseGeoJson(geoJsonData: String): List<GeometryMapObject>
Parameters

parseGeoJsonFile(fsPath)

fun parseGeoJsonFile(fsPath: String): List<GeometryMapObject>
Parameters

projectionZToStyleZ(projectionZ,latitude)

fun projectionZToStyleZ(projectionZ: Zoom, latitude: Latitude): StyleZoom
Parameters
projectionZ
latitude
Returns

registerPlatformLocationSource(context,source)

fun registerPlatformLocationSource(context: Context, source: LocationSource?): Unit
Registers a geolocation source. You can use DefaultLocationSource as the default source.
Parameters
context
source
Returns

registerPlatformMagneticSource(context,source)

fun registerPlatformMagneticSource(context: Context, source: MagneticHeadingSource?): Unit
Parameters

remainingRouteGeometry(fullRouteGeometry,currentRoutePoint)

fun remainingRouteGeometry(fullRouteGeometry: GeoPointRouteAttribute, currentRoutePoint: RoutePoint): GeoPointRouteAttribute
Calculates the geometry of the remaining part of the route, i.e. the geometry starting at the point corresponding to the current waypoint and continuing to the end of the route. If the route is completely passed or the current point is outside the route, an empty geometry is returned.
Parameters
fullRouteGeometry
Full geometry of the entire route
currentRoutePoint
Current position on the route
Returns
GeoPointRouteAttributeGeometry of the rest of the route <p>Operation complexity O(N), where N = full_route_geometry.size()</p>

routeMatchesTruckPassZonePasses(truckPassZoneIds,passZonePasses)

fun routeMatchesTruckPassZonePasses(truckPassZoneIds: TruckPassZoneIdRouteLongAttribute, passZonePasses: List<TruckPassZonePass>): Boolean
Checks if the provided list of passes is sufficient to drive through the truck access areas through which the route passes.<p>If the route does not pass through any truck access areas, the function returns true.</p>
Parameters
truckPassZoneIds
Attribute of a route with identifiers of access zones for trucks.
passZonePasses
Pass for driving through the truck access zones.
Returns
BooleanSign of the sufficiency of passes to travel along the route.

styleZToProjectionZ(styleZ,latitude)

fun styleZToProjectionZ(styleZ: StyleZoom, latitude: Latitude): Zoom
Parameters
styleZ
latitude
Returns

toMapGeometry(geometry)

fun toMapGeometry(geometry: GeoPointRouteAttribute): Geometry
Converts route geometry to IGeometryPtr.
Parameters

zoomOutToFit(camera,geometry,styleZoomToTiltRelation,size)

fun zoomOutToFit(
camera: BaseCamera,
geometry: Geometry,
styleZoomToTiltRelation: StyleZoomToTiltRelation? = null,
size: ScreenSize? = null
): CameraPosition
Calculating the camera position such that, given a constant camera installation point, the geometric object located on the map fits into the screen area specified by the camera padding.<p>If you do not need to change the settings of the original camera, then you can configure the camera copied via IBaseCamera::clone().</p>
Parameters
camera
Camera used for calculating the position.
geometry
Geometric object to fit into the screen area, specified by the camera paddings.
styleZoomToTiltRelation
Dependence function of the camera tilt angle on the style zoom level.
size
Size of the viewing area. If not specified, the current value of ICamera::size() is used.
Returns

zoomOutToFit(camera,objects,styleZoomToTiltRelation,size)

fun zoomOutToFit(
camera: BaseCamera,
objects: List<SimpleMapObject>,
styleZoomToTiltRelation: StyleZoomToTiltRelation? = null,
size: ScreenSize? = null
): CameraPosition
Calculating the camera position such that, given a constant camera installation point, the geometric object located on the map fits into the screen area specified by the camera padding.
Parameters
camera
Camera used for calculating the position.
objects
Map objects to fit into the screen area specified by the camera paddings.
styleZoomToTiltRelation
Dependence function of the camera tilt angle on the style zoom level.
size
Size of the viewing area. If not specified, the current value of ICamera::size() is used.
Returns