I\'m trying to make something like this: I have a mapactivity and when the user taps the map it shows the coordinates of that location. I already overrided the onclick metho
Try this:
private class OverlayMapa extends Overlay {
@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow)
{
...
}
@Override
public boolean onTap(GeoPoint point, MapView mapView)
{
Context contexto = mapView.getContext();
String msg = "Lat: " + point.getLatitudeE6()/1E6 + " - " +
"Lon: " + point.getLongitudeE6()/1E6;
Toast toast = Toast.makeText(contexto, msg, Toast.LENGTH_SHORT);
toast.show();
return true;
}
}