File "goya-google-maps.min.js"
Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/themes/goya/assets/js/goya-google-maps.min.js
File size: 8.65 KB
MIME-type: text/plain
Charset: utf-8
/* Google Maps script */
function initGmap(e){var t=e,s=t.parent().find(".et_location"),l=t.data("map-zoom"),i=t.data("map-style"),r=t.data("custom-map-style"),a=t.data("map-type"),o=t.data("pan-control"),y=t.data("zoom-control"),n=t.data("maptype-control"),p=t.data("scale-control"),e=t.data("streetview-control"),f=t.find(".et-location-data"),i=0<r.length?r:{paper:[{featureType:"administrative",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"all",stylers:[{visibility:"simplified"},{hue:"#0066ff"},{saturation:74},{lightness:100}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"poi.business",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"off"},{weight:.6},{saturation:-85},{lightness:61}]},{featureType:"road.highway",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road.arterial",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#eaeaea"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"water",elementType:"all",stylers:[{visibility:"simplified"},{color:"#5f94ff"},{lightness:26},{gamma:5.86}]}],light:[{featureType:"administrative.locality",elementType:"all",stylers:[{hue:"#2c2e33"},{saturation:7},{lightness:19},{visibility:"on"}]},{featureType:"landscape",elementType:"all",stylers:[{hue:"#ffffff"},{saturation:-100},{lightness:100},{visibility:"simplified"}]},{featureType:"poi",elementType:"all",stylers:[{hue:"#ffffff"},{saturation:-100},{lightness:100},{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{hue:"#bbc0c4"},{saturation:-93},{lightness:31},{visibility:"simplified"}]},{featureType:"road",elementType:"labels",stylers:[{hue:"#bbc0c4"},{saturation:-93},{lightness:31},{visibility:"on"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{hue:"#bbc0c4"},{saturation:-93},{lightness:-2},{visibility:"simplified"}]},{featureType:"road.local",elementType:"geometry",stylers:[{hue:"#e9ebed"},{saturation:-90},{lightness:-8},{visibility:"simplified"}]},{featureType:"transit",elementType:"all",stylers:[{hue:"#e9ebed"},{saturation:10},{lightness:69},{visibility:"on"}]},{featureType:"water",elementType:"all",stylers:[{hue:"#e9ebed"},{saturation:-78},{lightness:67},{visibility:"simplified"}]}],dark:[{featureType:"all",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#838383"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#c4c4c4"}]},{featureType:"administrative.neighborhood",elementType:"labels.text.fill",stylers:[{color:"#aaaaaa"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21},{visibility:"on"}]},{featureType:"poi.business",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#6e6e6e"},{lightness:"0"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#575757"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.stroke",stylers:[{color:"#2c2c2c"}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#999999"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]}],grayscale:[{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#d3d3d3"}]},{featureType:"transit",stylers:[{color:"#808080"},{visibility:"off"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{visibility:"on"},{color:"#b3b3b3"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#ffffff"},{weight:1.8}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{color:"#d7d7d7"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#ebebeb"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#a7a7a7"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#efefef"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#696969"}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{visibility:"on"},{color:"#737373"}]},{featureType:"poi",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#d6d6d6"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{},{featureType:"poi",elementType:"geometry.fill",stylers:[{color:"#dadada"}]}],countries:[{featureType:"all",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{visibility:"on"},{lightness:-100},{color:"#454545"}]}]}[i],T=new google.maps.LatLngBounds,a={center:{lat:-34.397,lng:150.644},styles:i,zoom:l,scrollwheel:!1,panControl:o,zoomControl:y,mapTypeControl:n,scaleControl:p,streetViewControl:e,fullscreenControl:!1,mapTypeId:a},u=new google.maps.Map(t[0],a);function m(e,t){var l=t.data("option"),i=l.latitude,s=l.longitude,y=new google.maps.LatLng(i,s),n=l.marker_image,p=l.marker_size,f=l.retina_marker,m=l.marker_title,d=l.marker_description,l=new Image;T.extend(y),l.src=n,t.data("rendered",!0),jQuery(l).on("load",function(){function e(e,t){this.latlng=e,this.setMap(t)}var t,l,i,s,r,a,o;t=u,l=y,i=n,s=p,a=f,r='<div class="poi-info-window gm-style"><div class="title">'+m+'</div><div class="address">'+(r=d)+"</div></div>",o=new google.maps.InfoWindow({content:r}),a&&(s[0]=s[0]/2,s[1]=s[1]/2),(e.prototype=new google.maps.OverlayView).draw=function(){var e=this.div_;e||(e=this.div_=jQuery('<div class="pin-wrap"><img src="'+i+'" width="'+s[0]+'" height="'+s[1]+'"/></div>'),this.div_[0].style.position="absolute",this.div_[0].style.cursor="pointer",this.getPanes().overlayImage.appendChild(this.div_[0]),e[0].addEventListener("click",function(e){o.setPosition(l),o.open(t)}));e=this.getProjection().fromLatLngToDivPixel(l);e&&(this.div_[0].style.left=Math.round(e.x-s[0]/2)+"px",this.div_[0].style.top=e.y-s[1]+"px",this.div_[0].style.width=s[0]+"px",this.div_[0].style.height=s[1]+"px")},e.prototype.remove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},e.prototype.getPosition=function(){return this.latlng},new e(l,t)})}s.each(function(e){e=jQuery(this).parents(".et_location_outer").index();m(0,f.eq(e))}),google.maps.event.addListenerOnce(u,"tilesloaded",function(){s.on("click",function(){var e=jQuery(this),t=e.parents(".et_location_outer").index(),l=f.eq(t),i=l.data("option"),t=i.latitude,i=i.longitude,i=new google.maps.LatLng(t,i);l.data("rendered")||m(0,l),s.removeClass("active"),e.addClass("active"),u.panTo(i)}),setTimeout(function(){s.eq(0).parents(".et_location_list").hasClass("autoselect_first")&&s.eq(0).trigger("click")},100),0<l?(u.setCenter(T.getCenter()),u.setZoom(l)):(u.setCenter(T.getCenter()),u.fitBounds(T))}),jQuery(window).on("resize",_.debounce(function(){u.setCenter(T.getCenter())},50))}jQuery(document).ready(function(e){e(".et_map_parent:not(.disabled)").each(function(){initGmap(e(this))})});