Developing a custom store locator map: Create a spreadsheet of your locations

This is the first post in my series covering how to develop your own store locator by integrating Google maps into your website with PHP and Javascript. In this post we will cover how to create a spreadsheet of your store locations.

You can use either a CSV file or an XLS file to compile your store locations.

One of the most important things you need is the latitude and longitude for each location. The easiest way that I found to get these values, is by using http://www.gpsvisualizer.com/geocoder/.

Simply copy and paste or type each of your locations into the “Input” box (one location per line), and then click the “Start geocoding” button.

Your locations along with the longitude and latitude for each one will be displayed in the box under the map of your locations. Highlight and copy the results once all of the locations have been processed and paste them into a new text file (I prefer to use Notepad if I am on a PC and TextEdit if I am on a Mac). Save the file as locations.csv (or any name that you want to use, as long as it has the extention .csv).

Now, create a new Google spreadsheet at https://docs.google.com/. Go to File -> Import and import the locations.csv file that you just created.

Once you have your new spreadsheet populated and all of the fields that you want for your store locator map created (location name, address, website, phone number, etc.), go to File -> Download As -> Excel. This will download a file called locations.xls to your computer.

You are now ready to move on to the next step, which is Creating and populating the MySQL table.

Here are links to all of the posts in this series on how to create your own store locator map:

 

Create a spreadsheet of your store locations

Create and populate the MySQL table

Create a PHP file which will be used to connect to the database

Create a PHP file which will output the XML file results of a search

Create the HTML page which contains the store locator map

 

 And here are some hints and tips to help create and customize your store locator map:

Using your own custom markers for the locations in place of Google’s default markers

How to prevent the map from zooming in to close on a single location