android.support.v4.app.Fragment 内的 MapView

MapView inside android.support.v4.app.Fragment

我正在尝试在我的支持片段中设置 Google 地图,但没有加载地图,我只有 Google 地图显示的默认网格。我将它设置在 Activity 中并且一切正常,这就是为什么我认为问题在于我在 android.support.v4.app.Fragment

中使用它的原因
public class DetalleRuta extends android.support.v4.app.Fragment {

private GoogleMap googleMap;
private MapView mapView;

public DetalleRuta() {
    // Required empty public constructor
}


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {

    View v = inflater.inflate(R.layout.fragment_detalle_ruta, container, false);

    //Inicio el mapa
    mapView = (MapView)v.findViewById(R.id.mapa);
    mapView.onCreate(savedInstanceState);
    googleMap = mapView.getMap();
    googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);

    int idRuta = this.getArguments().getInt("identificador_ruta");

    return v;
}
}

这里是.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.fitness.dullmonkey.keepingfit.DetalleRuta"
    android:weightSum="10">

    <com.google.android.gms.maps.MapView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="7"
        android:id="@+id/mapa">
    </com.google.android.gms.maps.MapView>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:orientation="vertical"
        android:layout_weight="3"
        android:paddingTop="20dp">

        <TextView android:text="@string/hello_world" android:layout_width="match_parent"
            android:layout_height="wrap_content" android:gravity="center" android:id="@+id/distancia"/>

        <TextView android:text="@string/hello_world" android:layout_width="match_parent"
            android:layout_height="wrap_content" android:gravity="center" android:id="@+id/tiempo"/>

        <TextView android:text="@string/hello_world" android:layout_width="match_parent"
            android:layout_height="wrap_content" android:gravity="center" android:id="@+id/velocidad_media"/>

    </LinearLayout>



</LinearLayout>

问题是我需要覆盖片段的这个方法。

    @Override
    public void onResume() {
        mapView.onResume();
        super.onResume();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mapView.onDestroy();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        mapView.onLowMemory();
    }