https://github.com/software-mansion/kmp-maps
Universal map component for Compose Multiplatform.
https://github.com/software-mansion/kmp-maps
android compose-multiplatform ios kotlin maps
Last synced: 5 months ago
JSON representation
Universal map component for Compose Multiplatform.
- Host: GitHub
- URL: https://github.com/software-mansion/kmp-maps
- Owner: software-mansion
- License: mit
- Created: 2025-09-10T10:51:18.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-10-08T16:20:07.000Z (9 months ago)
- Last Synced: 2025-10-08T18:38:52.784Z (9 months ago)
- Topics: android, compose-multiplatform, ios, kotlin, maps
- Language: Kotlin
- Homepage: http://docs.swmansion.com/kmp-maps/
- Size: 4.71 MB
- Stars: 91
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-swm-tools - kmp-maps - A **universal map component for Compose Multiplatform** that provides a single API for native map services (Google Maps on Android, Apple Maps on iOS). (Events and communities)
- kmp-awesome - KMP Maps
README

[](https://kotlinlang.org)
[](./LICENSE)

`kmp-maps` provides a unified map component for Compose Multiplatform applications, offering seamless integration with native map APIs on both Android and iOS platforms.
## 🎯 See It in Action
Check out the sample project in the `/sample` directory for complete usage examples.
| iOS (Apple Maps) | Android (Google Maps) | Desktop (Google Maps) |
| :-------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: |:-------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
|
|
| _Map view with circles, polygon, polylines and markers on iOS_ | _Map view with circles, polygon, polylines and markers on Android_ | _Map view with circles, polygon, polylines and markers on desktop_ |
## ✨ Features
- **Multi-Provider Support:** Android (Google Maps), iOS (Apple Maps or Google Maps), and JVM/desktop (Google Maps JS).
- **Fully Customizable Markers:** Create markers using standard Compose Multiplatform code.
- **GeoJSON Support:** Easily render GeoJSON layers with customizable styling capabilities.
- **Native Rendering:** Powered by underlying native SDKs, ensuring smooth performance, correct gesture handling, and native look and feel.
- **Rich Geometry Support:** Draw interactive circles, polygons, and polylines with full control over colors, strokes, and fills.
- **Location Services:** Built-in location permission handling and user location display.
- **Interactive Callbacks:** Comprehensive event handling for map clicks, camera movements, POI interactions, and marker events.
- **Compose Multiplatform:** Built with Compose Multiplatform for modern UI development.
## 🚀 Usage
### Import
Choose the appropriate import based on your needs:
- **Native Implementation:** Uses native Google Maps on Android, native Apple Maps on iOS, and Google Maps JS API (via WebView) on desktop.
```kotlin
import com.swmansion.kmpmaps.core.Map
```
- **Universal Google Maps:** Uses Google Maps SDK on Android and iOS, and Google Maps JS API on desktop.
```kotlin
import com.swmansion.kmpmaps.googlemaps.Map
```
### Example
```kotlin
@Composable
fun MyMapScreen() {
Map(
modifier = Modifier.fillMaxSize(),
properties = MapProperties(
isMyLocationEnabled = true,
mapType = MapType.NORMAL,
),
uiSettings = MapUISettings(
myLocationButtonEnabled = true,
compassEnabled = true
),
cameraPosition = CameraPosition(
coordinates = Coordinates(latitude = 50.0619, longitude = 19.9373),
zoom = 13f
),
markers = listOf(
Marker(
coordinates = Coordinates(latitude = 50.0486, longitude = 19.9654),
title = "Software Mansion",
androidSnippet = "Software house"
)
),
onMarkerClick = { marker ->
println("Marker clicked: ${marker.title}")
},
onMapClick = { coordinates ->
println("Map clicked at: ${coordinates.latitude}, ${coordinates.longitude}")
}
)
}
```
## 📦 Installation
For installation instructions, platform setup, and configuration details, visit our [dedicated document](https://github.com/software-mansion/kmp-maps/blob/main/docs/INSTALLATION_SETUP.md).
## 📚 API Reference
Check out our [dedicated documentation page](https://docs.swmansion.com/kmp-maps/) for API reference.
## 🤝 Contributing
We welcome contributions! Please feel free to submit a Pull Request.
## KMP Maps is created by Software Mansion
[](https://swmansion.com)
Since 2012 [Software Mansion](https://swmansion.com) is a software agency with
experience in building web and mobile apps. We are Core React Native
Contributors and experts in dealing with all kinds of React Native issues. We
can help you build your next dream product –
[Hire us](https://swmansion.com/contact/projects?utm_source=typegpu&utm_medium=readme).
Made by [@software-mansion](https://github.com/software-mansion) and
[community](https://github.com/software-mansion/kmp-maps/graphs/contributors) 💛