- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
feat: Update to play-services-maps3d-0.1.0 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit introduces Espresso UI tests for `HelloMapActivity` in both the Java and Kotlin sample apps to verify that the map view is displayed. Additionally, this commit includes several build and dependency updates: - Upgrades Gradle, the Android Gradle Plugin, Kotlin, and other AndroidX libraries. - Centralizes `minSdk` and `targetSdk` in the version catalog (`libs.versions.toml`). - Moves the Maps 3D SDK dependency to the `common` module and exposes it to the app modules using the `api` configuration.
This commit introduces an instrumented test for `CameraControlsActivity`. The test verifies two main functionalities: - The `Map3DView` is displayed correctly. - The "Fly to" button animates the camera to the expected location. The `androidx.test.uiautomator` dependency was added to support the test implementation.
This commit introduces a new instrumentation test, `testFlyAround`, to `CameraControlsActivityTest`. The test verifies the functionality of the "Fly Around" button by clicking it and then using `OnMapSteadyListener` to assert that the animation completes and the map returns to a steady state.
This commit updates the project to use version 0.0.3 of the Maps3D SDK, which is now included as a local AAR file. It also updates various dependencies, including the Android Gradle Plugin, Kotlin, Compose BOM, and the Gradle wrapper. Key API changes from the SDK update have been applied: * `PolygonOptions.outerCoordinates` is now `path`. * `PolygonOptions.innerCoordinates` is now `innerPaths`. * `PolylineOptions.coordinates` is now `path`. Additionally, the build configuration is streamlined by centralizing `compileSdk`, `minSdk`, and `targetSdk` versions in the `libs.versions.toml` files.
This commit adds the Google Truth assertion library as a testing dependency for both the Java and Kotlin sample apps. Existing instrumentation tests have been refactored to use Truth's fluent `assertThat` API instead of JUnit assertions, improving the readability and expressiveness of the test code.
This commit introduces click handling for various map elements and adds a new sample to demonstrate place clicks. - **Map Interactions Sample:** A new `MapInteractionsActivity` has been added to show how to use `setMap3DClickListener` to handle clicks on the map and on places. - **Marker Clicks:** The `MarkersActivity` now sets a `clickListener` on each marker, displaying a `Toast` with the marker's label when clicked. - **Polyline Clicks:** The `PolylinesActivity` now sets a `clickListener` on the trail polyline. - **Polygon Clicks:** The `PolygonsActivity` now sets `clickListener`s on the museum and zoo polygons.
This commit introduces several improvements to the sample applications: - The build configuration is updated across all modules to depend on a local `play-services-maps3d` AAR file instead of a remote dependency. - The Kotlin `MainActivity` is refactored to use a `Sample` data class for the list of demos, improving type safety and code readability. - The XML themes for the Java and Kotlin ApiDemos apps are updated to consistently use `Theme.Material3.DayNight.NoActionBar`.
This commit enhances the `HelloMapActivity` and `MarkersActivity` samples with improved documentation and modern Android development patterns. Key changes include: - Expanded KDoc comments in `HelloMapActivity` and `MarkersActivity` to provide more detailed explanations of the code and concepts. - Refactored `MarkersActivity` to use `lifecycleScope` for managing coroutines and to extract marker creation and click listener setup into separate functions. - Updated `SampleBaseActivity` to extend `AppCompatActivity` for better support and consistency. - Moved the `TAG` definition in `HelloMapActivity` to a `companion object` to follow common Kotlin idioms.
This commit refactors `ModelsActivity` for better code organization, readability, and lifecycle safety. Key changes include: - Replaced `CoroutineScope(Dispatchers.Main)` with `lifecycleScope` to tie coroutines to the activity's lifecycle, preventing potential leaks. - Extracted logic into smaller, well-documented helper functions like `setupUI`, `addPlaneModel`, and `runAnimationSequence`. - Used `kotlin.time.Duration` for more readable and type-safe time values in animations and flows. - Added extensive KDoc comments to the class and methods to improve documentation.
This commit refactors the `PolygonsActivity` to improve code organization, clarity, and lifecycle management. Key changes include: - Extracting the logic for adding polygons and setting up click listeners into dedicated functions (`addMuseumPolygons`, `addZooPolygon`, `setupPolygonClickListener`). - Switching from a manual `CoroutineScope` to `lifecycleScope` for safer coroutine handling that is tied to the activity's lifecycle. - Adding extensive KDoc comments to the class, methods, and properties to better document the sample's functionality. - Using `by lazy` to defer the initialization of polygon coordinate data until first use.
This commit refactors the `PolylinesActivity` to improve code quality, readability, and documentation. Key changes include: - Expanded the KDoc for the activity to better explain the sample's purpose and implementation details. - Extracted logic for adding polylines and setting up click listeners into separate, focused functions. - Switched from a manually created `CoroutineScope` to the lifecycle-aware `lifecycleScope`. - Used `by lazy` for deferred initialization of polyline options and trail data, improving performance. - Simplified the parsing of trail location data using more idiomatic Kotlin.
Loading the files locally left as comments for reference
Adds a click listener to the airplane model in the `ModelsActivity` sample. A toast message is shown when the model is clicked to demonstrate the feature.
| 
           Hi @kikoso, When can we expect this release 0.0.3 to rollout for public  | 
    
| 
           Hello folks. There is no specific release date to share yet for the new version of Maps 3D. You can subscribe to this thread, and check the official Google Maps Platform channel.  | 
    
This commit updates the Gradle version and refreshes various project dependencies across the sample applications.
Key changes:
- **Gradle Upgrade:** Upgraded the Gradle wrapper from version 8.11.1 to 9.1.0. This includes updating the `gradlew` and `gradlew.bat` scripts and the wrapper JAR to the versions generated by Gradle 9.1.
- **Dependency Updates:** Updated several key libraries to their latest versions, including:
    - Android Gradle Plugin to 8.13.0
    - Kotlin to 2.2.20
    - Compose BOM to 2025.09.00
    - Hilt to 2.57.1
    - Various AndroidX, KSP, and testing libraries.
- **Build Script Refactor:** In the `ApiDemos` project, the `play-services-maps3d` dependency is now referenced through the version catalog for consistency.
    This commit introduces several cleanups and refactorings across the API Demos samples, primarily focusing on the Gradle build scripts and the Java sample application.
- **Gradle Build Scripts:**
    - The `sarifOutput` path for lint reports is now consistently configured using the modern `layout.buildDirectory` API across all modules.
    - In the `java-app`, SDK versions (`compileSdk`, `minSdk`, `targetSdk`) are now sourced from the version catalog (`libs.versions`) instead of being hardcoded.
- **Java Sample App (`java-app`):**
    - Removed Kotlin and Jetpack Compose plugins and dependencies, making it a pure Java-based sample.
    - Updated Javadoc comments to follow standard Java conventions, removing Kotlin-style syntax.
- **Kotlin Code:**
    - Corrected a `@StringRes` annotation target in `Units.kt` for better precision.
    - Removed an unused import in `MainActivity.kt`.
    - Enabled `buildConfig` in the `kotlin-app` module.
    This commit updates the Java API Demos app to support edge-to-edge display, allowing the app's UI to draw behind the system status and navigation bars for a more immersive experience.
Key changes:
-   **Theme Updates (`themes.xml`):**
    -   The status and navigation bars are set to transparent.
    -   The theme is configured to allow drawing behind system bars (`windowDrawsSystemBarBackgrounds`) and to render in the display cutout area.
-   **Activity Changes (`MainActivity` & `SampleBaseActivity`):**
    -   `WindowCompat.setDecorFitsSystemWindows(false)` is called to enable edge-to-edge mode.
    -   An `OnApplyWindowInsetsListener` is used to get the system bar insets and apply them as padding to the root view. This ensures that interactive UI elements are not obscured by the system bars.
-   **Refinement:** The inset handling logic in `SampleBaseActivity` has been simplified to use `WindowInsetsCompat.Type.systemBars()` for a cleaner implementation.
    This commit updates the project's dependencies to use version 0.0.3 of the Maps 3D SDK. Key changes: - The `play-services-maps3d` dependency is updated from version 0.0.2 to 0.0.3 in `libs.versions.toml`. - The SDK is now included as a local AAR file (`play-services-maps3d-0.0.3.aar`) in the `common`, `java-app`, and `kotlin-app` modules. - A new dependency on `play-services-base` has been added to all modules, as required by the updated SDK. - The version catalog (`libs.versions.toml`) has been updated to include `play-services-base`, `truth`, and `uiautomator`.
- Implemented click listeners for markers, polygons, polylines, and models to demonstrate new interactive features. - Updated Polygon and Polyline options to use the new `path` and `innerPaths` properties, aligning with the latest API. - Refactored `MarkersActivity` to use a helper method for marker creation, improving code clarity and reducing repetition. - Added a migration guide to assist users in updating to the new SDK version.
- Abstracted Toast notifications into a `showToast` helper method in `SampleBaseActivity` to reduce boilerplate in individual activities. - Replaced hardcoded strings in click listeners with string resources for better maintainability and localization.
This commit refactors the Java API Demos sample app by moving shared resources to the `common` module and simplifying code.
Key changes:
-   **Code Simplification in `CameraControlsActivity`:**
    -   The `updateCameraPosition` method now uses a single formatted string resource (`camera_state_format`) instead of manual `StringBuilder` concatenation, making the code cleaner and more localizable.
    -   UI updates are now posted to the main thread using `runOnUiThread` and `view.postDelayed` instead of `new Handler(Looper.getMainLooper())`.
-   **Lifecycle Method Cleanup in `HelloMapActivity`:**
    -   Removed redundant null checks for `map3DView` in lifecycle callback methods (`onResume`, `onPause`, `onDestroy`, etc.), as the view is initialized in `onCreate`.
    This commit updates the project's dependencies and build configuration. Key changes: - **Gradle Build Script:** The `sarifOutput` path in `build.gradle.kts` was updated to use the modern `layout.buildDirectory` API. - **Lint Fix:** Added a `@param:StringRes` annotation target in `MainActivity.kt` to resolve a lint warning.
This commit updates the Maps 3D SDK from a local AAR file to the remote artifact version 0.1.0. It also includes updates to several other libraries.
Key changes:
-   **Maps 3D SDK Update:**
    -   The `libs.versions.toml` files in both `ApiDemos` and `advanced` samples are updated to use `playServicesMaps3d = "0.1.0"`.
-   **Other Dependency Updates:**
    -   In the `advanced` sample, the following dependencies were updated:
        -   `composeBom` to `2025.09.01`
        -   `hilt` to `2.57.2`
        -   `playServicesBase` to `18.9.0`
    Resolves an issue where `android:windowLayoutInDisplayCutoutMode` was used in a theme that supported API levels below 27, causing a build failure. This attribute is only available on API level 27 and higher. To fix this, the attribute has been moved to a separate theme file in the `values-v27` resource directory. Also fixes a warning about multiple substitutions in the `camera_state_format` string resource by adding `formatted="false"`.
        
          
                Maps3DSamples/advanced/app/src/main/java/com/example/advancedmaps3dsamples/MainActivity.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
               | 
          ||
| Welcome to the latest version of the Maps3D SDK! This release focuses on improving API clarity and introducing powerful new ways to make your maps interactive. This guide will walk you through the necessary changes to update your application in both Kotlin and Java. | ||
| 
               | 
          ||
| ### Summary of Changes | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be benefitial to leave here the version number where the breaking change happens, since this document is likely to grow overtime.
| 
           Some very minor comments. If we can merge #19 before, we will get rid of the failure in the Lint flow.  | 
    
# [1.2.0](v1.1.0...v1.2.0) (2025-10-24) ### Features * Update to play-services-maps3d-0.1.0 ([#16](#16)) ([ef2c4c3](ef2c4c3))
| 
           🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀  | 
    
| 
           Hi @knishant362 , @tejbhansahu , @anmolgupta22 and @Vinay310 . As you can see, this PR has been already merged.  | 
    
Updates for v0.1.0 of the maps3d library.
Includes demonstration of click handling for places, markers, polylines and polygons