/*! SVGMarker v0.8.1 - https://github.com/defvayne23/SVGMarker */ function SVGMarker(t){var e={clickable:!0,cursor:"pointer",draggable:!1,icon:{anchor:new google.maps.Point(0,0),size:new google.maps.Size(30,30),url:"",text:{content:"",font:"Helvetica, sans-serif",color:"#000",size:"10px",weight:"400",position:[0,0]},class:"SVGMarker",html:""},map:"",opacity:1,position:"",title:"",visible:!0,zIndex:""};for(var i in t)if("object"==typeof e[i])for(var o in t[i])if("object"==typeof e[i][o])for(var s in t[i][o])t[i][o].hasOwnProperty(s)&&(e[i][o][s]=t[i][o][s]);else t[i].hasOwnProperty(o)&&(e[i][o]=t[i][o]);else t.hasOwnProperty(i)&&(e[i]=t[i]);this.setValues(e),"map"in t&&this.setMap(t.map)}SVGMarker.prototype=new google.maps.OverlayView,SVGMarker.prototype.onAdd=function(){var t=this,e=document.createElement("div");e.style.border="none",e.style.borderWidth="0px",e.style.position="absolute",""!==this.get("icon").class&&e.setAttribute("class",this.get("icon").class),this.classList=e.classList,""!==this.get("zIndex")&&(e.style.zIndex=this.get("zIndex")),!1===this.get("visible")&&(e.style.visibility="hidden"),this.get("opacity")>=0&&this.get("opacity")<=1&&(e.style.opacity=this.get("opacity")),!0===this.get("clickable")&&google.maps.event.addDomListener(e,"click",function(e){google.maps.event.trigger(t,"click",e)}),!0===this.get("draggable")&&(google.maps.event.addDomListener(e,"drag",function(e){google.maps.event.trigger(t,"drag",e)}),google.maps.event.addDomListener(e,"mousedown",function(e){google.maps.event.trigger(t,"dragstart",e),this.style.cursor="move",t.get("map").set("draggable",!1);var i=e;t.moveHandler=google.maps.event.addDomListener(t.get("map").getDiv(),"mousemove",function(e){google.maps.event.trigger(t,"drag",e);var o=i.clientX-e.clientX,s=i.clientY-e.clientY,n=t.getProjection().fromLatLngToDivPixel(t.get("position")),r=t.getProjection().fromDivPixelToLatLng(new google.maps.Point(n.x-o,n.y-s));i=e,t.set("position",r),t.draw()})}),google.maps.event.addDomListener(e,"mouseup",function(e){google.maps.event.trigger(t,"dragend",e),t.get("map").set("draggable",!0),this.style.cursor="default",google.maps.event.removeListener(t.moveHandler)}),google.maps.event.addDomListener(this.get("map").getDiv(),"mouseleave",function(t){google.maps.event.trigger(e,"mouseup",t)})),google.maps.event.addDomListener(e,"mouseover",function(e){google.maps.event.trigger(t,"mouseover",e)}),google.maps.event.addDomListener(e,"mouseout",function(e){google.maps.event.trigger(t,"mouseout",e)});var i=document.createElement("img");if(i.src=this.get("icon").url,i.classList.add("SVGMarkerIcon"),i.style.width=this.get("icon").size.width+"px",i.style.height=this.get("icon").size.height+"px",i.style.display="block",i.setAttribute("alt",this.get("title")),e.appendChild(i),""!==this.get("icon").text.content){var o=document.createElement("span");o.textContent=this.get("icon").text.content,o.style.fontFamily=this.get("icon").text.font,o.style.fontSize=this.get("icon").text.size,o.style.fontWeight=this.get("icon").text.weight,o.style.color=this.get("icon").text.color,o.style.position="absolute",o.style.top=this.get("icon").text.position[0]+"px",o.style.left=this.get("icon").text.position[1]+"px",o.style.transform="translate(-50%, -50%)",this.get("container").appendChild(o)}""!==this.get("icon").html&&e.appendChild(this.get("icon").html),this.set("container",e),this.getPanes().overlayImage.appendChild(e)},SVGMarker.prototype.draw=function(){var t=this.getProjection().fromLatLngToDivPixel(this.get("position"));this.get("container").style.left=t.x-this.get("icon").anchor.x+"px",this.get("container").style.top=t.y-this.get("icon").anchor.y+"px",this.get("container").style.cursor=this.get("cursor")},SVGMarker.prototype.onRemove=function(){this.get("container").parentNode.removeChild(this.get("container")),this.set("container",null)},SVGMarker.prototype.setZIndex=function(t){this.get("container")&&(this.get("container").style.zIndex=t)},SVGMarker.prototype.setOpacity=function(t){this.get("container")&&(this.get("container").style.opacity=t)},SVGMarker.prototype.setIcon=function(t){var e=this.get("icon");if(e){for(var i in t)if("object"==typeof e[i])for(var o in t[i])if("object"==typeof e[i][o])for(var s in t[i][o])t[i][o].hasOwnProperty(s)&&(e[i][o][s]=t[i][o][s]);else t[i].hasOwnProperty(o)&&(e[i][o]=t[i][o]);else t.hasOwnProperty(i)&&(e[i]=t[i]);this.set("icon",e);var n=this.get("container").querySelector("img.SVGMarkerIcon");n.src=e.url,n.style.width=e.size.width+"px",n.style.height=e.size.height+"px";var r=this.getProjection().fromLatLngToDivPixel(this.get("position"));this.get("container").style.left=r.x-e.anchor.x+"px",this.get("container").style.top=r.y-e.anchor.y+"px"}else this.set("icon",t)},SVGMarker.prototype.hide=function(){this.get("container")&&(this.get("container").style.visibility="hidden")},SVGMarker.prototype.show=function(){this.get("container")&&(this.get("container").style.visibility="visible")},SVGMarker.prototype.toggle=function(){this.get("container")&&("hidden"===this.get("container").style.visibility?this.show():this.hide())},SVGMarker.prototype.getPosition=function(){return this.get("position")},SVGMarker.prototype.toggleDOM=function(){this.getMap()?this.setMap(null):this.setMap(this.get("map"))};