Q:

Setting landscape mode only to Android Google Map Fragment

I have a MapFragment class, which will take up the full screen upon calling it.
From this question, I understand that forcing a horizontal layout will require changes in the Android Manifest. However, how can I achieve this if it's for a MapFragment class?
This is my xml for my map display, if it helps:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<fragment
    android:id="@+id/fragment_map"
    android:name=".com.fragments.MapFragment"
    class="com.fragments.MapFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:tag="tag_fragment_map" />

</FrameLayout>

A:

You can extend the MapFragment class. When onAttach() is invoked store the current orientation of an activity ( by calling getActivity().getRequestedOrientation() ) to an integer then set the parent's orientation to landscape. This is temporary. If your MapFragment is no longer used it will set the parent's old orientation.
public class DummyMapFragment extends MapFragment
{

    private int activityOrientation;

    @Override
    public void onAttach(Activity arg0) {

        super.onAttach(arg0);

        activityOrientation = arg0.getRequestedOrientation();

                 arg0.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

    }

    @Override
    public void onStop() {
        Activity parent = getActivity();

        if(parent != null)
                    getActivity().setRequestedOrientation(activityOrientation);

        super.onStop();

    }
}

