开发者

Google Maps markers with directions renderer

So I want to plot a route using directions renderer and at the same time have Origin as an "A" marker, all the way through the destination as the final marker, with all waypoints also being marker.

By default it looks like renderer only sets markers for origin and destination, so I plotted markers for all the waypo开发者_如何学Cints.

However, the directionsrenderer markers are "A" for origin and "B" for destination, meanwhile my second waypoint is also "B".

How do I get all the waypoints on chronological order of the route to show the correct marker with correct letter? Here's an image of the problem:

Google Maps markers with directions renderer

Thanks


You should be able to inspect DirectionsRoute.waypoint_order to get an array of which order the waypoints are ordered in. Then I'd say use that to work out which letters to assign to each waypoint marker

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜