Skip to content

Commit 6cad327

Browse files
committed
Added map marker accessibility, deprecated bounceMarker setting
1 parent 691db42 commit 6cad327

File tree

5 files changed

+23
-32
lines changed

5 files changed

+23
-32
lines changed

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

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
'autoCompleteDisableListener': false,
2626
'autoCompleteOptions' : {},
2727
'autoGeocode' : false,
28-
'bounceMarker' : true,
28+
'bounceMarker' : true, // Deprecated.
2929
'catMarkers' : null,
3030
'dataLocation' : 'data/locations.json',
3131
'dataRaw' : null,
@@ -1268,10 +1268,12 @@
12681268
// Create the default markers
12691269
if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || this.settings.catMarkers !== null || this.settings.markerImg !== null || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) {
12701270
marker = new google.maps.Marker({
1271-
position : point,
1272-
map : map,
12731271
draggable: false,
1274-
icon: markerImg // Reverts to default marker if nothing is passed
1272+
icon : markerImg, // Reverts to default marker if nothing is passed
1273+
map : map,
1274+
optimized: false,
1275+
position : point,
1276+
title : name,
12751277
});
12761278
}
12771279
else {
@@ -1280,7 +1282,9 @@
12801282
draggable: false,
12811283
label : letter,
12821284
map : map,
1285+
optimized: false,
12831286
position : point,
1287+
title : name,
12841288
});
12851289
}
12861290
}
@@ -2569,17 +2573,7 @@
25692573

25702574
map.panTo(selectedMarker.getPosition());
25712575
var listLoc = 'left';
2572-
if (_this.settings.bounceMarker === true) {
2573-
selectedMarker.setAnimation(google.maps.Animation.BOUNCE);
2574-
setTimeout(function () {
2575-
selectedMarker.setAnimation(null);
2576-
_this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page);
2577-
}, 700
2578-
);
2579-
}
2580-
else {
2581-
_this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page);
2582-
}
2576+
_this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page);
25832577

25842578
// Custom selected marker override
25852579
if (_this.settings.selectedMarkerImg !== null) {

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| autoCompleteDisableListener | false | Disable the listener that immediately triggers a search when an auto complete location option is selected. |
99
| autoCompleteOptions | {} | Google Places autocomplete [options object](https://developers.google.com/maps/documentation/javascript/places-autocomplete#add_autocomplete). |
1010
| autoGeocode | false | Set to true if you want to use the HTML5 geolocation API (good for mobile) to geocode the user's location. **SSL is required**. |
11-
| bounceMarker | true | Bounces the maker when a list element is clicked. |
11+
| bounceMarker | true | Deprecated - no longer applies. |
1212
| catMarkers | null | Multiple replacement marker images based on categories object. Value should be array with image path followed by dimensions - ex value: catMarkers : {'Restaurant' : ['img/red-marker.svg', 32, 32]} |
1313
| dataLocation | 'data/locations.json' | The path to the location data. |
1414
| dataRaw | null | Accepts raw KML, XML, or JSON instead of using a remote file. |

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ filtering.
3737

3838
### Version 3.1.10
3939

40+
* Added map marker accessibility.
41+
* Deprecated bounceMarker setting due to Google Charts API deprecation and poor animation results with Google marker labels.
4042
* Fixed issue with new disable filtering functionality when location objet property is missing.
4143
* Fixed marker labels not working with previous technique. Swapped to google.maps.Marker label parameter.
44+
* Updated package devDependencies.
4245

4346
### Version 3.1.9
4447

src/js/jquery.storelocator.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'autoCompleteDisableListener': false,
2222
'autoCompleteOptions' : {},
2323
'autoGeocode' : false,
24-
'bounceMarker' : true,
24+
'bounceMarker' : true, // Deprecated.
2525
'catMarkers' : null,
2626
'dataLocation' : 'data/locations.json',
2727
'dataRaw' : null,
@@ -1264,10 +1264,12 @@
12641264
// Create the default markers
12651265
if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || this.settings.catMarkers !== null || this.settings.markerImg !== null || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) {
12661266
marker = new google.maps.Marker({
1267-
position : point,
1268-
map : map,
12691267
draggable: false,
1270-
icon: markerImg // Reverts to default marker if nothing is passed
1268+
icon : markerImg, // Reverts to default marker if nothing is passed
1269+
map : map,
1270+
optimized: false,
1271+
position : point,
1272+
title : name,
12711273
});
12721274
}
12731275
else {
@@ -1276,7 +1278,9 @@
12761278
draggable: false,
12771279
label : letter,
12781280
map : map,
1281+
optimized: false,
12791282
position : point,
1283+
title : name,
12801284
});
12811285
}
12821286
}
@@ -2565,17 +2569,7 @@
25652569

25662570
map.panTo(selectedMarker.getPosition());
25672571
var listLoc = 'left';
2568-
if (_this.settings.bounceMarker === true) {
2569-
selectedMarker.setAnimation(google.maps.Animation.BOUNCE);
2570-
setTimeout(function () {
2571-
selectedMarker.setAnimation(null);
2572-
_this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page);
2573-
}, 700
2574-
);
2575-
}
2576-
else {
2577-
_this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page);
2578-
}
2572+
_this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page);
25792573

25802574
// Custom selected marker override
25812575
if (_this.settings.selectedMarkerImg !== null) {

0 commit comments

Comments
 (0)