Google map for android my location custom button

前端 未结 4 1467
不知归路
不知归路 2020-12-01 00:53

How can I change google map my location default button? I set my location enable and map draw standard image to find location, is it possible to change default image?

4条回答
  •  囚心锁ツ
    2020-12-01 01:38

    If you want to retain the smoothness of the default My Location button but not the look, call the following lines:

    //Make sure you have explicit permission/catch SecurityException
    mMap.setMyLocationEnabled(true);
    mMap.getUiSettings().setMyLocationButtonEnabled(false);
    

    Now you can start & stop location updates while keeping the default behavior

提交回复
热议问题