On any map application it used to display a blank square on the bottom
left.
Flashed a 4.2.1 and the square is gone.
On Nov 6, 2:45 pm, TreKing <treking...@gmail.com> wrote:
> Isn't that where the Google logo is supposed to show up? Maybe that
> got corrupted somehow?
>
> On Nov 5, 9:50 pm, Matthieu Cornillault <m...@netsurf.org> wrote:
>
> > Hi Dave
>
> > Thanks for the idea. I tried it out but still get this red square....
> > When the page loads it displays the grid, the red square, and the
> > loads the satellite map (while keeping this red box visible).
>
> > Thanks
> > Matt
>
> > On Nov 5, 2009, at 6:58 PM, davemac wrote:
>
> > > My guess would be it's the LinearLayout but I don't know why. Try
> > > removing that and see if it helps. I don't think you need it.
>
> > > - dave
>
> > > On Nov 5, 2:18 pm, Matthieu Cornillault <m...@netsurf.org> wrote:
> > >> Hello,
>
> > >> I have written a simple map application using the google API. I have
> > >> the apikey set and the map displays properly on the android phone.
> > >> However, there is always a red square on the bottom left of the map,
> > >> that I don't know how to get rid off.
> > >> Here is the URL of the snapshot:http://picasaweb.google.com/mcornill/Screenshots#5399362615931619762
> > >> The java code is pasted below.
> > >> Any help is appreciated.
> > >> Thanks
>
> > >> Matt
>
> > >> import android.*;
> > >> import android.content.Intent;
> > >> import android.graphics.Bitmap;
> > >> import android.graphics.BitmapFactory;
> > >> import android.graphics.Canvas;
> > >> import android.graphics.Point;
> > >> import android.location.Address;
> > >> import android.location.Geocoder;
> > >> import android.view.*;
> > >> import android.widget.LinearLayout;
> > >> import android.widget.Toast;
> > >> import com.google.android.maps.*;
> > >> import com.google.android.maps.MapView.LayoutParams;
> > >> import android.os.Bundle;
> > >> import java.io.IOException;
> > >> import java.util.List;
> > >> import java.util.Locale;
> > >> public class MapsActivity extends MapActivity
> > >> {
> > >> static MapView mapView;
> > >> MapController mc;
> > >> GeoPoint p;
>
> > >> /** Called when the activity is first created. */
> > >> @Override
> > >> public void onCreate(Bundle savedInstanceState)
> > >> {
> > >> super.onCreate(savedInstanceState);
> > >> setContentView(R.layout.main);
> > >> // Allow zooming
> > >> mapView = (MapView) findViewById(R.id.mapView);
> > >> mapView.setSatellite(true);
> > >> mapView.setBuiltInZoomControls(true);
> > >> mc = mapView.getController();
> > >> Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
> > >> try {
> > >> List<Address> addresses = geoCoder.getFromLocationName(
> > >> "Palo Alto, CA", 5);
> > >> String add = "";
> > >> if (addresses.size() > 0) {
> > >> p = new GeoPoint(
> > >> (int) (addresses.get(0).getLatitude() * 1E6),
> > >> (int) (addresses.get(0).getLongitude() *
> > >> 1E6));
> > >> }
> > >> } catch (IOException e) {
> > >> e.printStackTrace();
> > >> }
> > >> mc.animateTo(p);
> > >> mc.setZoom(17);
> > >> mapView.invalidate();
> > >> }
> > >> @Override
> > >> protected boolean isRouteDisplayed() {
> > >> return false;
> > >> }
>
> > >> }
>
> > >> and here is main.xml:
> > >> <?xml version="1.0" encoding="utf-8"?>
> > >> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> > >> android"
> > >> android:layout_width="fill_parent"
> > >> android:layout_height="fill_parent">
>
> > >> <com.google.android.maps.MapView
> > >> android:id="@+id/mapView"
> > >> android:layout_width="fill_parent"
> > >> android:layout_height="fill_parent"
> > >> android:enabled="true"
> > >> android:clickable="true"
> > >> android:apiKey="0oWLKpz0iuwLIE5KcYgcqCL0TPkzQOeWEOiUWOg"
> > >> />
>
> > >> <LinearLayout android:id="@+id/zoom"
> > >> android:layout_width="wrap_content"
> > >> android:layout_height="wrap_content"
> > >> android:layout_alignParentBottom="true"
> > >> android:layout_centerHorizontal="true"
> > >> />
> > >> </RelativeLayout>
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscribe@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment