Waypoints in request of directionsService.route

77 views
Skip to first unread message

Aste (Alyson)

unread,
Nov 18, 2011, 5:18:21 PM11/18/11
to google-map...@googlegroups.com
Waypoints in request of directionsService.route

When I make the request to generate the route
with waypoints, must go from the point 0 to point 0

in other words

Start: 0
End: 0

wapoints: 2,3,1,4

route: 0,2,3,1,4,0

When the Google Maps generates the route, it goes from point A to E,
but the point E to point A is superimposed on the map.

Some help?

Sorry, I do not speak English. ; x

ex:

JKurtock

unread,
Nov 19, 2011, 11:04:46 AM11/19/11
to Google Maps JavaScript API v3
1. The posting guidelines ask you to post a link to your map (which
has to be publicly available, and there are plenty of FREE hosting
services). Otherwise, you are asking "us" to create your web page for
you from your posted code, and then to run it to try to replicate your
problem. Which hardly ever does you any good anyway; the most common
problems have to do with something simple, like typos. So give us a
link.

2. In your description, assuming waypoint E is #4 and A is #0, you
would expect E to A to be the final leg and shown on the map. What is
the problem you see?

Andrew Leach

unread,
Nov 19, 2011, 11:12:22 AM11/19/11
to google-map...@googlegroups.com
On 19 November 2011 16:04, JKurtock <jkur...@gmail.com> wrote:
>
> 2. In your description, assuming waypoint E is #4 and A is #0, you
> would expect E to A to be the final leg and shown on the map.  What is
> the problem you see?

I'd guess the marker for point E is shown superimposed on A and the
route appears to run from B through E to B, instead of A through D to
A.

One fairly easy way around that might be to make the last point very
slightly north of the first point so the last marker is stacked
underneath the first. Otherwise you're into replacing markers (so that
you make point E show an "A" marker): while I'm sure there are
examples which do that, it's easier to add 0.000001deg to the last
point.

Reply all
Reply to author
Forward
0 new messages