interface MapController

Controls general map properties. It also provides two helper methods that can convert between a Point on the screen and its GeoPoint counterpart.



Link copied to clipboard

Converts a Point on the MapView to a position on the map. Returns a Result with a GeoPoint or PointConversionFailure when it cannot obtain a coordinate from the given point. This Result can occur when the point is not on the map.

Link copied to clipboard

Provides the currently visible region as VisibleRegion.

Link copied to clipboard
abstract fun pointForCoordinate(coordinate: GeoPoint): Point

Converts a position on the map into the MapView point.

Link copied to clipboard
abstract fun setFrameRate(@IntRange(from = 1) frameRate: Int)

Applies a frame rate cap on the map renderer. It is useful for scenarios where the map is not fully visible to the user, and there is no need to render it with its full performance.

Link copied to clipboard
abstract fun setLanguage(language: Locale)

Sets map language. If the requested locale is unsupported, the map falls back to the NGT (Neutral Ground Truth); this means official languages for all regions in local scripts (if available).

Link copied to clipboard
abstract fun setPadding(padding: Padding)

Sets padding on the MapView to determine space for the safe area. The safe area is the part of the viewport which is considered completely visible by the user i.e. not covered by UI components such as buttons or sliders.