Web Design and Development
One popular feature which is indispensable for the websites of large retail, bank, or restaurant chains is that little feature which enables users to find a location. Users simply type in their street address or zip code and get a list of locations closest to them. And while most visitors might not use the feature, it is especially helpful for travelers or people who are new-to-the-area. So adding it to your website might help you to reach new customers.
Clearly, this is a pretty advanced feature, however, it is not as complicated to implement as you might think. And depending on what concessions you make in terms of accuracy, you will be able to have a great find a location feature without breaking the bank.
The technology behind store locators are pretty simple. First, a user enters their address or zip code into a field. Next, the zip code or address is directly translated into a pair of longitude and latitude coordinates. And finally, these coordinates are compared to a database of coordinates for all store locations using the Haversine formula, an equation that returns the distance between two coordinates.
There are many ways to add this feature to your website, but some methods are more expensive than others. The most robust method, is to enable users to enter either their street addresses to retrieve the closest locations. However, this method requires the most amount of work because it requires dynamically retrieving the latitude and longitude coordinates for each user-supplied address. So we suggest two easier alternatives.
To minimize cost, you could simply create a list of all zip codes and then match each zip code with one location, which would be the closest for that zip code. The problem with this method, however, is that a search will not retrieve a list of the closest locations, but just one location. So this would only be ideal if your chain only had a few locations. Fortunately, there is another solution which would work for a chain with many locations.
Our suggested solution is to do all calculations based only on zip codes, instead of addresses. You would provide a list of store locations and their respective zip codes. Then, using the method mentioned above under how does it work, you would take a user-supplied zip code value and use it to calculate the distance between the two zip codes. This method works very well, but there is one major drawback: accuracy. With this method, addresses have been replaced by zip codes. And the latitude/longitude values for a zip code are taken from the very center of a zip code. So depending on the address of the user, the store locator might not retrieve the closest stores.
(Note: The distance calculation does require the use of a comprehensive list of all US zip codes. Fortunately, this list can be obtained for free from various sources.)
Now that you know the basics about store locators and what options exist for implementing it, its time to add this feature to your website. To do so, you will need a web programmer along with a list of your chain locations and their zip codes. Don’t have a programmer? Let us know about your project and we’ll give you a quote.
Tags: widgetsTrackback URL for this entry:
http://www.velvetblues.com/web-development-blog/add-a-store-locator-or-distance-calculator-to-your-website/trackback/
Contact us today for a quote. Click here to submit details regarding your project.
If you are making a general inquiry, send an email to info@velvetblues.com