How to close all open <Callout /> on the map by tapping the map or any button? #705
-
Hello! I need help. I have a problem. On the map, I have markers, and when I tap on them, their descriptions appear. For example, if I tap on marker A, its description opens, and then if I tap on marker B, the description of marker A hides and the description of marker B appears. But there’s one catch: to close the description of a marker, I need to tap on the same marker again. I would like to make it so that the description can be closed by tapping on the map or a specific button. Is there an event in the library for this? I would be fine with an event that closes all annotations with one tap. Also, my marker’s coordinates change every 4 seconds because it tracks the movement of a real person. If I tap on the marker and the annotation appears, and then the coordinates change, the marker moves but the annotation stays in place. Is there a solution to this problem?
Through experimentation, I found that if I render just a marker on the map using
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would recommend switching to |
Beta Was this translation helpful? Give feedback.
I would recommend switching to
MarkerView
instead of usingCallout
. There you can control the state yourself easily and implement any custom behavior.