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
class ButtCap : Cap

A line end cut off flat at the end point.

Link copied to clipboard
class CameraPosition @JvmOverloads constructor(target: LatLng, zoom: Float, bearing: Float = 0.0f) : Parcelable

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
abstract class Cap

The shape of a line end, as in the Maps SDK: ButtCap, RoundCap or SquareCap.

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

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

Link copied to clipboard

Builder class for creating Circle instances with a fluent API. A builder for circle configuration.

Link copied to clipboard
class Dash(val length: Float) : PatternItem

A dash, drawn as a stroke of the given length.

Link copied to clipboard

Persistent disk cache for map tiles.

Link copied to clipboard

A dot as wide as the stroke.

Link copied to clipboard
enum Edge : Enum<Edge>

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

Link copied to clipboard
class Gap(val length: Float) : PatternItem

A gap, where nothing is drawn.

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

An image placed on the map, e.g. a historic map or a floor plan, that scales with the map.

Link copied to clipboard
Link copied to clipboard

Provides custom views for marker info windows.

Link copied to clipboard
object JointType

The shape of the corners of a stroke, as int constants like in the Maps SDK, e.g. PolylineOptions.jointType(JointType.ROUND).

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

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

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

An immutable class representing a latitude/longitude aligned rectangle.

Link copied to clipboard
interface LocationSource

Provides locations for the my-location layer.

Link copied to clipboard

Color scheme constants for OpenMapView.setMapColorScheme, with the same values as in the Maps SDK.

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
class Marker(position: LatLng, title: String? = null, snippet: String? = null, icon: BitmapDescriptor? = null, anchor: Pair<Float, Float> = Pair(0.5f, 1.0f), infoWindowAnchor: Pair<Float, Float> = Pair(0.5f, 0.0f), rotation: Float = 0.0f, isFlat: Boolean = false, visible: Boolean = true, alpha: Float = 1.0f, draggable: Boolean = false, zIndex: Float = 0.0f, tag: Any? = null)

A marker on the map at a specific geographic location.

Link copied to clipboard

Builder class for creating Marker instances with a fluent API. A builder 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

Interface for receiving info window long click events. Called when the user presses and holds the info window of a marker.

Link copied to clipboard
fun interface OnMapClickListener

Listener interface for map click events.

Link copied to clipboard
fun interface OnMapLoadedCallback

Callback for when the map has finished rendering.

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

Called when the my-location button is tapped.

Link copied to clipboard

Called when the my-location dot is tapped.

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
abstract class PatternItem

One element of a stroke pattern, as in the Maps SDK: a Dot, a Dash or a Gap.

Link copied to clipboard
class Polygon(points: List<LatLng>, strokeColor: Color = Color.Black, strokeWidth: Float = 10.0f, strokePattern: PathEffect? = null, pattern: List<PatternItem>? = null, strokeCap: StrokeCap = StrokeCap.Butt, strokeJoin: StrokeJoin = StrokeJoin.Round, fillColor: Color = Color(red = 128, green = 128, blue = 128, alpha = 128), holes: List<List<LatLng>> = emptyList(), geodesic: Boolean = false, visible: Boolean = true, clickable: Boolean = false, zIndex: Float = 0.0f, tag: Any? = null)

A polygon on the map: a closed shape with optional holes.

Link copied to clipboard

Builder class for creating Polygon instances with a fluent API. A builder for polygon configuration.

Link copied to clipboard
class Polyline(points: List<LatLng>, strokeColor: Color = Color.Black, strokeWidth: Float = 10.0f, strokePattern: PathEffect? = null, pattern: List<PatternItem>? = null, startCap: StrokeCap = StrokeCap.Butt, endCap: StrokeCap = StrokeCap.Butt, strokeJoin: StrokeJoin = StrokeJoin.Round, geodesic: Boolean = false, spans: List<StyleSpan> = emptyList(), visible: Boolean = true, clickable: Boolean = false, zIndex: Float = 0.0f, tag: Any? = null)

A polyline on the map: connected line segments.

Link copied to clipboard

Builder class for creating Polyline instances with a fluent API. A builder 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
class RoundCap : Cap

A line end with a half circle around the end point.

Link copied to clipboard
fun interface SnapshotReadyCallback

Callback interface for receiving map snapshots.

Link copied to clipboard

Distances, headings, offsets, interpolation and areas on the Earth as a sphere, e.g. to move a vehicle marker along its route and turn it the way it travels.

Link copied to clipboard
class SquareCap : Cap

A line end with a half square around the end point.

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

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

Link copied to clipboard

Ready-made color filters for OpenMapView.setTileColorFilter.

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
class TileOverlay(val tileProvider: TileProvider, transparency: Float = 0.0f, zIndex: Float = 0.0f, visible: Boolean = true, fadeIn: Boolean = false, 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. A builder 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.