开发者

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

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 Di开发者_JAVA百科rectionsRenderer.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 debug the object using console.log.

Hope i have made it clear.


The waypoints will be part of the steps of the routes object.

Just one extra note, if order does matter for you then you need to keep an eye on the waypoint_order field if you used the optimize:true argument. Since this will return the optimized path. Reference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜