how to find the selected route index in google map api v 3
590 views
Skip to first unread message
sam
unread,
Dec 15, 2011, 11:59:00 PM12/15/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
I am using google map 3 and able to show multiple routes in the div which i pass in setpanel() method. now what i want is when i click on any suggested route i should able to get the index of that route. please help its urgent. thanks in advance.
MymsMan
unread,
Dec 16, 2011, 6:18:24 AM12/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
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
then how can i figure out the index any other way ??
MymsMan
unread,
Dec 16, 2011, 7:27:30 AM12/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
You could possibly use a setTimeout loop to poll for the current value every second an see if it has changed but it would be a bit ugly.
sam
unread,
Dec 16, 2011, 7:30:21 AM12/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
Thanks MymsMan for ur reply but what i want is user will select any route from suggested route and will click on the save button so that i can save the route index in my database.
MymsMan
unread,
Dec 16, 2011, 7:39:24 AM12/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
If the user is clicking a Save button then you can just retrieve the current value from the Directions renderer object - Rend.getRouteIndex().
What is missing from the API is a notification of when the user selects an alternative route.
sam
unread,
Dec 16, 2011, 8:02:05 AM12/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
MymsMan
thaaaaaaaaaaaaaankuuuuuuuu soooooo much that worked really fine...cant tell you how long i have been dealing with this issue...