Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Always show map marker title in Android

I'm adding default Marker to GoogleMap the following way:

GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.editMapMap)).getMap();  MarkerOptions markerOptions = new MarkerOptions(); markerOptions.position(currentLocation.getCoordinate()); markerOptions.title(Utils.getLocationString(currentLocation.getCoordinate())); markerOptions.snippet("Blah");  locationMarker = map.addMarker(markerOptions); locationMarker.setDraggable(true); 

How can I make marker always show title and snippet without touch? I also would like to disable hiding them on touch.

like image 874
Misha Avatar asked Feb 28 '13 09:02

Misha


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.


1 Answers

It is very easy:

locationMarker.showInfoWindow(); 
like image 127
JerabekJakub Avatar answered Sep 21 '22 19:09

JerabekJakub