Thanks for your answer! I just want to implement the function just like
Google Map (point on map get the start point).I use the OnTouchListener to
listen this event.But when I point on map ,the map can't move,room,I can
only touch on a Stationary map.
Shall I use other listeners?But I didn't find the proper the listener.
On Wed, Jun 2, 2010 at 9:39 AM, fjfdeztoro <[email protected]> wrote:
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
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