Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn2404 committed Aug 14, 2015
2 parents 6ffd2af + 042b30f commit 9155a75
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 33 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-storelocator-plugin",
"version": "2.0.8",
"version": "2.0.9",
"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.",
"repository": {
"type": "git",
Expand Down
30 changes: 16 additions & 14 deletions dist/assets/js/plugins/storeLocator/jquery.storelocator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! jQuery Google Maps Store Locator - v2.0.8 - 2015-07-19
/*! jQuery Google Maps Store Locator - v2.0.9 - 2015-08-13
* http://www.bjornblog.com/web/jquery-store-locator-plugin
* Copyright (c) 2015 Bjorn Holine; Licensed MIT */

Expand Down Expand Up @@ -798,21 +798,23 @@

// Custom multi-marker image override (different markers for different categories
if(this.settings.catMarkers !== null) {
// Multiple categories
if(category.indexOf(',') !== -1) {
// Break the category variable into an array if there are multiple categories for the location
categories = category.split(',');
// With multiple categories the color will be determined by the last matched category in the data
for(var i = 0; i < categories.length; i++) {
if(categories[i] in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
if(typeof category !== 'undefined') {
// Multiple categories
if(category.indexOf(',') !== -1) {
// Break the category variable into an array if there are multiple categories for the location
categories = category.split(',');
// With multiple categories the color will be determined by the last matched category in the data
for(var i = 0; i < categories.length; i++) {
if(categories[i] in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
}
}
}
}
// Single category
else {
if(category in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
// Single category
else {
if(category in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
}
}
}
}
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "jquery-storelocator-plugin",
"version": "2.0.8",
"version": "2.0.9",
"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.",
"repository": {
"type": "git",
"url": "https://github.com/bjorn2404/jQuery-Store-Locator-Plugin.git"
},
"keywords": ["jquery-plugin","locator","store", "location","locations","maps","map","stores","find"],
"keywords": ["jquery-plugin","ecosystem:jquery","locator","store", "location","locations","maps","map","stores","find","finder"],
"author": {
"name": "Bjorn Holine",
"url": "http://www.bjornblog.com/"
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ for even faster loading.

## Changelog

### 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.
Expand Down
28 changes: 15 additions & 13 deletions src/js/jquery.storelocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,21 +796,23 @@

// Custom multi-marker image override (different markers for different categories
if(this.settings.catMarkers !== null) {
// Multiple categories
if(category.indexOf(',') !== -1) {
// Break the category variable into an array if there are multiple categories for the location
categories = category.split(',');
// With multiple categories the color will be determined by the last matched category in the data
for(var i = 0; i < categories.length; i++) {
if(categories[i] in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
if(typeof category !== 'undefined') {
// Multiple categories
if(category.indexOf(',') !== -1) {
// Break the category variable into an array if there are multiple categories for the location
categories = category.split(',');
// With multiple categories the color will be determined by the last matched category in the data
for(var i = 0; i < categories.length; i++) {
if(categories[i] in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], this.settings.catMarkers[categories[i]][1], this.settings.catMarkers[categories[i]][2]);
}
}
}
}
// Single category
else {
if(category in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
// Single category
else {
if(category in this.settings.catMarkers) {
markerImg = this.markerImage(this.settings.catMarkers[category][0], this.settings.catMarkers[category][1], this.settings.catMarkers[category][2]);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion storelocator.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "jQuery Google Maps Store Locator",
"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.",
"keywords": ["jquery","locator","store", "location", "locations", "maps", "map", "stores", "find"],
"version": "2.0.8",
"version": "2.0.9",
"author": {
"name": "Bjorn Holine",
"url": "http://www.bjornblog.com/"
Expand Down

0 comments on commit 9155a75

Please sign in to comment.