myLocationButtonClickEvents

fun GoogleMap.myLocationButtonClickEvents(consumed: () -> Boolean = { false }): Observable<Unit>

Creates an Observable that emits whenever the my location button is clicked.

The created Observable uses GoogleMap.setOnMyLocationButtonClickListener to listen to map my location button clicks. Since only one listener at a time is allowed, only one Observable at a time can be used.

Parameters

consumed

Lambda invoked when the my location button is clicked. The return value is the value passed to GoogleMap.OnMyLocationButtonClickListener.onMyLocationButtonClick. Default implementation will always return false