T Tony Tetley Active Member Licensed User Longtime User Apr 14, 2015 #1 The OSMdroid lib is really great! But I have a problem with multiple markers. If there are two markers very close together on the map I am getting click events for both of them on one touch. Is there a way to prevent or ignore the second click? Thanks, Tony
The OSMdroid lib is really great! But I have a problem with multiple markers. If there are two markers very close together on the map I am getting click events for both of them on one touch. Is there a way to prevent or ignore the second click? Thanks, Tony
MaFu Well-Known Member Licensed User Longtime User Apr 19, 2015 #2 Create a global long variable and set it to 0 on app start. In your click event get the current time with DateTime.Now and compare it with the variable value. If the difference is smaller than a second ignore the event. Otherwise set the variable to the current time and continue with the event code. Upvote 0
Create a global long variable and set it to 0 on app start. In your click event get the current time with DateTime.Now and compare it with the variable value. If the difference is smaller than a second ignore the event. Otherwise set the variable to the current time and continue with the event code.