class
ActivityTracker
val stopChannel
An active state of this flag indicates that the navigator needs to be stopped. If navigation stops in the Finished state, i.e. the movement stops or its speed falls below the threshold, and if this state persists for some time, then the flag is set is set to true, otherwise it is set to false.
val stop
An active state of this flag indicates that the navigator needs to be stopped. If navigation stops in the Finished state, i.e. the movement stops or its speed falls below the threshold, and if this state persists for some time, then the flag is set is set to true, otherwise it is set to false.
AddEventResult
Result of adding event (event object or error).
fun match(event: Function1, error: Function1): T
fun toString(): String
fun hashCode(): Int
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.
drillDown
components
buildingName
postCode
buildingCode
addressComment
val drillDown
The set of administrative division objects where the described object is located.
val components
A full address of an object may contain several separate address components.
val buildingName
Name of the building.
val postCode
ZIP code.
val buildingCode
The unique ZIP code of the building.
val addressComment
Comment on the address. Example: "301 office; 9th floor"
AddressAdmDiv
Object of administrative division.
AddressComponent
The address component: street, house number, or verbal description of location.
fun match(
streetAddress: Function1,
number: Function1,
location: Function1
): T
fun toString(): String
fun hashCode(): Int
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.
comment
AddressNumber
In some settlements, only the house number is indicated, without the street (for example, Krasnoobsk).
AddressNumber(number: String)
In some settlements, only the house number is indicated, without the street (for example, Krasnoobsk).
number
AddressStreet
Regular address, there is a street and a building number.
AddRoadEventButton
Button for adding a traffic event.
AddRoadEventButton(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Button for adding a traffic event.
fun attachToModel(model: AddRoadEventCardModel): Unit
AddRoadEventCard
Card for adding a road event.
AddRoadEventCard(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Card for adding a road event.
fun attachToModel(model: AddRoadEventCardModel): Unit
AddRoadEventCardModel
Model of the card for adding a road event.
AddRoadEventCardModel(roadEventManager: RoadEventManager, map: Map)
Model of the card for adding a road event.
fun onEventTypeClicked(type: RoadEventType): Unit
Action when the event type selection control is clicked.
fun onLaneClicked(lane: Lane): Unit
Action when the lane selection control is clicked.
fun onDescriptionEntered(description: String): Unit
Action when entering description.
fun close(): Unit
val eventTypeChannel
Selected event type.
val lanesChannel
Selected lanes.
val canSelectLanesChannel
Is it possible to set lanes.
val descriptionChannel
Entered description.
val markerPositionChannel
Marker position on the screen.
val canSendChannel
Is it possible to send an event.
val resultChannel
The result of sending the event.
AddRoadEventControl
Base class for controls for adding traffic events.
AddRoadEventControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Base class for controls for adding traffic events.
fun attachToModel(model: AddRoadEventCardModel): Unit
@CallSuper
fun detachFromModel(): Unit
fun onAttachedToWindow(): Unit
fun onDetachedFromWindow(): Unit
AddRoadEventControls
A set of controls for adding road events. Consists of a card with event parameters, "Submit" button and a marker indicating the location of adding an event on the map.
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.
fun attachToModel(model: AddRoadEventCardModel): Unit
fun detachFromModel(): Unit
AlternativeRoutesProviderSettings
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. Should be no 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 total length of route edges that differ between the original route and the alternative route at which the alternative route is considered a better route.
Anchor
Image anchor point. (0, 0) - upper left corner, (1, 1) - lower right.
ApartmentRange
Range of apartments.
val start
Beginning of the range/stored value. Currently, only numeric values are possible, while there are no flats with suffixes in the data yet.
val end
The end of the range. If absent, then the range consists of a single value start. Otherwise, it is an arithmetic progression from start to end in increments of 1.
Attribute
Additional attribute. Example: { tag: "hotel_room_internet", name: "Free internet in rooms" }
Attributes
Interface for managing map object properties.
Only map objects have properties, but you can set default properties for the entire map, for the style and for the source (see ISource for details).
fun setAttributeValue(name: String, value: AttributeValue): Unit
Setting property.
fun setAttributeValues(values: Map, attributesToRemove: List<String> = listOf()): Unit
Setting a property set.
values
Set of the "name":"value" pairs for the added property.
attributesToRemove
List of names of properties to be removed.
fun removeAttribute(name: String): Unit
Deleting a property.
fun getAttributeValue(name: String): AttributeValue
Getting a property.
AttributeValue
Properties of map objects.
AttributeValue()
fun match(
empty: Function0<T>,
boolean: Function1,
number: Function1,
integer: Function1,
string: Function1,
data: Function1,
array: Function1,
item: Function1
): T
empty
boolean
number
integer
string
data
array
item
fun toString(): String
fun hashCode(): Int
AuthorInfo
Information about the author of the event or photo.
AuthorInfo(type: AuthorType, name: String)
Information about the author of the event or photo.
BaseCamera
Camera.
Sets the parameters for projecting the map onto the screen.
val projection
Projection.
Used to get a screen point from a map point and a map point from a screen point. Camera parameters are fixed at the time of the call.
val positionChannel
Getting the current camera position.
var position
Getting the current camera position.
val zoomRestrictionsChannel
Get actual zoom level limits.
var zoomRestrictions
Get actual zoom level limits.
val deviceDensityChannel
Getting the DPI ratio to the device's base DPI.
val deviceDensity
Getting the DPI ratio to the device's base DPI.
val sizeChannel
Get viewport size.
var size
Get the size of the viewing area.
val paddingChannel
Get current paddings from screen edges.
var padding
Get current paddings from screen edges.
val positionPointChannel
The point on the screen to which the camera position is attached is set taking padding into account.
var positionPoint
The point on the screen to which the camera position is attached is set taking padding into account.
val visibleArea
The area of intersection of the visibility pyramid of the camera and the surface of the map.
val visibleRectChannel
The bounding rectangle of the visible area of the map.
val visibleRect
The bounding rectangle of the visible area of the map.
val styleZoomToTiltRelationChannel
Getting the current function of the dependency of the camera tilt angle on the style zoom level.
var styleZoomToTiltRelation
Getting the current function of the dependency of the camera tilt angle on the style zoom level.
val maxTiltRestrictionChannel
Getting the current function of the maximum camera tilt angle dependency on the style zoom level.
var maxTiltRestriction
Getting the current function of the maximum camera tilt angle dependency on the style zoom level.
Bearing
The angle between the directions of two objects or between the direction of the object and north. The angle is measured clockwise. The range of values is 0°,360°.
BetterRouteInfo
Information about an available alternative route.
BetterRoutePromptControl
Dialog prompting you to switch to route following with a lower expected arrival time.
val visibilityChannel
BicycleBriefRouteInfo
Basic information about the cycling route.
BicycleBriefRouteInfo(length: RouteDistance, landmark: String)
Basic information about the cycling route.
BicycleInstructionCrossroad
Description of maneuvers when passing through an intersection or a pedestrian crossing.
BicycleInstructionCrossroad(landmark: BicycleInstructionCrossroadLandmark = BicycleInstructionCrossroadLandmark.NONE, maneuvers: List<BicycleInstructionCrossroadManeuver>)
Description of maneuvers when passing through an intersection or a pedestrian crossing.
BicycleInstructionCrossroadManeuver
BicycleInstructionCrossroadManeuver(direction: BicycleInstructionCrossroadManeuverDirection = BicycleInstructionCrossroadManeuverDirection.STRAIGHT, turnAngle: Int = 0)
BicycleInstructionFinish
End of the cycling part of the route.
BicycleInstructionFinish()
End of the cycling part of the route.
BicycleInstructionStart
Beginning of the cycling part of the route.
BicycleInstructionStart()
Beginning of the cycling part of the route.
BicycleRouteSearchOptions
Bike route search options.
BicycleRouteSearchOptions(
avoidCarRoads: Boolean = false,
avoidStairways: Boolean = false,
avoidUnderpassesAndOverpasses: Boolean = false,
excludedAreas: List<ExcludedArea> = listOf()
)
Bicycle route search options.
avoidCarRoads
avoidStairways
avoidUnderpassesAndOverpasses
excludedAreas
BoolRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): BoolRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<BoolRouteLongEntry>
Elements partially or completely covered by begin,end.
BoolRouteLongEntry
Extended route element - segment and value on it.
BoolRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: Boolean
)
Extended route element - segment and value on it.
BriefExtraRouteInfo
Additional information about the route for a specific type of transport.
BriefExtraRouteInfo(pedestrian: PedestrianBriefRouteInfo)
pedestrian
BriefExtraRouteInfo(publicTransport: PublicBriefRouteInfo)
publicTransport
fun match(
bicycle: Function1,
car: Function1,
pedestrian: Function1,
publicTransport: Function1,
scooter: Function1
): T
bicycle
car
pedestrian
publicTransport
scooter
fun toString(): String
fun hashCode(): Int
BriefPublicTransportCard
A short card that displays information about a public transport route. Unlike a PublicTransportCard, it does not contain information about transfers.
BriefPublicTransportCard(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
A short card that displays information about a public transport route. Unlike a PublicTransportCard, it does not contain information about transfers.
fun onAttachedToWindow(): Unit
var model
BriefPublicTransportCardModel
Model for BriefPublicTransportCard.
BriefPublicTransportCardModel(route: TrafficRoute, context: Context)
Model for BriefPublicTransportCard.
val title
Title. Estimated travel time, for example, "1 hour 42 minutes".
val transports
Transport information.
val description
Description. Number of transfers and walking time, e.g. 1transfer,15min walk.
BriefRoadEvent
BriefRouteInfo
Basic route information.
BriefRouteInfo(duration: Duration, extraInfo: BriefExtraRouteInfo)
Basic route information.
BriefRouteInfoSearchPoints
Points to query for searching basic route information.
BriefRouteInfoSearchPoints(startPoint: RouteSearchPoint, finishPoint: RouteSearchPoint)
Points to query for searching basic route information.
BuildingId
BuildingLevels
Information about the floor plans of the building.
BuildingLevels(defaultLevelId: LevelId, levels: List<LevelInfo>)
Information about the floor plans of the building.
CalloutMapPosition
Route callout position.
CalloutMapPosition(
mapId: MapId,
calloutPosition: GeoPoint?,
routePoint: RoutePoint?
)
Route callout position.
Camera
Camera to start moving the map and adjust tracking.
fun move(moveController: CameraMoveController): Future<CameraAnimatedMoveResult>
Start of the map moving.
Resets the current map tracking mode and interrupts gesture processing.
moveController
Animated camera movement controller.
fun move(
position: CameraPosition,
time: Duration = Duration.ofMilliseconds(300),
animationType: CameraAnimationType = CameraAnimationType.DEFAULT
): Future<CameraAnimatedMoveResult>
Start of the animated map movement using the built-in map movement controller.
Resets the current map tracking mode and interrupts gesture processing.
position
Final camera position.
time
Time allotted for moving the map
animationType
Camera animation type.
fun processMovementAndStop(): Unit
Setting the camera position according to the current time and stopping animated movement.
Calling the method interrupts the flyover and gesture processing, and also resets the tracking mode.
fun addFollowController(followController: FollowController): Unit
Adding a tracking controller.
There can be several different ones, for example, a controller for tracking scale, map tilt, geolocation, etc.
fun removeFollowController(followController: FollowController): Unit
Removing the tracking controller.
fun setCustomFollowController(followController: CustomFollowController): Unit
Adding a tracking controller implemented on the platform.
Only one such controller can be installed. If you install multiple controllers, only the last one installed is used.
fun removeCustomFollowController(): Unit
Removing the tracking controller implemented on the platform.
CameraBehaviour
Camera tracking mode.
Camera modes are degraded according to the following rules:
- Map shift sets to None the following events: DirectMapShiftEvent, MapShiftBeginEvent, DirectMapRotationEvent with the specified event center, DirectMapScalingEvent with the specified event center, ScaleMapEvent with the specified event center
- Rotation of the map relative to the position point blocks the publication of Bearing events: MapRotationBeginEvent, RotateMapToNorthEvent, DirectMapRotationEvent without event center
- Changing the scale relative to the position point blocks the publication of StyleZoom events: MapScalingBeginEvent, DirectMapScalingEvent without event center, ScaleMapEvent without event center
- Tilt locks the publication of Tilt events: DirectMapTiltEvent
CameraBehaviour(position: FollowPosition?, transitionType: TransitionType = TransitionType.SMOOTH)
Camera tracking mode.
Camera modes are degraded according to the following rules:
- Map shift sets to None the following events: DirectMapShiftEvent, MapShiftBeginEvent, DirectMapRotationEvent with the specified event center, DirectMapScalingEvent with the specified event center, ScaleMapEvent with the specified event center
- Rotation of the map relative to the position point blocks the publication of Bearing events: MapRotationBeginEvent, RotateMapToNorthEvent, DirectMapRotationEvent without event center
- Changing the scale relative to the position point blocks the publication of StyleZoom events: MapScalingBeginEvent, DirectMapScalingEvent without event center, ScaleMapEvent without event center
- Tilt locks the publication of Tilt events: DirectMapTiltEvent
CameraBehaviourChange
Change tracking mode.
CameraBehaviourChange(newBehaviour: CameraBehaviour, changeReason: CameraBehaviourChangeReason)
Change tracking mode.
CameraNotifier
Warns you when you enter the traffic camera area.
CameraPosition
Camera position.
val point
Map point corresponding to the camera position (see ICamera::position_point()).
val zoom
Zoom level. 0 is the entire world inscribed in a square of 256x256 logical pixels (see LogicalPixel).
val tilt
The tilt angle of the direction of vertical view.
0 - nadir (look vertically down), the maximum value is 60 degrees.
val bearing
The rotation angle of the direction of horizontal view relative to the north direction. Counted clockwise, in degrees.
CameraPositionPoint
The relative screen position of the point to which the camera is attached.
Screen area is set by paddings. x - offset from the left edge of the screen area, y - offset from the top edge Allowed range of padding values (0.0f, 1.0f) 0,0 - upper left corner of the screen area, 1,1 - lower right
.CameraPositionPoint(x: Float = 0.5f, y: Float = 0.5f)
The relative screen position of the point to which the camera is attached.
Screen area is set by paddings. x - offset from the left edge of the screen area, y - offset from the top edge Allowed range of padding values (0.0f, 1.0f) 0,0 - upper left corner of the screen area, 1,1 - lower right.
CameraProgressInfo
Information about the progress of passing the camera zone.
CameraRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<CameraRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): CameraRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): CameraRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
CameraRouteEntry
Route element - point and value in it.
CameraRouteEntry(point: RoutePoint, value: RouteCamera)
Route element - point and value in it.
CameraZoomRestrictions
Acceptable zoom range.
CancelEvent
The event of canceling the current action.
Called, for example, when a gesture is canceled, the window focus is lost, or when the mouse capture is lost. It can also be called from within the map when changing the zoom level restrictions, some changes in the tracking mode and setting the interactive mode of the map.
CancelEvent()
CarBriefRouteInfo
Basic car route information.
CarBriefRouteInfo(
length: RouteDistance,
landmark: String,
trafficSpeed: CarBriefRouteInfoTrafficSpeed
)
Basic car route information.
CarInstructionCrossroad
Description of maneuvers at the crossroads.
CarInstructionCrossroad(
direction: CarInstructionCrossroadDirection = CarInstructionCrossroadDirection.STRAIGHT,
turnAngle: Int = 0,
landmark: CarInstructionCrossroadLandmark = CarInstructionCrossroadLandmark.NONE,
exitName: String
)
Description of maneuvers at the crossroads.
direction
turnAngle
landmark
exitName
CarInstructionFinish
End of the car section of the route.
CarInstructionFinish()
End of the car section of the route.
CarInstructionRoundabout
Description of maneuvers at a roundabout.
CarInstructionRoundabout(
type: CarInstructionRoundaboutType = CarInstructionRoundaboutType.ENTRY,
turnAngle: Int = 0,
exitNumber: Int = 0,
exitName: String
)
Description of maneuvers at a roundabout.
CarInstructionStart
The beginning of the car section of the route.
CarInstructionStart()
The beginning of the car section of the route.
CarInstructionUTurn
U-turn on the road (not at the intersection).
U-turn at the intersection is described by the Crossroad instruction.
CarInstructionUTurn(exitName: String)
U-turn on the road (not at the intersection).
U-turn at the intersection is described by the Crossroad instruction.
exitName
CarRouteSearchOptions
Parameters for finding a car route.
CarRouteSearchOptions(
avoidTollRoads: Boolean = false,
avoidUnpavedRoads: Boolean = false,
avoidFerries: Boolean = false,
avoidLockedRoads: Boolean = true,
routeSearchType: RouteSearchType = RouteSearchType.JAM,
excludedAreas: List<ExcludedArea> = listOf()
)
Parameters for finding a car route.
avoidTollRoads
avoidUnpavedRoads
avoidFerries
avoidLockedRoads
routeSearchType
excludedAreas
val avoidTollRoads
Avoid toll roads.
val avoidUnpavedRoads
Avoid dirt roads.
val avoidFerries
Avoid ferries.
val avoidLockedRoads
Avoid closed roads. When set to true, the route search does not take into account road sections that are closed to traffic. If set to false, the route can be built through blocked sections of roads if it is impossible to build a route without passing through blocked sections.
val routeSearchType
Route search type.
val excludedAreas
Excluded areas (no more than 25).
Certificate
SSL certificate.
fun match(
system: Function1,
fromFile: Function1,
fromAsset: Function1
): T
system
fromFile
fromAsset
fun toString(): String
fun hashCode(): Int
CertificateFromAsset
SSL certificate from Android asset.
CertificateFromFile
SSL certificate from file.
Circle
CircleOptions
Parameters for creating a geometric map object of the "Circle" type.
CircleOptions(
position: GeoPoint,
radius: Meter,
color: Color = Color(),
strokeWidth: LogicalPixel = LogicalPixel(value = 0.0f),
strokeColor: Color = Color(),
visible: Boolean = true,
userData: Any? = null,
zIndex: ZIndex = ZIndex(value = 0),
levelId: LevelId? = null
)
Parameters for creating a geometric map object of the "Circle" type.
val position
Geographical position.
val radius
Radius in meters.
val color
Fill color.
val strokeWidth
The line width of the circle outline.
val strokeColor
Line color of the circle outline.
val visible
Visibility flag.
val userData
User data (not used inside the SDK, only needed for the API user).
val zIndex
Object drawing level.
val levelId
Link to the floor plan of the building.
ClusterObject
Cluster of objects.
ClusterOptions
Cluster marker settings.
Color
Color
CompassControl
Compass control.
CompassControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0,
layout: Int = R.layout.dgis_compass_control
)
Compass control.
CompassControl
CompassControlModel
Compass control model. The control consists of a compass button, when pressed, the map camera changes the angle in the north direction. If the map camera faces the server, the control must be hidden. Thread-safe.
fun onClicked(): Unit
ComplexGeometry
A compound geometry consisting of a set of simple or compound geometries.
An arbitrary level of nesting of compound geometries in a set is supported.
val elements
ContactInfo
A way to contact the organization.
val type
The type of the contact. One of the following:
- website
- phone
- fax
- pobox - P.O. box
- icq
- jabber
- skype
- vkontakte
- odnoklassniki
- youtube
- googleplus
- viber
- telegram
val displayText
Contact value to display.
val value
The technical value of the contact. Depending on the contact type, it has the following semantics:
- email - email address
- website - full URL
- phone - phone number in international format, for example: "+73831234567"
- fax - phone number in international format, for example: "+73831234567"
- pobox - mailing address
- icq - user ID
- jabber - user ID
- skype - user ID
- vkontakte - full URL
- twitter - full URL
- odnoklassniki - full URL
- youtube - full URL
- linkedin - full URL
- googleplus - full URL
- pinterest - full URL
- whatsapp - full URL
- viber - full URL
- telegram - full URL
val comment
Clarifying information about the contact.
Context
Context - the environment required for the SDK to work.
DashboardControl
DashedPolylineOptions
Dashed polyline options.
DashedPolylineOptions(dashLength: LogicalPixel = LogicalPixel(value = 5.0f), dashSpaceLength: LogicalPixel = LogicalPixel(value = 2.0f))
Dashed polyline options.
DayTime
Time moment within a day.
DefaultLocationSource
Implementation of the default location source, which is recommended. If present, GMS uses them, otherwise - LocationManager.
DefaultLocationSource(context: Context)
Implementation of the default location source, which is recommended. If present, GMS uses them, otherwise - LocationManager.
context
@Synchronized
fun activate(listener: LocationChangeListener): Unit
@Synchronized
fun deactivate(): Unit
@Synchronized
fun setDesiredAccuracy(accuracy: DesiredAccuracy): Unit
fun onPermissionGranted(): Unit
The method must be called after receiving permissions to use the location.
@Synchronized
fun onProvidersChanged(): Unit
DefaultNavigationControls
Navigator UI controls suggested for default use: lane information, speed limit, next maneuver indication, etc. SDK users can also create their own UI controls and use the navigator UI model to get event notifications while navigating a route.
DeviceDensity
A multiplier that is calculated as the ratio of DPI to the base DPI of the device.
On Android, it corresponds to resources.displayMetrics.density On iOS, it corresponds to nativeScale.
Must be positive.
DeviceDensity(value: Float = 0.0f)
A multiplier that is calculated as the ratio of DPI to the base DPI of the device.
On Android, it corresponds to resources.displayMetrics.density On iOS, it corresponds to nativeScale.
Must be positive.
value
DevicePpi
Device display resolution, in pixels per inch.
Must be positive.
DevicePpi(value: Float = 0.0f)
Device display resolution, in pixels per inch.
Must be positive.
value
DGis
Entry point to the 2GIS SDK. At the start of work, you must call initialize.
@JvmStatic
@JvmOverloads
fun initialize(
appContext: Context,
httpOptions: HttpOptions = HttpOptions(),
logOptions: LogOptions = LogOptions(LogLevel.WARNING),
vendorConfig: VendorConfig = VendorConfig(),
keySource: KeySource = KeySource(KeyFromAsset("dgissdk.key")),
dataCollectConsent: PersonalDataCollectionConsent = PersonalDataCollectionConsent.GRANTED
): Context
You must call this method before working with the SDK.
appContext
Android application context.
httpOptions
logOptions
vendorConfig
keySource
dataCollectConsent
Consent to data collection and data processing.
sdkContext required for SDK services to work.
@JvmStatic
fun context(): Context
DgisMapObject
2GIS map object.
Information about the object can be obtained via directory.
val id
Stable numeric object identifier.
DgisObjectId
DgisSource
Main interface of 2GIS data sources.
fun setHighlighted(directoryObjectIds: List<DgisObjectId>, highlighted: Boolean): Unit
Sets or unselects objects.
Adds a "selected" attribute to an object, which can be used in styles.
directoryObjectIds
mutable object identifiers.
highlighted
setting or deselecting.
@JvmStatic
fun createDgisSource(context: Context, workingMode: DgisSourceWorkingMode = DgisSourceWorkingMode.ONLINE): Source
Creating a source that retrieves data from 2GIS servers or uses pre-loaded data in operation.
DirectMapControlBeginEvent
Direct map control start event. Tells the map to handle direct map control events. Direct control events only work from DirectMapControlBeginEvent to DirectMapControlEndEvent. After the direct control event sequence has ended, kinematics may start. Kinematics uses the time the event occurred, so it's better use the time received from the system rather than fill in the value during processing. While the kinematics only work for moving the map, not for rotation and scaling.
DirectMapControlBeginEvent()
DirectMapControlEndEvent
Direct map control end event. Ends direct map control started after getting the DirectMapControlBeginEvent. Direct map control events are described in DirectMapControlBeginEvent.
DirectMapRotationEvent
Map direct rotation event. Direct map control events are described in DirectMapControlBeginEvent.
DirectMapRotationEvent(
bearingDelta: Bearing,
timestamp: Duration,
rotationCenter: ScreenPoint? = null
)
bearingDelta
Change the angle of the map rotation, in degrees. Positive values correspond to the direction of counterclockwise rotation.
timestamp
System event generation time.
rotationCenter
The point on the screen around which the map rotates. If no point is specified, the rotation is relative to the map's position point.
DirectMapScalingEvent
Event of direct map scaling. Direct map control events are described in DirectMapControlBeginEvent.
DirectMapScalingEvent(
zoomDelta: Float,
timestamp: Duration,
scalingCenter: ScreenPoint? = null
)
zoomDelta
Amount by which the current zoom value changes.
timestamp
System event generation time.
scalingCenter
The point on the screen around which the map is scaled. If no point is given, then scaling is relative to the map's position point.
DirectMapShiftEvent
Direct map offset event. Direct map control events are described in DirectMapControlBeginEvent.
DirectMapShiftEvent(
screenShift: ScreenShift,
shiftedPoint: ScreenPoint,
timestamp: Duration
)
screenShift
Change of the screen position of the map relative to the previous one, in pixels.
shiftedPoint
The center point from which the map is offset.
timestamp
System event generation time.
DirectMapTiltEvent
Direct camera tilt event. Direct map control events are described in DirectMapControlBeginEvent.
DirectoryFilter
Filters for reference.
DirectoryFilter(workTime: WorkTimeFilter?, dynamic: List<DynamicFilter>)
Filters for reference.
DirectoryObject
Reference object.
fun formattedAddress(type: FormattingType): FormattedAddress?
Formatted string representation of the address according to the specified length requirement.
val types
Object type. There can be several ones, for example, Sun City shopping center - a branch of the organization and a building at the same time. The first type in this list is the main one.
val title
Object title.
val titleAddition
Additional information for the title. Example: "(apt. 1-12)"
val subtitle
Object subtitle.
Can be an empty string if missing.
val id
Stable numeric object identifier.
val markerPosition
Feature point where the marker should be placed.
val address
Object address as a set of components.
val attributes
Additional object attributes.
val contextAttributes
Context additional object attributes.
val timeZoneOffset
Shift of the object's local time relative to UTC in seconds at the current moment.
val openingHours
Object opening hours.
val contactInfos
Object contacts.
val reviews
Reviews.
val parkingInfo
Additional information about parking.
val workStatus
Work status.
val levelId
ID of the floor where the object is located.
val buildingLevels
Information about the floor plans of the building.
val entrances
Information about the entrances.
DoubleRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<DoubleRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): DoubleRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): DoubleRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
DoubleRouteEntry
Route element - point and value in it.
DoubleRouteEntry(point: RoutePoint, value: Double)
Route element - point and value in it.
DragBeginData
Data on the beginning of dragging: drag start point and an object being dragged.
DragBeginData(point: ScreenPoint, item: RenderedObject)
Data on the beginning of dragging: drag start point and an object being dragged.
Duration
A class representing a period of time.
operator fun unaryMinus(): Duration
fun toString(): String
DynamicFilter
Dynamic filters for search results.
fun match(flagFilter: Function1, rangeFilter: Function1): T
fun toString(): String
fun hashCode(): Int
DynamicRouteInfo
DynamicRouteInfoSettings
Settings for receiving dynamic route data.
Elevation
Non-negative height of the point above the surface in meters.
Elevation(value: Float = 0.0f)
Non-negative height of the point above the surface in meters.
value
EmptyFollowController
Base class for custom controllers. Can be used as the basis for implementing a controller on a platform.
EmptyFollowController()
Base class for custom controllers. Can be used as the basis for implementing a controller on a platform.
fun availableValues(): EnumSet<FollowValue>
A set of value types that this controller can manage.
fun requestValues(values: EnumSet<FollowValue>): Unit
This method tells the controller which values it provides are in use. This frees resources associated with calculating unused values. The method can be called multiple times with different values, in which case the last one is the actual one.
fun setNewValuesNotifier(notifier: NewValuesNotifier?): Unit
Installing a notifier that notifies about new values. The notifier must be stored in the implemented controller.
EntranceGeometry
Geometry for displaying the entrance on the map.
EntranceGeometry(entrancePoints: List<GeoPoint>, entrancePolylines: List<List<GeoPoint>>)
Geometry for displaying the entrance on the map.
EntranceInfo
Information about the entrance to the building.
EntranceInfo(
id: DgisObjectId,
buildingNumber: String?,
porchName: String?,
porchNumber: String?,
apartmentRanges: List<ApartmentRange>,
geometry: EntranceGeometry?
)
Information about the entrance to the building.
id
buildingNumber
porchName
porchNumber
apartmentRanges
geometry
val id
Identifier of the entrance object.
val buildingNumber
Number of the house to which the entrance belongs.
val porchName
Non-empty entrance name. Filled only for entrances. Can take the values of the entrance name (eg "Entrance 1") or the building number if the entrance has its own address.
val porchNumber
Non-empty entrance number. To be filled only for entrances. Can take values of the entrance number (eg "1") or the building number if the entrance has its own address.
val apartmentRanges
Numbers of apartments related to the entrance.
val geometry
Geometry for displaying the entrance on the map.
Event
Base class for all handled events.
EventsProcessingSettings
EventsProcessingSettings(rotationCenter: RotationCenter, scalingCenter: ScalingCenter)
ExceedSpeedLimitSettings
Settings for detection of exceeding the maximum allowed speed limit.
ExcludedArea
Excluded area to be avoided when building a route.
ExcludedArea(
type: ExcludedAreaType = ExcludedAreaType.POINT,
severity: ExcludedAreaSeverity = ExcludedAreaSeverity.SOFT,
extent: RouteDistance,
points: List<GeoPoint>
)
Excluded area to be avoided when building a route.
ExtraInstructionInfo
ExtraInstructionInfo(bicycleStart: BicycleInstructionStart)
bicycleStart
ExtraInstructionInfo(bicycleFinish: BicycleInstructionFinish)
bicycleFinish
ExtraInstructionInfo(bicycleCrossroad: BicycleInstructionCrossroad)
bicycleCrossroad
ExtraInstructionInfo(carCrossroad: CarInstructionCrossroad)
carCrossroad
ExtraInstructionInfo(carRoundabout: CarInstructionRoundabout)
carRoundabout
ExtraInstructionInfo(pedestrianStart: PedestrianInstructionStart)
pedestrianStart
ExtraInstructionInfo(pedestrianFinish: PedestrianInstructionFinish)
pedestrianFinish
ExtraInstructionInfo(pedestrianCrossroad: PedestrianInstructionCrossroad)
pedestrianCrossroad
ExtraInstructionInfo(pedestrianIndoorFloorChange: PedestrianInstructionIndoorFloorChange)
pedestrianIndoorFloorChange
ExtraInstructionInfo(pedestrianIndoorEnter: PedestrianInstructionIndoorEnter)
pedestrianIndoorEnter
ExtraInstructionInfo(pedestrianIndoorExit: PedestrianInstructionIndoorExit)
pedestrianIndoorExit
ExtraInstructionInfo(scooterStart: ScooterInstructionStart)
scooterStart
ExtraInstructionInfo(scooterFinish: ScooterInstructionFinish)
scooterFinish
ExtraInstructionInfo(scooterCrossroad: ScooterInstructionCrossroad)
scooterCrossroad
fun match(
bicycleStart: Function1,
bicycleFinish: Function1,
bicycleCrossroad: Function1,
carStart: Function1,
carFinish: Function1,
carCrossroad: Function1,
carRoundabout: Function1,
carUturn: Function1,
pedestrianStart: Function1,
pedestrianFinish: Function1,
pedestrianCrossroad: Function1,
pedestrianIndoorFloorChange: Function1,
pedestrianIndoorEnter: Function1,
pedestrianIndoorExit: Function1,
scooterStart: Function1,
scooterFinish: Function1,
scooterCrossroad: Function1
): T
bicycleStart
bicycleFinish
bicycleCrossroad
carStart
carFinish
carCrossroad
carRoundabout
carUturn
pedestrianStart
pedestrianFinish
pedestrianCrossroad
pedestrianIndoorFloorChange
pedestrianIndoorEnter
pedestrianIndoorExit
scooterStart
scooterFinish
scooterCrossroad
fun toString(): String
fun hashCode(): Int
val isBicycleStart
val asBicycleStart
val isBicycleFinish
val asBicycleFinish
val isBicycleCrossroad
val asBicycleCrossroad
val isCarStart
val asCarStart
val isCarFinish
val asCarFinish
val isCarCrossroad
val asCarCrossroad
val isCarRoundabout
val asCarRoundabout
val isCarUturn
val asCarUturn
val isPedestrianStart
val asPedestrianStart
val isPedestrianFinish
val asPedestrianFinish
val isPedestrianCrossroad
val asPedestrianCrossroad
val isPedestrianIndoorFloorChange
val asPedestrianIndoorFloorChange
val isPedestrianIndoorEnter
val asPedestrianIndoorEnter
val isPedestrianIndoorExit
val asPedestrianIndoorExit
val isScooterStart
val asScooterStart
val isScooterFinish
val asScooterFinish
val isScooterCrossroad
val asScooterCrossroad
val value
File
File identifier.
Can be not only a file in the file system, but also an arbitrary data source.
@JvmStatic
fun fromString(contents: String): File
File with contents from the given string.
FinishRouteControl
FlagFilter
The flag filter.
FloatRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): FloatRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<FloatRouteLongEntry>
Elements partially or completely covered by begin,end.
FloatRouteLongEntry
Extended route element - segment and value on it.
FloatRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: Float
)
Extended route element - segment and value on it.
FloorInfo
Information about the floor plan for the marker - an element of search results.
FloorInfo(levelId: LevelId, buildingId: BuildingId)
Information about the floor plan for the marker - an element of search results.
FollowControl
FollowController
A class that allows you to manage the camera position and the geolocation marker. All of its methods' implementations must be thread-safe. Most methods have trivial default implementations available (thus the FollowController responsible for scaling is not required to override coordinates() and similar methods).
fun requestValues(values: EnumSet<FollowValue>): Unit
This method tells the FollowController which values it provides are in use. This frees resources associated with calculating unused values. The method can be called multiple times with different values, in which case the last one is the actual one.
fun setClock(clock: FollowControllerClock?): Unit
This method passes a time source to the FollowController. The timestamps that are returned from next_timestamp() must be computed relative to the values obtained from clock. This method is not called again to replace a previously non-zero value with a non-zero value other than it.
fun setThresholds(shiftMeters: Double, rotation: Double): Unit
Threshold values for position offset and rotation angle. Smaller offsets and smaller rotations are assumed not to be visually distinguishable.
fun updateValues(): Unit
A request to calculate all provided values. Immediately after calling this method, all values (coordinates(), satellite_bearing(), etc.) are considered up-to-date.
val availableValues
A set of value types that this FollowController can manage. For example, one FollowController can manage coordinates only , while another can manage map tilt only.
val nextTimestampChannel
A channel that informs subscribers about the time of the next visible change of values. The change time of values that are not obtained via request_values() may not be reported. Time values are interpreted relative to the source passed to set_clock().
val nextTimestamp
A channel that informs subscribers about the time of the next visible change of values. The change time of values that are not obtained via request_values() may not be reported. Time values are interpreted relative to the source passed to set_clock().
val coordinates
Geographical coordinates.
val satelliteBearing
Direction of movement.
val magneticBearing
Direction to magnetic north.
val tilt
Map tilt.
val styleZoom
The style zoom level of the map.
val accuracy
Precision circle radius (meters).
FollowControllerClock
The clock used to measure time in the FollowController.
FollowPosition
Settings for tracking direction, tilt and zoom level.
FollowPosition(
bearing: FollowBearing = FollowBearing.OFF,
tilt: FollowTilt = FollowTilt.OFF,
styleZoom: FollowStyleZoom = FollowStyleZoom.OFF
)
Settings for tracking direction, tilt and zoom level.
FormattedAddress
Human-readable representation of the address.
val drilldownAddress
The drilldown address. Example: "Novosibirsk, Kirovsky district".
val streetAddress
The address within the settlement. Example: "Nikolaeva, 11".
val addressComment
The comment on the address. Example: "301 office; 9th floor".
val postCode
Postal code of the object with the building code, if any. Example: "630088", "630007/XBVJF8".
Fps
Frames per second, frame rate.
FreeRoamSettings
var onRoutePrefetchLength
Road graph tiles are loaded into the HTTP cache during following the route if they correspond to a section of the route from the current position to the specified distance. The default value is 5 km.
Tiles are not loaded into the HTTP cache if the parameter matches zero or negative distance.
var onRoutePrefetchRadiusMeters
When caching road graph tiles during following the route, tiles are loaded into the HTTP cache if they are closer than the specified distance in meters from the route line. The default value is 1 km.
Tiles are not loaded into the HTTP cache, if the parameter corresponds to zero or negative distance.
var prefetchRadiusMeters
Road graph tiles are loaded into the HTTP cache if they are closer than the specified distance in meters from the current position. The default value is 2 km.
Tiles are not loaded into the HTTP cache if the parameter corresponds to a zero or negative distance.< /p>
Geometry
Geometry object
fun intersects(geometry: Geometry): Boolean
The intersects function allows you to determine whether a given geometry intersects with another geometry object.
GeometryMapObject
A geometric object of the map.
Methods are thread-safe.
The object is displayed on the map under the following conditions:
- the object is visible;
- the object is added to the data source;
- the data source containing the object is added to the map;
- the display parameters in the styles set in the map are applicable to this object. For more information about displaying on the map, see ISource.
val geometryChannel
Object geometry.
var geometry
Object geometry.
val objectAttributes
Getting the properties of the map object for reading and modifying.
val isVisibleChannel
Current object visibility flag.
var isVisible
Current object visibility flag.
val isDraggableChannel
Current object relocation flag.
var isDraggable
Current object relocation flag.
val bounds
Minimum size of rectangle containing geometry.
GeometryMapObjectBuilder
Class for setting properties and then creating geometric objects.
GeometryMapObjectBuilder()
fun setObjectAttribute(name: String, value: AttributeValue): GeometryMapObjectBuilder
Setting the map object property.
name
map object property name
value
Map object property value.
fun setObjectAttributes(values: Map): GeometryMapObjectBuilder
Setting the properties of the map object.
values
Set of "name":"value" pairs for the added properties of a map object.
The method does not replace the entire set of object properties, i.e. if a property is absent in values, but has already been added to the object previously, it will not be changed.
fun setGeometry(geometry: Geometry): GeometryMapObjectBuilder
Setting the geometry of the map object.
fun setVisible(visible: Boolean): GeometryMapObjectBuilder
Set the visibility of the map object.
fun setDraggable(draggable: Boolean): GeometryMapObjectBuilder
Setting the possibility of dragging a map object.
fun setUserData(userData: Any?): GeometryMapObjectBuilder
Installing user data.
User data is not used in any way in the SDK and is only needed to return it to the user.
fun createObject(): GeometryMapObject
Constructing a map object.
The object must have geometry
After calling this function, GeometryMapObjectBuilder is not suitable for setting the parameters of a map object or for creating it.
fun setObjectAttribute(name: String, value: Boolean): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: Long): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: Int): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: Double): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: Float): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: String): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: ByteArray): GeometryMapObjectBuilder
fun setObjectAttribute(name: String, value: Color): GeometryMapObjectBuilder
GeometryMapObjectSource
Source of geometric map objects.
fun clusteringObjects(position: CameraPosition): List<MapObject>
Get a list of objects participating in clustering given a camera position. The list contains both clusters and geometric objects.
fun addObject(item: GeometryMapObject): Unit
Adding an object to the source.
Adding objects by group is more efficient than adding one by one, especially when the source has already been added to one or more maps.
Adding is asynchronous, thread-safe, the method can be used from any thread.
For a source with clustering, addition is not yet implemented, an exception will be thrown.
fun addObjects(objects: List<GeometryMapObject>): Unit
Adding multiple objects to the source.
Adding objects by group is more efficient than adding one by one, especially when the source has already been added to one or more maps.
Adding is asynchronous, thread-safe, the method can be use from any thread.
For a source with clustering, addition is not yet implemented, an exception will be thrown.
fun removeObject(item: GeometryMapObject): Unit
Deleting an object from the source.
The deletion is asynchronous, thread-safe, the method can be used from any thread.
fun removeObjects(objects: List<GeometryMapObject>): Unit
Removing objects from the source.
fun removeAndAddObjects(objectsToRemove: List<GeometryMapObject>, objectsToAdd: List<GeometryMapObject>): Unit
Removing and adding objects in the source.
GeometryMapObjectSourceBuilder
fun setSourceAttribute(name: String, value: AttributeValue): GeometryMapObjectSourceBuilder
Setting the property of map objects common to the entire source (see ISource).
fun setSourceAttributes(values: Map): GeometryMapObjectSourceBuilder
Setting properties of map objects common to the entire source.
fun addObject(item: GeometryMapObject): GeometryMapObjectSourceBuilder
Adding a map geometry object to the source.
fun addObjects(objects: List<GeometryMapObject>): GeometryMapObjectSourceBuilder
Adding several geometric map objects to the source.
fun createSource(): GeometryMapObjectSource
Creating a source of geometric objects.
After calling this function, you cannot use the GeometryMapObjectSourceBuilder to create a data source or set data source parameters.
GeoPoint
A point in a spherical coordinate system that, together with a geodetic coordinate system (e.g. WGS84), points to a point on the Earth's surface. This structure is not tied to a specific geodetic coordinate system. But this module contains free functions that operate on this structure already in a specific coordinate system (in which one, see the documentation for the functions).
GeoPoint(latitude: Latitude, longitude: Longitude)
A point in a spherical coordinate system that, together with a geodetic coordinate system (e.g. WGS84), points to a point on the Earth's surface. This structure is not tied to a specific geodetic coordinate system. But this module contains free functions that operate on this structure already in a specific coordinate system (in which one, see the documentation for the functions).
fun move(bearing: Bearing, meter: Meter): GeoPoint
Calculates the point obtained by moving the origin point in the specified direction by the specified distance.
fun withElevation(elevation: Elevation = Elevation(0.0f)): GeoPointWithElevation
fun bearing(point: GeoPoint): Bearing
Calculates the direction (track angle, i.e. the angle between true north and the direction of travel, counted clockwise) between two points.
GeoPointRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<GeoPointRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): GeoPointRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): GeoPointRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
fun calculateGeoPoint(routePoint: RoutePoint): SegmentGeoPoint?
Calculates a GeoPoint from a known RoutePoint.
routePoint
The calculated geographical coordinates and direction of the segment pointed to by the route_point parameter. If the route is empty or the route_point goes beyond the route, then null is returned.
The complexity of the operation is O(log2(N)), where N = route_geometry .size()
GeoPointRouteEntry
Route element - point and value in it.
GeoPointRouteEntry(point: RoutePoint, value: GeoPoint)
Route element - point and value in it.
GeoPointWithElevation
A point in a geographic coordinates system (latitude, longitude, elevation).
Elevation is calculated in meters above the surface, not above the sea level.
GeoPointWithElevation(
latitude: Latitude,
longitude: Longitude,
elevation: Elevation = Elevation(value = 0.0f)
)
A point in a geographic coordinates system (latitude, longitude, elevation).
Elevation is calculated in meters above the surface, not above the sea level.
fun bearing(point: GeoPoint): Bearing
Calculates the direction (track angle, i.e. the angle between true north and heading, counted clockwise ) for projecting a point onto the map and a given point.
fun distance(point: GeoPoint): Meter
Calculates the minimum (by great circle) distance between the projection of a point on the map and a given point.
fun move(bearing: Bearing, meter: Meter): GeoPointWithElevation
Calculates the point obtained by moving the projection of the origin point in the specified direction by the specified distance.
GeoRect
A rectangular area in a spherical coordinate system (eg WGS84). This structure is not tied to a specific geodetic coordinate system.
fun contains(rect2: GeoRect): Boolean
Is rect2 contained within rect1, i.e. are all its points contained within.
fun contains(point: GeoPoint): Boolean
Does the rectangle contain a point. Points located on the boundary are also considered to belong to the rectangle.
fun intersects(rect2: GeoRect): Boolean
Do the rectangles intersect, i.e. have common points. Rectangles with common points only on the border are also considered to intersect.
fun expand(rect2: GeoRect): GeoRect
Expand rectangle. Return the minimum rectangle containing both given rectangles.
val isValid
Checks the rectangle for validity.
val isDegenerate
Checks the rectangle for degeneracy. If the points in the rectangle are equal, then it degenerates to a point. A degenerate rectangle is a valid rectangle. An invalid rectangle is not degenerate.
val southWestPoint
Southwest point, lower left border of the rectangle.
val northEastPoint
Northeast point, upper right border of the rectangle.
GestureManager
Class for managing gesture processing.
fun setSettingsAboutMapPositionPoint(settings: EventsProcessingSettings): Unit
Setting the point relative to which the scaling and rotation take place.
settings
Event handling settings.
When the function is called, gesture recognition tools are recreated.
fun setMutuallyExclusiveGestures(rules: List<EnumSet<Gesture>>): Unit
Setting a list of rules for excluding simultaneous triggering of multiple gestures.
The default rules are added to the passed list of rules, which do not allow the tilt gesture to be triggered simultaneously with other gestures. Each rule contains a list of gestures that cannot be triggered simultaneously. For example, if the Scaling and Rotation gestures are specified in the rule, these gestures will not work simultaneously. If multiple gestures from the rule are performed simultaneously, the gesture with higher priority will be triggered. The order of gesture priorities (in descending order): (Shift ->) Tilt -> Scaling -> Rotation -> MultiTouchShift
GradientPolylineOptions
Gradient polyline options.
GradientPolylineOptions(
borderWidth: LogicalPixel = LogicalPixel(value = 0.0f),
secondBorderWidth: LogicalPixel = LogicalPixel(value = 0.0f),
gradientLength: LogicalPixel = LogicalPixel(value = 1.0f),
borderColor: Color = Color(),
secondBorderColor: Color = Color(),
colors: List<Color>,
colorIndices: ByteArray
)
Gradient polyline options.
borderWidth
secondBorderWidth
gradientLength
borderColor
secondBorderColor
colors
colorIndices
val borderWidth
Line border width
val secondBorderWidth
Width of the second line border
val gradientLength
Gradient line length
val borderColor
Border color.
val secondBorderColor
Second border color.
val colors
Gradient polyline color picker.
val colorIndices
Color indices of the gradient polyline. The number of indices must be 1 less than the number of polyline points.
HttpCacheManager
HttpOptions
HTTP client options.
HttpOptions(
certificates: List?<Certificate> = null,
timeout: Duration = Duration.ofMilliseconds(15000),
useCache: Boolean = true,
cacheStoragePath: String? = null,
cacheMaxSize: Long? = null,
proxy: HttpProxyOptions? = null
)
HTTP client options.
certificates
timeout
useCache
cacheStoragePath
cacheMaxSize
proxy
val certificates
Certificates in PEM format. If not specified, system certificates + supplied with the SDK are used.
val timeout
Timeout for HTTP requests.
val useCache
Use HTTP cache.
val cacheStoragePath
Path to the top-level directory for the main HTTP cache file store. The file store will be located in the http_cache subdirectory in this directory. If no path is specified, the directory returned by context.getCacheDir() will be used.
val cacheMaxSize
Maximum HTTP cache size in bytes. If not specified, the default maximum HTTP cache size is 300 MB.
val proxy
Proxy settings.
HttpProxyOptions
Proxy settings.
Image
Image.
ImageData
Image data: size, format, and binary data.
ImageData(
size: ScreenSize,
format: ImageFormat,
data: ByteArray
)
Image data: size, format, and binary data.
fun toBitmap(): Bitmap
IncompleteTextHandler
Autocomplete is suggested for the text, entered by the user.
IndoorBuilding
Building with floor plans.
IndoorControl
Floor control.
It is a column with the names of floors, of which the active one is highlighted. When you click on the name, the floor plan switches. No more than 5 names are displayed at the same time, those that do not fit will be under the scroll.
IndoorControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Floor control.
It is a column with the names of floors, of which the active one is highlighted. When you click on the name, the floor plan switches. No more than 5 names are displayed at the same time, those that do not fit will be under the scroll.
var markedLevels
Floors on which marks are displayed.
IndoorControlModel
Floor control model.
val activeLevelIndexChannel
Active floor index.
var activeLevelIndex
Active floor index.
var markedLevels
Floors on which marks are displayed.
val levelNamesChannel
Names of floors. Empty if the map does not display a building with floor plans or if the building has only one floor.
val levelNames
Names of floors. Empty if the map does not display a building with floor plans or if the building has only one floor.
IndoorDetector
IndoorManager
Class for getting the current building with floor plans.
IndoorRouteLevelsGetter
Allows you to get the set of floors through which the routes displayed on the map pass.
InputEvent
User input event.
InstructionRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<InstructionRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): InstructionRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): InstructionRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
InstructionRouteEntry
Route element - point and value in it.
InstructionRouteEntry(point: RoutePoint, value: RouteInstruction)
Route element - point and value in it.
IntRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<IntRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): IntRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): IntRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
IntRouteEntry
Route element - point and value in it.
IntRouteEntry(point: RoutePoint, value: Int)
Route element - point and value in it.
IsOpenNow
Open now.
IsOpenNow()
Open now.
ItemMarkerInfo
KeyFromAsset
Key from an asset.
KeyFromFile
Key from file.
KeyFromString
Key from a string.
KeySource
Source of the key.
fun match(
fromAsset: Function1,
fromFile: Function1,
fromString: Function1
): T
fun toString(): String
fun hashCode(): Int
LanesCalloutMapPosition
Position of the lane callout for the route.
LanesCalloutMapPosition(
mapId: MapId,
routePoint: RoutePoint,
geoPoint: GeoPoint
)
Position of the lane callout for the route.
LaneSignRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): LaneSignRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<LaneSignRouteLongEntry>
Elements partially or completely covered by begin,end.
LaneSignRouteLongEntry
Extended route element - segment and value on it.
LaneSignRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: RouteLaneSign
)
Extended route element - segment and value on it.
Latitude
Geographical latitude.
LevelId
Floor plan identifier.
LevelInfo
Information about the floor of the building.
LocaleManager
Location
Geoposition.
Location(
coordinates: LocationCoordinates,
altitude: LocationFuzzyDouble?,
course: LocationCourse?,
groundSpeed: LocationFuzzyDouble?,
source: String,
timestamp: Duration
)
Geoposition.
coordinates
altitude
course
groundSpeed
source
timestamp
val coordinates
coordinates::value - coordinates of the geoposition. coordinates::accuracy - horizontal accuracy of the geoposition coordinates (DRMS), m. https://en.wikipedia.org/wiki/Circular_error_probable Value range: >= 0.
val altitude
altitude::value - height above the WGS84 reference ellipsoid, m. altitude::accuracy - standard deviation of the measurement error of the height, m. null means that the platform does not provide this field. https://en.wikipedia.org/wiki/Standard_deviation Value range: (null, > 0).
val course
course::value - course angle (direction of movement along the Earth's surface). The angle is measured relative to geographic north). course::accuracy - standard deviation of the measurement error of the course angle. null means that the platform does not provide this field. https://en.wikipedia.org/wiki/Standard_deviation Value range: (null, > 0).
val groundSpeed
ground_speed - speed of movement along the Earth's surface, m/s. Value range: >= 0. ground_speed::accuracy - root-mean-square deviation of the measurement error of the speed, m/s. null means that the platform does not provide this field. https://en.wikipedia.org/wiki/Rayleigh_distribution Value range: (null, > 0).
val source
The name of the location source.
Timestamps between different location sources are not synchronized, so you cannot compare timestamps for locations that are obtained from different sources.
val timestamp
The time point at which the geolocation was determined. This point is not tied to any specific date and is used solely to calculate the time between two location measurements obtained from the same location source in the same session. This field must be monotonous increase (even when the system is in sleep mode).
LocationCoordinates
LocationCourse
LocationFuzzyDouble
LogicalPixel
A pixel which size is independent of screen density.
1 logical pixel equals 1/(base ppi) of an inch. The base PPI is device-specific and is calculated from the DevicePpi/DeviceDensity ratio. DevicePpi and DeviceDensity are in turn set with the OS via the map interface. For Android, LogicalPixel corresponds to dp, for iOS - to point.
LogicalPixel(value: Float = 0.0f)
A pixel which size is independent of screen density.
1 logical pixel equals 1/(base ppi) of an inch. The base PPI is device-specific and is calculated from the DevicePpi/DeviceDensity ratio. DevicePpi and DeviceDensity are in turn set with the OS via the map interface. For Android, LogicalPixel corresponds to dp, for iOS - to point.
value
LogMessage
Message to be logged.
LogOptions
Logging settings.
Longitude
Geographical longitude.
MagneticChangeListener
A class that keeps track of compass direction changes and compass availability.
ManeuverControl
Map
Map.
fun addSource(source: Source): Unit
Adding a data source to the map.
Occurs asynchronously. The method can be called from any thread, it is thread-safe.
fun removeSource(source: Source): Unit
Removing the data source from the map.
Occurs asynchronously. The method can be called from any thread, it is thread safe.
fun getRenderedObjects(centerPoint: ScreenPoint, radius: ScreenDistance = ScreenDistance(value = 5.0f)): Future<List<RenderedObjectInfo>>
Getting displayable map objects projected onto a circle on the screen.
centerPoint
Circle center.
radius
The radius of the circle.
The list of objects is formed in the order of drawing from the latest to the earliest.
fun setAttribute(name: String, value: AttributeValue): Unit
val id
Map instance ID, unique within the process.
val camera
Getting a camera.
val indoorManager
Getting a floor plan manager.
val dataLoadingStateChannel
Notification about the state of data loading to the map.
When tracking the camera position, the map state is always MapDataLoadingState::Loading.
val dataLoadingState
Notification about the state of data loading to the map.
When tracking the camera position, the map state is always MapDataLoadingState::Loading.
val styleChannel
Get current map styles.
var style
Get current map styles.
val fontIconSizeMultiplierChannel
The icon and font size multiplier received from the application.
The size of icons and fonts is specified in logical pixels (see LogicalPixel) and multiplied by the font and icon size multiplier.
var fontIconSizeMultiplier
The icon and font size multiplier received from the application.
The size of icons and fonts is specified in logical pixels (see LogicalPixel) and multiplied by the font and icon size multiplier.
val sources
Getting the map data sources.
Occurs asynchronously. The method can be called from any thread, it is thread safe.
val mapVisibilityStateChannel
var mapVisibilityState
val attributes
Getting attributes.
The following properties must be specified: "theme"="day|night" "navigatorOn"="true|false"
TODO: style properties for traffic.
val interactiveChannel
Map interactivity. Interactivity means that the user has the ability to interact with the map. If interactivity is disabled, the map stops responding to input events obtained from the user. Controls for working with the map (zooming in and moving to the current position) also stop working. It remains possible to work with the map via set_position/move. Unfinished gestures are reset upon transition to the non-interactive state. By default, the map is interactive (interactive == true).
The function can be called from any thread.
var interactive
Map interactivity. Interactivity means that the user has the ability to interact with the map. If interactivity is disabled, the map stops responding to input events obtained from the user. Controls for working with the map (zooming in and moving to the current position) also stop working. It remains possible to work with the map via set_position/move. Unfinished gestures are reset upon transition to the non-interactive state. By default, the map is interactive (interactive == true).
The function can be called from any thread.
MapControl
Base class for map UI controls.
MapControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Base class for map UI controls.
MapControls
MapDirection
The angle of rotation of the object relative to the north direction, in degrees, counted clockwise.
MapDirection(value: Double = 0.0)
The angle of rotation of the object relative to the north direction, in degrees, counted clockwise.
value
MapId
Map instance ID, unique within the process.
MapManager
An interface that allows you to add maps to the navigator and remove them from it.
MapObject
Object on the map.
MapObjectManager
MapObjectManager(map: Map, layerId: String? = null)
Create IMapObjectManager.
fun removeObject(item: SimpleMapObject): Unit
Delete an object.
fun addObjects(objects: List<SimpleMapObject>): Unit
Add objects.
fun removeObjects(objects: List<SimpleMapObject>): Unit
Delete objects.
fun removeAndAddObjects(objectsToRemove: List<SimpleMapObject>, objectsToAdd: List<SimpleMapObject>): Unit
Remove and add objects.
fun removeAll(): Unit
fun clusteringObjects(position: CameraPosition): List<MapObject>
Get a list of objects participating in clustering given the camera position. The list contains both clusters and markers.
@JvmStatic
fun withClustering(
map: Map,
logicalPixel: LogicalPixel,
maxZoom: Zoom,
clusterRenderer: SimpleClusterRenderer,
minZoom: Zoom = Zoom(value = 0.0f),
layerId: String? = null
): MapObjectManager
Create an IMapObjectManager with data clustering. Only IMarker objects are clustered.
map
logicalPixel
The minimum possible distance on the screen between anchor points of markers on levels where clustering works.
maxZoom
The level from which all markers are visible.
clusterRenderer
Interface for setting cluster display parameters.
minZoom
The level from which clusters are formed.
layerId
Layer ID in the "Dynamic Object" type style. Created objects are placed on this layer, this allows you to set their order relative to other layers. If not specified, objects are placed on top of other layers.
@JvmStatic
fun withGeneralization(
map: Map,
logicalPixel: LogicalPixel,
maxZoom: Zoom,
minZoom: Zoom = Zoom(value = 0.0f),
layerId: String? = null
): MapObjectManager
Create an IMapObjectManager with data generalization. Only IMarker objects are generalized.
map
logicalPixel
The minimum distance on the screen between marker anchor points on levels where generalization works.
maxZoom
The level from which all markers are visible.
minZoom
The level from which generalization works.
layerId
Layer ID in the "Dynamic Object" type style. Created objects are placed on this layer, this allows you to set their order relative to other layers. If not specified, objects are placed on top of other layers.
MapOptions
Map options.
MapOptions()
Map options.
@JvmStatic
fun fromAttributes(context: Context, attrs: AttributeSet): MapOptions
MapPaddingControl
A control that sets the padding of the map.
MapPaddingControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
A control that sets the padding of the map.
MapRotationBeginEvent
Event of starting map rotation around a point.
val direction
MapRotationEndEvent
The event of the end of the map rotation around the point.
MapRotationEndEvent()
MapScalingBeginEvent
MapScalingEndEvent
MapShiftBeginEvent
MapShiftEndEvent
MapView
Container containing the map and additional controls.
fun onAttachedToWindow(): Unit
fun onDetachedFromWindow(): Unit
fun setTouchEventsObserver(observer: TouchEventsObserver?): Unit
fun addObjectTappedCallback(callback: MapObjectTappedCallback): Unit
fun removeObjectTappedCallback(callback: MapObjectTappedCallback): Unit
fun addObjectLongTouchCallback(callback: MapObjectTappedCallback): Unit
fun removeLongTouchCallback(callback: MapObjectTappedCallback): Unit
fun setCopyrightMargins(
left: Int,
top: Int,
right: Int,
bottom: Int
): Unit
fun onConfigurationChanged(newConfig: Configuration): Unit
fun onSaveInstanceState(): Parcelable?
fun onVisibilityChanged(changedView: View, visibility: Int): Unit
fun takeSnapshot(copyrightPosition: Alignment = Alignment.BOTTOM_RIGHT): Future<ImageData>
fun useCustomGestureRecognitionEngine(customGestureRecognitionEngine: MapGestureRecognitionEngine): Unit
Use custom gesture recognizer.
lateinit var mapOptions
var showApiVersionInCopyrightView
var maxFps
Maximum allowed map refresh rate. If not set, it is equal to the screen refresh rate.
var powerSavingMaxFps
Maximum allowable map refresh rate in power saving mode. If not set, it is equal to maxFps.
val fpsChannel
Map update frequency. To get the correct value, you must keep a subscription to the channel. Before calling the method, the map must be initialized (getMapAsync completed).
val renderView
Returns the View used for rendering OpenGL.
val gestureManager
MarkedByRouteIndoorControl
Floor control, which marks the floors through which routes pass on the map.
MarkedByRouteIndoorControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Floor control, which marks the floors through which routes pass on the map.
MarkedUpText
Marked text.
MarkedUpText(text: String, matchedParts: List<MarkedUpTextSpan>)
Marked text.
MarkedUpTextSpan
Describes a subset of bytes of the text string.
Marker
A point on the map that is of interest to the user.
var position
Get a marker location.
var icon
Getting a marker icon.
var anchor
Getting anchor point of a marker icon.
var iconOpacity
Getting the transparency of the marker icon.
var text
Getting the token signature.
var textStyle
Getting the marker label style.
var isDraggable
Getting the marker dragability flag.
var iconWidth
Getting the target marker width used for scaling.
var iconMapDirection
Rotation angle of the marker on the map relative to the north direction, clockwise.
var animatedAppearance
Whether or not to animate appearance.
MarkerOptions
Marker options.
MarkerOptions(
position: GeoPointWithElevation,
icon: Image?,
iconMapDirection: MapDirection? = null,
anchor: Anchor = Anchor(x = 0.5f, y = 0.5f),
text: String? = null,
textStyle: TextStyle? = null,
iconOpacity: Opacity = Opacity(value = 1.0f),
visible: Boolean = true,
draggable: Boolean = false,
iconWidth: LogicalPixel = LogicalPixel(value = 0.0f),
userData: Any? = null,
zIndex: ZIndex = ZIndex(value = 0),
animatedAppearance: Boolean = true,
levelId: LevelId? = null
)
Marker options.
position
icon
iconMapDirection
anchor
text
textStyle
iconOpacity
visible
draggable
iconWidth
userData
zIndex
animatedAppearance
levelId
val position
val icon
val iconMapDirection
val anchor
val text
val textStyle
val iconOpacity
val visible
val draggable
val iconWidth
Target width used for scaling.
val userData
val zIndex
Object drawing level.
val animatedAppearance
Whether or not to animate appearance.
val levelId
Link to the floor plan of the building.
MessageControl
Meter
Length/distance in meters.
MillisecondsRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<MillisecondsRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): MillisecondsRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): MillisecondsRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
fun calculateDuration(routePoint: RoutePoint): Duration
Calculates the expected travel time to the end of the route.
MillisecondsRouteEntry
Route element - point and value in it.
MillisecondsRouteEntry(point: RoutePoint, value: Duration)
Route element - point and value in it.
Model
The navigator model intended to be displayed in the UI.
val stateChannel
Navigator status.
val state
Navigator status.
val locationChannel
The current location the navigator is working with.
See location_available_channel
val location
The current location the navigator is working with.
See location_available_channel
val locationAvailableChannel
A flag that indicates whether the current location is used for navigation. After receiving the location, the navigator decides whether it is suitable for using it for navigation (for example, if the location has too large error margins, the navigator may decide that it is not suitable for navigation) If the location is navigable, the navigator sets the value to true in this channel, if not, it sets the value to false.
Even if the value in this channel is false, the location_channel can be updated in the location_channel.
See location_channel
val locationAvailable
A flag that indicates whether the current location is used for navigation. After receiving the location, the navigator decides whether it is suitable for using it for navigation (for example, if the location has too large error margins, the navigator may decide that it is not suitable for navigation) If the location is navigable, the navigator sets the value to true in this channel, if not, it sets the value to false.
Even if the value in this channel is false, the location_channel can be updated in the location_channel.
See location_channel
val routeChannel
Route with maneuvers.
In the free roam mode (StateChannel::FreeRoam), there is no route on which a user is traveling. Therefore, the section of the road on which the user is currently moving is represented by the navigator as a route and returned as the current route. Such a road definition is not a complete route as it lacks finish and maneuvers.
val route
Route with maneuvers.
In the free roam mode (StateChannel::FreeRoam), there is no route on which a user is traveling. Therefore, the section of the road on which the user is currently moving is represented by the navigator as a route and returned as the current route. Such a road definition is not a complete route as it lacks finish and maneuvers.
val dynamicRouteInfoChannel
Traffic events and traffic data on the route or on the predicted part of the route for FreeRoam mode.
val dynamicRouteInfo
Traffic events and traffic data on the route or on the predicted part of the route for FreeRoam mode.
val routePositionChannel
The user's current position on the route.
val routePosition
The user's current position on the route.
val exceedingMaxSpeedLimitChannel
Flag of exceeding the maximum allowed speed limit.
val exceedingMaxSpeedLimit
Flag of exceeding the maximum allowed speed limit.
val betterRouteChannel
Signal indicating an alternative route with shorter expected travel time. If the value in the channel is null, this means that an alternative route cannot be found or has become outdated.
val betterRoute
Signal indicating an alternative route with shorter expected travel time. If the value in the channel is null, this means that an alternative route cannot be found or has become outdated.
val duration
val isFreeRoam
MultiTouchShiftSettings
Settings for handling shift when touching with multiple fingers.
MultiTouchShiftSettings(thresholdMm: Float)
Settings for handling shift when touching with multiple fingers.
thresholdMm
MyLocationControl
Control of the flyover to the user's current location.
MyLocationControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Control of the flyover to the user's current location.
MyLocationController
Class that controls the display of the current position marker.
MyLocationControlModel
Model for the control to fly to the user's location. The control consists of a button that, when clicked, flies the camera to the user's location. If the location is not specified, nothing happens. Object methods must be called on the same thread.
MyLocationControlModel(map: Map, transitionType: TransitionType = TransitionType.SMOOTH)
fun onClicked(): Unit
MyLocationMapObject
Geolocation marker.
MyLocationMapObjectSource
A source containing a geolocation marker.
MyLocationMapObjectSource(context: Context, directionBehaviour: MyLocationDirectionBehaviour)
Create a location marker source using data from map with smooth change.
MyLocationMapObjectSource(
context: Context,
directionBehaviour: MyLocationDirectionBehaviour,
controller: MyLocationController
)
Create location marker source.
fun setDirectionBehaviour(directionBehaviour: MyLocationDirectionBehaviour): Unit
Select marker direction behavior.
val item
Get the geolocation marker.
NativeException
Exception converted from an exception thrown in native code.
NativeObject
The base class for objects that wrap objects in native code.
NativeProxy
A technical class that encapsulates a weak pointer to an object in native code.
fun finalize(): Unit
NavigationControl
Container with controls for the zoom level and flyover to the user's current location.
NavigationControl
Base class for navigator UI controls.
NavigationFollowController
Interface for managing map tracking of a geolocation marker in the navigator.
NavigationManager
Root public interface of the navigator.
val uiModel
The navigator model intended to be displayed in the UI.
val indoorDetector
Indoor navigation.
val mapFollowController
Management of automatic return of the map to tracking a geolocation marker.
val mapManager
Navigator map manager.
val zoomFollowSettings
Map scaling settings during the follow mode.
val routeMapSettings
Settings for displaying the route on the map.
val routeSourceSettings
Settings for the source used to display the route on the map.
val simulationSettings
Settings for simulation of following the route.
val voiceSelector
Managing voice packages in the current navigator session.
val exceedSpeedLimitSettings
Settings for detection of exceeding the speed limit.
val dynamicRouteInfoSettings
Settings for receiving and updating dynamic route data.
val soundNotificationSettings
Settings for sound alerts in the current navigator session.
val freeRoamSettings
Settings for following without a route in free roam mode.
val alternativeRoutesProviderSettings
Alternative route search settings in the follow mode.
NavigationView
UI element that displays the state of navigation on the map.
Adding it to a MapView results in the display of a route, a geolocation marker, transport events, and camera tracking. Navigation controls can be placed inside NavigationView - inheritors of NavigationControl, in particular, ready-made to use the set of controls DefaultNavigationControls.
var navigationManager
NavigationVoice
Voice to use in the navigator.
NewValuesNotifier
The interface of an object that reports that there are changes in any of the parameters.
ObstacleInfo
Information about the obstacle on the route.
ObstacleInfo(type: Obstacle = Obstacle.OTHER, limitation: ObstaclePassLimitation = ObstaclePassLimitation.UNLIMITED)
Information about the obstacle on the route.
ObstacleInfoRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<ObstacleInfoRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): ObstacleInfoRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): ObstacleInfoRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
ObstacleInfoRouteEntry
Route element - point and value in it.
ObstacleInfoRouteEntry(point: RoutePoint, value: ObstacleInfo)
Route element - point and value in it.
ObstacleInfoRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): ObstacleInfoRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<ObstacleInfoRouteLongEntry>
Elements partially or completely covered by begin,end.
ObstacleInfoRouteLongEntry
Extended route element - segment and value on it.
ObstacleInfoRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: ObstacleInfo
)
Extended route element - segment and value on it.
Opacity
Opacity - from 0.0 (fully transparent) to 1.0 (fully opaque).
Opacity(value: Float = 0.0f)
Opacity - from 0.0 (fully transparent) to 1.0 (fully opaque).
value
OpeningHours
Opening hours of the organization.
OpeningHours(weekOpeningHours: List<List<WeekTimeInterval>>, isOpen24x7: Boolean)
Opening hours of the organization.
Package
Package. For the convenience of working with data (installation, updating, deletion), data in the 2GIS SDK are grouped into sets according to functional-logical purpose. A set of grouped data is called a package. The functional purpose of data is unique within one package. However, sets data of packages with the same functionality may overlap, that is, it is possible that the data of several packages have common files.In operations with a group of such packages, the common data will be processed (downloaded, unpacked, deleted) only once.
val id
Stable technical package identifier.
val infoChannel
Package information.
val info
Package information.
val progressChannel
Package installation or update operation progress as a percentage. If the package is not installed locally, the channel contains the value 0. If the package is installed locally, regardless of the date and compatibility with the current SDK version, the channel contains the value 100. If the package is located during the install or update phase, the channel contains the update value in the range 0.100.
val progress
Package installation or update operation progress as a percentage. If the package is not installed locally, the channel contains the value 0. If the package is installed locally, regardless of the date and compatibility with the current SDK version, the channel contains the value 100. If the package is located during the install or update phase, the channel contains the update value in the range 0.100.
PackageInfo
Package information. See IPackage.
PackageInfo(
name: String,
installed: Boolean = false,
incomplete: Boolean = false,
preinstalled: Boolean = false,
compatible: Boolean = true,
hasUpdate: Boolean = false,
updateStatus: PackageUpdateStatus
)
Package information. See IPackage.
val name
Localized package name.
val installed
Installation flag - true, if the package was selected for installation.
val incomplete
Installation pending flag - true, if there is no fully loaded version of the package (possibly incompatible with the current SDK version).
val preinstalled
A flag for pre-installed packages. Pre-installed packages are always installed and fully loaded, and cannot be removed.
val compatible
Compatibility flag - true, if the downloaded package is compatible with the current SDK version.
val hasUpdate
Indicator of an update availability - true, if there is an update for the downloaded package. It is possible, that during the process of updating to a new version, an even newer version of the package became available on the server. In this case, the value is true both during the update and upon completion.
val updateStatus
Package update status.
PackageManager
An interface for centralized package management:
- Managing auto-update and obtaining its status;
- Forced updates checking;
- Starting and stopping the installation/update of all available packages.
- Subscription to changes in information about packages;
- Subscription to changes in information about the overall installation progress of packages.
var autoupdateEnabled
Auto-update status (enabled/disabled).
val packagesChannel
A channel with a list of all known packages. Updated, if information about at least one of the packages or the list composition changes.
val packages
A channel with a list of all known packages. Updated if information about at least one of the packages or the list composition changes.
PackedMapState
Serialized map state.
@JvmStatic
fun of(position: CameraPosition, showTraffic: Boolean): PackedMapState
Getting the map state.
position
Camera position.
showTraffic
Status of displaying traffic score on the map.
Serialized map state.
@JvmStatic
fun fromBytes(data: ByteArray): PackedMapState
Getting the map state.
@JvmStatic
fun fromMap(map: Map): PackedMapState
Getting the map state.
PackedNavigationState
Helper object for serializing and deserializing navigation state.
PackedSearchQuery
A helper object for serializing and deserializing a search query.
fun toBytes(): ByteArray
fun toSearchQuery(): SearchQuery
@JvmStatic
fun fromBytes(data: ByteArray): PackedSearchQuery
Deserialization of a search query.
@JvmStatic
fun fromSearchQuery(searchQuery: SearchQuery): PackedSearchQuery
val queryText
Query text. For some queries (for example, expanding a category from a suggest), there is no text, because identifiers are stored in the query, and the behavior is different from searching the text of the suggest element.
val spatialRestriction
Geometry limiting the search area.
val areaOfInterest
Rectangular area of interest.
val allowedResultTypes
Restriction on object types returned by search.
val pageSize
Issue page size.
val directoryFilter
Information about active filters.
val sortingType
Type of sorting of results.
Padding
Camera padding.
Specified as an inward offset from the edges, in physical pixels. The paddings affect:
- the position point;
- animated map movement;
- the placement of dynamic map objects (such as route callouts).
Padding(
left: Int = 0,
top: Int = 0,
right: Int = 0,
bottom: Int = 0
)
Camera padding.
Specified as an inward offset from the edges, in physical pixels. The paddings affect:
- the position point;
- animated map movement;
- the placement of dynamic map objects (such as route callouts).
Page
Search results page.
fun fetchPrevPage(): Future<Page?>
Get the previous page of results.
Future that resolves into a non-null pointer to the previous page if the page was retrieved successfully. Future that resolves to a null pointer if there is no previous page. Exceptional future if an error occurred while fetching the page.
fun fetchNextPage(): Future<Page?>
Get the next page of results.
Future that resolves to a non-null pointer to the next page if the page is retrieved successfully. Future that resolves to a null pointer if there is no next page. Exceptional future if an error occurred while fetching the page.
val items
Non-empty set of reference objects for this page.
ParkingCapacity
Parking capacity.
ParkingCapacity(total: String?, specialSpaces: List<SpecialSpace>)
Parking capacity.
ParkingInfo
General parking information.
ParkingInfo(
type: ParkingType?,
purpose: ParkingPurpose,
access: ParkingAccess,
pavingType: ParkingPavingType?,
isPaid: Boolean,
isIncentive: Boolean,
forTrucks: Boolean,
levelCount: Short?,
capacity: ParkingCapacity?
)
General parking information.
type
purpose
access
pavingType
isPaid
isIncentive
forTrucks
levelCount
capacity
PedestrianBriefRouteInfo
Basic information about the pedestrian route.
PedestrianBriefRouteInfo(length: RouteDistance, landmark: String)
Basic information about the pedestrian route.
PedestrianInstructionCrossroad
Description of maneuvers when passing through an intersection or a pedestrian crossing.
PedestrianInstructionCrossroad(landmark: PedestrianInstructionCrossroadLandmark = PedestrianInstructionCrossroadLandmark.NONE, maneuvers: List<PedestrianInstructionCrossroadManeuver>)
Description of maneuvers when passing through an intersection or a pedestrian crossing.
PedestrianInstructionCrossroadManeuver
PedestrianInstructionCrossroadManeuver(direction: PedestrianInstructionCrossroadManeuverDirection = PedestrianInstructionCrossroadManeuverDirection.STRAIGHT, turnAngle: Int = 0)
PedestrianInstructionFinish
End of the pedestrian part of the route.
PedestrianInstructionFinish()
End of the pedestrian part of the route.
PedestrianInstructionIndoorEnter
Entrance to the building.
PedestrianInstructionIndoorEnter(levelId: LevelId = LevelId())
Entrance to the building.
levelId
PedestrianInstructionIndoorExit
Exit of the building.
PedestrianInstructionIndoorExit()
Exit of the building.
PedestrianInstructionIndoorFloorChange
Change of floors in the building.
PedestrianInstructionIndoorFloorChange(
type: PedestrianInstructionIndoorFloorChangeType = PedestrianInstructionIndoorFloorChangeType.UNDEFINED,
beginId: LevelId = LevelId(),
endId: LevelId = LevelId()
)
Change of floors in the building.
PedestrianInstructionStart
Beginning of the pedestrian part of the route.
PedestrianInstructionStart()
Beginning of the pedestrian part of the route.
PedestrianRouteSearchOptions
Pedestrian route search options.
PedestrianRouteSearchOptions(
avoidStairways: Boolean = false,
useIndoor: Boolean = true,
excludedAreas: List<ExcludedArea> = listOf()
)
Pedestrian route search options.
PerformSearchHandler
Suggested to search for a specific set of objects.
val searchQuery
Query to run through the search engine.
PlatformLocationFollowController
Location and compass tracking controller.
PlatformLocationFollowController(map: Map)
Creating a location tracking and compass controller.
map
PointGeometry
PointGeometryData
Geometry data of the point object.
PointGeometryData(geoPointWithElevation: GeoPointWithElevation)
geoPointWithElevation
fun match(geoPoint: Function1, geoPointWithElevation: Function1): T
fun toString(): String
fun hashCode(): Int
Polygon
PolygonGeometry
PolygonOptions
Polygon settings.
PolygonOptions(
contours: List<List<GeoPoint>>,
color: Color = Color(),
strokeWidth: LogicalPixel = LogicalPixel(value = 0.0f),
strokeColor: Color = Color(),
visible: Boolean = true,
userData: Any? = null,
zIndex: ZIndex = ZIndex(value = 0),
levelId: LevelId? = null
)
Polygon settings.
contours
color
strokeWidth
strokeColor
visible
userData
zIndex
levelId
Polyline
Polyline on the map.
PolylineGeometry
PolylineOptions
Polyline options.
PolylineOptions(
points: List<GeoPoint>,
width: LogicalPixel = LogicalPixel(value = 1.0f),
color: Color = Color(),
erasedPart: Double = 0.0,
dashedPolylineOptions: DashedPolylineOptions? = null,
gradientPolylineOptions: GradientPolylineOptions? = null,
visible: Boolean = true,
userData: Any? = null,
zIndex: ZIndex = ZIndex(value = 0),
levelId: LevelId? = null
)
Polyline options.
points
width
color
erasedPart
dashedPolylineOptions
gradientPolylineOptions
visible
userData
zIndex
levelId
val points
Points of a polyline.
val width
Polyline width.
val color
Primary color of the polyline.
val erasedPart
val dashedPolylineOptions
Dashed polyline options.
Dashed gradient line options are not currently supported, so if both dashed_polyline_options and gradient_polyline_options are present in PolylineOptions, then dashed_polyline_options is ignored when creating the polyline.
val gradientPolylineOptions
Gradient polyline options.
Dashed gradient line is currently not supported, so if both dashed_polyline_options and gradient_polyline_options are present in PolylineOptions, dashed_polyline_options is ignored when creating the polyline.
val visible
Polyline visibility.
val userData
User data.
val zIndex
Object drawing level.
val levelId
Link to the floor plan of the building.
Projection
Projection.
Uses the Mercator spherical projection (EPSG:3857), looped in longitude. Displayed data is limited in latitude from -85.06° to 85.06°.
fun screenToMap(point: ScreenPoint): GeoPoint?
Calculates a map point at the specified screen point.
The function returns an empty value if the specified screen point is outside the map projection.
fun mapToScreen(point: GeoPoint): ScreenPoint?
Calculating the screen point corresponding to the specified map point.
The function returns an empty value:
fun mapToScreen(point: GeoPointWithElevation): ScreenPoint?
Calculates the screen point corresponding to the specified map point with elevation.
The function returns an empty value:
- if the point has an invalid value (latitude is outside the range -90;90, longitude is outside the range -180;180, or elevation is negative).
- if the specified map point is above the projection plane of the map on the screen.
- if the specified map point is too far beyond the screen and the type overflow occurs.
fun screenToMapClipped(point: ScreenPoint): GeoPoint
Calculating the nearest map point to the projection of the specified screen point.
PublicBriefRouteInfo
Basic route information for public transport.
PublicBriefRouteInfo(publicTransportInfos: List<PublicBriefRouteTransportInfo>)
Basic route information for public transport.
publicTransportInfos
val publicTransportInfos
Description of ways to travel by public transport.
PublicBriefRouteTransportInfo
Description of the public transport type.
PublicBriefRouteTransportInfo(
type: PublicTransportType = PublicTransportType.BUS,
names: List<String>,
color: Int?,
routeLogo: String
)
Description of the public transport type.
val type
Public transport type.
val names
Names of public transport routes on which travel takes place.
val color
ARGB representation of the color associated with this type of public transport, for example, the color of a subway line. If there is no color information, the field will be null.
val routeLogo
Identifier of the icon for route stops. Empty string if information is not available. Technical field.
PublicRoutePart
Description of the section of the route by public transport.
PublicRoutePart(transports: List<PublicTransportInfo>, intermediateStops: List<PublicTransportStop>)
Description of the section of the route by public transport.
val transports
Types of public transport that can be used to travel this section of the route.
If the list is empty, then this section of the route is proposed to be overcome by personal or rented transport or on foot.
val intermediateStops
Intermediate stops that the transport will pass before reaching the transfer point.
Stops are sorted in the order they follow the route.
You do not need to get off at these stops.
Start and end stops are not included in this list.
PublicTransportCard
A card that displays information about a public transport route.
PublicTransportCard(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
A card that displays information about a public transport route.
fun onAttachedToWindow(): Unit
var model
PublicTransportCardModel
Model for PublicTransportCard.
PublicTransportCardModel(
route: TrafficRoute,
context: Context,
startName: String? = null,
finishName: String? = null
)
Model for PublicTransportCard.
PublicTransportInfo
Description of the public transport vehicle.
PublicTransportInfo(
type: PublicTransportType = PublicTransportType.BUS,
names: List<String>,
suggestedCarNumbers: List<Int>,
boardingSuggest: String,
color: Int?,
routeLogo: String
)
Description of the public transport vehicle.
type
names
suggestedCarNumbers
boardingSuggest
color
routeLogo
val type
Public transport type.
val names
Names of public transport routes on which travel takes place.
val suggestedCarNumbers
Numbers of wagons where boarding is recommended.
If the vehicle consists of one wagon or you can board any wagon, this list is empty.
val boardingSuggest
Text description of wagons recommended for boarding.
val color
ARGB representation of the color associated with this type of public transport, for example, the color of a subway line. If there is no color information, the field is null.
val routeLogo
Identifier of the icon for route stops. Empty string if information is not available. Technical field.
PublicTransportRouteSearchOptions
Public transport route search options.
PublicTransportRouteSearchOptions(
startTime: TimePoint? = null,
useSchedule: Boolean = false,
transportTypes: EnumSet<PublicTransportType> = EnumSet.noneOf(PublicTransportType::class.java)
)
Public transport route search options.
val startTime
The time in UTC for which the route should be built. If not set, the current time is used.
val useSchedule
Taking into account the timetable of public transport when building a route.
val transportTypes
Types of public transport. If not filled, routes are built for all supported types of public transport.
PublicTransportStop
Description of the public transport stop.
PublicTransportTransfer
Description of how to get to the next transfer point by public transport.
PublicTransportTransfer(
startPointName: String,
finishPointName: String,
routeParts: List<PublicRoutePart>
)
Description of how to get to the next transfer point by public transport.
val startPointName
The name of the point from which the movement for this section of the route begins.
val finishPointName
Destination name for this route segment.
val routeParts
Description of the route segment on public transport, which can be used to get to the next transfer point.
All route segments from this list follow the same geometry line.
If the list is empty, then this route segment it is proposed to overcome by personal or rented transport or on foot.
PublicTransportTransferRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): PublicTransportTransferRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<PublicTransportTransferRouteLongEntry>
Elements partially or completely covered by begin,end.
PublicTransportTransferRouteLongEntry
Extended route element - segment and value on it.
PublicTransportTransferRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: PublicTransportTransfer
)
Extended route element - segment and value on it.
RangeFilter
The filter for the value ranges.
RemainingRouteInfoControl
Navigator UI control that displays information about the remaining distance to the finish of the route and the time remaining on the route.
Remover
Object to remove user content.
fun remove(): Future<ActionResult>
Deleting content.
Action is available for content authored by the user.
RenderedObject
Map object to display.
RenderedObjectInfo
Detailed information about the displayed map object.
RenderedObjectInfo(
closestViewportPoint: ScreenPoint,
closestMapPoint: GeoPointWithElevation,
item: RenderedObject
)
Detailed information about the displayed map object.
Reviews
Reviews.
RoadCameraInfo
Camera information.
RoadCameraInfo(purposes: EnumSet<CameraPurpose>, speedLimit: Short?)
Camera information.
RoadEvent
Traffic event.
val type
Event type.
val name
Localized event name.
val author
Information about the user who added the event.
val timestamp
Timestamp of event creation.
val location
Event coordinates.
val description
Custom description of the traffic event.
val cameraInfo
Information about the camera.
Available for events of the "Camera" type only.
val schedule
Schedule.
Currently available for road blockings only, and may not even exist.
val lanes
Affected lanes.
Currently, only custom events can be set.
val availableActions
List of available actions with the event.
val remover
Getting the object to delete the event.
RoadEventAction
Event action.
fun set(): Future<ActionResult>
Apply an action (e.g. liking it, confirming an event).
There are opposite actions, such as "like" and "dislike". If both actions are available for an event, the method call resets the application of the opposite - it is impossible to put "like" and "dislike" at the same time.
fun reset(): Future<ActionResult>
Cancel an action (e.g. reset "like", reset confirmation of an event).
There are actions that are opposite of each other, for example "like" and "dislike". If both are available for an event action, calling the method does not cause the opposite action to be applied.
RoadEventActionButton
Action button for the road event (confirm, like, etc.).
RoadEventActionButton(model: RoadEventActionButtonModel, context: Context)
Action button for the road event (confirm, like, etc.).
val model
RoadEventActionInfo
Information about the action.
RoadEventActionInfo(state: RoadEventActionState, count: Int?)
Information about the action.
RoadEventCard
A card that displays information about a traffic event.
RoadEventCard(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
A card that displays information about a traffic event.
RoadEventCardModel
Traffic event card model.
RoadEventCardModel(
event: RoadEvent,
photoSize: StatefulChannel<ScreenSize>,
context: Context
)
Traffic event card model.
fun close(): Unit
val name
Name, e.g. "Overlap".
val description
Description, e.g. "Repair work".
val lanes
Affected lanes, e.g. "Left row, middle row".
val schedule
Schedule, for example, "October 10th 08:00 - October 15th 23:30".
val creationTime
Created time, e.g. "5 hours ago", "August 5", "December 10, 2020".
val author
Author, for example, "2GIS".
val photoChannel
Photo.
val actionCompletedChannel
Notification about completed action.
val removeCompletedChannel
Notification about completion of event removing.
val actions
Actions.
RoadEventManager
Object for creating transport events.
RoadEventManager(context: Context)
Getting an object for creating traffic events.
context
fun createAccident(
location: GeoPoint,
lanes: EnumSet<Lane>,
description: String
): Future<AddEventResult>
Creating an "Accident" event.
location
Event location.
lanes
Lanes of the road affected by the event.
description
Custom event description.
fun createCamera(location: GeoPoint, description: String): Future<AddEventResult>
Creating a "Camera" event.
location
Event location.
description
Custom event description.
fun createRoadRestriction(location: GeoPoint, description: String): Future<AddEventResult>
Creating a "Road closure" event.
location
Event location.
description
Custom event description.
fun createComment(location: GeoPoint, description: String): Future<AddEventResult>
Creating a "Comment" event.
location
Event location.
description
Custom event description.
fun createOther(
location: GeoPoint,
lanes: EnumSet<Lane>,
description: String
): Future<AddEventResult>
Create an "Other" event.
location
Event location.
lanes
Lanes of the road affected by the event.
description
Custom event description.
fun createRoadWorks(
location: GeoPoint,
lanes: EnumSet<Lane>,
description: String
): Future<AddEventResult>
Creating a "Road works" event.
location
Event location.
lanes
Lanes of the road affected by the event.
description
Custom event description.
RoadEventMapObject
Map object"Traffic event".
RoadEventPhoto
Photograph of a road event.
fun previewUrl(desiredSize: ScreenSize): String
Photo preview URL.
fun report(): Future<ActionResult>
Submitting a photo complaint.
Complaining your photo will get you nowhere.
RoadEventRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<RoadEventRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): RoadEventRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): RoadEventRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
RoadEventRouteEntry
Route element - point and value in it.
RoadEventRouteEntry(point: RoutePoint, value: BriefRoadEvent)
Route element - point and value in it.
RoadEventSource
Interface of the class that controls the display of traffic events (tUGC) on the map.
RoadEventSource(context: Context)
Create a source that displays traffic events on the map.
context
var visibleEvents
Getting the current categories of events provided by this source.
RoadMacroGraph
Global road graph package, used to build a passage between two loaded offline territories.
RoadRuleRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): RoadRuleRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<RoadRuleRouteLongEntry>
Elements partially or completely covered by begin,end.
RoadRuleRouteLongEntry
Extended route element - segment and value on it.
RoadRuleRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: RoadRule
)
Extended route element - segment and value on it.
RoadSubtypeRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): RoadSubtypeRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<RoadSubtypeRouteLongEntry>
Elements partially or completely covered by begin,end.
RoadSubtypeRouteLongEntry
Extended route element - segment and value on it.
RoadSubtypeRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: RoadSubtype
)
Extended route element - segment and value on it.
RoadSurfaceRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): RoadSurfaceRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<RoadSurfaceRouteLongEntry>
Elements partially or completely covered by begin,end.
RoadSurfaceRouteLongEntry
Extended route element - segment and value on it.
RoadSurfaceRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: RoadSurface
)
Extended route element - segment and value on it.
RoadTypeRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): RoadTypeRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<RoadTypeRouteLongEntry>
Elements partially or completely covered by begin,end.
RoadTypeRouteLongEntry
Extended route element - segment and value on it.
RoadTypeRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: RoadType
)
Extended route element - segment and value on it.
RotateMapToNorthEvent
RotationSettings
Settings for handling map rotation.
val angleDiffDeg
Angle change threshold, in degrees, after which it starts sending rotation messages. Used if scaling is inactive.
val distanceDiffMm
Threshold of mean radial shift of points, in millimeters, after which it starts sending rotation messages. Used if scaling is inactive.
val angleDiffInScalingDeg
Angle change threshold, in degrees, after which it starts sending rotation messages. Used if scaling is active.
val distanceDiffInScalingMm
Threshold of average point radial shift, in millimeters, after which it starts sending rotation messages. Used if scaling is active.
Route
A class that describes a route. A route is a set of attributes, each of which is a container of the RouteAttribute or the RouteLongAttribute type, which stores elements of route attributes. Route attributes are divided into point and length attributes. Point attributes (for example, geometry points or speed bumps) are specified as a pair of a RoutePoint and an attribute value. Long attributes (such as the width of a roadway or a speed limit) are specified as a pair of a RoutePoint specifying the beginning of the attribute's action and the attribute's value. A terminator is placed at the end of the route. For example, let the width of the roadway be given as a set of pairs {{0m, 3m}, {10m, 7m}, {20m, 5m}, {30m, 0m}}, then the first 10 meters of the route the carriageway has a width of 3 meters, at the interval [10m., 20m.) - 7m., from 20m. to the end of the route - 5m.
val geometry
Route geometry.
It is not guaranteed that the RoutePoint of geometry points will match the RoutePoint of other attribute elements, so in order to calculate the geographic coordinate of an attribute element, you do not need to search the geometry for an element RoutePoint of which matches the RoutePoint attribute element, calculate_geo_point should be used instead.
val instructions
Instructions to be followed on the route.
val intermediatePoints
Intermediate points through which the route passes. The route may not pass directly through the intermediate point, but near it. The attribute value stores the coordinate at which the intermediate point was set, the key contains the coordinate of the projection of the intermediate point onto the route.
val altitudes
Altitudes on the route.
val badRoads
Bad road (there are bumps and potholes on the road that impede the passage).
val obstacles
Obstacles on the route.
val roadNames
Road/street names.
val settlements
A sign that the route section passes through the settlement.
val transportTypes
Type of transport for which the route section is built.
val cameras
Road cameras.
val carriagewaysWidth
Width of the carriageway in meters. 0 - width is unknown.
val exitSigns
Exit signs.
val humps
Speed bumps.
val lanes
Traffic lanes.
val levels
Floors of buildings.
val maxSpeedLimits
Maximum allowed speed limits.
0 - speed limit is unknown.
val roadRules
Side of traffic.
val roadSubtypes
Additional description for the type of road the route is built for.
val roadSurfaces
Road cover.
val roadTypes
The type of road along which the route passws.
val tolls
Segments of the route that run along toll roads.
val truckData
A sign of the presence or absence of data for cargo navigation.
val truckPassZoneIds
Checkpoints for trucks.
val truckRestrictedAreas
A sign of the validity of the sign prohibiting of the trucks passage.
val vehicleRestrictedAreas
A sign of the validity of the sign prohibiting the passage of any vehicles (overlapping).
val publicTransportTransfers
Description of ways to travel by public transport between transfer points.
RouteBuildOptions
A structure that describes the parameters for building a route in the navigator.
RouteCamera
A structure describing a traffic camera.
RouteCamera(
purposes: EnumSet<RouteCameraPurpose>,
rangeAgainst: RouteDistance,
rangeAlong: RouteDistance,
direction: RouteCameraDirection
)
A structure describing a traffic camera.
purposes
rangeAgainst
rangeAlong
direction
RouteDistance
Distance along the route.
fun absoluteValue(): RouteDistance
operator fun plus(other: RouteDistance): RouteDistance
operator fun minus(other: RouteDistance): RouteDistance
RouteEditor
Interface for the route editor. The route editor obtains the starting and the finish points of the route, builds routes, and notifies about their updates and rebuilds via channels.
All methods of this interface are called from a single thread.
fun setRouteParams(routeParams: RouteEditorRouteParams): Unit
Setting route editor parameters. Starts searching for a new route according to the given parameters.
fun setActiveRouteIndex(index: RouteIndex): Unit
Set active route index.
val routesInfoChannel
A channel through which you can monitor updates about the routes operated by the editor.
val routesInfo
A channel through which you can monitor updates about the routes operated by the editor.
val activeRouteIndexChannel
A channel through which you can monitor active route index updates. If there are no routes, null is placed in this channel.
val activeRouteIndex
A channel through which you can monitor active route index updates. If there are no routes, null is placed in this channel.
RouteEditorRouteParams
Information about route parameters.
RouteEditorRouteParams(
startPoint: RouteSearchPoint,
finishPoint: RouteSearchPoint,
routeSearchOptions: RouteSearchOptions,
intermediatePoints: List<RouteSearchPoint> = listOf()
)
Information about route parameters.
startPoint
finishPoint
routeSearchOptions
intermediatePoints
RouteEditorRoutesInfo
Information about routes operated by the editor.
RouteEditorRoutesInfo(routes: List<TrafficRoute>, routeParams: RouteEditorRouteParams)
Information about routes operated by the editor.
val routes
When updating the list of routes, the first route is active, if the list of routes is not empty.
val routeParams
Parameters of the route that were searched for. May differ from the parameters passed to the editor if the routes were already found after the parameters were changed in the editor.
RouteEditorSource
Interface of the class that controls the display of routes on the map.
RouteEditorSource(
context: Context,
routeEditor: RouteEditor,
activeDisplayFlags: EnumSet?<RouteMapObjectDisplayFlag> = null,
inactiveDisplayFlags: EnumSet?<RouteMapObjectDisplayFlag> = null,
activeCalloutLabelFlags: EnumSet?<RouteMapObjectCalloutLabelFlag> = null,
inactiveCalloutLabelFlags: EnumSet?<RouteMapObjectCalloutLabelFlag> = null,
calloutLabelDisplayMode: RouteMapObjectCalloutLabelDisplayMode = RouteMapObjectCalloutLabelDisplayMode.ABSOLUTE_VALUES,
activePermanentDisplayFlags: EnumSet?<RouteMapObjectPermanentDisplayFlag> = null,
inactivePermanentDisplayFlags: EnumSet?<RouteMapObjectPermanentDisplayFlag> = null
)
Function to create IRouteEditorSource.
context
routeEditor
activeDisplayFlags
inactiveDisplayFlags
activeCalloutLabelFlags
inactiveCalloutLabelFlags
calloutLabelDisplayMode
activePermanentDisplayFlags
inactivePermanentDisplayFlags
fun setRoutesVisible(visible: Boolean): Unit
Enable or disable the routes display on the map.
fun setShowOnlyActiveRoute(showOnlyActiveRoute: Boolean): Unit
Show all routes on the map (false) or only the current active route (true).
fun setPassedDistanceVisualization(passedDistanceVisualization: RouteMapObjectPassedDistanceVisualization): Unit
Change how distance traveled along a route is visualized.
val objects
Route objects on the map.
val routeSourceSettings
Settings for displaying maneuvers on the route.
var activeDisplayFlags
Display flags for the active route. See IRouteMapObject::display_flags.
var inactiveDisplayFlags
Display flags for inactive routes. See IRouteMapObject::display_flags.
var activeCalloutLabelFlags
Flags enabling the display of content in callouts for inactive routes. See IRouteMapObject::callout_label_flags.
var inactiveCalloutLabelFlags
Flags enabling the display of content in callouts for inactive routes. See IRouteMapObject::callout_label_flags.
var calloutLabelDisplayMode
Display mode for values in route callouts. See IRouteMapObject::callout_label_display_mode.
var activePermanentDisplayFlags
Flags excluding the hiding of components of the active route from the map. See IRouteMapObject::permanent_display_flags.
var inactivePermanentDisplayFlags
Flags excluding the hiding of components of inactive routes from the map. See IRouteMapObject::permanent_display_flags.
RouteExitSign
Information about the exit sign.
RouteExitSign(
type: RouteExitSignType = RouteExitSignType.UNDEFINED,
roadNameTable: RouteExitSignTable,
roadNumberTable: RouteExitSignTable?
)
Information about the exit sign.
RouteExitSignRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<RouteExitSignRouteEntry>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): RouteExitSignRouteEntry?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): RouteExitSignRouteEntry?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
RouteExitSignRouteEntry
Route element - point and value in it.
RouteExitSignRouteEntry(point: RoutePoint, value: RouteExitSign)
Route element - point and value in it.
RouteExitSignTable
Information about the exit sign.
RouteExitSignTable(backgroundColor: RouteExitSignTableColor = RouteExitSignTableColor.UNDEFINED, text: String)
Information about the exit sign.
RouteIndex
Active route index.
RouteInfo
Route description with maneuvers.
val route
Route.
val routeBuildOptions
Route building parameters in the navigator. A null value means that the route has no finish point. In this case, based on the road graph and user movement parameters, a section of the road on which the user is likely to move is calculated and returned as a route in the route field. Therefore, such a "route" cannot contain instructions, and the last point in this "route" is not a destination where the user is moving to, but just a point where the navigator managed to predict the user's movement. Where they will go next is unknown. This navigation mode is called free roam.
RouteInfoCalloutMapObject
A callout object with information about the length and/or duration of the route on the map.
RouteInstruction
Instruction to follow the route.
RouteInstruction(
roadName: String,
range: RouteDistance,
extraInstructionInfo: ExtraInstructionInfo
)
Instruction to follow the route.
RouteLane
Structure describing one traffic lane.
RouteLane(
routeManeuver: RouteLaneManeuver = RouteLaneManeuver.UNDEFINED,
maneuvers: EnumSet<RouteLaneManeuver>,
speedLimit: Float = 0.0f,
prohibited: Boolean = false,
onlyPublicTransport: Boolean = false
)
Structure describing one traffic lane.
routeManeuver
maneuvers
speedLimit
prohibited
onlyPublicTransport
val routeManeuver
A maneuver that must be performed to move along the route.
val maneuvers
Permissible maneuvers on the runway.
val speedLimit
Maximum allowed speed on the lane m/s. 0 - speed limit unknown.
val prohibited
Traveling on the lane is prohibited.
val onlyPublicTransport
Public transport lane.
RouteLaneSign
Description of traffic lanes.
RouteLaneSign(
lanes: List<RouteLane>,
signStartPoint: RoutePoint?,
signPoint: RoutePoint?,
signEndPoint: RoutePoint?
)
Description of traffic lanes.
val lanes
Car lanes on a road section. Listed in order from curb to middle of carriageway.
If the number of lanes is unknown, or there is one lane on the road in the direction of the route, this array is empty.
val signStartPoint
The point on the route where the action of the sign regulating lane traffic begins. null if the position of the sign's action start is unknown.
val signPoint
The point on the route where the sign regulating lane traffic is placed. null if the position of the sign is unknown.
val signEndPoint
The point on the route where the action of the sign regulating lane traffic ends. null if the position the sign's action end is unknown.
RouteLevelInfo
Information about the floor of the building corresponding to the route section.
val beginId
Identifier of the floor plan at the starting point of the route segment. Missed if the point is not in a building.
val endId
Identifier of the floor plan at the finish point of the route segment. None if the point is not in a building.
val name
Name of the floor. Blank if the route segment connects different floors.
RouteLevelInfoRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): RouteLevelInfoRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<RouteLevelInfoRouteLongEntry>
Elements partially or completely covered by begin,end.
RouteLevelInfoRouteLongEntry
Extended route element - segment and value on it.
RouteLevelInfoRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: RouteLevelInfo
)
Extended route element - segment and value on it.
RouteMapObject
Route object on the map.
RouteMapObject(
route: TrafficRoute,
isActive: Boolean,
index: RouteIndex,
displayFlags: EnumSet?<RouteMapObjectDisplayFlag> = null,
calloutLabelFlags: EnumSet?<RouteMapObjectCalloutLabelFlag> = null,
calloutLabelDisplayMode: RouteMapObjectCalloutLabelDisplayMode = RouteMapObjectCalloutLabelDisplayMode.ABSOLUTE_VALUES,
permanentDisplayFlags: EnumSet?<RouteMapObjectPermanentDisplayFlag> = null
)
route
isActive
index
displayFlags
calloutLabelFlags
calloutLabelDisplayMode
permanentDisplayFlags
val displayFlagsChannel
A set of flags to display the various parts of the route. If not specified, display logic based on the activity status of the route is used.
var displayFlags
A set of flags to display the various parts of the route. If not specified, display logic based on the activity status of the route is used.
val permanentDisplayFlagsChannel
A set of flags to prevent various parts of the route from being hidden from the map when updating the distance traveled along the route. If not specified, then when updating the distance traveled along the route, all route elements that fall into the undisplayed part of the route are hidden from the map.
var permanentDisplayFlags
A set of flags to prevent various parts of the route from being hidden from the map when updating the distance traveled along the route. If not specified, then when updating the distance traveled along the route, all route elements that fall into the undisplayed part of the route are hidden from the map.
val isActiveChannel
Route activity status.
var isActive
Route activity status.
val route
Route.
val routeIndex
Route index in the route editor.
val passedDistanceChannel
Distance traveled along the route.
var passedDistance
Distance traveled along the route.
val passedDistanceVisualizationChannel
var passedDistanceVisualization
val calloutPositionChannel
Route callout position.
val calloutPosition
Route callout position.
val calloutLabelFlagsChannel
A set of flags for displaying the contents of the route callouts. If not specified, then both the time of movement along the route and its length are displayed for the active route, and only the time of movement for inactive routes.
var calloutLabelFlags
A set of flags for displaying the contents of the route callouts. If not specified, then both the time of movement along the route and its length are displayed for the active route, and only the time of movement for inactive routes.
val calloutLabelDisplayModeChannel
Mode for displaying values in route callouts. By default, values are displayed as absolute values.
var calloutLabelDisplayMode
Mode for displaying values in route callouts. By default, values are displayed as absolute values.
val lanesCalloutPositionsChannel
Lane callout positions. Only actual positions are returned for the current distance traveled along the route, and only if the source where the object is placed is in navigation mode.
val lanesCalloutPositions
Lane callout positions. Only actual positions are returned for the current distance traveled along the route, and only if the source where the object is placed is in navigation mode.
RouteMapObjectSource
Source of route features on the map.
RouteMapObjectSource(context: Context, routeVisualizationType: RouteVisualizationType = RouteVisualizationType.NORMAL)
Function to create IRouteMapObjectSource.
fun addObject(item: RouteMapObject): Unit
Adding a route object to the source.
fun removeObject(item: RouteMapObject): Unit
Removing the route object from the source.
fun replaceAllObjects(objects: List<RouteMapObject>): Unit
Replacing all objects previously added to the source with the passed list of objects. In contrast to deleting and adding objects one at a time, the replacement is performed atomically - old routes are deleted, and new routes appear on the map at the same time.
RouteMapSettings
Settings for displaying the route on the map.
var onRouteDisplayFlags
Flags for displaying the route on the map for the route follow mode. By default, all flags are enabled except for the InactiveFloors flag.
var freeRoamDisplayFlags
Flags for displaying the route on the map for the free roam mode. The flags Cameras, Humps, Accidents, RoadWorks, Comments, RoadRestrictions, OtherEvents are enabled by default.
var onRoutePermanentDisplayFlags
Flags to prevent hiding various parts of the route from the map when updating the distance traveled along the route for route guidance mode. By default, all route elements are hidden.
var freeRoamPermanentDisplayFlags
Flags that prevent hiding various parts of the route from the map when updating the distance traveled along the route for free roam mode. By default, all route elements are hidden.
RouteOverviewControl
RoutePoint
Point on the route, specified as the distance along the route from the beginning of the route.
RoutePoint(distance: RouteDistance)
Point on the route, specified as the distance along the route from the beginning of the route.
distance
operator fun plus(distance: RouteDistance): RoutePoint
operator fun minus(distance: RouteDistance): RoutePoint
val distance
RoutePointMapObject
A feature that is part of a route on the map (for example, the starting or the finish point of a route).
val route
The route, the part of which the given feature represents.
val routeIndex
Route index.
val kind
Route feature type.
val routePoint
Position on the route corresponding to the given feature.
val pointChannel
Geographic coordinates at which this feature is located.
var point
Geographic coordinates at which this feature is located.
RouteSearchOptions
Route search options.
RouteSearchOptions(pedestrian: PedestrianRouteSearchOptions)
pedestrian
RouteSearchOptions(publicTransport: PublicTransportRouteSearchOptions)
publicTransport
fun match(
bicycle: Function1,
car: Function1,
pedestrian: Function1,
publicTransport: Function1,
scooter: Function1,
taxi: Function1,
truck: Function1
): T
bicycle
car
pedestrian
publicTransport
scooter
taxi
truck
fun toString(): String
fun hashCode(): Int
RouteSearchPoint
Description of the points by which the route is built.
RouteSearchPoint(
coordinates: GeoPoint,
course: Bearing? = null,
objectId: DgisObjectId = DgisObjectId(objectId = 0, entranceId = 0),
levelId: LevelId? = null
)
Description of the points by which the route is built.
RouteSourceSettings
Route source settings.
fun getLargeScaleMergeDistanceMeters(transportType: TransportType): Float
Minimum allowable distance in meters between successive maneuver arrows for a large scale. If the distance is less than the specified one, then the arrows are merged.
fun setLargeScaleMergeDistanceMeters(distance: Float, transportType: TransportType): Unit
Set the minimum allowed distance in meters between successive maneuver arrows for large scale.
distance
Distance in meters.
transportType
Type of transport for which the distance is set.
fun getSmallScaleMergeDistanceMeters(transportType: TransportType): Float
Minimum allowable distance in meters between successive maneuver arrows for a small scaling. If the distance is less than the specified one, the arrows are merged.
fun setSmallScaleMergeDistanceMeters(distance: Float, transportType: TransportType): Unit
Set the minimum allowable distance in meters between successive maneuver arrows for small scaling.
distance
Distance in meters.
transportType
Type of transport for which the distance is set.
fun getLargeScaleCrossroadsOffsetMeters(transportType: TransportType): Float
Offset in meters from the intersection point to the start and end of the large scale maneuver arrow.
fun setLargeScaleCrossroadsOffsetMeters(offset: Float, transportType: TransportType): Unit
Set the offset in meters from the intersection point to the start and end of the maneuver arrow for the large scale. Allows you to set the size of the maneuver arrow.
offset
Offset in meters.
transportType
Transport type for which the offset is set.
fun getSmallScaleCrossroadsOffsetMeters(transportType: TransportType): Float
Offset from the intersection point to the start and end of the maneuver arrow for the small scale.
fun setSmallScaleCrossroadsOffsetMeters(offset: Float, transportType: TransportType): Unit
Set the offset from the intersection point to the start and end of the maneuver arrow for the small scale. Allows you to set the size of the maneuver arrow.
offset
Offset in meters.
transportType
Transport type for which the offset is set.
var largeScaleRingroadOffsetMeters
Offset from the roundabout exit point to the start and end of the maneuver arrow for large scale. Allows you to set the size of the maneuver arrow.
var smallScaleRingroadOffsetMeters
Offset from the roundabout exit point to the beginning and end of the maneuver arrow for small scale. Allows you to set the size of the maneuver arrow.
var calloutVisualizationMode
Mode for displaying callouts with time and route length.
ScaleMapEvent
Map scale change event.
ScaleMapEvent(zoomDelta: Float, scalingCenter: ScreenPoint? = null)
Zoom event constructor.
zoomDelta
Amount by which the current zoom value changes.
scalingCenter
The point on the screen around which the map is scaled. If no point is given, then scaling is relative to the map's position point.
ScalingSettings
val scaleRatioThreshold
Scaling factor threshold at which a scaling event is sent. Used if rotation is inactive. The multiplier must be out of bounds (1 / scale_ratio_threshold, scale_ratio_threshold).
val scaleRatioThresholdInRotation
Scaling factor threshold at which scaling messages is sent. Used if rotation is active. The multiplier must be out of bounds (1 / scale_ratio_threshold_in_rotation, scale_ratio_threshold_in_rotation).
Schedule
Traffic event schedule.
Schedule(
startTime: TimePoint?,
finishTime: TimePoint?,
weekTimeIntervals: List<WeekTimeInterval>
)
Traffic event schedule.
ScooterBriefRouteInfo
Basic information about the scooter route.
ScooterBriefRouteInfo(length: RouteDistance, landmark: String)
Basic information about the scooter route.
ScooterInstructionCrossroad
Description of maneuvers when passing through an intersection or a pedestrian crossing.
ScooterInstructionCrossroad(landmark: ScooterInstructionCrossroadLandmark = ScooterInstructionCrossroadLandmark.NONE, maneuvers: List<ScooterInstructionCrossroadManeuver>)
Description of maneuvers when passing through an intersection or a pedestrian crossing.
ScooterInstructionCrossroadManeuver
ScooterInstructionCrossroadManeuver(direction: ScooterInstructionCrossroadManeuverDirection = ScooterInstructionCrossroadManeuverDirection.STRAIGHT, turnAngle: Int = 0)
ScooterInstructionFinish
End of the scooter part of the route.
ScooterInstructionFinish()
End of the scooter part of the route.
ScooterInstructionStart
The beginning of the scooter part of the route.
ScooterInstructionStart()
The beginning of the scooter part of the route.
ScooterRouteSearchOptions
Scooter route search options.
ScooterRouteSearchOptions(
avoidCarRoads: Boolean = true,
avoidStairways: Boolean = true,
avoidUnderpassesAndOverpasses: Boolean = true,
excludedAreas: List<ExcludedArea> = listOf()
)
Scooter route search options.
avoidCarRoads
avoidStairways
avoidUnderpassesAndOverpasses
excludedAreas
ScreenDistance
The distance between objects on the screen in millimeters.
Cannot be negative
ScreenDistance(value: Float = 0.0f)
The distance between objects on the screen in millimeters.
Cannot be negative
value
ScreenPoint
The point in screen coordinates.
Directions of axes: x - rightwards, y - downwards. (0.0, 0.0) - the upper left corner of the upper left pixel. The integer part of the coordinate is the pixel number, the fractional part is the relative position within the pixel.
ScreenPoint(x: Float = 0.0f, y: Float = 0.0f)
The point in screen coordinates.
Directions of axes: x - rightwards, y - downwards. (0.0, 0.0) - the upper left corner of the upper left pixel. The integer part of the coordinate is the pixel number, the fractional part is the relative position within the pixel.
ScreenShift
The horizontal and the vertical offset of the map in the coordinate space of the screen.
Positive offset direction: dx - to the right, dy - down.
ScreenSize
Size in pixels.
SearchManager
Search engine. Main entry point for the help API.
fun suggest(query: SuggestQuery): Future<SuggestResult>
Get suggestions matching the given query.
query
Future that resolves to a non-null pointer to the result of suggestion or exceptional future if an error occurred while getting suggestions.
fun search(query: SearchQuery): Future<SearchResult>
Get directory objects matching the given request.
query
Future that resolves to a non-null pointer to the search result or exceptional future if an error occurred while getting the search results.
fun searchById(id: String): Future<DirectoryObject?>
Get the reference object by string identifier.
id
Future that resolves to a pointer to a reference object. If the object is not found, a null pointer is returned.
fun searchByDirectoryObjectId(objectId: DgisObjectId): Future<DirectoryObject?>
Get the reference object by identifier.
objectId
Future that resolves to a pointer to a reference object. If the object is not found, a null pointer is returned.
@JvmStatic
fun createOnlineManager(context: Context): SearchManager
Create an online search engine.
@JvmStatic
fun createOfflineManager(context: Context): SearchManager
Create a search engine that works with preloaded data.
@JvmStatic
fun createSmartManager(context: Context): SearchManager
Create a search engine that works online or with preloaded data depending on the presence of Internet connection.
SearchQuery
Search query.
SearchQueryBuilder
Search query builder. The search is performed on the global index and local segment indexes, where a segment is a subdivision of the global map. The process of selecting segments for search is done as follows (in descending priority order):
TODO: This condition is not working yet. It will be fixed in upcoming releases.
fun setSpatialRestriction(spatialRestriction: List?<GeoPoint>): SearchQueryBuilder
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.
No limit by default.
fun setAreaOfInterest(rect: GeoRect?): SearchQueryBuilder
Set a rectangular region of interest in geographic coordinates. A typical value is visible_rect from ICamera - the enclosing rectangle of the viewing area.
fun setAllowedResultTypes(allowedResultTypes: List<ObjectType>): SearchQueryBuilder
Set the object types allowed in the query result.
By default is all except Route
fun setPageSize(pageSize: Int): SearchQueryBuilder
Set your preferred number of elements on the results page. Valid values are 1;50
default 10
fun setDirectoryFilter(filter: DirectoryFilter): SearchQueryBuilder
Set filtering for the search query.
fun setSortingType(sortingType: SortingType): SearchQueryBuilder
Set sorting for the search query.
@JvmStatic
fun fromQueryText(queryText: String): SearchQueryBuilder
Start building a text search query with the specified text.
@JvmStatic
fun fromQuery(query: SearchQuery): SearchQueryBuilder
Start building a query based on #query to change some of the parameters.
The original #query remains unchanged
SearchResult
The result of the search engine.
fun markerTitles(objectIds: List<DgisObjectId>): List<Future<List<UIMarkerInfo>>>
Getting texts of markers by their IDs. A vector <future
is returned, because no more than 50 IDs per request can be sent to the cloud.
val firstPage
First page of search results.
val representativeArea
A rectangular area suitable for displaying search results.
val itemMarkerInfos
Asynchronous receipt of markers.
val searchResultType
Search query type.
val dynamicFilters
The dynamic filters for this query.
val autoUseFirstResult
Indicates that the first result is suitable for direct use.
SegmentGeoPoint
Describes a geographic point on a segment and the direction of the segment. The geometry of the route is a sequence of points that form segments pairwise. In all functions that work with the geometry of the route, it is assumed that the first point from the pair forming the segment belongs to this segment, and the second one does not: [point_1, point_2),[point_2, point_3),...,[point_n-1, point_n)point_last. The last point forms a zero-length segment with itself. Thus, each point on the route belongs to exactly one segment. The direction of the point_last is not defined.
SegmentGeoPoint(point: GeoPoint, bearing: Bearing)
Describes a geographic point on a segment and the direction of the segment. The geometry of the route is a sequence of points that form segments pairwise. In all functions that work with the geometry of the route, it is assumed that the first point from the pair forming the segment belongs to this segment, and the second one does not: [point_1, point_2),[point_2, point_3),...,[point_n-1, point_n)point_last. The last point forms a zero-length segment with itself. Thus, each point on the route belongs to exactly one segment. The direction of the point_last is not defined.
SettlementRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, beginning at which the next element's attribute action begins.
fun entry(point: RoutePoint): SettlementRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<SettlementRouteLongEntry>
Elements partially or completely covered by begin,end.
SettlementRouteLongEntry
Extended route element - segment and value on it.
SettlementRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: Settlement
)
Extended route element - segment and value on it.
ShowRouteControl
A control that controls the map flyover to the route.
SimpleClusterObject
Cluster of simple marker objects.
val position
Getting the position of the cluster on the map.
val objectCount
Getting the number of tokens in the cluster.
val objects
Getting a list of markers in the cluster.
var anchor
Getting and setting the anchor point of the cluster icon.
var iconOpacity
Getting and setting the transparency of the cluster icon.
var text
Getting and setting cluster signature.
var textStyle
Getting and setting the cluster signature style.
var iconWidth
Getting and setting the target cluster width used for scaling.
var iconMapDirection
Getting and setting the rotation angle of the cluster on the map relative to the north direction, clockwise.
var animatedAppearance
Getting and setting the cluster spawn animation flag.
var zIndex
Getting and setting the rendering level of an object.
SimpleClusterOptions
Marker settings for a cluster of simple marker objects.
SimpleClusterOptions(
icon: Image?,
iconMapDirection: MapDirection? = null,
anchor: Anchor = Anchor(x = 0.5f, y = 0.5f),
text: String? = null,
textStyle: TextStyle? = null,
iconOpacity: Opacity = Opacity(value = 1.0f),
iconWidth: LogicalPixel = LogicalPixel(value = 0.0f),
userData: Any? = null,
zIndex: ZIndex = ZIndex(value = 0),
animatedAppearance: Boolean = true
)
Marker settings for a cluster of simple marker objects.
icon
iconMapDirection
anchor
text
textStyle
iconOpacity
iconWidth
userData
zIndex
animatedAppearance
SimpleMapObject
Object on the map for which visibility can be set.
SimulationAutoWithOverSpeed
Structure for setting the motion mode, taking into account the maximum speed on the edge of the route.
SimulationConstantSpeed
Structure for setting the simulation mode at a constant speed.
SimulationSettings
Settings for route following simulation.
var speedMode
Simulator mode.
SimulationSpeedMode
SnapToMapLayout
Layout that allows you to bind the View to a point on the map.
SnapToMapLayout(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Layout that allows you to bind the View to a point on the map.
fun onAttachedToWindow(): Unit
fun onDetachedFromWindow(): Unit
fun onLayout(
changed: Boolean,
left: Int,
top: Int,
right: Int,
bottom: Int
): Unit
fun generateLayoutParams(attrs: AttributeSet?): LayoutParams?
fun generateLayoutParams(p: LayoutParams?): LayoutParams?
SoundNotificationSettings
Settings for Sound Alerts in the Navigator By default, all values of the alert sound categories are enabled. The user can change the values while working with the Navigator.
Source
Data source for the map.
This can be a source of traffic data, routes, markers, arbitrary geometric or other map objects. Any map object can have its own properties. The object properties affect which rules and display parameters, described in map styles, are applied to it. Style is a set of parameters and rules for displaying map objects, obtained through the style editor and used for rendering the map.
The object properties can be set:
- directly for the object;
- for the data source (all objects added to the source obtain these properties);
- for the map (all objects added to the map obtain these properties);
- for the style (all objects to which the style is applied obtain these properties). The list is presented in descending order of priority for applying properties. Even if no data sources are added to the map, the style and map properties still affect the map, since there are special displayable objects such as background.
SpecialSpace
Special parking spot.
SpecialSpace(
type: SpecialSpaceType,
name: String,
count: String?
)
Special parking spot.
SpeedInfoControl
SpeedRange
Velocity interval. Velocities are specified in meters per second.
SpeedRangeToStyleZoom
Mapping of speed intervals to style zoom.
StringRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): StringRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<StringRouteLongEntry>
Elements partially or completely covered by begin,end.
StringRouteLongEntry
Extended route element - segment and value on it.
StringRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: String
)
Extended route element - segment and value on it.
Style
Style with a set of map object properties (see ISource).
val styleAttributes
Getting default properties for objects that have the specified layer applied to them.
StyleBuilder
Style Builder.
fun setStyleAttribute(name: String, value: AttributeValue): StyleBuilder
StyleLayerId
ID of the style layer.
StyleZoom
Style zoom level.
It is set in the style editor and differs from the usual zoom level in that for one StyleZoom the map scale is the same regardless of latitude. However, with Zoom < 9 or with latitude > 60 degrees StyleZoom == Zoom and map scale is different at different latitudes.
StyleZoom cannot be negative.
StyleZoom(value: Float = 0.0f)
Style zoom level.
It is set in the style editor and differs from the usual zoom level in that for one StyleZoom the map scale is the same regardless of latitude. However, with Zoom < 9 or with latitude > 60 degrees StyleZoom == Zoom and map scale is different at different latitudes.
StyleZoom cannot be negative.
value
StyleZoomFollowController
Controller for tracking the style zoom level of the map.
StyleZoomFollowController(map: Map)
Creating of the controller for tracking the style zoom level of the map.
map
fun setStyleZoom(styleZoom: StyleZoom): Unit
Setting a new value for the style zoom level.
fun setStyleZoomRange(minStyleZoom: StyleZoom, maxStyleZoom: StyleZoom): Unit
Setting the range of acceptable values for the style zoom level.
Suggest
Search suggestion.
SuggestHandler
Suggestion selection handler.
SuggestHandler(performSearchHandler: PerformSearchHandler?)
performSearchHandler
SuggestHandler(incompleteTextHandler: IncompleteTextHandler?)
incompleteTextHandler
fun match(
objectHandler: Function1,
performSearchHandler: Function1,
incompleteTextHandler: Function1
): T
objectHandler
performSearchHandler
incompleteTextHandler
fun toString(): String
fun hashCode(): Int
SuggestObjectHandler
Specific reference object suggested.
val item
Suggested object.
SuggestQuery
Request a search suggestion.
SuggestQueryBuilder
Query builder for suggester.
fun setSpatialRestriction(spatialRestriction: List?<GeoPoint>): SuggestQueryBuilder
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.
No limit by default
fun setAreaOfInterest(rect: GeoRect?): SuggestQueryBuilder
Set a rectangular region of interest in geographic coordinates. A typical value is visible_rect from ICamera - the enclosing rectangle of the viewport.
fun setAllowedResultTypes(allowedResultTypes: List<SuggestedType>): SuggestQueryBuilder
Set the object types allowed in the query result.
By default is all except Route
fun setSuggestorType(suggestorType: SuggestorType): SuggestQueryBuilder
Set the type of suggester.
The default value is #SuggestorType::General
fun setLimit(limit: Int): SuggestQueryBuilder
Set the desired number of suggestions. Valid values are from the range 1;50
default 10
@JvmStatic
fun fromQueryText(queryText: String): SuggestQueryBuilder
Start building a suggestion query for the given text and the area of interest.
@JvmStatic
fun fromQuery(query: SuggestQuery): SuggestQueryBuilder
Start building a suggestion query based on #query to change some of the parameters.
The original #query remains unchanged.
SuggestResult
The result of the suggester's work.
val suggests
A set of suggestions.
The set is empty if no matching suggestions are found.
SystemCertificate
System SSL certificate.
SystemCertificate()
System SSL certificate.
SystemMemoryManager
Interface of the system memory management.
fun reduceMemoryUsage(): Unit
Memory usage decrease by clearing various caches and buffers.
TaxiRouteSearchOptions
Taxi route search options.
TaxiRouteSearchOptions(car: CarRouteSearchOptions)
Taxi route search options.
val car
Route search options shared with other vehicles.
TerritoriesAlongRouteProvider
Interface for finding a route based on traffic data.
fun getTerritories(route: Route): Future<List<Territory>>
Returns the minimum required list of offline territories in route order.
Territory
Territory. Data in 2GIS is divided into some indivisible units called segments. For more convenient and flexible work with data, not segments themselves are used for updating, but their sets, called territories. Sets of segments in two territories can intersect, in including one territory may be entirely nested within another.
TerritoryManager
An interface for interacting with the list of territories: Subscriptions to changes in information about territories; Search for territories by coordinates and geometries; Subscriptions to changes in information about the overall progress of installing/updating territories; Pausing and resuming the process of installing/updating territories.
val territoriesChannel
A channel with a list of all known territories. Updated when information about at least one of the territories or the list composition changes. The channel's contents is a subset of the general package list obtained from IPackageManager::packages. To avoid desynchronization of package descriptions, do not use data obtained simultaneously from multiple channels containing subsets of the general package list.
val territories
A channel with a list of all known territories. Updated when information about at least one of the territories or the list composition changes. The channel's contents is a subset of the general package list obtained from IPackageManager::packages. To avoid desynchronization of package descriptions, do not use data obtained simultaneously from multiple channels containing subsets of the general package list.
TextStyle
Text appearance settings.
TextStyle(
fontSize: LogicalPixel = LogicalPixel(value = 8.0f),
color: Color = Color(),
strokeWidth: LogicalPixel = LogicalPixel(value = 0.34999999f),
strokeColor: Color = Color(argb = 4294967295.toInt()),
textPlacement: TextPlacement = TextPlacement.BOTTOM_CENTER,
textOffset: LogicalPixel = LogicalPixel(value = 0.0f),
fontName: String? = null
)
Text appearance settings.
fontSize
color
strokeWidth
strokeColor
textPlacement
textOffset
fontName
Tilt
Tilt angle in degrees, where 0 is nadir (looking vertically down), 90 is horizon in front.
Values in the range of 0 to 60 degrees are allowed. In cases where the camera position point is closer to the bottom of the screen, the value may be additionally reduced.
Tilt(value: Float = 0.0f)
Tilt angle in degrees, where 0 is nadir (looking vertically down), 90 is horizon in front.
Values in the range of 0 to 60 degrees are allowed. In cases where the camera position point is closer to the bottom of the screen, the value may be additionally reduced.
value
TiltFollowController
Controller for tracking the angle of the map.
TiltFollowController()
Creating a map angle tracking controller.
TiltSettings
val lenOnDegreeMm
Distance, in mm, that you need to slide your fingers across the screen to change the camera angle by 1 degree. A negative value will invert the direction. A value of 0 is invalid.
val horizontalSwerveDeg
Maximum allowable deviation of the finger line from the horizon for a vertical swipe. In degrees.
val verticalSwerveDeg
Maximum allowable angle of deviation of the swipe direction from the vertical line. In degrees.
val thresholdMm
Weighted average point shift threshold, in millimeters, if the shift does not exceed the threshold, then the event is not sent.
TimePoint
A class representing a point in time.
TimePoint(timeFromEpoch: Duration)
A class representing a point in time.
timeFromEpoch
fun toString(): String
@JvmStatic
fun ofEpochMilliseconds(milliseconds: Long): TimePoint
@JvmStatic
fun now(): TimePoint
Traffic
Description of the traffic data.
TrafficAndParkingControl
Container with controls for displaying parking lots and traffic jams.
TrafficCollector
Interface for managing traffic information collection service.
This interface is thread-safe.
TrafficCollector(context: Context)
The function of creating a service for collecting information about traffic. The service for collecting information about traffic analyzes the state of traffic on the road where the user is moving and sends the results of the analysis to the server in anonymized form .
context
Context - the environment required for the SDK to work.
TrafficControl
Traffic jam control. It is a button that switches the visibility of traffic jams on the map. The control visually displays the traffic jam score, which also affects color: green - low level of traffic, yellow - medium, red - high. The appearance of the control changes depending on the state, see TrafficControlStatus for details.
TrafficControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Traffic jam control. It is a button that switches the visibility of traffic jams on the map. The control visually displays the traffic jam score, which also affects color: green - low level of traffic, yellow - medium, red - high. The appearance of the control changes depending on the state, see TrafficControlStatus for details.
TrafficControl
Traffic score control. It is a button that switches the visibility of traffic jams on the map. The control visually displays the traffic jam score, which also affects color: green - low level of traffic, yellow - medium, red - high. The appearance of the control changes depending on the state, see TrafficControlStatus for details.
TrafficControlModel
Traffic control model.
This interface is thread-safe.
fun onClicked(): Unit
Action when clicking on the control. Toggles the visibility of traffic jams on the map.
TrafficControlState
Traffic control status.
TrafficControlState(status: TrafficControlStatus = TrafficControlStatus.HIDDEN, score: Int?)
Traffic control status.
TrafficLineControl
A control that displays the level of traffic along the route.
var pointObjectsPosition
TrafficLinePointObject
TrafficLinePointObjectView
TrafficRoute
TrafficRouter
Interface for finding a route based on traffic data.
fun findRoute(
startPoint: RouteSearchPoint,
finishPoint: RouteSearchPoint,
routeSearchOptions: RouteSearchOptions,
intermediatePoints: List<RouteSearchPoint> = listOf()
): Future<List<TrafficRoute>>
Looks for a route with the given parameters.
startPoint
The starting point of the route.
finishPoint
The finish point of the route.
routeSearchOptions
Route search options.
intermediatePoints
Intermediate points to pass in the same order in which the points are given in the vector.
Future with a set of found routes, or throw a NativeException on failure.
An empty route set is a valid result, meaning that a route matching the specified search criteria cannot be found.
When searching for routes for freight transport, it is possible to return routes passing through the access zones for which passes were not provided, if it was not possible to route only through the access zones for which the passes were provided. To check if the list of passes is sufficient to pass a route, use the route_matches_truck_pass_zone_passes function.
fun findBriefRouteInfos(searchPoints: List<BriefRouteInfoSearchPoints>, routeSearchOptions: RouteSearchOptions): Future<List<BriefRouteInfo?>>
Searching for basic route information for a matching set of search points.
searchPoints
A set of points for finding basic information about the route.
routeSearchOptions
Future with basic information about the set of routes corresponding to the set of search points, or throwing a NativeException on failure.
If the basic information for any of the pairs of points is not found, the element at the corresponding index in the returned result is null.
val truckPassZonePasses
Returns a list of all supported passes that allow truck traffic within the pass zones.
TrafficScore
Traffic score.
TrafficScore(state: TrafficScoreState = TrafficScoreState.PENDING, value: Int?)
Traffic score.
TrafficScoreProvider
Subscribe to traffic updates.
This interface is thread-safe.
TrafficScoreProvider(map: Map)
A function for creating an object for tracking the traffic score in the map visibility area.
map
The map for which the area of visibility is tracked.
TrafficSource
Interface of the class that controls the display of traffic score on the map.
TrafficSpeedColorRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): TrafficSpeedColorRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<TrafficSpeedColorRouteLongEntry>
Elements partially or completely covered by begin,end.
TrafficSpeedColorRouteLongEntry
Extended route element - segment and value on it.
TrafficSpeedColorRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: TrafficSpeedColor
)
Extended route element - segment and value on it.
TransportTypeRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): TransportTypeRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<TransportTypeRouteLongEntry>
Elements partially or completely covered by begin,end.
TransportTypeRouteLongEntry
Extended route element - segment and value on it.
TransportTypeRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: TransportType
)
Extended route element - segment and value on it.
TruckPassZoneId
Identifier of the pass zone for trucks. The 0 value means no pass zone.
TruckPassZoneId(value: Int = 0)
Identifier of the pass zone for trucks. Value 0 means no pass zone.
value
TruckPassZoneIdRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): TruckPassZoneIdRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<TruckPassZoneIdRouteLongEntry>
Elements partially or completely covered by begin,end.
TruckPassZoneIdRouteLongEntry
Extended route element - segment and value on it.
TruckPassZoneIdRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: TruckPassZoneId
)
Extended route element - segment and value on it.
TruckPassZonePass
Pass allowing the movement of trucks in the checkpoints.
TruckPassZonePass(
id: TruckPassZonePassId,
name: String,
passZoneIds: Set<TruckPassZoneId>
)
Pass allowing the movement of trucks in the checkpoints.
TruckPassZonePassId
Identifier of a pass that allows the movement of trucks in the checkpoints.
TruckPassZonePassId(value: Int = 0)
Identifier of a pass that allows the movement of trucks in the checkpoints.
value
TruckRouteSearchOptions
Parameters for finding a truck route. When searching for a route, only filled-in parameters are taken into account.
TruckRouteSearchOptions(
car: CarRouteSearchOptions,
truckLength: Int? = null,
truckHeight: Int? = null,
truckWidth: Int? = null,
actualMass: Int? = null,
maxPermittedMass: Int? = null,
axleLoad: Int? = null,
dangerousCargo: Boolean = false,
explosiveCargo: Boolean = false,
passIds: Set<TruckPassZonePassId> = setOf(),
fallbackOnCar: Boolean = false
)
Parameters for finding a truck route . When searching for a route, only filled-in parameters are taken into account.
val car
Route search options shared with other vehicles.
val truckLength
Length of the truck in millimeters.
val truckHeight
Height of the truck in millimeters.
val truckWidth
Width of the truck in millimeters.
val actualMass
Actual weight of the truck in kilograms.
val maxPermittedMass
Maximum authorized mass of a truck in kilograms.
val axleLoad
Axle load in kilograms.
val dangerousCargo
A sign of the presence of dangerous goods.
val explosiveCargo
A sign of the presence of explosive cargo.
val passIds
Identifiers of the user's passes required for moving within the access zones.
val fallbackOnCar
Use automatic fallback from truck route search to car route search, if you cannot find a truck route that matches the search parameters.
UIMarkerInfo
Object ID with signature.
UIMarkerInfo(objectId: DgisObjectId, label: String?)
Object ID with signature.
UIntRouteLongAttribute
A container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. Attribute action starts at this point and ends at the next point, at which the next element's attribute action begins.
fun entry(point: RoutePoint): UIntRouteLongEntry?
The element that the specified point falls into.
fun entries(begin: RoutePoint, end: RoutePoint): List<UIntRouteLongEntry>
Elements partially or completely covered by begin,end.
UIntRouteLongEntry
Extended route element - segment and value on it.
UIntRouteLongEntry(
point: RoutePoint,
length: RouteDistance,
value: Int
)
Extended route element - segment and value on it.
VendorConfig
Override SDK configuration.
VendorConfig()
fun match(
none: Function0<T>,
fromAsset: Function1,
fromFile: Function1,
fromString: Function1
): T
none
fromAsset
fromFile
fromString
fun toString(): String
fun hashCode(): Int
VendorConfigFromAsset
Overriding SDK settings by specifying the path to an Android app asset.
VendorConfigFromAsset(path: String)
Overriding SDK settings by specifying the path to an Android app asset.
path
VendorConfigFromFile
Override SDK settings by specifying a path to a file in the file system of the device.
VendorConfigFromFile(path: String)
Override SDK settings by specifying a path to a file in the file system of the device.
path
VendorConfigFromString
Override SDK settings by specifying the file content.
VendorConfigFromString(contents: String)
Override SDK settings by specifying the file content.
contents
Voice
Voice pack with navigator voice acting.
VoiceManager
Interface for interacting with the list of navigator voice packages.
val voicesChannel
A channel with a list of all known voice packages. Updated if information about at least one of the voices or the list composition changes. The content of the channel is a subset of the total list of packages. To avoid desynchronization of package descriptions, you should not use data that are obtained simultaneously from multiple channels containing subsets of a common package list.
val voices
A channel with a list of all known voice packages. Updated if information about at least one of the voices or the list composition changes. The content of the channel is a subset of the total list of packages. To avoid desynchronization of package descriptions, you should not use data that are obtained simultaneously from multiple channels containing subsets of a common package list.
VoiceSelector
Manages voice packages in the current navigator session.
var voice
Voice pack that plays voice announcements in the current Navigator session.
VoidRouteAttribute
A container that describes a point attribute of a route. Each element is stored as the point on the route at which the element is located and the value of the element itself.
fun entries(begin: RoutePoint, end: RoutePoint): List<RoutePoint>
Elements falling within the [begin, end) range.
fun findNearBackward(point: RoutePoint): RoutePoint?
Find the nearest element the position of which is < = point.
The complexity of the operation is log2(N), where N = size.
fun findNearForward(point: RoutePoint): RoutePoint?
Find the nearest element the position of which is >= point.
The complexity of the operation is log2(N), where N = size.
WeekTime
Time point within a week.
WeekTimeInterval
Time interval within a week.
WorkStatus
Work status.
WorkTimeFilter
Filter by the object's opening hours. Either open now or open for a specific date and time.
fun match(workTime: Function1, isOpenNow: Function1): T
fun toString(): String
fun hashCode(): Int
ZIndex
An index specifying the drawing order of objects within a layer.
ZIndex(value: Int = 0)
An index specifying the drawing order of objects within a layer.
value
Zoom
Zoom level.
Zoom = 0 is the scale at which the whole world is inscribed in a square of 256x256 logical pixels (see LogicalPixel) Zoom = 1 is the scale at which the whole world is inscribed in a square of 512x512 logical pixels The scale is proportional value of 2^Zoom.
Zoom cannot be negative.
Zoom(value: Float = 0.0f)
Zoom level.
Zoom = 0 is the scale at which the entire world is inscribed in a square of 256x256 logical pixels (see LogicalPixel) Zoom = 1 is the scale at which the entire world is inscribed in a square of 512x512 logical pixels The scale is proportional value of 2^Zoom.
Zoom cannot be negative.
value
ZoomControl
Container with controls to increase and decrease the zoom level.
ZoomControl(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
)
Container with controls to increase and decrease the zoom level.
ZoomControl
Container with controls to increase and decrease the zoom level.
ZoomControlModel
Zoom control model. The control consists of +/- buttons, which, when pressed, change the map scale. When the allowable scale limit is reached, the zoom button in this direction becomes inactive. Object methods must be called on one thread.
fun isEnabled(button: ZoomControlButton): StatefulChannel<Boolean>
fun setPressed(button: ZoomControlButton, value: Boolean): Unit
ZoomFollowSettings
An interface that allows you to manage map scaling settings during following.
During following, the scale depends on the speed of movement, the presence of maneuvers ahead and behind on the route, and the type of road.
If there are no maneuvers ahead and behind, or on roads with low value (minor streets in settlements, highways, intercity or federal highways), the scale value is selected based on the values SpeedRangeToStyleZoom, which are stored in the speed_range_to_style_zoom_sequence. The sequence speed_range_to_style_zoom_sequence must contain speed intervals sorted in ascending order of min_speed values, and the conditions below must be met: max_speedi > min_speedi+1
max_speedi < max_speedi+1. That is, speed intervals should touch or even intersect, but the speed value should not fall into more than two intervals. However, the minimum speed value is not considered to fall within the interval, i.e. the same speed value may be the maximum speed for one interval, the minimum speed for another, and be inside the interval for a third interval. An exception is the first speed interval, which must contain min_speed == 0.
The map scale is selected from the speed_range_to_style_zoom_sequence using the algorithm:
When approaching a maneuver at the current speed, the scale will increase smoothly. The duration of the increase depends on the speed and distance to the maneuver. When the speed is increased, the animation time increases, and when the speed is decreased, it decreases. The increase in zoom level is completed at some distance from the maneuver.
After passing the maneuver, the zoom level smoothly decreases.
var speedRangeToStyleZoomSequence
Sequence of speed intervals and their corresponding scales. Used for automatic map scaling in the navigator based on speed.
var styleZoomSpeedRangesAnimationDuration
Duration of smooth zoom in the follow mode as speed changes when there are no maneuvers ahead/behind at a sufficiently close distance, or on roads with low value.
var zoomInBeforeManeuverAnimationDuration
Duration of smooth zoom increase when approaching a maneuver. Used only if the speed is lower than get_min_speed_to_consider_in_zoom_in_before_maneuver_animation.
var zoomOutAfterManeuverAnimationDuration
Duration of smooth decrease of the zoom level after the passage of the maneuver.
var minSpeedToConsiderInZoomInBeforeManeuverAnimation
Minimum movement speed in m/s at which the duration of the smooth zoom level change is calculated taking into account not only the proximity to the maneuver, but also the current speed. Must be at least 0.1 m/s, values less than are ignored.
var zoomInBeforeManeuverAnimationAcceleration
Acceleration factor for the zoom increase animation when approaching a maneuver. Must be at least 1, values less than this are ignored.
var distanceGapToManeuver
The distance to the maneuver at which the zoom-in animation must be completed so that the zoom does not change during the maneuver. For example, if there is 300 m before the maneuver, then the zoom-in animation must be completed 50 m before start of the maneuver. Must be at least 1 m, values less than are ignored.
var minAnimationDuration
Minimum animation time. Used to prevent abrupt changes in the zoom level during animation. Must be at least 200, values below are ignored.