text: (function(){function g(a){a=a||{};this.cursorNode=this.div_=this.text_=this.latlng_=null;this.style_=a.style||{};this.className=a.className||""}function v(a){var b=0,g=0;if(a.offsetParent){do b+=a.offsetLeft,g+=a.offsetTop,a=a.offsetParent;while(null!=a)}return{x:b,y:g}}g.prototype=new google.maps.OverlayView;g.prototype.onAdd=function(){var a=document.createElement("DIV");this.className?a.className=this.className:(a.style.border="1px solid black",a.style.position="absolute",a.style.whiteSpace="nowrap",a.style.backgroundColor="#ffffcc",a.style.fontSize="x-small");if(this.style_)for(var b in this.style_)this.style_.hasOwnProperty(b)&&(a.style[b]=this.style_[b]);this.div_=a;b=this.getPanes();this.cursorNode=b.overlayLayer.parentNode;b.floatPane.appendChild(a);google.maps.event.trigger(this,"ready")};g.prototype.draw=function(){var a=this.getProjection();if(this.latlng_){var a=a.fromLatLngToDivPixel(this.latlng_),b=this.div_;b.style.left=a.x+"px";b.style.top=a.y-20+"px";b.innerHTML=this.text_}};g.prototype.onRemove=function(){this.div_.parentNode.removeChild(this.div_);this.div_=null};g.prototype.hide=function(){this.div_&&(this.div_.style.visibility="hidden")};g.prototype.show=function(a,b){this.div_&&(this.div_.style.visibility="visible");if(a||b)this.latlng_=a||this.latlng_,this.text_=b,this.draw()};var w=0;google.maps.FusionTablesLayer.prototype.enableMapTips=function(a){function b(){if(!m){var h=s,b=e.getProjection(),c=b.fromLatLngToDivPixel(h);c.x-=p;c.y+=p;var d=b.fromDivPixelToLatLng(c);c.x+=2*p;c.y-=2*p;b=b.fromDivPixelToLatLng(c);d=new google.maps.LatLngBounds(d,b);d="ST_INTERSECTS("+a.geometryColumn+",RECTANGLE(LATLNG("+d.getSouthWest().lat()+","+d.getSouthWest().lng()+"),LATLNG("+d.getNorthEast().lat()+","+d.getNorthEast().lng()+")))";d=encodeURIComponent("SELECT "+a.select+" FROM "+a.from+" WHERE "+d);m=!0;google.visualization?r(h,d):x(h,d)}}function r(a,b){(new google.visualization.Query("http://www.google.com/fusiontables/gvizdata?tq="+b)).send(function(c){m=!1;c=c.getDataTable();html="";var d={};if(c){var b=c.getNumberOfRows(),e=c.getNumberOfColumns();if(0<b)for(i=0;i<e;i++)html+=c.getValue(0,i)+"<br/>",b={columnName:c.getColumnLabel(i),value:c.getValue(0,i)},d[c.getColumnLabel(i)]=b}else console&&console.log("no data");t(html,a,d)})}function x(b,e){var c=document.createElement("script"),d="query_"+w++,f="https://www.googleapis.com/fusiontables/v1/query?sql="+e;"undefined"!=typeof a.key&&(f+="&key="+a.key);c.setAttribute("src",f+("&callback=fusiontips."+d));c.setAttribute("id","fusiontips."+d);window.fusiontips[d]=function(a){m=!1;html="";var e=null;if(a.rows&&a.columns){var f=a.columns.length;if(0<a.rows.length)for(e={},i=0;i<f;i++)html+=a.rows[0][i]+"<br/>",e[a.columns[i]]={columnName:a.columns[i],value:a.rows[0][i]}}else a.error?console&&(f="error, code="+a.error.code,0<a.error.errors.length&&(f+=" message="+a.error.errors[0].message,f+=" reason="+a.error.errors[0].reason),console.log(f)):console&&console.log("no data");t(html,b,e);delete window.fusiontips[d];c.parentNode.removeChild(c)};document.getElementsByTagName("head")[0].appendChild(c)}function t(b,g,c){!a.suppressMapTips&&e&&g&&b&&e.show(g,b);var d;if(d=c){var f;a:if(d=k,null==d)f=!1;else{for(f in c)if(c.hasOwnProperty(f)&&(!d[f]||d[f].value!=c[f].value)){f=!1;break a}f=!0}d=!f}d&&(k&&google.maps.event.trigger(l,"mouseout",{row:k}),google.maps.event.trigger(l,"mouseover",{infoWindowHtml:b,latLng:g,row:c}));k=c}a=a||{};var e=new g(a),l=this,s=null,q=null,k=null,n=null,m=!1,u=v(l.getMap().getDiv()),p=a.tolerance||6;google.maps.event.addListenerOnce(e,"ready",function(){l.mousemoveListener_=google.maps.event.addDomListener(l.getMap().getDiv(),"mousemove",function(h){n&&(window.clearTimeout(n),n=null);var g=e.cursorNode.style.cursor?e.cursorNode.style.cursor:e.cursorNode.getComputedStyle?e.cursorNode.getComputedStyle().cursor:e.cursorNode.currentStyle?e.cursorNode.currentStyle.cursor:window.getComputedStyle?document.defaultView.getComputedStyle(e.cursorNode,null).getPropertyValue("cursor"):null;if(g!=q&&"pointer"==q)google.maps.event.trigger(l,"mouseout",{row:k}),k=null,e.hide();else if("pointer"==g&&!m&&!n){var c=0,d=0;h||(h=window.event);if(h.pageX||h.pageY)c=h.pageX,d=h.pageY;else if(h.clientX||h.clientY)c=h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d=h.clientY+document.body.scrollTop+document.documentElement.scrollTop;h=new google.maps.Point(c-u.x,d-u.y);s=e.getProjection().fromContainerPixelToLatLng(h);n=window.setTimeout(b,a.delay||400)}q=g})});e.setMap(this.getMap());this.maptipOverlay_=e;window.fusiontips=window.fusiontips||{}};google.maps.FusionTablesLayer.prototype.disableMapTips=function(){this.maptipOverlay_&&(this.maptipOverlay_.setMap(null),this.maptipOverlay_=null);this.mousemoveListener_&&(google.maps.event.removeListener(this.mousemoveListener_),this.mousemoveListener_=null)};var r=google.maps.FusionTablesLayer.prototype.setMap;google.maps.FusionTablesLayer.prototype.setMap=function(a){null==a&&this.disableMapTips();r.call(this,a)}})();