MapActivity.java ----------------- // This example demonstrates how to put multiple markers on the map, color them, // adjust the zoom and change the terrain type. The zoom is changed by double-clicking // on the map. Click on the markers to see the name. import androidx.fragment.app.FragmentActivity; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; public class MapsActivity extends FragmentActivity implements OnMapReadyCallback { private GoogleMap mMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); } @Override public void onMapReady(GoogleMap googleMap) { // googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); // map with mountains, rivers, etc googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID); // photographic map + roads and city names // googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE); // photographic map googleMap.addMarker(new MarkerOptions() .position(new LatLng(37.4233438, -122.0728817)) .title("LinkedIn") .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))); googleMap.addMarker(new MarkerOptions() .position(new LatLng(37.4629101,-122.2449094)) .title("Facebook") .snippet("Facebook HQ: Menlo Park") .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))); googleMap.addMarker(new MarkerOptions() .position(new LatLng(37.3092293, -122.1136845)) .title("Apple") .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET))); googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(37.4233438, -122.0728817), 10)); // change last parameter for more zoom, i.e. switch to 15 and look at difference } }