€7.63

jQuery Google Maps Store Locator Plugin

I want this!

jQuery Google Maps Store Locator Plugin

€7.63

jQuery Google Maps Store Locator Plugin

The files you're looking for are in the dist/ directory

Please see my blog for more information and examples.

This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information. How you create the data file is up to you. I originally created this for a company that didn¡¯t have many locations, so I just used a static XML file. You will need to geocode your locations beforehand or use a geocoding API service if you want to try to do it on the fly. The reason for this is that all free geocoding APIs have strict limits that would easily be exceeded. In the end, you're much better off storing the coordinates versus having to look them up for each location on each request.

A note on the distance calculation: this plugin currently uses a distance function that I found on the blog of Chris Pietschmann. Google Maps API version 3 does include a distance calculation service (Google Distance Matrix API) but I decided not to use it because of the current request limits, which seem somewhat low. For v2 I also tried experimenting with the Directions API to request distances but also found the limits to be too restrictive. So, the distance calculation is ¡°as the crow flies¡± instead of a road distance calculation. However, if you use the inline directions option that does provide the distance that's returned via the directions request.

Last, it¡¯s very important to note that the plugin requires the Handlebars template engine. This separates the markup of the infowindows and location list elements so that they can easily be restructured. Handlebars pretty slick, will read Mustache templates, and the built-in helpers really come in handy. Depending on what your data source is, 2 of the 4 total templates will be used (KML vs XML or JSON) and there are options to set the paths of each template if you don¡¯t want them in the default location. If you¡¯re developing something for mobile devices the templates can be pre-compiled for even faster loading.

I want this!
Size
272 KB
Copy product URL