Overview
MapLibre Compose shows interactive maps in Compose Multiplatform apps on Android, iOS, desktop, and the web. You build the map with composables and Kotlin state, the same way you build the rest of your UI. The maps render with MapLibre, an open-source map engine, and work with any map style and tiles that MapLibre can load.
This composable shows a street map of Portland:
@Composablefun MyMap() { val mapState = rememberMapState( baseStyle = BaseStyle.Uri("https://tiles.openfreemap.org/styles/liberty"), initialCameraPosition = CameraPosition(center = Position(latitude = 45.521, longitude = -122.675), zoom = 13.0), ) MaplibreMap(state = mapState)}Platforms
Section titled “Platforms”| Platform | Map engine | Stability |
|---|---|---|
| Android | MapLibre Native | Beta |
| iOS | MapLibre Native | Beta |
| Native macOS (arm64) | MapLibre Native | Experimental |
| Desktop (JVM) | MapLibre Native | Alpha |
| Web (Kotlin/JS) | MapLibre GL JS | Alpha |
MapLibre Native and MapLibre GL JS read the same style format, and you use the same Kotlin API on every platform. Offline downloads are not available in the browser.
Desktop and web are Alpha because they depend on internal details of Compose and Skia. Platform setup lists the requirements of each platform.
API stability
Section titled “API stability”The API is not stable yet. Until version 1.0, a minor release can contain breaking changes.
Next steps
Section titled “Next steps”- Getting started: add the library and show your first map.
- Live demo: try the demo app in your browser.
- API reference: every public class and function.