I am observing unexpected behavior of Google Map. Problem is Map getting crop from top and bottom area using Support Map Fragment, if I am using full screen, map is completely visible as shown in Picture 1, but if I am applying map fragment height or weight property, map is not completely visible as shown in Picture 2.
layout xml for picture 1:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.paki.venturedive.awtest.MapsActivity" />
layout xml for picture 2:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.6"
tools:context="com.paki.venturedive.awtest.MapsActivity" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Hello world"
android:layout_weight="0.4" />
Java code :
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
In Picture 2, I am(User will be) unable to see arctic ocean above Greenland area, similarly bottom area region will be missing, as shown in Picture 3.
Did anyone face this issue or does anyone know how to cope up it with?
Any reference link or hint will be kindly appreciated.