Skip to content

Commit d562ce7

Browse files
committed
Added location data object as parameter of callbackDirectionsRequest callback
1 parent 50cb736 commit d562ce7

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

callbacks/callback-directionsrequest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Fires upon a directions request when using the inline directions setting.
1010
|---|---|---|
1111
| origin | string | Origin address |
1212
| locID | int | Location ID of directions to |
13-
| map | object | Google map object |
13+
| map | object | Google map object |
14+
| location | object | Selected location data |

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-12
1+
/*! jQuery Google Maps Store Locator - v2.7.5 - 2018-02-15
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2018 Bjorn Holine; Licensed MIT */
44

@@ -1444,7 +1444,7 @@
14441444

14451445
// Directions request callback
14461446
if (this.settings.callbackDirectionsRequest) {
1447-
this.settings.callbackDirectionsRequest.call(this, origin, locID, map);
1447+
this.settings.callbackDirectionsRequest.call(this, origin, locID, map, locationset[locID]);
14481448
}
14491449

14501450
var destination = this.getAddressByMarker(locID);

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ filtering.
4242
* Added callbackGeocodeRestrictions callback that allows the componentRestrictions object to be overridden.
4343
* Added callbackNearestLoc callback that fires when the nearest location is triggered with the openNearest setting.
4444
* Added component filtering for geocoding to better restrict by area.
45+
* Added location data object as parameter of callbackDirectionsRequest callback.
4546
* Added openNearest setting to open/select the nearest location after searching.
4647
* Fixed issue with featuredLocations setting where featured locations at far distances would trigger distance alert.
4748
* Fixed issue with filtering values containing ampersands, which would not display any results - updated filtering regex.

src/js/jquery.storelocator.js

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

14411441
// Directions request callback
14421442
if (this.settings.callbackDirectionsRequest) {
1443-
this.settings.callbackDirectionsRequest.call(this, origin, locID, map);
1443+
this.settings.callbackDirectionsRequest.call(this, origin, locID, map, locationset[locID]);
14441444
}
14451445

14461446
var destination = this.getAddressByMarker(locID);

0 commit comments

Comments
 (0)