Answer the question
In order to leave comments, you need to log in
Catch a click on a specific marker in Google Maps?
Tell me, how can I correctly catch a click on a specific marker on a Google Maps map and then set an action for it? Let's say there are three Marker One variables; two; three; I did this, but it only works from the third or fourth click on the marker:
if (marker.equals(One)) {
Toast.makeText(getApplicationContext(), "Балалайка: ",
Toast.LENGTH_SHORT).show();
}
Answer the question
In order to leave comments, you need to log in
If I'm not mistaken, the marker has a setTag(Object o) method where you can stuff whatever your heart desires to distinguish them - id, name, any object. Well, accordingly, when you click getTag () and look, they poked where you need to - we do something, no - we do nothing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question