Search code examples
androidgoogle-mapsandroid-layoutgoogle-apifusedlocationproviderapi

How to change the position or remove the default GPS icon of google maps?


I am new with google maps and its apis.Here i have loaded google map and trying to change the position of that GPS icon in attached image but its not getting moved from its position.

I have loaded map using SupportMapFragment and used getMapAsync method to get object of map in onMapReady() method.I know if i remove getMapAsync that icon will be removed but without it i can't get the object of map.So this is the issue i am facing.

Is there any to move position of it or remove it. Help will be appreciated.Thank you.

enter image description here


Solution

  • to remove Location Button in onMapReady add

    map = googleMap;
            map.getUiSettings().setMyLocationButtonEnabled(false);