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;
}
Thank you for reading this article Problem of onTouchEvent(MotionEvent, MapView) on MapView With URL https://x-tutorials.blogspot.com/2010/06/problem-of-ontoucheventmotionevent.html. Also a time to read the other articles.
0 comments:
Write your comment for this article Problem of onTouchEvent(MotionEvent, MapView) on MapView above!