Skip to content

feat: expose info window customization for advanced markers - #965

Open
kikoso wants to merge 2 commits into
mainfrom
feat/advanced-marker-info-window
Open

feat: expose info window customization for advanced markers#965
kikoso wants to merge 2 commits into
mainfrom
feat/advanced-marker-info-window

Conversation

@kikoso

@kikoso kikoso commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • AdvancedMarkerImpl (the private implementation backing AdvancedMarker) already fully supported customizing a marker's info window via infoWindow/infoContent parameters, wiring them correctly into MarkerNode. However, the public AdvancedMarker composable never exposed these parameters, so there was no way to use this from outside the library.
  • Adds two new public composables, mirroring the existing pattern for regular markers (MarkerInfoWindow / MarkerInfoWindowContent):
    • AdvancedMarkerInfoWindow — customize the entire info window
    • AdvancedMarkerInfoWindowContent — customize just the info window's content, keeping the default frame
  • No changes to the existing AdvancedMarker public API — purely additive.

Fixes #822

Test plan

  • Added testAdvancedMarkerInfoWindowContentDoesNotCrash and testAdvancedMarkerInfoWindowDoesNotCrash to GoogleMapViewTests. Note: custom info window content is rendered to a bitmap by ComposeInfoWindowAdapter (not present in the Compose semantics tree), so these assert the composables wire up and showInfoWindow() succeeds without crashing, rather than asserting on-screen content.
  • Ran GoogleMapViewTests on a physical device (Pixel 4, API 33): all 18 tests pass.

AdvancedMarkerImpl already supported customizing a marker's info
window via infoWindow/infoContent, wiring them into MarkerNode
correctly, but the public AdvancedMarker composable never exposed
those parameters.

Add AdvancedMarkerInfoWindow and AdvancedMarkerInfoWindowContent,
mirroring the existing MarkerInfoWindow/MarkerInfoWindowContent
public API for regular markers.

Fixes #822
@googlemaps-bot

googlemaps-bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 25.74% -0.34%
Files changed 0%

File Coverage
AdvancedMarkersActivity.kt 0% -9.37%

Demonstrates the new public API from #822 by using it for Marker 1
in AdvancedMarkersActivity.
@kikoso
kikoso marked this pull request as ready for review August 14, 2026 15:39
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.

Support info window customization for advanced markers

3 participants