Skip to content

Commit 9155a75

Browse files
committed
Merge branch 'development'
2 parents 6ffd2af + 042b30f commit 9155a75

File tree

7 files changed

+41
-33
lines changed

7 files changed

+41
-33
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.0.8",
3+
"version": "2.0.9",
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: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.0.8 - 2015-07-19
1+
/*! jQuery Google Maps Store Locator - v2.0.9 - 2015-08-13
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2015 Bjorn Holine; Licensed MIT */
44

@@ -798,21 +798,23 @@
798798

799799
// Custom multi-marker image override (different markers for different categories
800800
if(this.settings.catMarkers !== null) {
801-
// Multiple categories
802-
if(category.indexOf(',') !== -1) {
803-
// Break the category variable into an array if there are multiple categories for the location
804-
categories = category.split(',');
805-
// With multiple categories the color will be determined by the last matched category in the data
806-
for(var i = 0; i < categories.length; i++) {
807-
if(categories[i] in this.settings.catMarkers) {
808-
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
801+
if(typeof category !== 'undefined') {
802+
// Multiple categories
803+
if(category.indexOf(',') !== -1) {
804+
// Break the category variable into an array if there are multiple categories for the location
805+
categories = category.split(',');
806+
// With multiple categories the color will be determined by the last matched category in the data
807+
for(var i = 0; i < categories.length; i++) {
808+
if(categories[i] in this.settings.catMarkers) {
809+
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
810+
}
809811
}
810812
}
811-
}
812-
// Single category
813-
else {
814-
if(category in this.settings.catMarkers) {
815-
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
813+
// Single category
814+
else {
815+
if(category in this.settings.catMarkers) {
816+
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
817+
}
816818
}
817819
}
818820
}

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "jquery-storelocator-plugin",
3-
"version": "2.0.8",
3+
"version": "2.0.9",
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",
77
"url": "https://github.com/bjorn2404/jQuery-Store-Locator-Plugin.git"
88
},
9-
"keywords": ["jquery-plugin","locator","store", "location","locations","maps","map","stores","find"],
9+
"keywords": ["jquery-plugin","ecosystem:jquery","locator","store", "location","locations","maps","map","stores","find","finder"],
1010
"author": {
1111
"name": "Bjorn Holine",
1212
"url": "http://www.bjornblog.com/"

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ for even faster loading.
2727

2828
## Changelog
2929

30+
### Version 2.0.9
31+
32+
* Fixed issue when using catMarkers setting and not setting a location's category resulted in an error.
33+
3034
### Version 2.0.8
3135

3236
* Changed infowindow and location list templates so that the comma is added if the city is available.

src/js/jquery.storelocator.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -796,21 +796,23 @@
796796

797797
// Custom multi-marker image override (different markers for different categories
798798
if(this.settings.catMarkers !== null) {
799-
// Multiple categories
800-
if(category.indexOf(',') !== -1) {
801-
// Break the category variable into an array if there are multiple categories for the location
802-
categories = category.split(',');
803-
// With multiple categories the color will be determined by the last matched category in the data
804-
for(var i = 0; i < categories.length; i++) {
805-
if(categories[i] in this.settings.catMarkers) {
806-
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
799+
if(typeof category !== 'undefined') {
800+
// Multiple categories
801+
if(category.indexOf(',') !== -1) {
802+
// Break the category variable into an array if there are multiple categories for the location
803+
categories = category.split(',');
804+
// With multiple categories the color will be determined by the last matched category in the data
805+
for(var i = 0; i < categories.length; i++) {
806+
if(categories[i] in this.settings.catMarkers) {
807+
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
808+
}
807809
}
808810
}
809-
}
810-
// Single category
811-
else {
812-
if(category in this.settings.catMarkers) {
813-
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
811+
// Single category
812+
else {
813+
if(category in this.settings.catMarkers) {
814+
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
815+
}
814816
}
815817
}
816818
}

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.0.8",
6+
"version": "2.0.9",
77
"author": {
88
"name": "Bjorn Holine",
99
"url": "http://www.bjornblog.com/"

0 commit comments

Comments
 (0)