googlemaps / googlemaps/android-maps-ktx
Allow customization of return type when using markerClickEvents() and myLocationButtonClickEvents()
- Dominant language
- Kotlin
- Stars
- 359
- Forks
- 57
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 9
Description
**Is your feature request related to a problem? Please describe.**
Currently, using the `markerClickEvents()` and `myLocationButtonClickEvents()` APIs cannot customize the behavior when a marker or when the blue dot is tapped. That is, the default behavior of centering the map on the marker/blue dot (and additionally displaying an info window for a marker) will always occur.
**Describe the solution you'd like**
Customization of this behavior should be achievable by passing in an optional lambda to one of those methods.
For example:
```
googleMap.markerClickEvents { marker ->
// Override default behavior
return false
}.collect {
// ...
}
```
**Describe alternatives you've considered**
Do nothing.
**Additional context**
See https://github.com/googlemaps/android-maps-ktx/pull/162#discussion_r710256848
Contributor guide
Assessment
This issue has not been assessed yet.