I am trying to catch onTouchEvent on MapActivity. I overwritten the
method but it isn't never fired. Why ?. I need to find the location
lat. and long. for show add new marker when the user tap on map.
public boolean onTouchEvent(MotionEvent event){
super.onTouchEvent(event);
if (event.getAction()==MotionEvent.ACTION_UP){
Projection pro = map.getProjection();
GeoPoint p = pro.fromPixels((int)event.getX(),
(int)event.getY());
curDB.requery();
Db.createPointItem(p.getLatitudeE6(),
p.getLongitudeE6(), "CIAO");
map.getOverlays().clear();
map.getOverlays().add(so);
map.invalidate();
return true;
}
else
return false;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---