Skip to content

Commit 0b0b910

Browse files
committed
Added mappingObject, originPoint, data, and page parameters to callbackSuccess callback
1 parent 1fe9fee commit 0b0b910

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

callbacks/callback-success.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@
22

33
## Description
44

5-
Fires after the location data has been successfully called.
5+
Fires after the location data has been successfully called.
6+
7+
## Parameters
8+
9+
| Name | Type | Description |
10+
|---|---|---|
11+
| mappingObject | object | All the potential mapping properties - latitude, longitude, origin, name, max distance, page |
12+
| originPoint | object | Google LatLng object of the origin coordinates |
13+
| data | object | Location data |
14+
| page | int | Current page number |

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

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

@@ -2452,7 +2452,7 @@
24522452

24532453
// Callback
24542454
if (_this.settings.callbackSuccess) {
2455-
_this.settings.callbackSuccess.call(this);
2455+
_this.settings.callbackSuccess.call(this, mappingObject, originPoint, data, page);
24562456
}
24572457

24582458
openMap = $mapDiv.hasClass('bh-sl-map-open');

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
@@ -43,6 +43,7 @@ filtering.
4343
* Added callbackGeocodeRestrictions callback that allows the componentRestrictions object to be overridden.
4444
* Added callbackNearestLoc callback that fires when the nearest location is triggered with the openNearest setting.
4545
* Added component filtering for geocoding to better restrict by area.
46+
* Added mappingObject, originPoint, data, and page parameters to callbackSuccess callback.
4647
* Added location data object as parameter of callbackDirectionsRequest callback.
4748
* Added openNearest setting to open/select the nearest location after searching.
4849
* Fixed issue with featuredLocations setting where featured locations at far distances would trigger distance alert.
@@ -51,7 +52,7 @@ filtering.
5152
* Fixed issue with pagination page numbers displaying after no results via PR from [heldr88](https://github.com/heldr88)
5253
* Fixed issue with taxonomy filtering and autoGeocode setting where HTML Geocoding API would run on every filter change.
5354
* Swapped the default location data type to be JSON instead of XML.
54-
* Updated taxonomy filtering so pagingation is reset to first page after selecting a filter.
55+
* Updated taxonomy filtering so pagination is reset to first page after selecting a filter.
5556

5657
### Version 2.7.4
5758

src/js/jquery.storelocator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2448,7 +2448,7 @@
24482448

24492449
// Callback
24502450
if (_this.settings.callbackSuccess) {
2451-
_this.settings.callbackSuccess.call(this);
2451+
_this.settings.callbackSuccess.call(this, mappingObject, originPoint, data, page);
24522452
}
24532453

24542454
openMap = $mapDiv.hasClass('bh-sl-map-open');

0 commit comments

Comments
 (0)