Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show title of the marker without clicking on that? [duplicate]

Tags:

android

I want to show marker name without clicking on the marker.

How can i do that one?

mMap.addMarker(new MarkerOptions().position(name1).title("bangalore"));
like image 630
Vinay Agrahar Avatar asked Dec 28 '25 18:12

Vinay Agrahar


1 Answers

you can use showInfoWindow() after creating marker. official document

static final LatLng MELBOURNE = new LatLng(-37.81319, 144.96298);
Marker melbourne = mMap.addMarker(new MarkerOptions()
                          .position(MELBOURNE)
                          .title("Melbourne"));
melbourne.showInfoWindow();
like image 118
CodingRat Avatar answered Dec 31 '25 11:12

CodingRat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!