Google Maps blank square

I am writing an application for Android 2.1. with google maps. Everything works fine, except for one detail: in the lower left corner of the device screen there is a white square. (for example, in the screenshot below). It doesnโ€™t depend on my location - always the bottom left corner is empty.

Here is the Java code where I create mapView:

mapView = new MapView(activity,"myCorrectApiCode"); // Configure the map display options mapView.setBuiltInZoomControls(false); mapView.setSatellite(true); mapView.setStreetView(true); 

Any idea to exclude this empty square?

alt text

code info: my main xml activity file:

 <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayoutMain" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center"> <LinearLayout android:background="@drawable/mapback" android:id="@+id/LinearLayoutMainUp" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="80sp" android:gravity="center"> <TextView android:textColor="#000000" android:gravity="center" android:id="@+id/TextViewResultTxt" android:layout_height="wrap_content" android:text="@string/result_txt" android:layout_width="wrap_content"></TextView> <TextView android:textColor="#000000" android:textStyle="bold" android:layout_height="wrap_content" android:id="@+id/myLocationText" android:singleLine="true" android:gravity="center" android:layout_width="fill_parent" android:text="@string/hello"></TextView> <TextView android:textColor="#000000" android:textStyle="bold" android:layout_height="wrap_content" android:id="@+id/myLocationTextDist" android:singleLine="true" android:gravity="center" android:layout_width="fill_parent" android:text="@string/waiting_for_gps"></TextView><TextView android:text="" android:id="@+id/timerTextView" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> </LinearLayout> 

mapView I am adding dynamic:

 LinearLayout l = ((LinearLayout) activity.findViewById(R.id.LinearLayoutMain)); l.addView(mapView); 
+4
source share
2 answers

Without knowing more, I would suggest that you might have another MapView element (or some other element) defined in your XML file, which is placed on top of the current map view. If you can share more with how you show your map (XML and java), it would be easier to find the reason.

0
source

Source: https://habr.com/ru/post/1336671/


All Articles