We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Had a discussion with @sargunv on Slack.
It's pretty hard to register a click handler you want to register immediately (without disambiguating double clicks).
Should this be we add some new API for this?
Here I copy pasted the implementation of onSingleTap to onSingleTapConfirmed to and commented out the body of onSingleTap.
onSingleTap
onSingleTapConfirmed
The text was updated successfully, but these errors were encountered:
Minimal Kotlin example of how to do this today without a new API
// map is a MapLibreMap val gestureManager = map.gesturesManager gestureManager.detectors.add(SingleTapUpDetector(context, gestureManager))
where SingleTapUpDetector is:
SingleTapUpDetector
class SingleTapUpDetector(context: Context, gestureManager: AndroidGesturesManager) : BaseGesture<StandardOnGestureListener>(context, gestureManager) { private val detector = GestureDetector(context, Listener()) override fun analyzeEvent(event: MotionEvent): Boolean { return detector.onTouchEvent(event) } private class Listener : SimpleStandardOnGestureListener() { override fun onSingleTapUp(event: MotionEvent): Boolean { println(event) return true } } }
Sorry, something went wrong.
Thanks for sharing. I'll make sure this is added to the documentation.
No branches or pull requests
Had a discussion with @sargunv on Slack.
It's pretty hard to register a click handler you want to register immediately (without disambiguating double clicks).
Should this be we add some new API for this?
Screen.Recording.2024-11-16.at.02.21.12.mov
Here I copy pasted the implementation of
onSingleTap
toonSingleTapConfirmed
to and commented out the body ofonSingleTap
.The text was updated successfully, but these errors were encountered: