January 23, 2008

Trail Pages Get Right To The Point.

This last week I've been working on new functionality for the trail pages which will show point-to-point driving directions for most trails in the trail directory.

Previously, if there were trail head coordinates a form would be available on the trail page where a user could enter a starting address. Upon submission of the starting address I would redirect the user to Google Maps where driving directions were available.

Now, thanks to the Google Maps API team, I'm able to display those same directions on TrailCentral.com.

Let me break down the new functionality with the following example:

1) A user visits the White Ranch trail page. White Ranch is near Golden, CO. When they look at the driving directions they will now see two new links.

2) The first link will default to the nearest city to the trail. In this case it is Golden, CO. When the user clicks the link the page expands and shows both a map and driving directions from the center of Golden, CO to the White Ranch trail head.


3) Well, if the user is driving from Boulder, CO that isn't much help, which is why the user can then click the "Change Start" link. A form is then displayed for the user. Here they can choose to cancel or update their starting location.

4) If the user enters "Boulder, CO" and clicks the "Update Starting Location" button the page is reloaded and they are again able to choose between updating their starting location or showing driving directions to White Ranch from Boulder, CO.


5) When the user clicks on the link to get directions from Boulder, CO to White Ranch in Golden, CO the map and driving directions are again displayed. This time from Boulder, CO.


The cool thing about updating a starting location is that the new location is stored as a cookie and is now the default starting location whenever the user loads a trail page that offers point-to-point directions.

6) Sometimes the user may be on a public machine and does not want their starting location stored in a cookie. In that case, they can simply click the "Forget Start" link. This will destroy the cookie and once again the default start location will be the nearest city to the trail.


It is as simple as that. In hindsight I did the best I could when writing the original directions, but even I get confused with my directions when looking at them months or even years later. This new functionality will eliminate that confusion for me and others since precise directions from any location you specify to the trail head will now be available.

I hope you will enjoy this new functionality as much as I do.

If you are interested, go ahead and give it a try by visiting the White Ranch trail page.

No comments:

"Pennies do not come from heaven. They have to be earned here on earth."
~Margaret Thatcher