Adding a waypoint at a specifc distance along route
132 views
Skip to first unread message
skube
unread,
Aug 16, 2011, 11:00:15 AM8/16/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
Hi, I'm wondering if anyone might be able to help. I would like to create a directions map that obviously has an origin and destination plotted. However, I would like to drop a marker at some distance along the route polyline (not radially from the origin). Does anyone know if this is even possible?
thanks!
geoco...@gmail.com
unread,
Aug 16, 2011, 2:56:13 PM8/16/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
Sure. You can get the route, then compute the coordinates of a point
at a certain distance along it and put a marker there.
createMarker(polyline.GetPointAtDistance(64800),"64.8km","64.8km");
(uses a ported version of Mike Williams (v2) epoly library, there are
probably better ways to do it now)