Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google android maps api v2 Show Marker Title Always

I have a google maps v2 in my android application and some markers on it. When user click one of these markers, a title popup comes. How can I show these titles always without user click?

like image 476
Sercan Ozdemir Avatar asked Jan 29 '13 09:01

Sercan Ozdemir


People also ask

How do I show a name marker on Google Maps?

If I understood your issue correctly, you want the marker name to be displayed in Google My Maps. For that click on the style option just below layer name. Now change the set label option to name or description to display it.

How do I change the marker on Google Maps Android?

For adding a custom marker to Google Maps navigate to the app > res > drawable > Right-Click on it > New > Vector Assets and select the icon which we have to show on your Map. You can change the color according to our requirements. After creating this icon now we will move towards adding this marker to our Map.


2 Answers

Just call Marker.showInfoWindow();. See https://developers.google.com/maps/documentation/android/marker#info_windows and https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/Marker#showInfoWindow()

like image 91
Anthony Avatar answered Sep 24 '22 16:09

Anthony


Something like that:

googleMap.addMarker(new MarkerOptions()     .position(new LatLng(latitude, longitude))     .title("Your position")).showInfoWindow(); 
like image 28
djose90 Avatar answered Sep 22 '22 16:09

djose90