-
Notifications
You must be signed in to change notification settings - Fork 172
Description
We’re using Google Maps with Compose to overlay several interactive elements.
Gestures events that start on a clickable compose element never reach the MapView (since it isn’t a composable ancestor), so the map won’t move unless the gesture begins directly on it.
It would be useful if Google Maps could act as a “parent” to these composables, handling unconsumed gestures from other composables—eg. drag gestures started from a child that only listens for clicks.
While we can’t set composable children on the view, we can redirect gesture events from a composable to the view if we would have access to it.
Could there be options for clients to handle this? For example:
-
A second
@Composableparameter inGoogleMap()with an internal event receiver for wiring gestures. -
Exposing the
MapView(via CompositionLocalProvider or a callback). -
Allowing the view to be searchable in the hierarchy (id, name, or tag) for disambiguation when multiple maps exist.
Currently, we have some working POC of this which relies on MapApplier holding the mapView, which feels risky.