title: How to get two MapFragments in the same activity - Google Map Api
body: <p>I need to display two MapFragments with two different locations in an activity.
  In my XML file I have two MapFragments called "map" and "map_two", and in java my code in onCreate is :</p>
  
  <pre><code>com.google.android.gms.maps.MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(map);
          mapCount = 1;
          mapFragment.getMapAsync(this);
          com.google.android.gms.maps.MapFragment mapFragmentTwo = (MapFragment) getFragmentManager().findFragmentById(map_two);
          mapCount = 2;
          mapFragmentTwo.getMapAsync(this);
  </code></pre>
  
  <p>Then I override onMapReady :</p>
  
  <pre><code>@Override
  public void onMapReady(GoogleMap googleMap) {
      if (mapCount == 1){
      mMap = googleMap;
      LatLng vannes = new LatLng(47.66, -2.75);
      mMap.addMarker(new MarkerOptions().position(vannes).title("Vannes"));
      mMap.moveCamera(CameraUpdateFactory.newLatLng(vannes));
  
      } else if (mapCount == 2){
          mMap = googleMap;
          LatLng bordeaux = new LatLng(44.833328, -0.56667);
          mMap.addMarker(new MarkerOptions().position(bordeaux).title("Bordeaux"));
          mMap.moveCamera(CameraUpdateFactory.newLatLng(bordeaux));
  
      } 
  }
  </code></pre>
  
  <p>My issue is that the two maps show the same location, whereas I want to show two different locations. Do you see how to make it ?</p>
  
  <p>Thank you,</p>
  
  <p>Alex</p>