Closed cypher447 closed 2 years ago
I completely forgot, but there's already an api for tap gestures using MapState.onTap(tapCb: (x: Double, y: Double) -> Unit)
.
The provided callback receives the normalized coordinates of the tap, which is exactly what you need to place a marker at that position.
It would be a nice feature, to have a click/longclick listener on the map, like in OSMdroid and GMaps. It should be fired when clicking on an empty space in the map and allow access to the click position. A common usecase for this is adding a marker at an empty position.