@@ -389,7 +389,7 @@ $.fn.storeLocator = function(options) {
389
389
var phone = this . phone ;
390
390
var email = this . email ;
391
391
var web = this . web ;
392
- web = web . replace ( "http://" , "" ) ;
392
+ if ( web ) web = web . replace ( "http://" , "" ) ;
393
393
var hours1 = this . hours1 ;
394
394
var hours2 = this . hours2 ;
395
395
var hours3 = this . hours3 ;
@@ -455,7 +455,7 @@ $.fn.storeLocator = function(options) {
455
455
var phone = $ ( this ) . attr ( 'phone' ) ;
456
456
var email = $ ( this ) . attr ( 'email' ) ;
457
457
var web = $ ( this ) . attr ( 'web' ) ;
458
- web = web . replace ( "http://" , "" ) ;
458
+ if ( web ) web = web . replace ( "http://" , "" ) ;
459
459
var hours1 = $ ( this ) . attr ( 'hours1' ) ;
460
460
var hours2 = $ ( this ) . attr ( 'hours2' ) ;
461
461
var hours3 = $ ( this ) . attr ( 'hours3' ) ;
@@ -521,7 +521,7 @@ $.fn.storeLocator = function(options) {
521
521
}
522
522
}
523
523
else {
524
- if ( locationset [ 0 ] [ 0 ] > settings . distanceAlert ) {
524
+ if ( settings . distanceAlert != - 1 && locationset [ 0 ] [ 0 ] > settings . distanceAlert ) {
525
525
alert ( settings . distanceErrorAlert + settings . distanceAlert + " " + distUnit ) ;
526
526
}
527
527
}
@@ -590,7 +590,7 @@ $.fn.storeLocator = function(options) {
590
590
//Set up alpha character
591
591
var markerId = currentMarker . get ( "id" ) ;
592
592
//Use dot markers instead of alpha if there are more than 26 locations
593
- if ( settings . storeLimit > 26 ) {
593
+ if ( settings . storeLimit == - 1 || settings . storeLimit > 26 ) {
594
594
var indicator = markerId + 1 ;
595
595
}
596
596
else {
@@ -703,7 +703,7 @@ $.fn.storeLocator = function(options) {
703
703
var infowindow = new google . maps . InfoWindow ( ) ;
704
704
705
705
//Avoid error if number of locations is less than the default of 26
706
- if ( ( locationset . length - 1 ) < settings . storeLimit - 1 ) {
706
+ if ( settings . storeLimit == - 1 || ( locationset . length - 1 ) < settings . storeLimit - 1 ) {
707
707
storenum = locationset . length - 1 ;
708
708
}
709
709
else {
@@ -801,7 +801,7 @@ $.fn.storeLocator = function(options) {
801
801
new google . maps . Point ( 12 , 35 ) ) ;
802
802
803
803
//Create the markers
804
- if ( settings . storeLimit > 26 ) {
804
+ if ( settings . storeLimit == - 1 || settings . storeLimit > 26 ) {
805
805
var marker = new google . maps . Marker ( {
806
806
position : point ,
807
807
map : map ,
@@ -865,4 +865,4 @@ $.fn.storeLocator = function(options) {
865
865
866
866
} ) ;
867
867
} ;
868
- } ) ( jQuery ) ;
868
+ } ) ( jQuery ) ;
0 commit comments