Instead of onTouchEvent(MotionEvent, MapView), I override onTap(GeoPoint, MapView) and test on Nexus One. It work as expect.
public boolean onTap(GeoPoint p, MapView mapView) {
String strLocation = String.valueOf((float)p.getLongitudeE6()/1000000)
+ " : "
+ String.valueOf((float)p.getLatitudeE6()/1000000);
Toast.makeText(AndroidMapView.this, strLocation, Toast.LENGTH_LONG).show();
// TODO Auto-generated method stub
//return super.onTap(p, mapView);
myMapView.getOverlays().remove(0);
CenterLocation(p);
return true;
}
No comments:
Post a Comment