Hi
I am trying to run a simple MAP application.The source code is as
below:

package test.test;

import android.os.Bundle;
import android.view.KeyEvent;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;

public class testapp extends MapActivity
{
    private MapView myMapView;

    @Override
    protected boolean isRouteDisplayed()
    {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        myMapView = new MapView(this, "");

        // Lets start at the Statue of Liberty
        // I grabbed the data from Google-Maps
        GeoPoint p = new GeoPoint((int) (40.689213 * 1000000), (int)
(-74.044558 * 1000000));
        // Get the controller, that is used for translation and
zooming
        MapController mc = myMapView.getController();
        // Translate to the Statue of Liberty
        mc.animateTo(p);
        // Zoom Very close
        // mc..zoomTo(21);
        // Make myMapView the exilicit view of this app
        setContentView(myMapView);
        // Enable Sattelite-Mode, so we will se the
        // Statue of liberty instantly on the screen
        myMapView.setSatellite(true);
    }

    public boolean onKeyDown(int keyCode, KeyEvent event)
    {
        if (keyCode == KeyEvent.KEYCODE_I)
        {
            // Zooming In
            // myMapView.getController().zoomTo(myMapView.getZoomLevel
() + 1);
            return true;
        }
        else
            if (keyCode == KeyEvent.KEYCODE_O)
            {
                // Zooming Out
                // myMapView.getController().zoomTo
(myMapView.getZoomLevel() -
                // 1);
                return true;
            }
            else
                if (keyCode == KeyEvent.KEYCODE_S)
                {
                    // Switch to satellite view
                    myMapView.setSatellite(true);
                    return true;
                }
                else
                    if (keyCode == KeyEvent.KEYCODE_T)
                    {
                        // Switch on traffic overlays
                        myMapView.setTraffic(true);
                        return true;
                    }
        return false;
    }

}


The application runs and a blank map screen is displayed.
The logcat output is
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
D/dalvikvm(   57): GC freed 7089 objects / 342672 bytes in 243ms
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
D/dalvikvm(15783): GC freed 10468 objects / 533944 bytes in 316ms
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error
E/OSNetworkSystem(15783): unknown socket error -1
W/AndroidHttpConnectionFactory(15783): IOException in HttpClient:
unknown error

.
I am sitting behind a proxy and have already set the proxy in the
settings db.

Kindly provide help and inputs on the issue.

Thanks
Ajit

--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to