Skip to content

feat(upgrade) : migrate to Maps 3D SDK 16.0.0 and update OnMap3DClickListener API - #67

Draft
LoyalAbbas wants to merge 1 commit into
mainfrom
feat/upgrade_to_16.0.0
Draft

LoyalAbbas wants to merge 1 commit into
mainfrom
feat/upgrade_to_16.0.0

Conversation

@LoyalAbbas

Copy link
Copy Markdown
Collaborator

Summary

Updates the Google Maps 3D Android samples repository to Google Maps 3D SDK 16.0.0, migrating setMap3DClickListener callbacks to the new Map3DClickEvent signature and updating XML layout attributes from map3d:mode to map3d:mapMode.

Key Changes

1. SDK Version & Build Configuration

  • gradle/libs.versions.toml: Bumped playServicesMaps3d from 0.2.2 to 16.0.0.
  • settings.gradle.kts: Enabled use_local_maven default for testing against local SDK artifacts.

2. OnMap3DClickListener Migration ((event: Map3DClickEvent) -> Boolean)

Migrated all setMap3DClickListener call sites from (location: LatLngAltitude, placeId: String?) -> Unit to (event: Map3DClickEvent) -> Boolean:

  • Compose Wrapper (maps3d-compose):
    • Updated GoogleMap3D.kt to unpack event.location and event.placeId from Map3DClickEvent, invoke onPlaceClick or fall back to onMapClick, and return true when handled (false otherwise).
  • Sample Apps (ApiDemos, ComposeDemos, maps3d-compose-demo, PlacesUIKit3D):
    • Updated Kotlin and Java MapInteractionsActivity across ApiDemos, ComposeDemos, and maps3d-compose-demo.
    • Updated Kotlin and Java MarkersActivity in ApiDemos to dismiss any active popover on map click and return whether a popover was dismissed.
    • Updated PlacesUIKit3D/MainActivity.kt to select clicked places and return true when event.placeId is non-empty.
  • Snippets & Documentation:
    • Updated Kotlin and Java PlaceSnippets (snippets/kotlin-app and snippets/java-app).
    • Updated Kotlin and Java code samples in Maps3DSamples/ApiDemos/migration_guide.md.

3. XML Layout Attribute Migration (map3d:mode -> map3d:mapMode)

  • Replaced deprecated map3d:mode XML attribute with map3d:mapMode across Map3DView layouts in:
    • Maps3DSamples/ApiDemos/common/src/main/res/layout/ (activity_camera_controls.xml, activity_cloud_styling.xml, activity_common_map.xml, activity_hello_map.xml, activity_map_interactions.xml)
    • PlacesUIKit3D/src/main/res/layout/activity_main.xml
    • .gemini/skills/android-maps3d-sdk/assets/samples/ (views_java/activity_main.xml, views_kotlin/activity_main.xml)

@LoyalAbbas
LoyalAbbas requested a review from dkhawk September 14, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant