PHP & AJAX Store Locator

PHP & AJAX Store Locator

Released 7 years ago , Last update 5 years ago

An easy-to-configure PHP, AJAX & MySQL store locator script using Google Maps.

This is a fully featured store locator that you can use to provide easy store locator functionality to your (or your client's) website in under 5 minutes.


  • Easy to configure and set up. (minimal coding skills required)
  • Uses Google Maps API v3 - No API key required!
  • Highly commented, with extra documentation included. (with package)
  • Admin Panel for listing, editing and removing stores.
  • Front-End for adding stores.
  • Easily integrated into existing website - minimal styling, login systems, etc.
  • Uses jQuery library for effects and AJAX.
  • New! JSON API for easy use with apps
  • 5 6
  • 4 4
  • 3 0
  • 2 0
  • 1 0
10 Reviews Read Reviews


14 day 14-day money-back guarantee


Single Site

  • Perpetual license

  • 1 site, unlimited servers

  • No distribution (hosted use only)

  • Commercial use

  • 12 months support


Developer License

  • Perpetual license

  • Unlimited projects

  • Can distribute code and binary products

  • Commercial use

  • 24 months support

Need custom services for this product? Get a quote


Does this script use any JavaScript libraries?

Yes, it uses the latest jQuery library (1.6.2 at time of publishing).

What is "geocoder"/"geocoding"?

Geocoding is the process of converting a string into a latitude/longitude pair. A geocoder is a script/tool that geocodes addresses.

What is "region biasing"?

Region biasing, put simply is biasing results/favoring results from one region over another. For example, let's say a user typed in San Francisco as a location. If the region was set to the US, the geocoder pick San Francisco, CA over other results from other regions, such as San Francisco, Spain. Vice-versa, if the region was set to ES, it would pick San Francisco in Spain. That's why it's very important to set the region.


The configuration of this script is quick and easy, and should not take more than 3 minutes. This requires no skill other than copying/pasting text and editing a basic file.

Almost all of the configuration is done in the settings.php file, which is in the /bin directory. Out of the box, it should look something like this:

//Database Connection information.
$host="hostname"; //usually localhost

//The unit of distance. If you want to use KM instead, put 'kilometers'
$unit = "miles";
$hav_int = 3959;    
//convert the unit string to a number.
if ($unit=="kilometers") {    
    $hav_int = 6371;

Quick Setup (3 Steps)

  1. Unzip the directory into your location of choice (probably /public_html)
  2. Change your database connection information at the top ( the top 4 variables)
  3. Import the 'import.sql' file in the /bin folder which will create a folder called "stores" in your database of choice. Make sure that you are in the database of choice

Once you have done that, you are ready to roll out the script. However, you might want to make some localizations to your script (especially if you're deploying outside of the US).


  1. In order to change default location of the map (from San Francisco, CA), you need to know the latitude and longitude of your new location, (if you don't know you can use a free geocoder like Tiny Geocoder). Then, go to add.js and locator.js (in the "js" folder), and in each file there is a line : var def_coords = {'lat' : 37.775196, 'lng': -122.419204};. replace 37.775196 with your latitude, and replace -122.419204 with your longitude.
  2. Change the $unit variable in settings.php to "kilometers" if you want kilometers, or keep it as miles depending on what is used in your country.
  3. Go to add.js, edit.js, and locator.js (in the "js" directory) and in each file at the top, there is a line: var region = 'us'; if you would like to change the region, you have to change it to ccTLD abbreviation for your country. (the top-level domain name). For example, you could set it to ca, or uk.
3 licenses, starting from From » $9.99 View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

or Get a quote

for customization or integration services

Or enter your name and Email
  • MV Mike Vallar 1 year ago
    is it possible to modify it so that it shows the stores in the default location and also by filter (say, brand)?
  • SC Simon Choy License holderSingle Site
    1 year support
    Purchased on Mar 23, 2012
    6 years ago
    Hi Souleiman. I've been using your script and modifying a few things. Really happy with it and definitely recommend it to others! There's two features that I wanted to add that are a bit challenging for me, so I wanted to pick your brain. 1. Pre-loading a search so it already displays results when a user visits. For example, on my site say I wanted to have a landing page specifically for New York, I would create one that has all 'stores' from NY already displayed within 50mi range. Been playing around in locator.js but can't get it to work!! 2. Allows registered users to input 'stores'. I know you can do this through add.php but I want the address inputted in separated form (i.e. by country, street, state etc.) instead of one big line so I can sort/filter data. My theoretical solution so far is to geocode user-inputted data through PHP server side ( and then write it to the stores table. PS. I realize providing the solution could be complex and time consuming for you. Even just a nudge in the right direction would be helpful.
  • GC Gus Castaneda 6 years ago
    I wish to buy this, but have few questions... Can it support different screen sizes such as desktop and mobiles? Can map be eleminated from displaying on same page and instead add Get Driving directions on every results list?
    • Souleiman Benhida Publisher 6 years ago
      Hi, thanks for showing interest in my script. 1) I'm not sure what you mean by support.. if you mean that it has a specific mobile website part, then no, but the regular desktop version runs fine on iPhones and iPads. 2) As of the current version, you can not get driving directions. I can't imagine it'd be too hard, but sadly it is not in the current version. Perhaps, in a later version I may add it IA but in the meantime you may want to look for another locator that does that. I'm sorry that my locator doesn't have all the features you want, but I think the code is clean and easy to understand and with a decent knowledge of PHP/AJAX you could do anything you want with it! Thanks!