Skip to content

Commit 273836e

Browse files
committed
Added location details object to callbackListClick and callbackMarkerClick objects
1 parent 81660d0 commit 273836e

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

callbacks/callback-listclick.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Fires after a location list item is clicked.
1010
|---|---|---|
1111
| markerId | int | Corresponding marker ID |
1212
| selectedMarker | object | Corresponding marker object |
13+
| locationObj | object | Location details of the selected item |

callbacks/callback-markerclick.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Fires when a marker on the map is clicked.
1010
|---|---|---|
1111
| marker | object | Google Maps marker object |
1212
| markerId | int | Marker ID number |
13-
| $selectedLocation | object | Corresponding location list DOM element |
13+
| $selectedLocation | object | Corresponding location list DOM element |
14+
| locationObj | object | Location details of the selected item |

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.7.3 - 2017-04-12
1+
/*! jQuery Google Maps Store Locator - v2.7.3 - 2017-04-26
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2017 Bjorn Holine; Licensed MIT */
44

@@ -26,7 +26,6 @@
2626
'addressID' : 'bh-sl-address',
2727
'regionID' : 'bh-sl-region',
2828
'mapSettings' : {
29-
gestureHandling: 'cooperative',
3029
mapTypeId : google.maps.MapTypeId.ROADMAP,
3130
zoom : 12
3231
},
@@ -1229,7 +1228,7 @@
12291228
if ($selectedLocation.length > 0) {
12301229
// Marker click callback
12311230
if (_this.settings.callbackMarkerClick) {
1232-
_this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation);
1231+
_this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId]);
12331232
}
12341233

12351234
$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
@@ -2108,7 +2107,7 @@
21082107

21092108
// List click callback
21102109
if (_this.settings.callbackListClick) {
2111-
_this.settings.callbackListClick.call(this, markerId, selectedMarker);
2110+
_this.settings.callbackListClick.call(this, markerId, selectedMarker, locationset[markerId]);
21122111
}
21132112

21142113
map.panTo(selectedMarker.getPosition());

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.

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ filtering.
3838
### Version 2.7.3
3939

4040
* Added autoCompleteDisableListener setting to disable the listener that immediately triggers a search when an auto complete location option is selected.
41+
* Added location details object to callbackListClick and callbackMarkerClick objects.
4142
* Fixed Handlebars targeting issue triggered by placing an unordered list within the location list template.
42-
* Updated callbackListClick documentation to include second market object paremter.
43+
* Updated callbackListClick documentation to include second market object parameter.
4344

4445
### Version 2.7.2
4546

src/js/jquery.storelocator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@
12251225
if ($selectedLocation.length > 0) {
12261226
// Marker click callback
12271227
if (_this.settings.callbackMarkerClick) {
1228-
_this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation);
1228+
_this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation, locationset[markerId]);
12291229
}
12301230

12311231
$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
@@ -2104,7 +2104,7 @@
21042104

21052105
// List click callback
21062106
if (_this.settings.callbackListClick) {
2107-
_this.settings.callbackListClick.call(this, markerId, selectedMarker);
2107+
_this.settings.callbackListClick.call(this, markerId, selectedMarker, locationset[markerId]);
21082108
}
21092109

21102110
map.panTo(selectedMarker.getPosition());

0 commit comments

Comments
 (0)