Пустой квадрат в Google Maps - PullRequest
       2

Пустой квадрат в Google Maps

4 голосов
/ 23 января 2011

Пишу приложение для Android 2.1.с Google Maps.Все отлично работает, кроме одной детали: в левом нижнем углу экрана устройства есть белая квадратная рамка.(как на скриншоте ниже).Это не зависит от моего местоположения - левый нижний угол всегда пуст.

Вот код Java, в котором я создаю mapView:

mapView = new MapView(activity,"myCorrectApiCode");

// Configure the map display options
mapView.setBuiltInZoomControls(false);
mapView.setSatellite(true);
mapView.setStreetView(true);

Есть идеи исключить этот пустой квадрат?

alt text

информация о коде: мой основной xml-файл активности:

<?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 Я добавляю динамические данные:

LinearLayout l = ((LinearLayout) activity.findViewById(R.id.LinearLayoutMain));
l.addView(mapView);

Ответы [ 2 ]

4 голосов
/ 25 января 2011

Эта проблема зависит от устройства.

Ответили здесь: глюк Google Maps на телефонах Motorola

Сообщение на официальном форуме Motorola: http://community.developer.motorola.com/t5/Android-App-Development-for/Glitch-with-Google-logo-in-Google-maps/m-p/10568#M2085

0 голосов
/ 24 января 2011

Не зная больше, я сначала предположил бы, что у вас может быть другой элемент MapView (или некоторый другой элемент), определенный в вашем XML-файле, который расположен поверх текущего вида карты. Если вы сможете больше рассказать о том, как вы показываете свою карту (XML и Java), вам будет легче найти причину.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...