[google_maps_flutter] Add `onTap` for DefaultMarker
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
### GooleMap displays default markers on surrounding landmarks. However, We can't detect `onTap` for that.
### Use case
let's say I want to set a destination by tapping the default marker on Map.
When I tap the marker, the value I want is the coordinate the marker points to, not the coordinate I tapped.
This may sound the same, but since the marker is not a point, a low zoom level makes a big difference.
### To be sure, here is the solution I am now doing instead.
1. `onTap` to get the `LatLng`.
2. use Google Maps API geocode the `LatLng` obtained in 1 to get the Place id.
3. use places api with the Place id obtained in step 2 to get the location information and point to the marker.
This works in many cases, but not reliably.
### Proposal
```dart
{void Function(LatLng)? onDefaultMarkerTap}
```
Contributor guide
Assessment
This issue has not been assessed yet.