Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Disable MyLocation button on google map [duplicate]

I am using latest Google Maps API. My problem goes like this:

I want to remove the MyLocation button (The blue dot/arrow) WITHOUT disabling MyLocation layer.

if I use this code:

googleMap.getUiSettings().setMyLocationButtonEnabled(false);

It doesn't work, unless I add:

googleMap().setMyLocationEnabled(false);

but I want to keep it true. any suggestions?

like image 632
user2745814 Avatar asked Dec 28 '13 12:12

user2745814


1 Answers

Google Map Doc says You can disable the button from appearing altogether by calling

UiSettings.setMyLocationButtonEnabled(boolean true/false)

like image 115
Chintan Khetiya Avatar answered Oct 03 '22 17:10

Chintan Khetiya