Let Users Find Their Way to You

Tuesday, December 16, 2008 | 2:59 PM

Implement Google's new driving (and walking) directions gadget on your website and allow visitors to easily find their way to your physical location.

Here's a common scenario: you own a number of business locations or run events across several locations.  You would like your website visitors to find their way easily to one of these locations.  How can you achieve this?  One way is to build a store locator using the Google Maps API.  A store locator that makes use of the Maps API can provide some useful and advanced functionality.  But if you don't want to spend too much time building an advanced store locator, and are looking for an easy-to-implement solution, try out Google's new driving directions gadget.

Let's assume I own a chain of clothing stores located in various shopping centres around Singapore.  The below gadget allows you to find your way to my stores so that you can take advantage of my holiday season bargains.  Go ahead, play around with it to find your way from your current location to the shopping centre of choice.

How was this done?  Here are the steps to create and add your own directions gadget to your website.

Step 1: visit the gadget creation page.

Step 2: set up your gadget size, title, and border style.

Step 3: start adding the locations you would like visitors to travel to.  If you have multiple locations you can separate them with a "|" symbol.  In my example I used the following string "Vivo City, Singapore|Plaza Singapura, Singapore|1.303913,103.832474 (Wisma Atria Shopping Centre)".  Here are a few helpful hints when deciding what to include in your string:

(a) Test an address with a regular map search on Google Maps.  If the search result gives you the right address, then you can use that address as is.

(b) If the search does not return the right result, you can provide the co-ordinates of the location in your string instead.  Of course, the co-ordinates are not going to mean much to your visitor, so you can provide an alias by enclosing it in parentheses after the co-ordinates.  That is exactly what I have done with the Wisma Atria Shopping Centre listing.  You can also add aliases to regular addresses.  So if I wanted, I could have listed Vivo City as "Vivo City, Singapore (Vivo City)" instead.

Step 4: click on the "Get the Code" button and copy the provided JavaScript code snippet.

Step 5: paste the code into your HTML file at the position where you want the gadget to appear.  That's it, you're done!

The driving directions gadget provides you with an easy way for visitors to locate your stores and events.  Learn more about the directions gadget over at the Lat Long Blog.