Skip to content
New issue

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

Marker callout disappeared when clicking or moving map view #23

Closed
sana-20 opened this issue Feb 15, 2021 · 1 comment
Closed

Marker callout disappeared when clicking or moving map view #23

sana-20 opened this issue Feb 15, 2021 · 1 comment

Comments

@sana-20
Copy link

sana-20 commented Feb 15, 2021

Hello @peterLaurence! Thank you for this great library. It really helped me a lot.
But a marker callout disappeared as soon as I touch a map.
Is there any way that I could keep marker callout view even though I click or move the map?

@p-lr
Copy link
Owner

p-lr commented Feb 15, 2021

Hi, this is intended behavior. You can turnaround this by subclassing the MapView and override onTouchEvent method, like so:

override fun onTouchEvent(event: MotionEvent): Boolean {
    return super.onTouchEvent(event)
}

However, you'll have to manage callouts visibility yourself. To remove them all, use mapView.markerLayout?.removeAllCallout(). To remove one particular callout, you can use mapView.removeCallout(view).
BTW, I realize that I should add a high level API to remove all callouts.

@p-lr p-lr closed this as completed Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants