Hi,
Is it possible to detect if the user clicked in the map area?
For instance, I want to show information about a marker when the user tap on the marker and then remove that info when the user click in another place on the map. Is this possible?
Thanks in advance,
@BGomes17 yes it is possible. You can define an onTap in your MapOptions:
MapOptions(
minZoom: 1.0,
maxZoom: 19.0,
zoom: 13.0,
onTap: (point) => print(point),
onLongPress: (point) => print(point),
onPositionChanged: (position, hasGesture) => print("$position $hasGesture"),
center: LatLng(0.0, 0.0),
)
Thank you very much, I was missing the parameter point in the onTap().
It worked like a charm.
Thank you,
Most helpful comment
@BGomes17 yes it is possible. You can define an
onTapin yourMapOptions: