Android google maps with marker inside fragment
<p>I would like to display a google map inside a fragment. A world map is dipslayed but the markers will be ignored. 
Hopefully some can help me with my problem.
Please find below my code:</p>

<p>MapsFragment.java:</p>

<pre><code>import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;


public class MapsFragment extends SupportMapFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        super.onCreateView(inflater, container, savedInstanceState);
        View root = inflater.inflate(R.layout.fragment_map, null, false);
        initilizeMap();
        return root;
    }

    private void initilizeMap()
    {
        SupportMapFragment mSupportMapFragment = (SupportMapFragment) getFragmentManager().findFragmentById(R.id.map);
        if (mSupportMapFragment == null) {
            FragmentManager fragmentManager = getFragmentManager();
            FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
            mSupportMapFragment = SupportMapFragment.newInstance();
            fragmentTransaction.replace(R.id.map, mSupportMapFragment).commit();
        }
        if (mSupportMapFragment != null)
        {
            GoogleMap googleMap = mSupportMapFragment.getMap();
            if (googleMap != null)
                googleMap.addMarker(new MarkerOptions().position(new LatLng(10.1253,10.5868)));
        }
    }
}
</code></pre>

<p>fragment_map.xml (Layout):</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical" &gt;
    &lt;FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1.03"
        android:name="com.google.android.gms.maps.SupportMapFragment"
        android:id="@+id/map" /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>The APIKey and permission are set:</p>

<pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt;
&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
</code></pre>

<p>Thanks!</p>