event handler for route click

Apr 23, 2009 at 8:33 AM
I'm wondering what is the best way to fire an event, if the user clicks on a drawn route.
Iterating the points of the route and check if they contain the mouse e.Y/e.X coordinates is not a good idea because you have to click exact on the specific point and can't catch the lines between...
The other way would be to use the graphicspath.isvisible...but I think this is not easy to implement with the actual design structure...are there any other ideas?
Apr 23, 2009 at 8:35 AM
you can add markers on the route end/start, they have events you need
Apr 23, 2009 at 8:39 AM

thanks for the fast answer ;-)
yes the markers work perfect, but the thing I am going to do is to catch all clicks on a random section of the route between the start and end marker...another way maybe would be to create a rectangle at each point of the graphicspath of the route and locate the click event via iterating thru the rectangle.contains of each point of the route...
Apr 23, 2009 at 9:35 AM
Feb 17, 2012 at 9:49 AM