How to change the GPS location icon in Android Studio?

0

I wanted to know how to change that red icon that marks the location of the GPS to put a photo located on the drawable. I just wanted to know what code I should add to get the suggested result.

The code is as follows:

@Override
public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;


    // Add a marker in Sydney and move the camera
    //11.456, -78910
    LatLng sydney = new LatLng(-7.937696, -34.897499);
    mMap.addMarker(new MarkerOptions().position(sydney).title("******"));

}
    
asked by anonymous 25.10.2018 / 19:16

1 answer

0

Hello, you can use the class Marker

link

GoogleMap map = ... // get a map.

Marker marker = map.addMarker(new MarkerOptions().position(new LatLng(lat, lon))
                .icon(BitmapDescriptorFactory.fromResource(R.drawable.sua_img)));
    
25.10.2018 / 19:26