Package-level declarations

Types

Link copied to clipboard
class ApiKeyErrorOverlay(context: Context, providerName: String, mapTypeName: String)

Overlay displayed when a map type requires an API key that is not configured.

Link copied to clipboard

Manages API keys for third-party tile providers.

Link copied to clipboard
class AttributionOverlay(context: Context)

Attribution overlay displaying tile source 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: Float)

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

A callback interface for tracking camera animation completion.

Link copied to clipboard
data class Circle(val center: LatLng, val radius: Float, val strokeColor: Color = Color.Black, val strokeWidth: Float = 10.0f, val strokePattern: PathEffect? = null, val strokeCap: StrokeCap = StrokeCap.Round, val strokeJoin: StrokeJoin = StrokeJoin.Round, val fillColor: Color = Color(red = 128, green = 128, blue = 128, alpha = 128), val visible: Boolean = true, val clickable: Boolean = false, val zIndex: Float = 0.0f, val tag: Any? = null)

Represents a circle on the map with a center point and radius in meters.

Link copied to clipboard

Builder class for creating Circle instances with a fluent API. Matches the Google Maps API pattern for circle configuration.

Link copied to clipboard
class DiskTileCache(context: Context)

Persistent disk cache for map tiles using DiskLruCache.

Link copied to clipboard
enum Edge : Enum<Edge>

Represents an edge of the map view for edge effect triggering.

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 GroundOverlay(val image: BitmapDescriptor, val position: LatLng? = null, val width: Float? = null, val height: Float? = null, val bounds: LatLngBounds? = null, val anchor: Pair<Float, Float> = Pair(0.5f, 0.5f), val bearing: Float = 0.0f, val transparency: Float = 0.0f, val visible: Boolean = true, val zIndex: Float = 0.0f, val clickable: Boolean = false, val tag: Any? = null)
Link copied to clipboard
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
object MapType

Map type constants for OpenMapView.

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

Builder class for creating Marker instances with a fluent API. Matches the Google Maps API pattern for marker configuration.

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
fun interface OnCircleClickListener

Interface for receiving circle click events.

Link copied to clipboard
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

Interface for receiving info window close events. Called when the info window of a marker is closed, either manually or via auto-dismiss.

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
fun interface OnMarkerClickListener

Listener interface for marker 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: Color = Color.Black, val strokeWidth: Float = 10.0f, val strokePattern: PathEffect? = null, val strokeCap: StrokeCap = StrokeCap.Butt, val strokeJoin: StrokeJoin = StrokeJoin.Round, val fillColor: Color = Color(red = 128, green = 128, blue = 128, alpha = 128), val holes: List<List<LatLng>> = emptyList(), val geodesic: Boolean = false, 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

Builder class for creating Polygon instances with a fluent API. Matches the Google Maps API pattern for polygon configuration.

Link copied to clipboard
data class Polyline(val points: List<LatLng>, val strokeColor: Color = Color.Black, val strokeWidth: Float = 10.0f, val strokePattern: PathEffect? = null, val startCap: StrokeCap = StrokeCap.Butt, val endCap: StrokeCap = StrokeCap.Butt, val strokeJoin: StrokeJoin = StrokeJoin.Round, val geodesic: Boolean = false, val spans: List<StyleSpan> = emptyList(), 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

Builder class for creating Polyline instances with a fluent API. Matches the Google Maps API pattern for polyline configuration.

Link copied to clipboard

Factory object providing predefined TileProvider implementations for popular public tile overlay services.

Link copied to clipboard

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

Link copied to clipboard
fun interface SnapshotReadyCallback

Callback interface for receiving map snapshots.

Link copied to clipboard
data class StyleSpan(val color: Color, val segments: Int = 1)

Defines a style span for a portion of a polyline.

Link copied to clipboard
data class Tile(val width: Int, val height: Int, val data: ByteArray)

Represents a single map tile containing image data.

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
data class TileOverlay(val tileProvider: TileProvider, val transparency: Float = 0.0f, val zIndex: Float = 0.0f, val visible: Boolean = true, val fadeIn: Boolean = false, val tag: Any? = null)

Represents a tile overlay layer on the map.

Link copied to clipboard

Builder class for creating TileOverlay instances with a fluent API. Matches the Google Maps API pattern for tile overlay configuration.

Link copied to clipboard
fun interface TileProvider

Interface for providing tiles to a TileOverlay.

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
abstract class UrlTileProvider(urlTemplate: String) : TileProvider

Abstract base class for TileProvider implementations that fetch tiles from URLs.

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.

Link copied to clipboard

Zoom controls overlay displaying +/- buttons for zooming.

Functions

Link copied to clipboard
fun openLocationInExternalApp(latLng: LatLng, zoom: Float, context: Context, label: String? = null): Boolean

Opens a location in an external map application with automatic fallback to browser.

Link copied to clipboard

Converts a CSS color string to a Compose Color.