More info:
By viewing the source of the google site, I think the geocode
parameter must be the "via"s of the route.  It appears that the route
is built by the list of destinations (in this case just the start and
end) and then adding the via points from the geocode parameter.  But
plugging those codes into the site here:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.html
doesn't give valid points.  Viewing the source, again, an array of
routes is built, and these routes have the true geocoded points of
their portion of the polyline.  (It appears that a sub route is the
directions from one via to the next (and start to first via, last via
to end).  I can pull these lists of encoded points from the source and
paste them into the decoding app to get a list of points, then
concatenate all of these points together.  It's doable, but I'd still
like to be able to do it automatically via the pasted link.


On Apr 5, 7:12 pm, programmertim <[email protected]> wrote:
> Thanks, that worked perfectly.  Now, I don't want to recreate the
> entire routing interface that google has (dragging to set points,
> street view, etc.)  I have created the route at maps.google.com, and
> generated a link as:
>
> http://maps.google.com/maps?f=d&source=s_d&saddr=Glen+Rose,+tx&daddr=...
>
> I now want to parse that into my api app.  I'm guessing I probably
> need to feed the geocode parameter into a GPolyline.fromEncoded, but
> the querystring parameter apparently doesn't use the same encoding as
> the api (yes, I remembered to unescape).  So is there any way to parse
> this URL out so that I can use the previously created routes in my
> google maps api app?
>
> On Apr 4, 3:03 pm, Mike Williams <[email protected]> wrote:
>
> > Listen for the "load" event on the directions request, then use
> > .getPolyline() on it.
>
> > var gdir = new GDirections(map);
>
> > GEvent.addListener(gdir,"load",function() {
> >   var poly = gdir.getPolyline();
> >   ...
>
> > });
>
> > gdir.load(...);
>
> > --http://econym.org.uk/gmap
> > The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to