> Or can I find the distance between device position and the nearest
> point of the direction?

That is what you should concentrate on.   Then you can choose not to
make your alert if your target is not exactly on the route but, say,
only 5mm off line.

So you have two topics to research, which have been covered here
before:

getting directions polyline
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/5b0ae4a42c44e5fc/9337b92306a259e9

point-to-line distance
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/47a59ed5d5d9a8f9/8220fe267d7967fb

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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/google-maps-js-api-v3?hl=en.

Reply via email to