Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.71 KB

File metadata and controls

65 lines (46 loc) · 1.71 KB

🗺️ MyMap – Jetpack Compose Polyline Routing

MyMap is a lightweight Android app built with Jetpack Compose and Google Maps. It displays route polylines based on encoded geometry from Map.ir API. Fully written in Kotlin with a clean architecture approach and beautiful map rendering using the latest Google Maps Compose library.


✨ Features

  • Decode and draw route polylines using encoded geometry
  • Google Maps integration via maps-compose
  • State-driven UI with ViewModel + mutableStateOf
  • Prevents multiple API calls on recomposition
  • Supports multi-leg route rendering
  • Clean, simple structure and reusable components

🧱 Tech Stack


📸 Preview

Preview

🧪 Example

@Stable
interface RoutUiState {
    val routeDto: RouteDto?
}

private class MutableRoutUiState : RoutUiState {
    override var routeDto: RouteDto? by mutableStateOf(null)
}
   uiState.routeDto?.let {
                    val polylinePoints = decodeRouteToLatLng(it)
                    Polyline(
                        points = polylinePoints,
                        color = Color.Blue,
                        width = 16f,
                    )
 }

🛣️ TODO

  • Add user location tracking
  • Animate camera along the route
  • Offline map caching

🙌 Contributing Feel free to fork, improve, or file issues. Stars are welcome 🌟