Skip to content

Commit 0b7c7ca

Browse files
committed
Fixed marker labels not working with previous technique, fixed issue with new disable filtering functionality when location property is missing
1 parent 460dacb commit 0b7c7ca

File tree

7 files changed

+31
-22
lines changed

7 files changed

+31
-22
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": "3.1.9",
3+
"version": "3.1.10",
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: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v3.1.9 - 2023-02-05
1+
/*! jQuery Google Maps Store Locator - v3.1.10 - 2023-02-19
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2023 Bjorn Holine; Licensed MIT */
44

@@ -1275,17 +1275,12 @@
12751275
});
12761276
}
12771277
else {
1278-
// Letter markers image
1279-
letterMarkerImg = {
1280-
url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text=' + letter + '&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48'
1281-
};
1282-
12831278
// Letter markers
12841279
marker = new google.maps.Marker({
1285-
position : point,
1280+
draggable: false,
1281+
label : letter,
12861282
map : map,
1287-
icon : letterMarkerImg,
1288-
draggable: false
1283+
position : point,
12891284
});
12901285
}
12911286
}
@@ -2820,6 +2815,13 @@
28202815
}
28212816
}
28222817

2818+
// Account for missing filter properties in location set.
2819+
for (var keyName in filters) {
2820+
if (!availableValues.hasOwnProperty(keyName)) {
2821+
availableValues[keyName] = '';
2822+
}
2823+
}
2824+
28232825
// Update input and option fields to disabled if they're not available.
28242826
for (var key in this.settings.taxonomyFilters) {
28252827
if (this.settings.taxonomyFilters.hasOwnProperty(key)) {

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": "3.1.9",
3+
"version": "3.1.10",
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 3.1.10
39+
40+
* Fixed issue with new disable filtering functionality when location objet property is missing.
41+
* Fixed marker labels not working with previous technique. Swapped to google.maps.Marker label parameter.
42+
3843
### Version 3.1.9
3944

4045
* Added functionality to disable input and option fields that don't have matching values in the current location set after filtering when inclusive filtering is used (default).

src/js/jquery.storelocator.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,17 +1271,12 @@
12711271
});
12721272
}
12731273
else {
1274-
// Letter markers image
1275-
letterMarkerImg = {
1276-
url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text=' + letter + '&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48'
1277-
};
1278-
12791274
// Letter markers
12801275
marker = new google.maps.Marker({
1281-
position : point,
1276+
draggable: false,
1277+
label : letter,
12821278
map : map,
1283-
icon : letterMarkerImg,
1284-
draggable: false
1279+
position : point,
12851280
});
12861281
}
12871282
}
@@ -2816,6 +2811,13 @@
28162811
}
28172812
}
28182813

2814+
// Account for missing filter properties in location set.
2815+
for (var keyName in filters) {
2816+
if (!availableValues.hasOwnProperty(keyName)) {
2817+
availableValues[keyName] = '';
2818+
}
2819+
}
2820+
28192821
// Update input and option fields to disabled if they're not available.
28202822
for (var key in this.settings.taxonomyFilters) {
28212823
if (this.settings.taxonomyFilters.hasOwnProperty(key)) {

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","dealer","location", "locations", "maps", "map", "stores", "find"],
6-
"version": "3.1.9",
6+
"version": "3.1.10",
77
"author": {
88
"name": "Bjorn Holine",
99
"url": "https://www.bjornblog.com/"

0 commit comments

Comments
 (0)