Answer the question
In order to leave comments, you need to log in
What is the error in displaying the desired phrase after checking the marker label?
Only one "Strips" message is displayed, both when the marker is clicked with the "Strips" message displayed, and the marker that should display the "Pop" message is displayed. What could be the problem?
public void onMapReady(GoogleMap googleMap) {
...
Tornado = mMap.addMarker(new MarkerOptions()
.position(HOR));
Tornado.setTag(Yep);
Oppy = mMap.addMarker(new MarkerOptions()
.position(DQE));
Oppy.setTag(Swe);
mMap.setOnMarkerClickListener(this);
}
public boolean onMarkerClick(final Marker marker) {
if (marker.getTag()==Yep) {
Toast.makeText(getApplicationContext(), "Strips: ",
Toast.LENGTH_SHORT).show();
}
else if (marker.getTag()==Swe) {
Toast.makeText(getApplicationContext(), "Pop: ",
Toast.LENGTH_SHORT).show();
}
return false;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question