File "googleMap.min.js"
Full Path: /home/ycoalition/public_html/blog/wp-content/themes/woodmart/js/scripts/elements/googleMap.min.js
File size: 2.45 KB
MIME-type: text/plain
Charset: utf-8
!function(n){n.each(["frontend/element_ready/wd_google_map.default"],function(e,o){woodmartThemeModule.wdElementorAddAction(o,function(){woodmartThemeModule.googleMapInit()})}),woodmartThemeModule.googleMapInit=function(){n(".google-map-container").each(function(){var o=n(this),t=o.data("map-args"),a={controls_on_map:!1,map_div:"#"+t.selector,start:1,map_options:{zoom:parseInt(t.zoom),scrollwheel:"yes"===t.mouse_zoom}};"yes"===t.multiple_markers?(a.locations=t.markers.map(e=>{var o={lat:e.marker_lat,lon:e.marker_lon,image:e.marker_icon||t.marker_icon,image_w:40,image_h:40,animation:google.maps.Animation.DROP};return e.marker_icon_size?(o.image_w=e.marker_icon_size[0],o.image_h=e.marker_icon_size[1]):t.marker_icon_size&&(o.image_w=t.marker_icon_size[0],o.image_h=t.marker_icon_size[1]),(e.marker_title||e.marker_description)&&(o.html=`<h3 style="min-width:300px; text-align:center; margin:15px;">${e.marker_title}</h3>`+e.marker_description),o}),t.hasOwnProperty("center")&&(a.start=0,a.map_options.set_center=t.center.split(",").map(function(e){return parseFloat(e)}))):(a.locations=[{lat:t.latitude,lon:t.longitude,image:t.marker_icon,image_w:t.marker_icon_size&&t.marker_icon_size[0]?t.marker_icon_size[0]:40,image_h:t.marker_icon_size&&t.marker_icon_size[1]?t.marker_icon_size[1]:40,animation:google.maps.Animation.DROP}],"yes"===t.marker_text_needed&&(a.locations[0].html=t.marker_text)),t.json_style&&!t.elementor?(a.styles={},a.styles[woodmart_settings.google_map_style_text]=JSON.parse(t.json_style)):t.json_style&&t.elementor&&(a.styles={},a.styles[woodmart_settings.google_map_style_text]=JSON.parse(atob(t.json_style))),"button"===t.init_type?o.find(".wd-init-map").on("click",function(e){e.preventDefault(),o.hasClass("wd-map-inited")||(o.addClass("wd-map-inited"),new Maplace(a).Load())}):"scroll"===t.init_type?woodmartThemeModule.$window.on("scroll",function(){window.innerHeight+woodmartThemeModule.$window.scrollTop()+parseInt(t.init_offset)>o.offset().top&&(o.hasClass("wd-map-inited")||(o.addClass("wd-map-inited"),new Maplace(a).Load()))}):"interaction"===t.init_type?woodmartThemeModule.$window.on("wdEventStarted",function(){o.hasClass("wd-map-inited")||(o.addClass("wd-map-inited"),new Maplace(a).Load())}):new Maplace(a).Load()});var e=n(".google-map-container-with-content");woodmartThemeModule.$window.on("resize",function(){e.css({height:e.find(".wd-google-map.with-content").outerHeight()})})},n(document).ready(function(){woodmartThemeModule.googleMapInit()})}(jQuery);