title: Adding touch event listeners to MapView
body: <p>So I want to return the the geo location of whatever point I touch on the map,but my code just doesn't do anything on moving across/clicking the screen. I'm new to Java as well as Android, so I think its something to do with my lack of knowledge of coding in java. Here's my code</p>
  
  <pre><code>package sdpd.loc;
  
  import sdpd.loc.createNote.mapOverlay;
  
  import com.google.android.maps.GeoPoint;
  import com.google.android.maps.MapActivity;
  import com.google.android.maps.MapView;
  
  import android.os.Bundle;
  import android.view.MotionEvent;
  import android.widget.Toast;
  import android.app.Activity;
  
  public class createNote extends MapActivity {
  
  @Override
  protected boolean isRouteDisplayed() {
      return false;
  }       
  
  @Override
  public void onCreate(Bundle savedInstanceStates){       
      super.onCreate(savedInstanceStates);
      setContentView(R.layout.map);
  
      MapView mapview=(MapView)findViewById(R.id.MapView);
      mapview.setBuiltInZoomControls(true);
  
  
  }   
  
  
  class mapOverlay extends com.google.android.maps.Overlay{
      @Override
  
      public boolean onTouchEvent(MotionEvent event, MapView mapview){
  
          if (event.getAction()==1){
              GeoPoint p=mapview.getProjection().fromPixels((int)event.getX(), (int)event.getY());
              Toast.makeText(getBaseContext(),p.getLatitudeE6()/1E6 + "," + p.getLongitudeE6()/1E6, Toast.LENGTH_SHORT).show();
  
          }
          return false;
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>How  do I get it to work?</p>