If I understand correctly you want to be able to select a point on a polyline. If you just want to select existing points on the polyline then you can do a simple search for the closest coordinate to where the user clicked. If you wanted to get the exact
location a user clicked on between data points on the polyline, then this may be a bit more difficult. The easiest solution would be to use thetryPixelToLocation method on the map and not the e.target. This will give you a location that is very close to being
on the line but may not be 100% centimetre accuracy. The accurate method would be to calculate the closest intersection point on the line. This would involve some in depth spherical mathematics.

http://rbrundritt.wordpress.com