Sorry, if this question has been answered, but didn't find. I use the Google Maps API on my site, but I can't change the route outlined by Google. For example, the user establishes a starting point and an ending point; the route is traced and it included establishments (points/markers created by me). But the planned route isn't always the best for the user, who wants to drag it to the best way, and according he was dragging the route, the points of establishments were fading (those not included in the current route) and other be appearing (these included on the current route). Is this possible? Thak you in advance. Regards.
问问题
77 次
1 回答
0
创建DirectionsRenderer
对象时,请使用选项draggable:true
. 设置新路线后,重新计算您的兴趣点。
相关的 SO 问题:谷歌地图保存可拖动的方向
文档:https ://developers.google.com/maps/documentation/javascript/reference#DirectionsRendererOptions
于 2012-07-04T18:39:29.097 回答