-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Description
Describe the bug
When tapping on a marker in the web version using @capacitor/google-maps
, the InfoWindow does not appear, even though title
and snippet
are set correctly in the code.
Upon investigation, we found that the snippet
value is forcibly overwritten as an empty string in the web implementation:
capacitor-google-maps/plugin/src/web.ts
Lines 669 to 675 in 4fb47b5
const advancedMarker = new this.AdvancedMarkerElement({ | |
position: marker.coordinate, | |
map: map, | |
content: content, | |
title: marker.title, | |
gmpDraggable: marker.draggable, | |
}); |
As a result, InfoWindow does not open in the web version, while it works as expected in the native version.
Expected behavior
InfoWindow should appear on marker click even if only title
or snippet
is provided, consistent with the behavior on native apps.
To Reproduce
Steps to reproduce:
- Set
title
andsnippet
when adding a marker. - Run the app in web environment.
- Tap the marker.
- InfoWindow does not appear.
Environment
@capacitor/google-maps
: 7.0.2- Platform: Web (browser)
- Framework: Vue 3 / Ionic + Capacitor
Additional context
- The issue does not occur in native iOS/Android apps.
- This difference in behavior makes it difficult to maintain parity between web and native versions.
- We manually patched the library for testing, and InfoWindow worked correctly when
snippet
was preserved.
Suggestion
Please avoid overwriting marker.snippet
with an empty string in the web implementation.
Reference: