title: getmap error on Google Maps in a fragment
body: <p>I try some Code with a Map in a fragemt.
  It works but the Map ID didnt found. 
  I get the warning that getMap is deprecated.</p>
  
  <p><a href="https://i.stack.imgur.com/RFUNG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RFUNG.jpg" alt="enter image description here"></a></p>
  
  <pre><code>public class MapsActivity extends Fragment {
  
  MapView mMapView;
  private GoogleMap googleMap;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // inflat and return the layout
      View v = inflater.inflate(R.layout.activity_maps, container,
              false);
  
      mMapView = (MapView) v.findViewById(R.id.mapView);
      mMapView.onCreate(savedInstanceState);
  
  
      mMapView.onResume();// needed to get the map to display immediately
  
      try {
          MapsInitializer.initialize(getActivity().getApplicationContext());
      } catch (Exception e) {
          e.printStackTrace();
      }
  
      googleMap = mMapView.getMap();
      // latitude and longitude
      double latitude = 17.385044;
      double longitude = 78.486671;
  </code></pre>