Skip to content

Commit 85199af

Browse files
committed
Handle markerid in combination with raw data setting
1 parent 6100770 commit 85199af

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v3.1.7 - 2022-05-28
1+
/*! jQuery Google Maps Store Locator - v3.1.7 - 2022-05-30
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2022 Bjorn Holine; Licensed MIT */
44

@@ -3102,6 +3102,14 @@
31023102
// Add marker ID to location data
31033103
locationset[y].markerid = marker.get('id');
31043104

3105+
if (this.settings.dataRaw !== null) {
3106+
for (var l = 0; l < this.settings.dataRaw.length; l++) {
3107+
if (this.settings.dataRaw[l] && this.settings.dataRaw[l].hasOwnProperty('id') && this.settings.dataRaw[l].id === locationset[y].id) {
3108+
this.settings.dataRaw[l].markerid = locationset[y].markerid;
3109+
}
3110+
}
3111+
}
3112+
31053113
if (
31063114
(_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) ||
31073115
(_this.settings.mapSettings.zoom === 0) ||

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.

src/js/jquery.storelocator.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,6 +3098,14 @@
30983098
// Add marker ID to location data
30993099
locationset[y].markerid = marker.get('id');
31003100

3101+
if (this.settings.dataRaw !== null) {
3102+
for (var l = 0; l < this.settings.dataRaw.length; l++) {
3103+
if (this.settings.dataRaw[l] && this.settings.dataRaw[l].hasOwnProperty('id') && this.settings.dataRaw[l].id === locationset[y].id) {
3104+
this.settings.dataRaw[l].markerid = locationset[y].markerid;
3105+
}
3106+
}
3107+
}
3108+
31013109
if (
31023110
(_this.settings.fullMapStart === true && firstRun === true && _this.settings.querystringParams !== true) ||
31033111
(_this.settings.mapSettings.zoom === 0) ||

0 commit comments

Comments
 (0)