Magento – Store locator with Google Maps

How to make google maps show up in a store locator in Magento:

These instructions were created using Magento 1.2.1 and the store locator plugin v1.3 created by ellisoj.

The first step is to install the store locator plugin.  Get the store locator extension key form the link above and use magento connect to install the plugin. Next you need to apply for a google maps API key. If you are installing this on a local installation of magento and your are using a host name like “localMagento ” here are a few notes:
1.  As of Magento 1.2.1 it appears that you need to use a name like “”.
2. Your local build will need it’s  own google api key.
You will need to place the google maps api key that you recieved into the Data.php file, located in the app/code/local/Eroi/Locator/Helper folder.

Below are the code updates to incorperate google maps. The main changes I made were to add the google maps javascript code, the html container for the map, and create the xml code for use by the google map javascript functions. I also change the unit of distance from Km to Miles. This is just a basic map. Check out the google api for more cool things to do with the map.

First add the javascript to the top of the page.
[sourcecode language=’javascript’]

Join our mailing list, and get updates on how to better your web ninja skills.