O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  


Better Driving Directions
Create more useful driving directions by truncating the extraneous bits to use a more general starting or ending point.

Contributed by:
[01/24/06 | Discuss (0) | Link to this hack]

One of the challenges I often run into when trying to create useful driving directions is that I usually don't want directions from one address to another - I want them from some commonly known point (like 520 crossing the lake) to an address. This is because I am often generating driving directions for other people, coming from different places (which I may or may not know the details of), but they all know how to get to 520. I don't know of any mapping site that offers this ability directly, but you can force Google Maps (and maybe others) to do it.

Let's take the example of creating driving directions from Seattle to my house in Carnation. If I use the obvious "from: Seattle, WA to: 32040 NE 112th, 98014" I get very detailed steps starting between 5th and 6th on Marion in downtown Seattle.

Example 1: from: Seattle, WA to: 32040 NE 112th, 98014

The first five or six steps are irrelevant details. What I really want is to have the directions start from out near the end of 520, as anyone who lives in Seattle can easily get there from where-ever they start from. The trick is to use a latitude,longitude pair as a starting point rather than an address. To find the correct lat/long, double click on the position you want to start at (zooming in as appropriate to get an accurate position). This will center the map on that location. Once you have it centered appropriately, click on the "Link to this page" link in the upper-right hand corner of the map. This will regenerate the URL in the browser.

Example 2: Zoom into desired starting point

From it, copy the latitude and longitude assigned by the "ll" parameter and paste it into the "Start address" form element, then click on "Search" (or hit Enter) to resubmit it. This will then generate driving directions from that lat/long to the destination address.

Example 3: Finished Driving Directions from 520 to 32040 NE 112th, 98014

O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.