!function(e){"use strict";window.houzezSingleGoogleMapElementor=function(a,o,t){if(void 0!==o){var i,l=15,n="",s=!1,p="marker",r="",m="no",g="roadmap";void 0!==t&&(t.closeIcon,r=t.infoWindowPlac,m=t.markerPricePins,g=t.map_type,p=t.map_pin_type,n=t.googlemap_stype,"circle"==p&&(s=!0),t.single_map_zoom>0&&(l=parseInt(t.single_map_zoom)));var c=new google.maps.LatLng(o.lat,o.lng),d={center:c,zoom:l,disableDefaultUI:!1,scrollwheel:!1};switch(g){case"hybrid":d.mapTypeId=google.maps.MapTypeId.HYBRID;break;case"terrain":d.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"satellite":d.mapTypeId=google.maps.MapTypeId.SATELLITE;break;default:d.mapTypeId=google.maps.MapTypeId.ROADMAP}""!=n&&(d.styles=JSON.parse(n)),i=new google.maps.Map(document.getElementById(a),d);e(".houzezMapType").on("click",function(a){a.preventDefault();var o,t=e(this).data("maptype");"roadmap"===(o=t)?i.setMapTypeId(google.maps.MapTypeId.ROADMAP):"satellite"===o?i.setMapTypeId(google.maps.MapTypeId.SATELLITE):"hybrid"===o?i.setMapTypeId(google.maps.MapTypeId.HYBRID):"terrain"===o&&i.setMapTypeId(google.maps.MapTypeId.TERRAIN)}),document.getElementById("listing-mapzoomin")&&(k=i,google.maps.event.addDomListener(document.getElementById("listing-mapzoomin"),"click",function(){var e=parseInt(k.getZoom(),10);console.log(e),++e>20&&(e=20),k.setZoom(e)})),document.getElementById("listing-mapzoomout")&&function(e){google.maps.event.addDomListener(document.getElementById("listing-mapzoomout"),"click",function(){var a=parseInt(e.getZoom(),10);console.log(a),--a<0&&(a=0),e.setZoom(a)})}(i);if(google.maps.event.addListener(i,"tilesloaded",function(){jQuery(".houzez-map-loading").hide()}),s&&function(e){new google.maps.Circle({strokeColor:"#4f5962",strokeOpacity:.8,strokeWeight:2,fillColor:"#4f5962",fillOpacity:.35,map:e,center:c,radius:300})}(i),!s){if("yes"==m)var y='<div data-id="'+o.property_id+'" class="gm-marker gm-marker-color-'+o.term_id+'"><div class="gm-marker-price">'+o.pricePin+"</div></div>",u=new RichMarker({map:i,position:c,draggable:!1,flat:!0,anchor:RichMarkerPosition.MIDDLE,content:y});else{var v=o.marker,I=new google.maps.Size(44,56);window.devicePixelRatio>1.5&&o.retinaMarker&&(v=o.retinaMarker,I=new google.maps.Size(44,56));var f={url:v,size:I,scaledSize:new google.maps.Size(44,56)};u=new google.maps.Marker({position:c,map:i,icon:f,animation:google.maps.Animation.DROP})}var h=document.createElement("div");h.className="map-info-window";var M="";M+='<div class="item-wrap">',M+='<div class="item-header">',o.thumbnail?M+='<a class="hover-effect"><img class="img-fluid listing-thumbnail" src="'+r+'" data-src="'+o.thumbnail+'" alt="'+o.title+'"/></a>':M+='<a class="hover-effect"><img class="img-fluid listing-thumbnail" src="'+r+'" alt="'+o.title+'"/></a>',M+="</div>",M+='<div class="item-body flex-grow-1">',M+='<h2 class="item-title">',M+="<a>"+o.title+"</a>",M+="</h2>",M+='<ul class="list-unstyled item-info">',o.price&&(M+='<li class="item-price">'+o.price+"</li>"),o.property_type&&(M+='<li class="item-type">'+o.property_type+"</li>"),M+="</ul>",M+="</div>",M+="</div>",h.innerHTML=M;var T=new google.maps.InfoWindow({content:h});!function(e,a,o){google.maps.event.addListener(a,"click",function(){o.open(e,a);var t=o.getContent().getElementsByClassName("listing-thumbnail");t.length&&t[0].dataset.src&&(t[0].src=t[0].dataset.src)})}(i,u,T)}}var k}}(jQuery);