Skip to content

Commit 1def0de

Browse files
committed
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, rebuilt
1 parent 64ebac9 commit 1def0de

File tree

7 files changed

+13
-16
lines changed

7 files changed

+13
-16
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "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.",
55
"repository": {
66
"type": "git",

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.4.0 - 2016-01-20
1+
/*! jQuery Google Maps Store Locator - v2.4.1 - 2016-01-20
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2016 Bjorn Holine; Licensed MIT */
44

@@ -185,12 +185,8 @@
185185

186186
// Set up Google Places autocomplete if it's set to true
187187
if (this.settings.autoComplete === true) {
188-
var _this = this;
189188
var searchInput = document.getElementById(this.settings.addressID);
190189
var autoPlaces = new google.maps.places.Autocomplete(searchInput);
191-
autoPlaces.addListener('place_changed', function(){
192-
_this.processForm(null);
193-
});
194190
}
195191

196192
// Load the templates and continue from there
@@ -2124,7 +2120,7 @@
21242120
}
21252121
else {
21262122
// Set up the location list markup
2127-
if (_this.settings.fullMapStartListLimit !== false && ! isNaN(_this.settings.fullMapStartListLimit)) {
2123+
if (_this.settings.fullMapStartListLimit !== false && ! isNaN(_this.settings.fullMapStartListLimit) && firstRun === true) {
21282124
for (var m = 0; m < _this.settings.fullMapStartListLimit; m++) {
21292125
var currentMarker = markers[m];
21302126
_this.listSetup(currentMarker, storeStart, page);

dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "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.",
55
"repository": {
66
"type": "git",

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ filtering.
3535

3636
## Changelog
3737

38+
### Version 2.4.1
39+
40+
* Changed new full map start list limit so that it's only applied on the initial load.
41+
* Fixed issue with new autocomplete setting where search was firing twice.
42+
3843
### Version 2.4.0
3944

4045
* Added new selected marker image options to highlight clicked marker.

src/js/jquery.storelocator.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,8 @@
182182

183183
// Set up Google Places autocomplete if it's set to true
184184
if (this.settings.autoComplete === true) {
185-
var _this = this;
186185
var searchInput = document.getElementById(this.settings.addressID);
187186
var autoPlaces = new google.maps.places.Autocomplete(searchInput);
188-
autoPlaces.addListener('place_changed', function(){
189-
_this.processForm(null);
190-
});
191187
}
192188

193189
// Load the templates and continue from there
@@ -2121,7 +2117,7 @@
21212117
}
21222118
else {
21232119
// Set up the location list markup
2124-
if (_this.settings.fullMapStartListLimit !== false && ! isNaN(_this.settings.fullMapStartListLimit)) {
2120+
if (_this.settings.fullMapStartListLimit !== false && ! isNaN(_this.settings.fullMapStartListLimit) && firstRun === true) {
21252121
for (var m = 0; m < _this.settings.fullMapStartListLimit; m++) {
21262122
var currentMarker = markers[m];
21272123
_this.listSetup(currentMarker, storeStart, page);

storelocator.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "jQuery Google Maps Store Locator",
44
"description": "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.",
55
"keywords": ["jquery","locator","store", "location", "locations", "maps", "map", "stores", "find"],
6-
"version": "2.4.0",
6+
"version": "2.4.1",
77
"author": {
88
"name": "Bjorn Holine",
99
"url": "http://www.bjornblog.com/"

0 commit comments

Comments
 (0)