Package-level declarations

Types

Link copied to clipboard
class AttributionOverlay(context: Context)

Attribution overlay displaying OpenStreetMap copyright notice.

Link copied to clipboard
sealed class BitmapDescriptor

Represents a bitmap image used for marker icons.

Link copied to clipboard

Factory for creating marker icons.

Link copied to clipboard
data class CameraPosition(val target: LatLng, val zoom: Double)

Represents the camera position for a map.

Link copied to clipboard
sealed class CameraUpdate

Defines a camera update to be applied to the map.

Link copied to clipboard

Factory for creating CameraUpdate objects to transform the camera on a map.

Link copied to clipboard
class DiskTileCache(context: Context)

Persistent disk cache for map tiles using DiskLruCache.

Link copied to clipboard

Parser for GeoJSON data to convert to map overlays.

Link copied to clipboard
data class GeoJsonResult(val markers: List<Marker> = emptyList(), val polylines: List<Polyline> = emptyList(), val polygons: List<Polygon> = emptyList())

Result of parsing GeoJSON data.

Link copied to clipboard
data class LatLng(val latitude: Double, val longitude: Double)

An immutable class representing a pair of latitude and longitude coordinates.

Link copied to clipboard
data class LatLngBounds(val southwest: LatLng, val northeast: LatLng)

An immutable class representing a latitude/longitude aligned rectangle.

Link copied to clipboard
class MapController(context: Context)

Core controller managing map state, rendering, and interactions.

Link copied to clipboard
data class Marker(var position: LatLng, val title: String? = null, val snippet: String? = null, val icon: BitmapDescriptor? = null, val anchor: Pair<Float, Float> = Pair(0.5f, 1.0f), val visible: Boolean = true, val alpha: Float = 1.0f, val draggable: Boolean = false, val zIndex: Float = 0.0f, val tag: Any? = null)

Represents a marker on the map at a specific geographic location.

Link copied to clipboard

Listener for camera animation completion events.

Link copied to clipboard
fun interface OnCameraIdleListener

Interface for receiving camera idle events.

Link copied to clipboard

Interface for receiving camera movement cancellation events.

Link copied to clipboard
fun interface OnCameraMoveListener

Interface for receiving camera movement events.

Link copied to clipboard

Interface for receiving camera movement start events.

Link copied to clipboard

Interface for receiving info window click events. Called when the info window of a marker is clicked.

Link copied to clipboard
fun interface OnMapClickListener

Listener interface for map click events.

Link copied to clipboard

Listener interface for map long-click events.

Link copied to clipboard

Interface for receiving marker drag events.

Link copied to clipboard

Interface for receiving polygon click events.

Link copied to clipboard

Interface for receiving polyline click events.

Link copied to clipboard
class OpenMapView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout, DefaultLifecycleObserver

A MapView powered by OpenStreetMap tiles.

Link copied to clipboard
data class Polygon(val points: List<LatLng>, val strokeColor: Int = Color.BLACK, val strokeWidth: Float = 10.0f, val fillColor: Int = Color.argb(128, 128, 128, 128), val holes: List<List<LatLng>> = emptyList(), val visible: Boolean = true, val clickable: Boolean = false, val zIndex: Float = 0.0f, val tag: Any? = null)

Represents a polygon on the map, consisting of a closed shape with optional holes.

Link copied to clipboard
data class Polyline(val points: List<LatLng>, val strokeColor: Int = Color.BLACK, val strokeWidth: Float = 10.0f, val visible: Boolean = true, val clickable: Boolean = false, val zIndex: Float = 0.0f, val tag: Any? = null)

Represents a polyline on the map, consisting of connected line segments.

Link copied to clipboard

A projection is used to translate between on-screen location and geographic coordinates.

Link copied to clipboard
class TileCache(context: Context? = null)

Two-level cache for map tiles: in-memory LRU cache backed by persistent disk cache.

Link copied to clipboard
data class TileCoordinate(val x: Int, val y: Int, val zoom: Int)

Represents the coordinates of a map tile in the tile grid.

Link copied to clipboard
Link copied to clipboard

Defines available tile sources for map rendering.

Link copied to clipboard

Settings for the map user interface controls and gestures.

Link copied to clipboard

Utility for calculating which map tiles are visible in the viewport.

Link copied to clipboard
data class VisibleRegion(val nearLeft: LatLng, val nearRight: LatLng, val farLeft: LatLng, val farRight: LatLng, val latLngBounds: LatLngBounds)

Contains the four points defining the four-sided polygon visible in the map camera.