Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable center button in MyLocation at Google Map API V2

I searched a lot on the web, but I haven't found anything which answered my question. When I enable MyLocation with

gmap.setMyLocationEnabled(true)

I automatically get a button to center the map on my current location. I want to remove it and so I'm asking you how to do this. I hope somebody of you can help me!

like image 976
medphys Avatar asked Jan 17 '13 09:01

medphys


1 Answers

After calling the following methods on your GoogleMap object:

map.setMyLocationEnabled(true); map.getUiSettings().setMyLocationButtonEnabled(false); 

you should see the current location indicator (the blue circle), but no control to center the map on that location.

like image 187
john ellis Avatar answered Oct 02 '22 16:10

john ellis