Save a "dragged" directionsResult (route)

324 views
Skip to first unread message

JKurtock

unread,
Sep 22, 2010, 10:41:10 PM9/22/10
to Google Maps JavaScript API v3
Is it possible to save a directionsResult after it has been dragged by
a user?

Without dragging, one could save the start and end points, then re-
call the DirectionsRenderer and get the same route back. But when the
user drags the route, a "transitional waypoint" is added, and the
route is recalculated including that waypoint (apparently with
stopover:false). Is the position of that transitional waypoint
accessible? If it is, then all of the user waypoints, plus the
transitional waypoint, could be saved. The DirectionsRenderer would
(I assume) render the same directions based on ALL of those waypoints.

Once could save EVERY "step" of the rendered direction, but if the
DirectionsRenderer was called with that large set of waypoints, the
rendered route would be (effectively) non-draggable (as every entered
waypoint would be fixed).

The transitional waypoint is visible (a small dot on the polyline),
but it does not seem to appear in the Steps of the Leg. Rather, the
Step just "goes through" the transitional waypoint without any
indication of that waypoint's position.

geoco...@gmail.com

unread,
Sep 22, 2010, 10:53:21 PM9/22/10
to Google Maps JavaScript API v3
Did you see Esa's post in this thread?
http://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/d4b2e1950744aa37/c8bb5e43f845afc4

Is that what you are looking for?

-- Larry

JKurtock

unread,
Sep 23, 2010, 11:39:31 AM9/23/10
to Google Maps JavaScript API v3
Yes, that is the answer for which I was looking.

(Now I just need to figure out how I missed it both in my own
experimentation AND in searching the forums ...)

Thx.

- Jeff

geoco...@gmail.com

unread,
Sep 23, 2010, 11:50:30 AM9/23/10
to Google Maps JavaScript API v3
That is the problem with undocumented things. They are hard to find,
and they have been known to change or go away without warning.

Searching the forum for something when you don't know what it is
called is not easy, I knew I had seen it, so I searched until I found
it.

-- Larry

>
> Thx.
>
> - Jeff

compto35

unread,
Feb 15, 2011, 1:35:12 AM2/15/11
to google-map...@googlegroups.com
See I know what to look for, but I still can't seem to get an object with the customized directions out of the DirectionsRenderer

sgiddings

unread,
Feb 16, 2011, 3:14:29 AM2/16/11
to Google Maps JavaScript API v3
There is an open Issue for this requesting that the via_waypoint array
be documented and stay in place officially.
http://code.google.com/p/gmaps-api-issues/issues/detail?id=2746

Feel free to add a comment and 'start' it to attempt to get it taken
into account by our google friends.
Reply all
Reply to author
Forward
0 new messages