Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Driving Directions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Derek  
View profile  
 More options Jul 6 2005, 2:03 pm
From: "Derek" <derekmart...@gmail.com>
Date: Wed, 06 Jul 2005 11:03:21 -0700
Local: Wed, Jul 6 2005 2:03 pm
Subject: Driving Directions
Hi all,

I'm pretty new to the Google Maps API and I was wondering if it is
possible to tap into the driving directions feature taht is available
on Google Maps.

Best,

Derek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Kagerer  
View profile  
 More options Jul 6 2005, 3:19 pm
From: "Richard Kagerer" <r...@leapbeyond.com>
Date: Wed, 06 Jul 2005 12:19:35 -0700
Local: Wed, Jul 6 2005 3:19 pm
Subject: Re: Driving Directions
Not directly through the API, although I've heard talk of submitting a
query to the normal Google Maps engine, then parsing out the points and
putting them on your map.  Haven't seen any examples yet, but I think
it'd be cool!  (Though there may be a serious Terms of Use issue in
doing an automated query on Google Maps).

http://groups-beta.google.com/group/Google-Maps-API/browse_frm/thread...

-Richard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Norm  
View profile  
 More options Jul 6 2005, 3:25 pm
From: "Norm" <nbis...@cplus.org>
Date: Wed, 06 Jul 2005 12:25:57 -0700
Local: Wed, Jul 6 2005 3:25 pm
Subject: Re: Driving Directions
If you click on the Google name at the left bottom corner it takes to
to the google engine and it can be done from there

Norm


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
robert  
View profile  
 More options Jul 6 2005, 3:58 pm
From: "robert" <robert.res...@gmail.com>
Date: Wed, 06 Jul 2005 19:58:55 -0000
Local: Wed, Jul 6 2005 3:58 pm
Subject: Re: Driving Directions
I have actually figured this out and now have a map with overlayed
route and  the driving directions. As an added feature it also shows
travel time per segment (something that normal google maps does not do)
and travel time for the trip.

Here is my solution...

First of all I assume people only want to go from an address to the
locations in my database. Each location in my database has an
associated lattitude and longitude. I take advantage of the fact that
google permits directions from coordinates to an address and vice
versa. I first create a form in in the bubble that pops up to collect
the destination address (note the target must be _parent if working in
an i frame), and then I place hidden form fields that contain the latt
and long to silently pass this information forward to a directions
page. Then I created a new xml file that grabs the google JS file for
directions then splits it up at specific tags and places its contents
in the approperiate places using PHP scripting, becasue the nature of
google drawing the line on the road and placing the start/end markers
is solely dependent on an XML file.

The google JS file is generated by the url:
http://maps.google.com/maps?saddr=[ADD1]&daddr=[ADD2]&hl=en
where [ADD1]  and [ADD2] are the address (or  coma seperated latt/long
points)
and [ADD1] is the starting address and  [ADD2] is the destination
address. Using forms and PHP it is rather easy to auto generate this
URL then read the contents back to a string then work from there. The
important part is the XML file that the JS contains. This is the magic
key for directions. It contains all the needed information and the code
for the map.

I then place this page in an iframe in my main page which collects the
posted info from the original bubble form then passes it to the iframe
in the src attribute used to call an iframel  which I then cause the
xml to recieve the variables via a GET request.

My approach has this file captured twice, once for generating the map
and second time for generating the driving directions, since the
strings of data are too long and create problems passing via GET.

 I then re grab the google JS file and then begin to split it apart as
an array looking for the segment tags which are of course delieved as
XML values and attributes.

Using DOM XML get element I'm able to extract the info from the given
xml then using nested while statments I parse it back to the user .

In furhter testing I discovered from a friend who uses IE that the map
with line drawing broke in windows IE. I've tried adding the stlyle
elements and adding the VML attributes to the html tag, but I'm still
stumped

Here is an example of my iframe map window, this URL will work in
Firefox but not in IE

http://www.lutheranstudentfellowship.org/gmaps/index.html?url=directi...

Due to this problem with IE I have not implemented a full usage of
this, and therefore have limited access to this function only when one
searches by zip code and then clicks on the map location link, then the
directions text box opens up.
http://www.lutheranstudentfellowship.org/zipsearch.php

I admit this approach is a bit clumsy and it breaks in IE. If anyone
would be interested I would be willing to post my code snippets and
perhaps some explanation behind it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Kagerer  
View profile  
 More options Jul 6 2005, 7:28 pm
From: "Richard Kagerer" <r...@leapbeyond.com>
Date: Wed, 06 Jul 2005 16:28:25 -0700
Local: Wed, Jul 6 2005 7:28 pm
Subject: Re: Driving Directions
Very VERY cool!

No time to look at the source tonight, but could you clarify something
for me:  Is the final map you see in the iframe (i.e. the one showing
the route) a custom Google map, or is it fed from maps.google.com?
i.e. how easy would it be to add other markers to the final map?

Great job!

-Richard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Kagerer  
View profile  
 More options Jul 6 2005, 10:19 pm
From: "Richard Kagerer" <r...@leapbeyond.com>
Date: Wed, 06 Jul 2005 19:19:52 -0700
Local: Wed, Jul 6 2005 10:19 pm
Subject: Re: Driving Directions
Robert,

Sorry to bombard you with posts.  I did poke at your source code a
little afterall.  Correct me if I'm wrong, but it's not using the API,
right?  I'd love to hear your thoughts on API-ifying this.

-Richard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ben  
View profile  
 More options Jul 7 2005, 12:48 am
From: "ben" <b...@mailinator.com>
Date: Wed, 06 Jul 2005 21:48:56 -0700
Local: Thurs, Jul 7 2005 12:48 am
Subject: Re: Driving Directions
That's very nice.  What are you doing for the different levels?  I
noticed that overlay line works well up to a point, but then it starts
missing intermediate points.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BillyT  
View profile  
 More options Jul 11 2005, 5:17 pm
From: "BillyT" <javabi...@gmail.com>
Date: Mon, 11 Jul 2005 14:17:31 -0700
Local: Mon, Jul 11 2005 5:17 pm
Subject: Re: Driving Directions
Robert,

Great works.   I'm interested in your code snippets would you post it
please.   Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xircweb  
View profile  
 More options Jul 19 2005, 6:27 pm
From: "Xircweb" <austinlche...@gmail.com>
Date: Tue, 19 Jul 2005 15:27:17 -0700
Local: Tues, Jul 19 2005 6:27 pm
Subject: Re: Driving Directions
I've found a way to API-ify this... Using just the output XML file and
writing the polylines to the map using the API.  The only problem most
people have experienced is that the XML file comes back with the
Polylines' coordinates encrypted.  To solv this problem, I *borrowed*
some code from Google's main map site to decrypt the XML data.  look
for the function named decodePolyline in "maps.11.js".  It takes a
little modifying, but you can get it to decode for yourself.  I'm sure
Google ment for this to help keep people from using their mapping
engine, as it probably would bog down thier servers if a lot of people
started using for driving directions.... But in the name of open
source... they didn't try too hard.  Very interesting thing though is
that you can accomplish a server-side geocoding tool for handeling
coordinates.  A project that I am working on uses the "refinement" tag
to automatically fix the driving directions... I love google though, so
I'm not going to blatently show how to do this... All I can say is that
it can be done.. I've done it, and google provides you more than enough
info on how to do it.  Good luck.  BTW... mine works fine in
IE,FireFox.... Google shows you how to do this if you read the API.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Johnstone  
View profile  
 More options Jul 19 2005, 11:27 pm
From: "Jeremy Johnstone" <jsjoh...@gmail.com>
Date: Wed, 20 Jul 2005 03:27:30 -0000
Local: Tues, Jul 19 2005 11:27 pm
Subject: Re: Driving Directions
Here's another example for you to check out. I am concidering the idea
of replacing the caching engine I put in place which caches the XML
with a direct browser request for the XML from Google. Would eliminate
any chance of it being considered "automated querying", but it also
puts more load on Google's site as I wouldn't be caching queries.

http://www.jeremyjohnstone.com/maps/routing-example.html

The example doesn't have much in the way of error handling yet, so be
careful what addresses you use.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Johnstone  
View profile  
 More options Jul 19 2005, 11:36 pm
From: "Jeremy Johnstone" <jsjoh...@gmail.com>
Date: Wed, 20 Jul 2005 03:36:18 -0000
Local: Tues, Jul 19 2005 11:36 pm
Subject: Re: Driving Directions
Another thing, if they didn't want us doing that, why did they put the
functions in the API which directly operate on the XML from that
packet. I will leave the functions left unsaid as they aren't
documented (yet?), but I am sure anyone who wants to find them can
easily do so like I did.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pursuitspecial@yahoo.com  
View profile  
 More options Aug 8 2005, 2:29 pm
From: "pursuitspec...@yahoo.com" <pursuitspec...@yahoo.com>
Date: Mon, 08 Aug 2005 11:29:33 -0700
Local: Mon, Aug 8 2005 2:29 pm
Subject: Re: Driving Directions
What's the easiest way to get a list of lat/long coordinates for a
planned route?

I only need to generate 4 or 5 routes so programatically creating
something to get the routes seems like too much work. I just want to be
able to go to google's driving directions, punch in my start and end
locations, hit get directions, then get a file from there to parse
through for the lat/longs.

What file do I need to get after I enter the directions in google's
search engine?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pursuitspecial@yahoo.com  
View profile  
 More options Aug 8 2005, 2:41 pm
From: "pursuitspec...@yahoo.com" <pursuitspec...@yahoo.com>
Date: Mon, 08 Aug 2005 11:41:39 -0700
Local: Mon, Aug 8 2005 2:41 pm
Subject: Re: Driving Directions
I don't need any of the "turn left here" or "turn right there"
information either. Just the lat/long list between two points.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pursuitspecial@yahoo.com  
View profile  
 More options Aug 9 2005, 3:56 pm
From: "pursuitspec...@yahoo.com" <pursuitspec...@yahoo.com>
Date: Tue, 09 Aug 2005 12:56:10 -0700
Local: Tues, Aug 9 2005 3:56 pm
Subject: Re: Driving Directions
Well I put the directions in the google direction finder. Got the xml
from there, and the points "polyline" string.

Went through it with my modified "decodePolyline" method borrowed from
maps.11.js, and I get an output of alternating lat/longs for my route.
The list is sorted by longitude, which makes sense because the route I
chose spans the country from west to east.

Only problem is that the lats are not correct, even though all the
longs are perfect.

In the decodePolyline method, the lats are decoded first, and then the
longs. I can't see what I'm doing wrong. The method is so clear and
simple, and it does the same exact set of operations for both the lat
and the long.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pursuitspecial@yahoo.com  
View profile  
 More options Aug 9 2005, 5:11 pm
From: "pursuitspec...@yahoo.com" <pursuitspec...@yahoo.com>
Date: Tue, 09 Aug 2005 14:11:55 -0700
Local: Tues, Aug 9 2005 5:11 pm
Subject: Re: Driving Directions
Nevermind, got it. I left out three characters in the front of the
polyline string.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gwally  
View profile  
 More options Aug 11 2005, 1:46 am
From: "gwally" <wa...@gwally.com>
Date: Wed, 10 Aug 2005 22:46:05 -0700
Local: Thurs, Aug 11 2005 1:46 am
Subject: Re: Driving Directions
I am looking to do driving directions for a route that is well, 700
miles long.

Is there an easy way to highlight a a route that goes over multiple
roads?

Is there a way to highlight roads?

Or add in other topographical features like passes?

http://www.gwally.com/directions/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Williams  
View profile  
 More options Aug 11 2005, 3:12 am
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Thu, 11 Aug 2005 08:12:29 +0100
Local: Thurs, Aug 11 2005 3:12 am
Subject: Re: Driving Directions
If I were doing something like that, I guess I'd build a temporary map
page that helped me to construct it.

If I could get addListener to work properly for "click" on the base map,
then I'd use that, otherwise I'd "borrow" considerable chunks of code
from <http://www.sueandpaul.com/gmapPedometer/> and use doubleclicks.

This temporary map would have a side panel to display a list of all the
long/lat co-ordinates that were clicked, in a format suitable for
copying and pasting into a Polyline (or an XMaps Polyline). I'd zoom
right in, click along the roads and grab a reasonably large chunks of
Polyline data at a time.

I'd grab the locations of individual topographical features along the
route in the same way, and mark them with different customised icons.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »