How to add a satellite view in android studio?

joey picture joey · Dec 18, 2015 · Viewed 17.2k times · Source

My map is working fine.However, i want to add a satellite view along with my normal view? How can i achieve that?

public class MainActivity extends FragmentActivity implements OnMapReadyCallback {


private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
            .findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}



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


    LatLng location = new LatLng(x,y);
    mMap.addMarker(new MarkerOptions().position(ReduitBusStop).title("you are here!"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(location));

Answer

SachinS picture SachinS · Dec 18, 2015

Try with setting the type of map tiles as below

        mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);