[android-developers] Re: How to get the point from click the google map
hello, I am not so sure about what is your problem, so if your problem
is detect which pixels has been touched:
(This code is not compiled, could have some errors, is just like an
idea)
class Map extends MapView
{
public boolean onTouchEvent(MotionEvent ev)
{
int coor_x = ev.getX();
int coor_y = ev.getY();
//And if you want get the geografic point represented by these
pixels:
GeoPoint point = this.getProjection().fromPixels(coor_x,
coor_y);
return super.onTouchEvent(ev);
}
}
Was that the solution to your problem?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home