1jQuery(document).ready(function($){ 2 // Create the script tag, set the appropriate attributes 3 var script = document.createElement('script'); 4 //script.src = 'https://maps.googleapis.com/maps/api/js?key=AIzaSyB6K0X-OMyGen0O-SuL4WNbEkNYuiQ02zY&callback=initMap'; 5 script.src = 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBzxaSmPF4QaByDeuqYvLR1USXENgP2sD0&callback=initMap'; 6 script.defer = true; 7 script.async = true; 8 9 // Attach your callback function to the `window` object 10 window.initMap = function(callback) { 11 var atlStyles = [ 12 { 13 "featureType": "administrative", 14 "elementType": "labels.text.fill", 15 "stylers": [ 16 { 17 "color": "#444444" 18 } 19 ] 20 }, 21 { 22 "featureType": "administrative.locality", 23 "elementType": "labels.text", 24 "stylers": [ 25 { 26 "visibility": "on" 27 } 28 ] 29 }, 30 { 31 "featureType": "administrative.neighborhood", 32 "elementType": "labels.text.fill", 33 "stylers": [ 34 { 35 "visibility": "on" 36 }, 37 { 38 "invert_lightness": true 39 }, 40 { 41 "weight": "2.05" 42 } 43 ] 44 }, 45 { 46 "featureType": "landscape", 47 "elementType": "all", 48 "stylers": [ 49 { 50 "color": "#f2f2f2" 51 } 52 ] 53 }, 54 { 55 "featureType": "poi", 56 "elementType": "all", 57 "stylers": [ 58 { 59 "visibility": "off" 60 } 61 ] 62 }, 63 { 64 "featureType": "road", 65 "elementType": "all", 66 "stylers": [ 67 { 68 "saturation": -100 69 }, 70 { 71 "lightness": 45 72 } 73 ] 74 }, 75 { 76 "featureType": "road.highway", 77 "elementType": "all", 78 "stylers": [ 79 { 80 "visibility": "simplified" 81 } 82 ] 83 }, 84 { 85 "featureType": "road.highway.controlled_access", 86 "elementType": "geometry.fill", 87 "stylers": [ 88 { 89 "color": "#91c0c8" 90 } 91 ] 92 }, 93 { 94 "featureType": "road.arterial", 95 "elementType": "labels.text.fill", 96 "stylers": [ 97 { 98 "color": "#000000" 99 }, 100 { 101 "visibility": "on" 102 } 103 ] 104 }, 105 { 106 "featureType": "road.arterial", 107 "elementType": "labels.icon", 108 "stylers": [ 109 { 110 "visibility": "off" 111 } 112 ] 113 }, 114 { 115 "featureType": "road.local", 116 "elementType": "labels.text.fill", 117 "stylers": [ 118 { 119 "visibility": "on" 120 }, 121 { 122 "color": "#000000" 123 } 124 ] 125 }, 126 { 127 "featureType": "transit", 128 "elementType": "all", 129 "stylers": [ 130 { 131 "visibility": "off" 132 } 133 ] 134 }, 135 { 136 "featureType": "water", 137 "elementType": "all", 138 "stylers": [ 139 { 140 "color": "#91c0c8" 141 }, 142 { 143 "visibility": "on" 144 } 145 ] 146 } 147 ]; 148 var atlMarker = { 149 path: 'M30.5,0 C13.6352941,0 0,13.6005362 0,30.422252 C0,45.3351206 24.2803922,80.2908847 30.5,89 C36.7196078,80.2908847 61,45.3351206 61,30.422252 C61,13.7198391 47.3647059,0 30.5,0 Z M30.5,49.5107239 C19.9745098,49.5107239 11.4823529,41.0402145 11.4823529,30.541555 C11.4823529,20.0428954 19.9745098,11.4530831 30.5,11.4530831 C41.0254902,11.4530831 49.5176471,19.9235925 49.5176471,30.422252 C49.5176471,40.9209115 41.0254902,49.5107239 30.5,49.5107239 Z',
150 fillColor: '#FFDA00', 151 fillOpacity: 1, 152 scale: 1.0, 153 strokeColor: 'black', 154 strokeOpacity: 0, 155 strokeWeight: 0, 156 anchor: new google.maps.Point(30,89) 157 }; 158 var mapElement = document.getElementById('map'); 159 var map = new google.maps.Map(mapElement, { 160 center: {lat: 33.7490, lng: -84.3880}, 161 zoom: 11, 162 styles: atlStyles, 163 disableDefaultUI: true 164 }); 165 function moveMap(index,map) { 166 // reset/remove marker 167 if (window.marker != undefined) { 168 if (window.marker.getPosition()) { 169 window.marker.setMap(null); 170 } 171 } 172 var text = $('.location-slide[data-index='+index+']').data('text'); 173 var latitude = $('.location-slide[data-index='+index+']').data('latitude'); 174 var longitude = $('.location-slide[data-index='+index+']').data('longitude'); 175 var markerPosition = {lat: parseFloat(latitude), lng: parseFloat(longitude)}; 176 window.marker = new google.maps.Marker({ 177 position: markerPosition, 178 title: text, 179 map: map, 180 icon: atlMarker 181 }); 182 map.panTo(window.marker.getPosition()); 183 $('.location-popup').hide(); 184 $('.location-popup').eq(index).show(); 185 } 186 var locationsCarousel = $('.locations-carousel'); 187 locationsCarousel.on('init', function(slick){ 188 moveMap(0,map); 189 }); 190 locationsCarousel.slick({ 191 slidesToShow: 1, 192 centerMode: true, 193 variableWidth: true, 194 arrows: true, 195 mobileFirst: true, 196 dots: false, 197 infinite: false, 198 mobileFirst: true, 199 responsive: [ 200 { 201 breakpoint: 1200, 202 settings: 'unslick' 203 } 204 ] 205 }); 206 locationsCarousel.on('afterChange', function(slick, currentSlide){ 207 moveMap(currentSlide.currentSlide,map); 208 }); 209 $('.location-slide').hover(function(){ 210 var ww = $(window).width(); 211 if (ww > 1200) { 212 var index = $(this).parent('.location-slide-contain').index(); 213 moveMap(index,map); 214 } 215 }); 216 217 // JS API is loaded and available 218 // marker.addListener('click', function() { 219 // map.setCenter(marker.getPosition()); 220 // }); 221 }; 222 223 // Append the 'script' element to 'head' 224 document.head.appendChild(script); 225});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.