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.
Yes, it uses the latest jQuery library (1.6.2 at time of publishing).
Geocoding is the process of converting a string into a latitude/longitude pair. A geocoder is a script/tool that geocodes addresses.
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:
<?php
//Database Connection information.
$host="hostname"; //usually localhost
$username="username";
$password="secret";
$db_name="dbname";
//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;
}
?>
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).
var def_coords = {'lat' : 37.775196, 'lng': -122.419204};. replace 37.775196 with your latitude, and replace -122.419204 with your longitude.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. I had this fully up and running in about 10 minutes. Other than knowledge on how to set-up a database, it's all self-explanatory from there and the developer made it nice and easy. Saved me days of coding!
Excellent component; very well commented, adaptable to other purposes and fantastic value.
Way to go, Souleiman. This is an elegant AJAX store locator that uses a recent JQuery, and I'd not seen one before. As claimed, it was easy to configure and worked right out of the box.
Questions & Comments