KEMBAR78
feat: Use Map ID from secrets for Advanced Markers by dkhawk · Pull Request #2302 · googlemaps-samples/android-samples · GitHub
Skip to content

Conversation

@dkhawk
Copy link
Contributor

@dkhawk dkhawk commented Oct 7, 2025

Updates the Advanced Markers demo to programmatically initialize the map when a custom Map ID is not provided in the string resources. This ensures that a valid Map ID from the secrets file is always used, which is a requirement for Advanced Markers to function correctly.

This change includes:

  • Adding detailed comments to both the Java and Kotlin versions of the activity to explain the Map ID loading logic.
  • Implementing a fallback mechanism to create the SupportMapFragment with a GoogleMapOptions object that explicitly sets the Map ID.

Updates the Advanced Markers demo to programmatically initialize the map when a custom Map ID is not provided in the string resources. This ensures that a valid Map ID from the secrets file is always used, which is a requirement for Advanced Markers to function correctly.

This change includes:
- Adding detailed comments to both the Java and Kotlin versions of the activity to explain the Map ID loading logic.
- Implementing a fallback mechanism to create the `SupportMapFragment` with a `GoogleMapOptions` object that explicitly sets the Map ID.
@dkhawk dkhawk requested a review from kikoso October 7, 2025 20:38
Copy link
Collaborator

@kikoso kikoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kikoso kikoso merged commit 092346f into main Oct 10, 2025
9 checks passed
@kikoso kikoso deleted the fix/use-map-id-from-secrets-in-adv-markers branch October 10, 2025 13:18
googlemaps-bot pushed a commit that referenced this pull request Oct 13, 2025
# [1.17.0](v1.16.0...v1.17.0) (2025-10-13)

### Bug Fixes

* images with size zero ([#2290](#2290)) ([3c4fb12](3c4fb12))

### Features

* Add EEA Terms of Service notice to README ([#2147](#2147)) ([6f7e480](6f7e480))
* modernization ApiDemos ([#2288](#2288)) ([f44422b](f44422b))
* updated snippets ([#2289](#2289)) ([778a365](778a365))
* Use Map ID from secrets for Advanced Markers ([#2302](#2302)) ([092346f](092346f))
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 1.17.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants