google map v3 DirectionsRenderer.direction objects one of the property name is changing periodically

451 views
Skip to first unread message

Jayapal Chandran

unread,
Apr 28, 2011, 12:18:26 PM4/28/11
to google-map...@googlegroups.com
I am displaying a draggable directions google map. when i drag a way point is created and the directions_changed event is fired.

i use DirectionsRenderer.directions to save the way points in the database.

I parsed the names of the objects and properties and i got the following

 status: OK; routes: [object Object]; Jf: [object Object]; Xg: true;

In the above the object Jf is the one which is having the waypoints but periodically that name Jf is changing and making us hard to find which property holds the waypoints. I have a method to find that. but yet i want to know how to handle this.

Jf: [object Object]; // here Jf is changing periodically

I used firefox to debut the object using console.log.

Hope i have made it clear.

geoco...@gmail.com

unread,
Apr 28, 2011, 12:24:15 PM4/28/11
to Google Maps JavaScript API v3
On Apr 28, 9:18 am, Jayapal Chandran <jayapalchand...@gmail.com>
wrote:
> I am displaying a draggable directions google map. when i drag a way point
> is created and the directions_changed event is fired.
>
> i use DirectionsRenderer.directions to save the way points in the database.
>
> I parsed the names of the objects and properties and i got the following
>
>  *status: OK; routes: [object Object]; Jf: [object Object]; Xg: true;*
>
> In the above the object Jf is the one which is having the waypoints but
> periodically that name Jf is changing and making us hard to find which
> property holds the waypoints. I have a method to find that. but yet i want
> to know how to handle this.
>
> *Jf: [object Object]; // here Jf is changing periodically*

Those are undocumented properties and will (or at least can) change
with each release.

Only use documented properties.

-- Larry

Jayapal Chandran

unread,
Apr 28, 2011, 12:31:15 PM4/28/11
to google-map...@googlegroups.com
Oh. So when we drag way points and if we want to save those for future display then ow do we save waypoints after creating a few. Can you link me to such references in google map?

Esa

unread,
Apr 28, 2011, 1:02:54 PM4/28/11
to Google Maps JavaScript API v3
In directions result routes > legs there is a documented
'via_waypoints' object. According to documentation:

"An array of waypoints along this leg that were not specified in the
original request, either as a result of a user dragging the polyline
or selecting an alternate route."

http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsResult

JKurtock

unread,
Apr 28, 2011, 1:42:03 PM4/28/11
to Google Maps JavaScript API v3
You might also want to look at http://code.google.com/p/gmaps-api-issues/issues/detail?id=2746
Since step_index and step_interpolation are not formally in the
documentation, you should use them with care. But since they don't
have cryptic names (like "Jf"), I think it is more of a documentation
shortcoming than an intent to avoid exposing them in the API.

- Jeff
> http://code.google.com/apis/maps/documentation/javascript/reference.h...

Jayapal Chandran

unread,
Jun 24, 2012, 1:53:49 AM6/24/12
to google-map...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages