On Feb 20, 4:19 pm, TreKing <[email protected]> wrote: > Tip: Don't post a giant blob of unformatted, unreadable code. Post the > least bit of code that will get the point across. No one is going to read > through all that, it makes your post hard to read, and increases the > chances of people ignoring your post because they never get to the bottom > where the real substance is. >
You're right, I'll remember it. > > For information, I was thinking about something which would probably > > be inefficient, but I'll tell it, we never knows :) > > Try it. See how fast it is. Profile it. Optimize it, if necessary. > > > Since the route establishement is basicaly a succession of drawings > > beetween two geopoints (segments), we could prehaps handle route > > clicking this way : > > > - Using the `onTouchEvent` method of the map overlay, we can get the > > geopoint associated to a click. > > - Then we try to establish if the clicked geopoint is part of a route > > segment. > > You probably want to determine if the clicked geopoint is "close enough" to > a route segment, as it's unlikely the user will always perfectly tap on a > route segment or point on said segment. > > > One last information : Several routes will be drawn on the map at the same > > instant, so the click must be associated to a unique route and not all of > > them. > > Then stop processing the tap event after you find one valid route. > The main message of this post was 'Am I missing something ?', is there another solution to manage route clicking than the one I briefly exposed. Since I didn't found any additional information, I'm going to test the route clicking management this way, finding if the clicked geopoint is close to a route segment (depending on the road drawing heavyness). Thank you. -- 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

