Skip to content

Latest commit

 

History

History
153 lines (102 loc) · 7.13 KB

README.md

File metadata and controls

153 lines (102 loc) · 7.13 KB

CodeStyle Compose Kotlin Android API License Apache 2.0

Jetpack Compose Google Map

Explore the dynamic capabilities of Jetpack Compose in the realm of mapping with this open-source project. The "Jetpack Compose Google Map" provides a comprehensive demonstration of integrating Google Maps seamlessly into Jetpack Compose applications.

This project serves as a valuable resource for developers diving into Jetpack Compose, offering practical examples of incorporating mapping features seamlessly. Whether you're building a location-based app or simply exploring the possibilities of Jetpack Compose, this showcase provides insights and code snippets to accelerate your development journey.

You can read the step-by-step guide in my medium story.

🔐 Key Features

  • Google Maps Integration: Effortlessly incorporate Google Maps into your Jetpack Compose project, providing a rich and interactive mapping experience.
  • Add Marker: Learn how to add markers to the map, allowing you to personalize location indicators according to your app's design and theme.
  • Custom Info Window: Enhance user engagement by creating customized info windows for your markers, delivering additional information in a visually appealing manner.
  • Multiple Markers: Showcase the ability to add multiple markers on the map, perfect for applications that need to highlight various points of interest.
  • Clustering: Implement marker clustering to improve map readability, especially in scenarios with a large number of markers.
  • Scale Bar: Integrate a scale bar to provide users with a visual reference for distances on the map, improving overall navigation.
  • Street View: Explore the incorporation of street view functionality, allowing users to virtually navigate through streets and explore locations at ground level.

🌳 Environment

Android Studio verison used : Android Studio Hedgehog | 2023.1.1 Canary 11

🖼️ Demo Screens

Overview Map Simple View Map Marker
Map Custom Info Window Map Multiple Marker Map Marker Cluster
Map Scale Bar

⚙️ How to Run

  1. Import this repository
  2. Get a Maps API key
  3. Goto local.properties and add MAPS_API_KEY==YOUR_KEY
  4. Build and Run

💰 Bonus Knowledge

In this project, we have utilized TOML (Tom's Obvious, Minimal Language) as a configuration file format for managing Gradle dependencies and plugins. TOML provides a clean and easy-to-read syntax, making it simpler to manage and maintain the project's dependencies.

By using a TOML file, we can define and organize our Gradle dependencies and plugins in a structured manner. This approach enhances the readability and maintainability of our build configuration.

The TOML file in this project serves as a centralized location to specify the required dependencies and plugins, ensuring consistency across different build scripts. By utilizing TOML, we have streamlined the process of managing dependencies and plugins, making the project more efficient and easier to maintain.

Here is a basic example of what you can achieve with TOML:

From

// Top-level `build.gradle.kts` file
plugins {
   id("com.android.application") version "7.4.1" apply false

}

// Module-level `build.gradle.kts` file
plugins {
   id("com.android.application")

}
dependencies {
    implementation("androidx.core:core-ktx:1.9.0")

}

To

// Top-level build.gradle.kts
plugins {
   alias(libs.plugins.android.application) apply false

}

// module build.gradle.kts
plugins {
   alias(libs.plugins.android.application)

}
dependencies {
   implementation(libs.androidx.ktx)

}

By adding code like this in libs.versions.toml

[versions]
ktx = "1.9.0"
androidGradlePlugin = "7.4.1"

[libraries]
androidx-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "ktx" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }

Feel free to explore the TOML configuration file in this project and adapt the approach to fit your own build management needs. You can find this file in project gradle folder with this name libs.versions.toml.

🤝 Contributing

Contributions are what make the open-source community such a fantastic place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you would like to contribute, please follow these steps:

  1. Open an issue first to discuss what you would like to change.
  2. Fork the Project
  3. Create your feature branch (git checkout -b feature/amazing-feature)
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a pull request

Please make sure to update tests as appropriate.

✍️ Author

👤 DawinderGill

Linkedin Google Play Medium

Feel free to ping me 😉

📝 License

Copyright © 2023 - DawinderGill