A store locator plugin using Google Maps API version 3

Overview

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.

WordPress version

Cardinal Store Locator plugin for WordPress is now available, which uses this jQuery plugin as a base and all of the settings can be set via a settings page in the WP dashboard. It also integrates with core WordPress features such as custom post types for location data and custom taxonomies for location categorization and filtering.

Changelog

Version 3.1.8

  • Added coordinate range check to exclude locations with invalid latitude and longitude values.

Version 3.1.7

  • Fixed empty name search value not clearing previous value.
  • Fixed openNearest setting not working in combination with querystringParams setting.
  • Fixed openNearest setting not opening correct location with custom sorting (sortBy) enabled.

Version 3.1.6

  • Added extra check to make sure mapping doesn't fire twice when defaultLoc is enabled and fullMapStart is also enabled. fullMapStart is not needed when defaultLoc is enabled and this is just a preventative to avoid user errors.
  • Fixed centering issue on initial search with maxDistance enabled introduced with fitBounds updates in last update.

Version 3.1.5

  • Added Google Maps object as a parameter for callbackMarkerClick callback.
  • Added a zoom listener after fitBounds is used to prevent high zoom levels after name search and taxonomy filtering.
  • Improved zooming when maxDistance setting is enabled taking advantage of the fitBounds method.

Version 3.1.4

  • Fixed name search filter value not clearing if form input is cleared.

Version 3.1.3

  • Fixed empty name search field value overriding filter results.
  • Fixed groups of filters not applying together.
  • Fixed potential error from occurring if fullMapStartListLimit is set, and the number of locations is less than the limit.
  • Updated bundled Handlebars to v4.7.7 that addresses a critical vulnerability.
  • Updated jQuery version in example files to v3.6.0.

Version 3.1.2

  • Fixed name search issue introduced in v3.1.1. Reverted to previous matching pattern only for name searches and still using the new patter for taxonomy matching.

Version 3.1.1

  • Enhanced filtering regular expression to better account for exact matches vs. substrings.
  • Fixed multi-category selection filtering issue introduced in last version 3.1.0.
  • Updated bundled Handlebars to v4.7.6.
  • Updated node modules.

Version 3.1.0

  • Added featuredDistance setting to restrict featured locations by a specified distance (number value should be used).
  • Updated bundled version of Handlebars to v4.5.1 due to security issue.
  • Updated taxonomy filtering REGEX and string replacements for international character support.

Version 3.0.1

  • Added custom order handling to tie into previously added custom sorting. Set order to asc or desc.
  • Added functionality to fill in search input with determined address when using autoGeocode or geocodeID settings.
  • Added Google Map object as parameter to callbackBeforeSend, callbackListClick, callbackModalReady, and callbackFilters callbacks.
  • Changed parseJSON to native JSON.parse due to deprecation in rawData processing function.
  • Fixed issue with mapReload (triggered with optional reset button) where storeLimit wasn't reset.
  • Updated sort-example.html example with order select field.

Version 3.0.0

Version 3 has a breaking change with the dataLocation and dataType settings switching the default from XML to JSON.

  • Added ajaxData to allow custom data to be sent with the AJAX request. The setting accepts an object.
  • Added altDistanceNoResult setting to display no results message vs. all locations when closest location is further than distanceAlert setting.
  • Added callbackAutoGeoSuccess callback that fires after the geolocation API returns a successful result.
  • Added callbackFormVals callback that fires after the form values have been processed from the form.
  • Added callbackGeocodeRestrictions callback that allows the componentRestrictions object to be overridden.
  • Added callbackNearestLoc callback that fires when the nearest location is triggered with the openNearest setting.
  • Added callbackSorting callback that fires when when a new sorting method is selected.
  • Added component filtering for geocoding to better restrict by area.
  • Added length unit (distance miles/kilometers) front-end swap functionality, setting and example file.
  • Added mappingObject, originPoint, data, and page parameters to callbackSuccess callback.
  • Added new front-end sorting functionality, settings, and example file.
  • Added location data object as parameter of callbackDirectionsRequest callback.
  • Added openNearest setting to open/select the nearest location after searching.
  • Fixed issue with featuredLocations setting where featured locations at far distances would trigger distance alert.
  • Fixed issue with filtering values containing ampersands, which would not display any results - updated filtering regex.
  • Fixed issue where HTML5 Geolocation was skipped when using the fullMapStartBlank setting.
  • Fixed issue with pagination page numbers displaying after no results via PR from heldr88
  • Fixed issue with taxonomy filtering and autoGeocode setting where HTML Geocoding API would run on every filter change.
  • Removed Less from the project as it is no longer needed with the Bootstrap update.
  • Swapped the default location data type to be JSON instead of XML.
  • Updated Bootstrap example file to make use of Bootstrap 4.
  • Updated taxonomy filtering so pagination is reset to first page after selecting a filter.

Version 2.7.4

  • Fixed error when filtering with query strings where filter values with spaces wouldn't work.
  • Updated processForm method so submitting the map removes focus from any of the form input/select fields instead of just the address input.
  • Updated filterData string replace methods to match string replace method in filters setup.

Version 2.7.3

  • Added ability to indicate multiple query string parameter values (for checkboxes) with a comma separated list value.
  • Added autoCompleteDisableListener setting to disable the listener that immediately triggers a search when an auto complete location option is selected.
  • Added blur to primary location input field after form submission to hide mobile keyboards.
  • Added check to exclusive filtering to make sure filter values are not undefined before proceeding with the regular expression.
  • Added functionality to automatically select/check filters on load from query string parameter values.
  • Added location details object to callbackListClick and callbackMarkerClick objects.
  • Fixed broken dragSearch functionality that was introduced after map scope pull request was merged.
  • Fixed Handlebars targeting issue triggered by placing an unordered list within the location list template.
  • Fixed issue with fullMapStart where conditional was checking if isNaN was true when it should have been false on fullMapStartListLimit setting.
  • Updated callbackListClick documentation to include second market object parameter.
  • Updated zooming to prevent fitBounds from being used when query string parameters are in use and the location has been set with bh-sl-address.

Version 2.7.2

  • Added callbackRegion callback, which allows region to be set before being sent to the Google Maps Geocoding API.
  • Fixed incorrect origin marker parameter order after code restructure.
  • Fixed issue where searching by name after searching by address, without a new address, didn't reset the origin.
  • Merged pull-request from ollea that adds "getMap" function that returns a google.maps.Map instance.

Version 2.7.1

  • Hotfix to prevent potential error with updated filterData method if the category of a location is undefined.

Version 2.7.0

  • Added callback documentation.
  • Added callbackCreateMarker for custom marker overrides.
  • Added InfoBubble support and example file.
  • Added location results total count if HTML element with "bh-sl-total-results" class exists.
  • Added checks to replace non-ASCII characters when filtering.
  • Added reset functionality that can be triggered via a button that has the CSS class "bh-sl-reset".
  • Added query string parameter filter check so that results can be filtered with URL query strings.
  • Fixed issue with maxDistance and querystringParams settings combination.
  • Moved some functionality from processData into new separate methods.
  • Removed non-standard $1 RegExp property in processData method.

Version 2.6.2

  • Added callbackMapSet callback that fires after the map has been set up.
  • Fixed issue where locations without attributes set could get the attribute values from prior locations.
  • Fixed issue where pagination total number of pages was based on the full location set total instead of the storeLimit setting.
  • Removed form markup from initial query string example index file as it's not needed until the submission page.

Version 2.6.1

  • Added additional error handling when the plugin checks the closest location.
  • Added listener for autoComplete change so that the search processes when a new place is selected.
  • Fixed issue with new boundary search AJAX params after a full address search was made.
  • Merged in pull request from noclat that added autoCompleteOptions setting.

Version 2.6.0

  • Added bounds and formatted address info from geocoding API to AJAX data parameters.
  • Added Marker Clusterer library support, setting and example file.
  • Added disableAlphaMarkers setting to completely disable displaying markers and location list indicators with alpha characters.
  • Fixed issue with combination of autoGeocode and originMarker settings.
  • Merged in pull request from drcomix that fixed zoom issue with dragSearch setting.
  • Switched included remote scripts in example files to https.
  • Updated jQuery references to the latest version.

Version 2.5.3

  • Removed check from createMarker method that removed spaces from categories - created issues with categories that have spaces.
  • Re-worked handling of no results.
  • Updated createMarker method to ensure custom category marker images are converted to integers if strings are passed for dimensions.
  • Updated autoGeocode and default location functionality so that max distance is applied on initial load.

Version 2.5.2

  • Fixed pagination bubbling issue.
  • Fixed pagination issues with autoGeocode and dragSearch combinations.

Version 2.5.1

  • Fixed issues with visibleMarkersList and location list background colors and selection.

Version 2.5.0

  • Added new dragSearch setting which performs a new search when the map is dragged when enabled.
  • Added new geocodeID setting so that the HTML geocoding API can be triggered by a button instead of firing automatically.
  • Fixed issues with no results where clicking the marker would display data from the previous result and clicking the location list item would throw an error.
  • Merged in pull request from hawkmeister with update to bower.json file with main property.
  • Merged in pull request from hyperTwitch with fixes for using fullMapStartListLimit in combination with a different store limit.
  • Updated jQuery references to the latest version.

Version 2.4.2

  • Fixed issue with new full map start location list limit where clicking on a marker that didn't have a list item displayed caused an error.
  • Fixed issue with settings combination of inline directions and default location.
  • Reverted change to new list limit so that it's always applied with full map start enabled.

Version 2.4.1

  • Changed new full map start list limit so that it's only applied on the initial load.
  • Fixed issue with new autocomplete setting where search was firing twice.

Version 2.4.0

  • Added new selected marker image options to highlight clicked marker.
  • Added Google Places autocomplete option and example file.
  • Added full map start location list limit setting.

Version 2.3.3

  • Removed code that temporarily hid the map and results, when there are no results, in favor of just displaying the no results message and empty map.

Version 2.3.2

  • Tweaked list label width styling.

Version 2.3.1

  • Added preventative styling to inline directions panel table.
  • Switched to unitless line-heights.

Version 2.3.0

  • Added fullMapStartBlank option to show a blank map without any locations initially. Set this setting to an integer, which will be applied as the initial Google Maps zoom value and will then fall back to the mapSettings zoom level after a search is performed.
  • Added fullMapStartBlank example file.
  • Fixed filters select field styling inconsistency.
  • Moved pagination container within map container div in pagination example to avoid confusion when combined with modal option.
  • Reworked styling so that all HTML example files are responsive by default.
  • Updated map-container ID in all example files with bh-sl prefix.

Version 2.2.2

  • Added preventative styling to avoid table conflicts with directions panel.
  • Fixed clearMarkers issue with inline directions enabled.

Version 2.2.1

  • Updated preventative styling to be more specific to the map container and added max-height img rule.

Version 2.2.0

  • Added check for Google Maps API.
  • Added Grunt Handlebars task for compiling Handlebars templates from src directory - will add more compatibility in future release.
  • Added preventative styling to avoid conflicts with CSS frameworks and resets.
  • Default design refresh.
  • Fixed bug with inline directions panel that occurred after multiple address submissions.
  • Removed sensor parameter from Google Maps API URL as it's no longer needed.
  • Switched the default plugin styling from LESS to SASS.
  • Updated included Handlebars to v4.0.5.

Version 2.1.0

Includes contributions from from Giancarlo Gomez.

  • Added ability to pass in array object as dataRaw.
  • Added writeDebug console.log helper function for debugging.
  • Added sessionStorage option to store user's location when autoGeocode in enabled to prevent multiple lookups per session.
  • Fixed bug with inline directions panel that occurred after multiple address submissions.
  • Updated processForm method form field variables with empty string fallback values.

Version 2.0.9

  • Fixed issue when using catMarkers setting and not setting a location's category resulted in an error.

Version 2.0.8

  • Changed infowindow and location list templates so that the comma is added if the city is available.
  • Fixed issue with inline directions where "null" was prepended to the destination address.
  • Fixed close directions bug where close icon couldn't be clicked more than two times.
  • Fixed bug where form wasn't overriding query string parameters.
  • Updated processForm method to accept max distance query string parameter.
  • Updated processForm method to use existing origin data if it's present and matches to avoid unnecessary geocode requests.
  • Updated max distance check to less than or equal to the selected distance vs. just less than.
  • Updated regionID description in options.md for clarity.
  • Updated formEventHandler method to prevent ASP.net form submission on keydown instead of keyup.
  • Updated mapSettings description in options.md to highlight that zoom can be set to 0 for automatic centering and zooming.

Version 2.0.7

  • Fixed bug where reverse geocoding wasn't passing the origin to the templates (autogeocode and default location), causing incorrect direction links.
  • Updated location list directions link to use https.

Version 2.0.6

  • Added the option to filter data exclusively rather than inclusively with the exclusiveFiltering setting.
  • Added callbackFilters that fires when a filter is changed and returns the filter values if needed.
  • Added dataRaw option to use raw KML, XML or JSON data instead of the AJAX call.
  • Added basic raw data example rawdata-example.php file.
  • Added visibleMarkersList option that updates the location list to only display data from the markers that are curently displayed on the map.
  • Changed the distance error functionality so that the map centers and zooms automatically and all locations are displayed on the map.
  • Fixed issue with fullMapStart and inlineDirections setting combination.
  • Fixed issue with global olat and olng variables not being set with autoGeocode setting enabled.
  • Fixed issue with maxDistance and autoGeocode setting combination.

Version 2.0.5

  • Fixed typo with originMarker setup.
  • Made the originMarkerDim setting optional when setting a custom origin marker image - defaults to 32px by 32px.
  • Removed geocodeErrorAlert language option and switched error alerts to custom exceptions so users aren't shown multiple alerts.
  • Fixed bug with inline directions where close icon wasn't being removed on page reload.
  • Added callbackListClick that fires when a list element is clicked.
  • Added callbackMarkerClick that fires when a map marker is clicked.

Version 2.0.4

  • Fixed bug with maxDistance and pagination setting combination. The last page of of the pagination results was set to use the locationsPerPage setting instead of the remaining number, which could have resulted in the plugin trying to load undefined locations.
  • Fixed bugs with googleGeocode and reverseGoogleGeocode methods in which references to "this" were undefined.

Version 2.0.3

  • Fixed bug with maxDistance setting - updated locationsSetup method so that the locationset array uses array.push instead of incrementing via a passed in parameter, which was causing undefined array elements and causing errors.
  • Removed testing line from maxdistance-example.html that was left in.

Version 2.0.2

  • Updated the Handlebars.compile calls when using the inline template options to include the ID hash so that it's consistent with the other ID settings.
  • Fixed incorrect callback call in the modalClose method - callbackModalOpen to callbackModalClose.
  • Added callbackModalReady that fires when the the content of the modal is generated.
  • Fixed markerImg setting - previously threw error if markerDim wasn't set.

Version 2.0.1

  • Quick fix to remove a dupicate copyright notice in dist/ file. Copyright was removed from src/jquery.storelocator.js file to prevent duplication with the Grunt Banner task.

Version 2.0.0

Version 2 is a complete rewrite of the plugin based on the "basic" plugin pattern of the jQuery Boilerplate. The overall file structure has changed, several of the plugin settings have changed and all of the CSS is now prefixed to avoid potential collisions. In other words, you're not going to be able to simply replace the main plugin file to upgrade to the latest version. I've been working on this update off and on for the past six months, so a lot has changed. I've also added many new features based on the most common requests I've received. The following list doesn't cover everything that's new but all of the important items to note:

  • Grunt is now utilized to minify and compile the plugin and CSS. You only need to worry about running this if you're doing extensive modifications or are interested in submitting a pull request.
  • Plugin file structure and programming pattern have been reworked to follow the basic jQuery Boilerplate pattern
  • Many of the methods are public and can be called as needed
  • Google Maps settings are now exposed as a setting. Instead of trying to modify the plugin to make Google Maps settings changes simply use the mapSettings option to override.
  • Added inline directions option
  • Added multi-group live filtering via regex for quick category, etc. filtering.
  • Added option to search locations by name
  • Added option to set custom markers by category
  • Added option for paginating results
  • Added responsive Bootstrap example
  • Added region biasing setting to handle region/country select field
  • Added coordinates and address (user input) to primary AJAX GET request for better back-end integration
  • Added option to check for query string parameters

Version 1.4.9

More contributions from Mathieu Boillat and Jimmy Rittenborg in addition to a few style updates:

Version 1.4.8

This update is made up of contributions from Mathieu Boillat and Jimmy Rittenborg:

  • Added the possibility to set the 'storeLimit' option to -1, which means unlimited
  • Added the possibility to set the 'distanceAlert' option to -1, which means disable distance alert
  • Added little checks to only format 'web' variable when it is not null otherwise javascript would gives an error
  • Possibility to add custom variables in locations
  • If 'distance' variable is set in location, do not calculate it
  • Simplified some parts of the code
  • If noForm is true, only simulate the submit when the field is actually in focus

Version 1.4.7

Added ability to feature locations so that they always show at the top of the location list. To use, set the featuredLocations option to true and add featured="true" to featured locations in your XML or JSON locations data.

Version 1.4.6

Fixed a bug where infowindows wouldn't open if the map div was changed.

Version 1.4.5

A minor update that includes the latest versions of jQuery and Handlebars, two new location variables and some clean-up.

  • Added email and country variables for locations
  • Updated included Handlebars version to v1.0.0
  • Updated jQuery call to v1.10.1
  • Some bracket clean-up

Version 1.4.4

This update includes a bug fix for form re-submissions that was most apparent with the maximum distance example. It also includes a new jsonpCallback setting that was submitted by quayzar.

  • Moved markers array declaration up to line 115
  • Added a reset function that resets both the locationset and markers array and resets the list click event handler
  • Includes quayzar's jsonpCallback callback

Version 1.4.3

A minor update with some clean up and additional language options.

Additions:

  • Added several options for messaging so they can be easily translated into other languages
  • Added event namespacing
  • Added category to location variables

Fixes:

  • The distance error would only display "miles" in the alert. It will now show miles or kilometers depending on what the lengthUnit option is set to.

Version 1.4.2

This is another minor patch with a few important fixes and one addition. The plugin has also been submitted to the official jQuery plugin registry, which is finally back online.

Additions:

  • Added a "loading" option, which displays a loading gif next to the search button if set to true
  • Added missing modal window callback functions

Fixes:

  • The locationset array wasn't being reset on re-submission, which was a more obvious problem when trying to use the maxDistance option. Accidentally removed in 1.4.1.
  • When using the fullMapStart option the map wouldn't center and zoom on closest points after form submission
  • Using the fullMapStart and maxDistance options together would cause errors
  • Wrapped template loading and the rest of the script in separate functions to ensure that the template files are loaded before the rest of the script runs
  • Changed all modal window DIVs to use options for full customization. I thought about having a third template for the modal but it seems like overkill.
  • Updated the jQuery version in all the example files to 1.9.1 and switched the source to use the Media Temple CDN version because Google is taking too long to update their version.

Note that if you try to use the minified version of jQuery 1.9.0 the plugin will error out in Internet Explorer due to the bug described in ticket 13315.

Version 1.4.1

This is a minor patch to switch array declarations to a faster method, fix line 682 to target with the loc-list setting instead of the div ID, and remove a duplicate locationset declaration on line 328.

Version 1.4

This is a large update that has many updates and improvements. It’s very important to note that the plugin now requires the Handlebars template engine. I made this change so that the data that’s displayed in the location list and the infowindows can be easily customized. I also wanted to separate the bulk of the layout additions from the main plugin file. Handlebars pretty slick, will read Mustache templates, and the built-in helpers can 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. Additionally, I’d also like to note that it probably makes more sense to use KML now as the data source over the other options but I’m definitely leaving XML and JSON support in. XML is still the default datatype but I may switch it to KML in the future.

New features:

Kilometers option
This was a no-brainer. You could make the change without too much trouble before but I thought I’d make it easier for the rest of the world.

Origin marker option
If you’d like to show the origin point, the originMarker option should be set to true. The default color is blue but you can also change that with the originpinColor option. I’m actually not positive how many colors Google has available but I know red, green and blue work - I would just try the color you want to see if it works.

KML support
Another obvious add-on. If you’d like to use this plugin with more customized data this would be the method I’d recommend because the templates are simplified to just name and description. So, you could put anything in the descriptions and not have to worry about line by line formatting. This method also allows you to create a map with Google “My Maps” and export the KML for use with this plugin.

Better JSONP support and 5 callbacks
Thanks to “Blackout” for passing these additions on. It should make working with JSONP easier and the callbacks should be helpful for anyone wanting to hook in add some more advanced customization.

ASP.net WebForms support
If you’re woking with ASP.net WebForms, including form tags is obviously going to cause some problems. If you’re in this situation simply set the new noForm option to true and make sure the formContainerDiv setting matches your template.

Maximum distance option
You can now easily add a distance dropdown with any options that you’d like. I’ve specifically added a new HTML file as an example.

Location limit now supports any number
This plugin was previously limited to only display a maximum of 26 locations at one time (based on the English alphabet). You can now set the limit to whatever you’d like and if there are more than 26 it will switch to just show dot markers with numbers in the location list.

Open with a full map of all locations
I had several requests asking how to accomplish this so I’ve added it as an option. There’s a new fullMapStart option that if set to true, will immediately display a map with all locations and the zoom will automatically fit all the markers and center.

Reciprocal focus
“JO” was particularly interested in adding this to the plugin and I finally got around to it. To accomplish reciprocal focus I add an ID to each marker and then add that same ID to each list element in the location list taking advantage of HTML5’s new data- attributes. I also added some jQuery to make the location list scroll to the correct position when its marker is clicked on the map.

Notes:

A few option names have changed, so be sure to take note of the changes before updating your files - especially people using JSON data.

I've included a basic LESS stylesheet without variables that can be used in place of the main map.css stylesheet. If you want to use it make any changes you want and compile it or include it in your main LESS file.

I’m somewhat concerned about the markers for future versions. Google has deprecated the Image Charts API, which is annoying (they always seem to deprecate the best things), but these should still continue to work for a long time. With that said though, my opinion of the look of Google’s markers is that they’re quite ugly. I was working on adding a new custom markers that could be controlled with CSS via the Rich Marker utility but I was unable to get that to work with the marker animations. I was also looking into using Nicolas Mollet’s custom marker icons, which look very nice compared to Google’s, but that project is apparently under maintenance until further notice. If you have suggestions on this concern I’d be interested in hearing them.

Version 1.3.3

Forgot to remove one of the UTF-8 encoding lines in the Geocoder function.

Version 1.3.2

Only a few special characters were working with the previous fix. Removed special encoding and all seem to be working now.

Version 1.3.1

Replaced .serialize with .val on line 169 and added the line directly below, which encodes the string in UTF-8. This should solve special character issues with international addresses.

Version 1.3

Added directions links to left column location list and HTML5 geolocation API option. Also did a little cleanup.

Version 1.2

Added JSON compatibility, distance to location list, and an option for a default location. Also updated jQuery calls to the latest version (1.7.2) and removed an unnecessary line in the process form input function.

Version 1.1.3

Serlialize was targeting any form on the page instead of the specific formID. Thanks to Scott for pointing it out.

Version 1.1.2

Changed it so that the processing stops if the user input is blank.

Version 1.1.1

Added a modal window option. Set slideMap to false and modalWindow to true to use it. Also started using the new jQuery .on() event api - make sure you're using jQuery v1.7+ or this won't work.

Version 1.0.1

Left a couple of console.logs in my code, which was causing IE to hang.

Version 1.0

This is my first jQuery plugin and the first time I’ve published anything on Github. Let me know if I can improve something or if I’m making some kind of mistake.

Comments
  • Custom Marker

    Custom Marker

    Hi, I'm trying to change the marker, i'm using "markerImg": "/path/img/img.png" but nothing seems to change! any idea shat that may be??

    Thanks

    opened by Redani 10
  • Category Search Broken

    Category Search Broken

    When searching with categories if you search first an select a few categories, upon unchecking the search filter the results are limited to those previously whittled down.

    opened by enrmbigg 8
  • queryStringParams documentation

    queryStringParams documentation

    Hi, I'd be really interested in see some documentation for the queryStringParams feature for the plugin.

    I'm trying to implement a form (prior to results page) that send the variables of search and then redirect to the results page.

    I think that's what the queryStringParams option is but couldn't find any kind of documentation/example of how to use it.

    Thanks in advance.

    bug 
    opened by jotapee 8
  • Marker cluster

    Marker cluster

    Would be a nice enhancement to add marker clustering ability. Had to implement a really basic approach myself but could be done far more extensive.

    To apply it:

    ...
    ,'markerCluster': true
    ,'markerClusterStyles': [{
            url: 'cluster1.png'
            ,width: 90
            ,height: 67
            ,anchor:[11,37]
            ,textColor: '#ffffff'
        },{
            url: 'cluster2.png'
            ,width: 90
            ,height: 67
            ,anchor:[11,37]
            ,textColor: '#ffffff'
        },
    ...
    

    And in the plugin itself like this:

    ...
    if(_this.settings.markerCluster === true) {
        var markerCluster = new MarkerClusterer(map, markers, {
            'styles': _this.settings.markerClusterStyles
        });
    }
    ...
    
    enhancement 
    opened by herooutoftime 8
  • Update map width

    Update map width

    I am using jquery to show/hide the panel with all locations. I need to resize the map when panel close or open.

    This is the code:

    google.maps.event.trigger(map, "resize");

    But how to get "map" object from Store Locator?

    Thanks

    opened by kamov 7
  • How to reset search query on click

    How to reset search query on click

    Hi, I want to reset search query when clicked on button. Can you please guide me how can i reset map location when clicked.

    What i am doing is, i have make list of Country and when any once click on that country it shows that country list, but when some one search from search box and if that location is not found there is no way to go back to the list. So i want location to get reset when click on any country list.

    opened by chiraggmodi 6
  • Form submission

    Form submission

    Hej Bjorn, hope you're doing well and thanks for this new update which is really full and packed of options and callbacks functions :)

    I'm trying to implement it but i'm facing a little small problem: in all your example you always submit the variables 'origLat', 'origLng' and 'origAddress'. In my case I will not need these 3 variables but rather a custom ones that i include in the form: 'zip' and 'country'. And I don't really need to use the geocode function.

    I had to tweak your code by replace this: data: { 'origLat' : lat, 'origLng' : lng, 'origAddress': address } with data: $("#bh-sl-user-location").serialize()

    But i was wondering if it's possible to do so without altering your code.

    Thanks a lot and have a great sunday

    opened by Redani 6
  • When defaultLoc is True, the directions link is broken

    When defaultLoc is True, the directions link is broken

    If defaultLoc is False(default), directions links and distances are not displaying. When defaultLoc is True with a defaultLat and defaultLng, the addresses are showing directions links and distances. But there is an issue with the distances links, a JavaScript error.

    Uncaught TypeError: Cannot read property 'setMap' of undefined

    Shopify Assets My infowindow-description.html

    {{#location}}
    <div class="loc-name">{{name}}</div>
    <div>{{address}}</div>
    <div>{{address2}}</div>
    <div>{{city}}, {{state}} {{postal}}</div>
    <div>{{hours1}}</div>
    <div>{{hours2}}</div>
    <div>{{hours3}}</div>
    <div>{{phone}}</div>
    <div>{{contact}}</div>
    <div><a href="http://%7B%7Bweb%7D%7D/" target="_blank">{{web}}</a></div>
    {{/location}}
    

    My location-list-description.html

    {{#location}}
    <li data-markerid="{{markerid}}">
    <!--//comment <div class="list-label">{{marker}}</div> endcomment//-->
    <div class="list-details">
        <div class="list-content">
            <div class="loc-name">{{name}}</div>
            <div class="loc-addr">{{address}}</div> 
            <div class="loc-addr2">{{address2}}</div> 
            <div class="loc-addr3">{{city}}, {{state}} {{postal}}</div> 
            <div class="loc-phone">{{phone}}</div> 
            <div class="loc-contact">{{contact}}</div> 
            <div class="loc-web"><a href="http://%7B%7Bweb%7D%7D/" target="_blank">{{web}}</a></div>
            {{#if distance}}<div class="loc-dist">{{distance}} {{length}}</div>
            <div class="loc-directions"><a href="http://maps.google.com/maps?saddr={{origin}}&daddr={{address}}%20{{address2}}%20{{city}},%20{{state}}%20{{postal}}" target="_blank">Directions</a></div>{{/if}}
        </div>
    </div>
    </li>
    {{/location}}
    

    JSON Processing Code

    // Process the location data depending on the data format type
            if (_this.settings.dataType === 'json' || _this.settings.dataType === 'jsonp') {
    
    
               // start of custom code for Google Worksheet feed API - Frank Thoeny 
                var dataLocationStr = _this.settings.dataLocation;
                var dataLocationPatt = new RegExp("google.com");
                if(true === dataLocationPatt.test(dataLocationStr)){
    
                   //Process JSON -> GOOGLE Worksheet feed API - Frank Thoeny
                   $.each(data.feed.entry, function (k) { 
    
                     var obj = data.feed.entry[k];
                     var locationData = {};
    
                     //locationData['id'] = parseInt(k+1);
                     locationData['name'] = obj.gsx$locname.$t.trim();
                     locationData['lat'] = obj.gsx$lat.$t.trim();
                     locationData['lng'] = obj.gsx$lng.$t.trim();
                     locationData['address'] = obj.gsx$address.$t.trim();
                     locationData['address2'] = obj.gsx$address2.$t.trim();
                     locationData['city'] = obj.gsx$city.$t.trim();
                     locationData['country'] = obj.gsx$city.$t.trim();
                     locationData['hours1'] = obj.gsx$hours1.$t.trim();
                     locationData['hours2'] = obj.gsx$hours2.$t.trim();
                     locationData['hours3'] = obj.gsx$hours3.$t.trim();
                     locationData['phone'] = obj.gsx$phone.$t.trim();
                     locationData['postal'] = obj.gsx$postal.$t.trim();
                     locationData['state'] = obj.gsx$state.$t.trim();
                     locationData['web'] = obj.gsx$web.$t.trim();
    
                     _this.locationsSetup(locationData, orig_lat, orig_lng, firstRun, origin, maxDistance);
    
                     i++;
    
                  });
    
                }
    
    opened by frankthoeny 6
  • display markers with parameters through url like city, zip, region or else...

    display markers with parameters through url like city, zip, region or else...

    Hi,

    Is it possible to pass an url parameter ? And display directly the correct markers on the map the first time the page load?

    For example "http://www.mydomain.com/storelocator?city=london This would display all the London markers to someone coming from another page ( he clicked on a link on the previous page for example )

    Thanks for this great plugin, very usefull.

    opened by angeenes 6
  • Pass variable to script and initialize it only after a on click event?

    Pass variable to script and initialize it only after a on click event?

    Is there a way to initialize plugin not on $(document).ready but, for example, on $("#button").on("click") ? I need this because i've to retrieve the full list of stores via ajax and i've to pass a variable $id to exclude a store itself by list...for example i've 4 stores: store1, store2, store3, store4. If I click in a button for store1 <button id_store="1">CHECK STORES AROUD ME</button> i'd like to pass variable id_store to my ajax to search ALL STORES but not store1........

    opened by itajackass 5
  • Reload Map?

    Reload Map?

    Hello,

    that might be an easy question, but how do i reload my map (in my example ill can change a marker image, and need to reload the map with the new marker image). I could simulate an changed filter, to force an reload - but is there a better solution?

    And anoher question: I would like to add some filters, but ill need to combine them. For example:

    Filter of Type, and Filter for Priority:

    Type could be type1, type2, and type3 - and Priority could be standard or high - now i would like to filter all with are type1 and 2, and priority high. So ill need to need to make filter "groups". Any ideas how to solve that? Can i send some values to the JSON Controller? So that he should return me only that POIs that i want to show?

    Thanks in advance for sharing that great plugin!

    opened by derdida 5
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.9.4 to 6.11.0

    Bump qs from 6.9.4 to 6.11.0

    Bumps qs from 6.9.4 to 6.11.0.

    Changelog

    Sourced from qs's changelog.

    6.11.0

    • [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip option (#442)
    • [readme] fix version badge

    6.10.5

    • [Fix] stringify: with arrayFormat: comma, properly include an explicit [] on a single-item array (#434)

    6.10.4

    • [Fix] stringify: with arrayFormat: comma, include an explicit [] on a single-item array (#441)
    • [meta] use npmignore to autogenerate an npmignore file
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbol, object-inspect, tape

    6.10.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [actions] reuse common workflows
    • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, tape

    6.10.2

    • [Fix] stringify: actually fix cyclic references (#426)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [actions] update codecov uploader
    • [actions] update workflows
    • [Tests] clean up stringify tests slightly
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, object-inspect, safe-publish-latest, tape

    6.10.1

    • [Fix] stringify: avoid exception on repeated object values (#402)

    6.10.0

    • [New] stringify: throw on cycles, instead of an infinite loop (#395, #394, #393)
    • [New] parse: add allowSparse option for collapsing arrays with missing indices (#312)
    • [meta] fix README.md (#399)
    • [meta] only run npm run dist in publish, not install
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbols, tape
    • [Tests] fix tests on node v0.6
    • [Tests] use ljharb/actions/node/install instead of ljharb/actions/node/run
    • [Tests] Revert "[meta] ignore eclint transitive audit warning"

    6.9.7

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [Tests] clean up stringify tests slightly
    • [meta] fix README.md (#399)
    • Revert "[meta] ignore eclint transitive audit warning"

    ... (truncated)

    Commits
    • 56763c1 v6.11.0
    • ddd3e29 [readme] fix version badge
    • c313472 [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip option
    • 95bc018 v6.10.5
    • 0e903c0 [Fix] stringify: with arrayFormat: comma, properly include an explicit `[...
    • ba9703c v6.10.4
    • 4e44019 [Fix] stringify: with arrayFormat: comma, include an explicit [] on a s...
    • 113b990 [Dev Deps] update object-inspect
    • c77f38f [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbol, tape
    • 2cf45b2 [meta] use npmignore to autogenerate an npmignore file
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimatch from 3.0.4 to 3.0.8

    Bump minimatch from 3.0.4 to 3.0.8

    Bumps minimatch from 3.0.4 to 3.0.8.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Reload

    Reload

    How to reload with different dataLocation?

    //$('#bh-sl-map-container').storeLocator('destroy'); //$('#bh-sl-map-container').storeLocator('mapReload'); //$('#bh-sl-map-container').storeLocator('reset'); $('#bh-sl-map-container').storeLocator('updateSku',{ //pagination: true, slideMap : false, altDistanceNoResult: true, autoComplete: true, bounceMarker: true, fullMapStart: true, dataType: 'json', lengthUnit: 'km', distanceAlert: 100, openNearest:true, loading: true, autoGeocode: true, mapSettings:{ zoom: 10, scrollwheel:true }, dataLocation: 'lib/contractsMap.php?services='+services }); $('#bh-sl-map-container').storeLocator('mapReload');

    opened by seritpt 0
  • Bump grunt from 1.3.0 to 1.5.3

    Bump grunt from 1.3.0 to 1.5.3

    Bumps grunt from 1.3.0 to 1.5.3.

    Release notes

    Sourced from grunt's releases.

    v1.5.3

    • Merge pull request #1745 from gruntjs/fix-copy-op 572d79b
    • Patch up race condition in symlink copying. 58016ff
    • Merge pull request #1746 from JamieSlome/patch-1 0749e1d
    • Create SECURITY.md 69b7c50

    https://github.com/gruntjs/grunt/compare/v1.5.2...v1.5.3

    v1.5.2

    • Update Changelog 7f15fd5
    • Merge pull request #1743 from gruntjs/cleanup-link b0ec6e1
    • Clean up link handling 433f91b

    https://github.com/gruntjs/grunt/compare/v1.5.1...v1.5.2

    v1.5.1

    • Merge pull request #1742 from gruntjs/update-symlink-test ad22608
    • Fix symlink test 0652305

    https://github.com/gruntjs/grunt/compare/v1.5.0...v1.5.1

    v1.5.0

    • Updated changelog b2b2c2b
    • Merge pull request #1740 from gruntjs/update-deps-22-10 3eda6ae
    • Update testing matrix 47d32de
    • More updates 2e9161c
    • Remove console log 04b960e
    • Update dependencies, tests... aad3d45
    • Merge pull request #1736 from justlep/main fdc7056
    • support .cjs extension e35fe54

    https://github.com/gruntjs/grunt/compare/v1.4.1...v1.5.0

    v1.4.1

    • Update Changelog e7625e5
    • Merge pull request #1731 from gruntjs/update-options 5d67e34
    • Fix ci install d13bf88
    • Switch to Actions 08896ae
    • Update grunt-known-options eee0673
    • Add note about a breaking change 1b6e288

    https://github.com/gruntjs/grunt/compare/v1.4.0...v1.4.1

    v1.4.0

    • Merge pull request #1728 from gruntjs/update-deps-changelog 63b2e89
    • Update changelog and util dep 106ed17
    • Merge pull request #1727 from gruntjs/update-deps-apr 49de70b
    • Update CLI and nodeunit 47cf8b6
    • Merge pull request #1722 from gruntjs/update-through e86db1c
    • Update deps 4952368

    ... (truncated)

    Changelog

    Sourced from grunt's changelog.

    v1.5.3 date: 2022-04-23 changes: - Patch up race condition in symlink copying. v1.5.2 date: 2022-04-12 changes: - Unlink symlinks when copy destination is a symlink. v1.5.1 date: 2022-04-11 changes: - Fixed symlink destination handling. v1.5.0 date: 2022-04-10 changes: - Updated dependencies. - Add symlink handling for copying files. v1.4.1 date: 2021-05-24 changes: - Fix --preload option to be a known option - Switch to GitHub Actions v1.4.0 date: 2021-04-21 changes: - Security fixes in production and dev dependencies - Liftup/Liftoff upgrade breaking change. Update your scripts to use --preload instead of --require. Ref: https://github.com/js-cli/js-liftoff/commit/e7a969d6706e730d90abb4e24d3cb4d3bce06ddb.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v3.1.8)
  • v3.1.8(Aug 22, 2022)

  • v3.1.7(Jun 26, 2022)

    • Fixed empty name search value not clearing previous value.
    • Fixed openNearest setting not working in combination with querystringParams setting.
    • Fixed openNearest setting not opening correct location with custom sorting (sortBy) enabled.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.6(Dec 5, 2021)

    • Added extra check to make sure mapping doesn't fire twice when defaultLoc is enabled and fullMapStart is also enabled. fullMapStart is not needed when defaultLoc is enabled and this is just a preventative to avoid user errors.
    • Fixed centering issue on initial search with maxDistance enabled introduced with fitBounds updates in last update.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.5(Sep 30, 2021)

    • Added Google Maps object as a parameter for callbackMarkerClick callback.
    • Added a zoom listener after fitBounds is used to prevent high zoom levels after name search and taxonomy filtering.
    • Improved zooming when maxDistance setting is enabled taking advantage of the fitBounds method.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.4(Jun 7, 2021)

  • v3.1.3(May 9, 2021)

    • Fixed empty name search field value overriding filter results.
    • Fixed groups of filters not applying together.
    • Fixed potential error from occurring if fullMapStartListLimit is set, and the number of locations is less than the limit.
    • Updated bundled Handlebars to v4.7.7 that addresses a critical vulnerability.
    • Updated jQuery version in example files to v3.6.0.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.2(Jan 13, 2021)

    • Fixed name search issue introduced in v3.1.1. Reverted to previous matching pattern only for name searches and still using the new patter for taxonomy matching.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.1(Jan 10, 2021)

    • Enhanced filtering regular expression to better account for exact matches vs. substrings.
    • Fixed multi-category selection filtering issue introduced in last version 3.1.0.
    • Updated bundled Handlebars to v4.7.6.
    • Updated node modules.
    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(Nov 18, 2019)

    • Added featuredDistance setting to restrict featured locations by a specified distance (number value should be used).
    • Updated bundled version of Handlebars to v4.5.1 due to security issue.
    • Updated taxonomy filtering REGEX and string replacements for international character support.
    Source code(tar.gz)
    Source code(zip)
  • v3.0.1(Sep 30, 2018)

    • Added custom order handling to tie into previously added custom sorting. Set order to asc or desc.
    • Added functionality to fill in search input with determined address when using autoGeocode or geocodeID settings.
    • Added Google Map object as parameter to callbackBeforeSend, callbackListClick, callbackModalReady, and callbackFilters callbacks.
    • Changed parseJSON to native JSON.parse due to deprecation in rawData processing function.
    • Fixed issue with mapReload (triggered with optional reset button) where storeLimit wasn't reset.
    • Updated sort-example.html example with order select field.
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Mar 5, 2018)

    Version 3 has a breaking change with the dataLocation and dataType settings switching the default from XML to JSON.

    • Added ajaxData to allow custom data to be sent with the AJAX request. The setting accepts an object.
    • Added altDistanceNoResult setting to display no results message vs. all locations when closest location is further than distanceAlert setting.
    • Added callbackAutoGeoSuccess callback that fires after the geolocation API returns a successful result.
    • Added callbackFormVals callback that fires after the form values have been processed from the form.
    • Added callbackGeocodeRestrictions callback that allows the componentRestrictions object to be overridden.
    • Added callbackNearestLoc callback that fires when the nearest location is triggered with the openNearest setting.
    • Added callbackSorting callback that fires when when a new sorting method is selected.
    • Added component filtering for geocoding to better restrict by area.
    • Added length unit (distance miles/kilometers) front-end swap functionality, setting and example file.
    • Added mappingObject, originPoint, data, and page parameters to callbackSuccess callback.
    • Added new front-end sorting functionality, settings, and example file.
    • Added location data object as parameter of callbackDirectionsRequest callback.
    • Added openNearest setting to open/select the nearest location after searching.
    • Fixed issue with featuredLocations setting where featured locations at far distances would trigger distance alert.
    • Fixed issue with filtering values containing ampersands, which would not display any results - updated filtering regex.
    • Fixed issue where HTML5 Geolocation was skipped when using the fullMapStartBlank setting.
    • Fixed issue with pagination page numbers displaying after no results via PR from heldr88
    • Fixed issue with taxonomy filtering and autoGeocode setting where HTML Geocoding API would run on every filter change.
    • Removed Less from the project as it is no longer needed with the Bootstrap update.
    • Swapped the default location data type to be JSON instead of XML.
    • Updated Bootstrap example file to make use of Bootstrap 4.
    • Updated taxonomy filtering so pagination is reset to first page after selecting a filter.
    Source code(tar.gz)
    Source code(zip)
  • v2.7.4(Jun 12, 2017)

    • Fixed error when filtering with query strings where filter values with spaces wouldn't work.
    • Updated processForm method so submitting the map removes focus from any of the form input/select fields instead of just the address input.
    • Updated filterData string replace methods to match string replace method in filters setup.
    Source code(tar.gz)
    Source code(zip)
  • v2.7.3(May 7, 2017)

    • Added ability to indicate multiple query string parameter values (for checkboxes) with a comma separated list value.
    • Added autoCompleteDisableListener setting to disable the listener that immediately triggers a search when an auto complete location option is selected.
    • Added blur to primary location input field after form submission to hide mobile keyboards.
    • Added check to exclusive filtering to make sure filter values are not undefined before proceeding with the regular expression.
    • Added functionality to automatically select/check filters on load from query string parameter values.
    • Added location details object to callbackListClick and callbackMarkerClick objects.
    • Fixed broken dragSearch functionality that was introduced after map scope pull request was merged.
    • Fixed Handlebars targeting issue triggered by placing an unordered list within the location list template.
    • Fixed issue with fullMapStart where conditional was checking if isNaN was true when it should have been false on fullMapStartListLimit setting.
    • Updated callbackListClick documentation to include second market object parameter.
    • Updated zooming to prevent fitBounds from being used when query string parameters are in use and the location has been set with bh-sl-address.
    Source code(tar.gz)
    Source code(zip)
  • v2.7.2(Dec 4, 2016)

    • Added callbackRegion callback, which allows region to be set before being sent to the Google Maps Geocoding API.
    • Fixed incorrect origin marker parameter order after code restructure.
    • Fixed issue where searching by name after searching by address, without a new address, didn't reset the origin.
    • Merged pull-request from ollea that adds "getMap" function that returns a google.maps.Map instance.
    Source code(tar.gz)
    Source code(zip)
  • v2.7.1(Oct 1, 2016)

  • v2.7.0(Sep 30, 2016)

    • Added callback documentation.
    • Added callbackCreateMarker for custom marker overrides.
    • Added InfoBubble support and example file.
    • Added location results total count if HTML element with "bh-sl-total-results" class exists.
    • Added checks to replace non-ASCII characters when filtering.
    • Added reset functionality that can be triggered via a button that has the CSS class "bh-sl-reset".
    • Added query string parameter filter check so that results can be filtered with URL query strings.
    • Fixed issue with maxDistance and querystringParams settings combination.
    • Moved some functionality from processData into new separate methods.
    • Removed non-standard $1 RegExp property in processData method.
    Source code(tar.gz)
    Source code(zip)
  • v2.6.2(Jul 19, 2016)

    • Added callbackMapSet callback that fires after the map has been set up.
    • Fixed issue where locations without attributes set could get the attribute values from prior locations.
    • Fixed issue where pagination total number of pages was based on the full location set total instead of the storeLimit setting.
    • Removed form markup from initial query string example index file as it's not needed until the submission page.
    Source code(tar.gz)
    Source code(zip)
  • v2.6.1(Jul 3, 2016)

    • Added additional error handling when the plugin checks the closest location.
    • Added listener for autoComplete change so that the search processes when a new place is selected.
    • Fixed issue with new boundary search AJAX params after a full address search was made.
    • Merged in pull request from noclat that added autoCompleteOptions setting.
    Source code(tar.gz)
    Source code(zip)
  • v2.6.0(Jun 19, 2016)

    • Added bounds and formatted address info from geocoding API to AJAX data parameters.
    • Added Marker Clusterer library support, setting and example file.
    • Added disableAlphaMarkers setting to completely disable displaying markers and location list indicators with alpha characters.
    • Fixed issue with combination of autoGeocode and originMarker settings.
    • Merged in pull request from drcomix that fixed zoom issue with dragSearch setting.
    • Switched included remote scripts in example files to https.
    • Updated jQuery references to the latest version.
    Source code(tar.gz)
    Source code(zip)
  • v2.5.3(Apr 4, 2016)

    • Removed check from createMarker method that removed spaces from categories - created issues with categories that have spaces.
    • Re-worked handling of no results.
    • Updated createMarker method to ensure custom category marker images are converted to integers if strings are passed for dimensions.
    • Updated autoGeocode and default location functionality so that max distance is applied on initial load.
    Source code(tar.gz)
    Source code(zip)
  • v2.5.2(Mar 16, 2016)

  • v2.5.1(Mar 13, 2016)

  • v2.5.0(Mar 6, 2016)

    • Added new dragSearch setting which peforms a new search when the map is dragged when enabled.
    • Added new geocodeID setting so that the HTML geocoding API can be triggered by a button instead of firing automatically.
    • Fixed issues with no results where clicking the marker would display data from the previous result and clicking the location list item would throw an error.
    • Merged in pull request from hawkmeister with update to bower.json file with main property.
    • Merged in pull request from hyperTwitch with fixes for using fullMapStartListLimit in combination with a different store limit.
    • Updated jQuery references to the latest version.
    Source code(tar.gz)
    Source code(zip)
  • v2.4.2(Jan 21, 2016)

    • Fixed issue with new full map start location list limit where clicking on a marker that didn't have a list item displayed caused an error.
    • Fixed issue with settings combination of inline directions and default location.
    • Reverted change to new list limit so that it's always applied with full map start enabled.
    Source code(tar.gz)
    Source code(zip)
  • v2.4.1(Jan 20, 2016)

    • Changed new full map start list limit so that it's only applied on the initial load.
    • Fixed issue with new autocomplete setting where search was firing twice.
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Jan 20, 2016)

    • Added new selected marker image options to highlight clicked marker.
    • Added Google Places autocomplete option and example file.
    • Added full map start location list limit setting.
    Source code(tar.gz)
    Source code(zip)
  • v2.3.3(Dec 23, 2015)

    Removed code that temporarily hid the map and results, when there are no results, in favor of just displaying the no results message and empty map.

    Source code(tar.gz)
    Source code(zip)
  • v2.3.2(Dec 15, 2015)

  • v2.3.1(Dec 13, 2015)

  • v2.3.0(Dec 12, 2015)

    • Added fullMapStartBlank option to show a blank map without any locations initially. Set this setting to an integer, which will be applied as the initial Google Maps zoom value and will then fall back to the mapSettings zoom level after a search is performed.
    • Added fullMapStartBlank example file.
    • Fixed filters select field styling inconsistency.
    • Moved pagination container within map container div in pagination example to avoid confusion when combined with modal option.
    • Reworked styling so that all HTML example files are responsive by default.
    • Updated map-container ID in all example files with bh-sl prefix.
    Source code(tar.gz)
    Source code(zip)
Owner
Bjorn Holine
Lead Web Engineer in Seattle with over thirteen years of professional agency experience.
Bjorn Holine
Google-reviews-crawler - A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file.

google-reviews-crawler A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file. Usage Clone the repo, install the de

￸A￸l￸e￸x D￸o￸m￸a￸k￸i￸d￸i￸s 6 Oct 26, 2022
A Travel companion app using Google Maps API, Travel Search and Weather API

Travel Advisor Introduction An advanced Travel Companion Application using Google Maps. With Geolocation, Google Maps API, Searching for places, Fetch

Sunny Bhadani 4 Nov 11, 2022
A landing page, as well as a results page, that utliize both Yelp API and Google Maps API.

Economic Eats Group Project #1 Maintained By: Austin Donovan John Hysong John Guzzetta Jahnathan Exantus Description This project contains a landing p

John Guzzetta IV 7 Aug 4, 2022
Google-Drive-Directory-Index | Combining the power of Cloudflare Workers and Google Drive API will allow you to index your Google Drive files on the browser.

?? Google-Drive-Directory-Index Combining the power of Cloudflare Workers and Google Drive will allow you to index your Google Drive files on the brow

Aicirou 127 Jan 2, 2023
It's a javascript Class which contains utility methods that simplify working with google maps web SDK

About GoogleMapsJSHelper It's a javascript Class which contains utility methods that simplify working with google maps web SDK Note: i used ES7 Class

Sami Alateya 6 Jul 23, 2022
Cross provider map drawing library, supporting Mapbox, Google Maps and Leaflet out the box

Terra Draw Frictionless map drawing across mapping providers. TerraDraw centralises map drawing logic and provides a host of out the box drawing modes

James Milner 106 Dec 31, 2022
This is a simple script to upload Multiple files into google drive using google drive API and Nodejs.

Welcome to gDrive Multiple File Upload ?? This is a simple script to upload Multiple files into google drive using google drive API and Nodejs Install

Jayamal Sanuka Hettiarachchi 1 Dec 29, 2021
Google Clone using NEXT JS ,SSR, Tailwind and Google API's to search data.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Hamnaikbalkhan 7 Sep 23, 2022
The Remix version of the fakebooks app demonstrated on https://remix.run. Check out the CRA version: https://github.com/kentcdodds/fakebooks-cra

Remix Fakebooks App This is a (very) simple implementation of the fakebooks mock app demonstrated on remix.run. There is no database, but there is an

Kent C. Dodds 61 Dec 22, 2022
Firebase SDK 9 + Google Sign In + Chrome Extension Manifest Version 3 + Webpack

Firebase SDK 9 + Google Sign In + Chrome Extension Manifest Version 3 + Webpack Demo Find this Chrome Extension Setup and working demo here or on Yout

Rasika Warade 40 Dec 28, 2022
Implementation of Google’s One Version Rule for JS monorepos

@wayfair/one-version One Version to rule them all, One Version to find them, One Version to bring them all, and in the darkness bind them.1 Opinionate

Wayfair Tech 17 Nov 9, 2022
Google Chrome release and version info as JSON (self updating)

chrome-versions Self updating repository to store Google Chrome release and version info as JSON. Windows macOS Linux Android TL;DR Use a CDN to fetch

berstend̡̲̫̹̠̖͚͓̔̄̓̐̄͛̀͘ 9 Dec 15, 2022
jQuery plugin for enhancing HTML Image maps

ImageMapster: A jQuery Plugin to make image maps useful ImageMapster activates the areas in HTML imagemaps so you can highlight and select them. It ha

James Treworgy 787 Jan 4, 2023
A script for Obsidian's QuickAdd plugin, to fetch books data using Google Books API.

Books script for Obsidian's Quickadd plugin Demo If this script helped you and you wish to contribute :) Description This script allows you to easily

Elaws 10 Dec 31, 2022
Front-End mentor project for rest maps API😊👍

REST Countries API with color theme switcher Live | Solution | Challenge Solution for a challenge from frontendmentor.io. About The Project If you're

Ashutosh Mohanty 3 Sep 4, 2022
A Geiger counter for Google emitting a sound for each request that goes to Google.

Google Teller This is a (Firefox) add-on (WebExtension) that emits a sound every time you connect to a service hosted by Google. It is inspired by @be

rugk 35 Nov 5, 2022
Script to synchronize between a Notion database and Google Calendar both ways. Uses Google App Script.

Yet Another Two Way Notion-Google Calendar Sync Script A script to sync events between Google calendar and a Notion database. Features! Google App Scr

kat 41 Jan 7, 2023