latitude and longitude change in android and map not shown 
<p>latitude and longitude change in android and map not shown </p>

<pre><code>package net.learn2develop.GoogleMaps;

import java.io.IOException;
import java.util.*;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.MapView.LayoutParams;
import android.app.LocalActivityManager;
import android.content.Context;
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.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.Toast;

public class MapsActivity extends MapActivity {
    MapView mapView;
    MapController mc;
    GeoPoint p;
    double latPoint, lngPoint;
    LocationManager myManager;


class MapOverlay extends com.google.android.maps.Overlay
{
    @Override

    public boolean onTouchEvent(MotionEvent event, MapView mapView) 
    {   
        //---when user lifts his finger---
        if (event.getAction() == 1) {                
            GeoPoint p = mapView.getProjection().fromPixels(
                (int) event.getX(),
                (int) event.getY());

            Geocoder geoCoder = new Geocoder(
                getBaseContext(), Locale.getDefault());
            try {
                List&lt;Address&gt; addresses = geoCoder.getFromLocation(
                    p.getLatitudeE6()  / 1E6, 
                    p.getLongitudeE6() / 1E6, 1);

                String add = "";
                if (addresses.size() &gt; 0) 
                {
                    for (int i=0; i&lt;addresses.get(0).getMaxAddressLineIndex(); 
                         i++)
                       add += addresses.get(0).getAddressLine(i) + "\n";
                }
                Log.e("address", add);

                Toast.makeText(getBaseContext(), add, Toast.LENGTH_SHORT).show();
            }
            catch (IOException e) {                
                e.printStackTrace();
            }   
            return true;
        }
        else                
            return false;
    }        

}

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mapView = (MapView) findViewById(R.id.mapView);
    LinearLayout zoomLayout = (LinearLayout) findViewById(R.id.zoom);
    View zoomView = mapView.getZoomControls();

    zoomLayout.addView(zoomView, new LinearLayout.LayoutParams(
            LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    mapView.displayZoomControls(true);

    mc = mapView.getController();
     LocationManager myManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    myManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,new myLocationListener());


    mc.setZoom(10);

    //---Add a location marker---
    MapOverlay mapOverlay = new MapOverlay();
    List&lt;Overlay&gt; listOfOverlays = mapView.getOverlays();
    listOfOverlays.clear();
    listOfOverlays.add(mapOverlay);   

    mapView.invalidate();

}

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

class myLocationListener implements LocationListener {

    public void ListLocationUpdater() {
    }

    @Override
    public void onLocationChanged(Location loc) {
        if (myManager != null) {
            // List list = myManager.getAllProviders();
            String param = (String) myManager.getProviders(true).get(0);
            loc = myManager.getLastKnownLocation(param);
            if (loc != null) {
                latPoint = loc.getLatitude();
                lngPoint = loc.getLongitude();
                                    p = new GeoPoint((int) (latPoint * 1E6), (int) (lngPoint * 1E6));

    mc.animateTo(p);                    Log.e("RootDrawApplication",String.valueOf(latPoint)+"  , "+String.valueOf(lngPoint));

            } else
                Log.e("GoogleMaps ", "Error: Location  is null");
        } else
            Log.e("GoogleMaps ", "Error: Location Manager is null");
    }

    @Override
    public void onProviderDisabled(String provider) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onProviderEnabled(String provider) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onStatusChanged(String provider, int status, Bundle extras) {
        // TODO Auto-generated method stub

    }

}
</code></pre>

<p>}</p>
