Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Red square on android map
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Matt  
View profile  
 More options Nov 2, 3:47 pm
From: Matt <mcorn...@gmail.com>
Date: Sun, 1 Nov 2009 20:47:12 -0800 (PST)
Local: Mon, Nov 2 2009 3:47 pm
Subject: Red square on android map
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
Any help is appreciated.

Thanks
Matt


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Leach  
View profile  
 More options Nov 2, 11:46 pm
From: Andrew Leach <andrew.leac...@googlemail.com>
Date: Mon, 2 Nov 2009 04:46:49 -0800 (PST)
Local: Mon, Nov 2 2009 11:46 pm
Subject: Re: Red square on android map
On Nov 2, 4:47 am, Matt <mcorn...@gmail.com> wrote:

> Here is the URL of the snapshot:http://picasaweb.google.com/mcornill/Screenshots#5399362615931619762
> Any help is appreciated.

I don't know how you expect anyone to help debug a screenshot. Please
post a url.

Andrew


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt  
View profile  
 More options Nov 4, 5:42 pm
From: Matt <mcorn...@gmail.com>
Date: Tue, 3 Nov 2009 22:42:03 -0800 (PST)
Local: Wed, Nov 4 2009 5:42 pm
Subject: Re: Red square on android map
Hi Andrew,

It's an android application, so here is the pretty simple source code
that produces that annoying red square on the map:

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;
    private static final int PREFERENCES_GROUP_ID=0;
    private static final int SETTINGS_ID=Menu.FIRST;

    /** 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;
    }

}

Thanks
Matt

On Nov 2, 4:46 am, Andrew Leach <andrew.leac...@googlemail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
maps.huge.info [Maps API Guru]  
View profile  
 More options Nov 4, 6:11 pm
From: "maps.huge.info [Maps API Guru]" <cor...@gmail.com>
Date: Tue, 3 Nov 2009 23:11:44 -0800 (PST)
Local: Wed, Nov 4 2009 6:11 pm
Subject: Re: Red square on android map
I suggest you post your question on the Android developer discussion
group instead.

http://groups.google.com/group/android-developers/

-John Coryat

http://maps.huge.info

http://www.usnaviguide.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google