|
1 |
| -/*! jQuery Google Maps Store Locator - v2.7.3 - 2017-03-21 |
| 1 | +/*! jQuery Google Maps Store Locator - v2.7.3 - 2017-04-12 |
2 | 2 | * http://www.bjornblog.com/web/jquery-store-locator-plugin
|
3 | 3 | * Copyright (c) 2017 Bjorn Holine; Licensed MIT */
|
4 | 4 |
|
|
18 | 18 | var filters = {}, locationData = {}, GeoCodeCalc = {}, mappingObj = {};
|
19 | 19 |
|
20 | 20 | // Create the defaults once. DO NOT change these settings in this file - settings should be overridden in the plugin call
|
21 |
| - var defaults = { |
22 |
| - 'mapID' : 'bh-sl-map', |
23 |
| - 'locationList' : 'bh-sl-loc-list', |
24 |
| - 'formContainer' : 'bh-sl-form-container', |
25 |
| - 'formID' : 'bh-sl-user-location', |
26 |
| - 'addressID' : 'bh-sl-address', |
27 |
| - 'regionID' : 'bh-sl-region', |
28 |
| - 'mapSettings': { |
| 21 | + var defaults = { |
| 22 | + 'mapID' : 'bh-sl-map', |
| 23 | + 'locationList' : 'bh-sl-loc-list', |
| 24 | + 'formContainer' : 'bh-sl-form-container', |
| 25 | + 'formID' : 'bh-sl-user-location', |
| 26 | + 'addressID' : 'bh-sl-address', |
| 27 | + 'regionID' : 'bh-sl-region', |
| 28 | + 'mapSettings' : { |
29 | 29 | gestureHandling: 'cooperative',
|
30 |
| - mapTypeId: google.maps.MapTypeId.ROADMAP, |
31 |
| - zoom: 12 |
| 30 | + mapTypeId : google.maps.MapTypeId.ROADMAP, |
| 31 | + zoom : 12 |
32 | 32 | },
|
33 |
| - 'markerImg' : null, |
34 |
| - 'markerDim' : null, |
35 |
| - 'catMarkers' : null, |
36 |
| - 'selectedMarkerImg' : null, |
37 |
| - 'selectedMarkerImgDim' : null, |
38 |
| - 'disableAlphaMarkers' : false, |
39 |
| - 'lengthUnit' : 'm', |
40 |
| - 'storeLimit' : 26, |
41 |
| - 'distanceAlert' : 60, |
42 |
| - 'dataType' : 'xml', |
43 |
| - 'dataLocation' : 'data/locations.xml', |
44 |
| - 'dataRaw' : null, |
45 |
| - 'xmlElement' : 'marker', |
46 |
| - 'listColor1' : '#ffffff', |
47 |
| - 'listColor2' : '#eeeeee', |
48 |
| - 'originMarker' : false, |
49 |
| - 'originMarkerImg' : null, |
50 |
| - 'originMarkerDim' : null, |
51 |
| - 'bounceMarker' : true, |
52 |
| - 'slideMap' : true, |
53 |
| - 'modal' : false, |
54 |
| - 'overlay' : 'bh-sl-overlay', |
55 |
| - 'modalWindow' : 'bh-sl-modal-window', |
56 |
| - 'modalContent' : 'bh-sl-modal-content', |
57 |
| - 'closeIcon' : 'bh-sl-close-icon', |
58 |
| - 'defaultLoc' : false, |
59 |
| - 'defaultLat' : null, |
60 |
| - 'defaultLng' : null, |
61 |
| - 'autoComplete' : false, |
62 |
| - 'autoCompleteOptions' : {}, |
63 |
| - 'autoCompleteDisableListener': false, |
64 |
| - 'autoGeocode' : false, |
65 |
| - 'geocodeID' : null, |
66 |
| - 'maxDistance' : false, |
67 |
| - 'maxDistanceID' : 'bh-sl-maxdistance', |
68 |
| - 'fullMapStart' : false, |
69 |
| - 'fullMapStartBlank' : false, |
70 |
| - 'fullMapStartListLimit' : false, |
71 |
| - 'noForm' : false, |
72 |
| - 'loading' : false, |
73 |
| - 'loadingContainer' : 'bh-sl-loading', |
74 |
| - 'featuredLocations' : false, |
75 |
| - 'pagination' : false, |
76 |
| - 'locationsPerPage' : 10, |
77 |
| - 'inlineDirections' : false, |
78 |
| - 'nameSearch' : false, |
79 |
| - 'searchID' : 'bh-sl-search', |
80 |
| - 'nameAttribute' : 'name', |
81 |
| - 'visibleMarkersList' : false, |
82 |
| - 'dragSearch' : false, |
83 |
| - 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', |
84 |
| - 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', |
85 |
| - 'KMLinfowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', |
86 |
| - 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', |
87 |
| - 'listTemplateID' : null, |
88 |
| - 'infowindowTemplateID' : null, |
89 |
| - 'taxonomyFilters' : null, |
90 |
| - 'taxonomyFiltersContainer' : 'bh-sl-filters-container', |
91 |
| - 'exclusiveFiltering' : false, |
92 |
| - 'querystringParams' : false, |
93 |
| - 'debug' : false, |
94 |
| - 'sessionStorage' : false, |
95 |
| - 'markerCluster' : null, |
96 |
| - 'infoBubble' : null, |
97 |
| - // Callbacks |
98 |
| - 'callbackNotify' : null, |
99 |
| - 'callbackRegion' : null, |
100 |
| - 'callbackBeforeSend' : null, |
101 |
| - 'callbackSuccess' : null, |
102 |
| - 'callbackModalOpen' : null, |
103 |
| - 'callbackModalReady' : null, |
104 |
| - 'callbackModalClose' : null, |
105 |
| - 'callbackJsonp' : null, |
106 |
| - 'callbackCreateMarker' : null, |
107 |
| - 'callbackPageChange' : null, |
108 |
| - 'callbackDirectionsRequest' : null, |
109 |
| - 'callbackCloseDirections' : null, |
110 |
| - 'callbackNoResults' : null, |
111 |
| - 'callbackListClick' : null, |
112 |
| - 'callbackMarkerClick' : null, |
113 |
| - 'callbackFilters' : null, |
114 |
| - 'callbackMapSet' : null, |
115 |
| - // Language options |
116 |
| - 'addressErrorAlert' : 'Unable to find address', |
117 |
| - 'autoGeocodeErrorAlert' : 'Automatic location detection failed. Please fill in your address or zip code.', |
118 |
| - 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', |
119 |
| - 'mileLang' : 'mile', |
120 |
| - 'milesLang' : 'miles', |
121 |
| - 'kilometerLang' : 'kilometer', |
122 |
| - 'kilometersLang' : 'kilometers', |
123 |
| - 'noResultsTitle' : 'No results', |
124 |
| - 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', |
125 |
| - 'nextPage' : 'Next »', |
126 |
| - 'prevPage' : '« Prev' |
127 |
| - }; |
| 33 | + 'markerImg' : null, |
| 34 | + 'markerDim' : null, |
| 35 | + 'catMarkers' : null, |
| 36 | + 'selectedMarkerImg' : null, |
| 37 | + 'selectedMarkerImgDim' : null, |
| 38 | + 'disableAlphaMarkers' : false, |
| 39 | + 'lengthUnit' : 'm', |
| 40 | + 'storeLimit' : 26, |
| 41 | + 'distanceAlert' : 60, |
| 42 | + 'dataType' : 'xml', |
| 43 | + 'dataLocation' : 'data/locations.xml', |
| 44 | + 'dataRaw' : null, |
| 45 | + 'xmlElement' : 'marker', |
| 46 | + 'listColor1' : '#ffffff', |
| 47 | + 'listColor2' : '#eeeeee', |
| 48 | + 'originMarker' : false, |
| 49 | + 'originMarkerImg' : null, |
| 50 | + 'originMarkerDim' : null, |
| 51 | + 'bounceMarker' : true, |
| 52 | + 'slideMap' : true, |
| 53 | + 'modal' : false, |
| 54 | + 'overlay' : 'bh-sl-overlay', |
| 55 | + 'modalWindow' : 'bh-sl-modal-window', |
| 56 | + 'modalContent' : 'bh-sl-modal-content', |
| 57 | + 'closeIcon' : 'bh-sl-close-icon', |
| 58 | + 'defaultLoc' : false, |
| 59 | + 'defaultLat' : null, |
| 60 | + 'defaultLng' : null, |
| 61 | + 'autoComplete' : false, |
| 62 | + 'autoCompleteOptions' : {}, |
| 63 | + 'autoCompleteDisableListener': false, |
| 64 | + 'autoGeocode' : false, |
| 65 | + 'geocodeID' : null, |
| 66 | + 'maxDistance' : false, |
| 67 | + 'maxDistanceID' : 'bh-sl-maxdistance', |
| 68 | + 'fullMapStart' : false, |
| 69 | + 'fullMapStartBlank' : false, |
| 70 | + 'fullMapStartListLimit' : false, |
| 71 | + 'noForm' : false, |
| 72 | + 'loading' : false, |
| 73 | + 'loadingContainer' : 'bh-sl-loading', |
| 74 | + 'featuredLocations' : false, |
| 75 | + 'pagination' : false, |
| 76 | + 'locationsPerPage' : 10, |
| 77 | + 'inlineDirections' : false, |
| 78 | + 'nameSearch' : false, |
| 79 | + 'searchID' : 'bh-sl-search', |
| 80 | + 'nameAttribute' : 'name', |
| 81 | + 'visibleMarkersList' : false, |
| 82 | + 'dragSearch' : false, |
| 83 | + 'infowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/infowindow-description.html', |
| 84 | + 'listTemplatePath' : 'assets/js/plugins/storeLocator/templates/location-list-description.html', |
| 85 | + 'KMLinfowindowTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-infowindow-description.html', |
| 86 | + 'KMLlistTemplatePath' : 'assets/js/plugins/storeLocator/templates/kml-location-list-description.html', |
| 87 | + 'listTemplateID' : null, |
| 88 | + 'infowindowTemplateID' : null, |
| 89 | + 'taxonomyFilters' : null, |
| 90 | + 'taxonomyFiltersContainer' : 'bh-sl-filters-container', |
| 91 | + 'exclusiveFiltering' : false, |
| 92 | + 'exclusiveTax' : null, |
| 93 | + 'querystringParams' : false, |
| 94 | + 'debug' : false, |
| 95 | + 'sessionStorage' : false, |
| 96 | + 'markerCluster' : null, |
| 97 | + 'infoBubble' : null, |
| 98 | + // Callbacks |
| 99 | + 'callbackNotify' : null, |
| 100 | + 'callbackRegion' : null, |
| 101 | + 'callbackBeforeSend' : null, |
| 102 | + 'callbackSuccess' : null, |
| 103 | + 'callbackModalOpen' : null, |
| 104 | + 'callbackModalReady' : null, |
| 105 | + 'callbackModalClose' : null, |
| 106 | + 'callbackJsonp' : null, |
| 107 | + 'callbackCreateMarker' : null, |
| 108 | + 'callbackPageChange' : null, |
| 109 | + 'callbackDirectionsRequest' : null, |
| 110 | + 'callbackCloseDirections' : null, |
| 111 | + 'callbackNoResults' : null, |
| 112 | + 'callbackListClick' : null, |
| 113 | + 'callbackMarkerClick' : null, |
| 114 | + 'callbackFilters' : null, |
| 115 | + 'callbackMapSet' : null, |
| 116 | + // Language options |
| 117 | + 'addressErrorAlert' : 'Unable to find address', |
| 118 | + 'autoGeocodeErrorAlert' : 'Automatic location detection failed. Please fill in your address or zip code.', |
| 119 | + 'distanceErrorAlert' : 'Unfortunately, our closest location is more than ', |
| 120 | + 'mileLang' : 'mile', |
| 121 | + 'milesLang' : 'miles', |
| 122 | + 'kilometerLang' : 'kilometer', |
| 123 | + 'kilometersLang' : 'kilometers', |
| 124 | + 'noResultsTitle' : 'No results', |
| 125 | + 'noResultsDesc' : 'No locations were found with the given criteria. Please modify your selections or input.', |
| 126 | + 'nextPage' : 'Next »', |
| 127 | + 'prevPage' : '« Prev' |
| 128 | + }; |
128 | 129 |
|
129 | 130 | // Plugin constructor
|
130 | 131 | function Plugin(element, options) {
|
|
869 | 870 | if (filters.hasOwnProperty(k)) {
|
870 | 871 |
|
871 | 872 | // Exclusive filtering
|
872 |
| - if(this.settings.exclusiveFiltering === true) { |
| 873 | + if(this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) { |
873 | 874 | var filterTests = filters[k];
|
874 | 875 | var exclusiveTest = [];
|
875 | 876 |
|
|
0 commit comments