function MCRadar(transparency,radarbounds){this.transparency_=transparency||35;this.radarbounds_=radarbounds;this.map_=null;this.img_=null;this.timestamp_=null;this.type_=false;this.dtg_=null;this.servlet_=null;this.bounds_=null;this.zoom_=null;this.cached_=null;this.stretchfactor_=1;this.border_=0;} MCRadar.prototype = new GOverlay(); MCRadar.prototype.initialize=function(map){var thisObj=this;var img=document.createElement("img");img.style.opacity=this.transparency_;img.style.position="absolute";map.getPane(G_MAP_MAP_PANE).appendChild(img);this.map_=map;this.img_=img;this.img_.onload=function(){thisObj.imgOnLoad()};this.img_.onerror=function(){thisObj.imgOnError()};this.img_.onabort=function(){thisObj.imgOnAbort()};this.clearCache();} MCRadar.prototype.remove=function(){if(this.img_!=null&&this.img_.parentNode!=null){this.img_.parentNode.removeChild(this.img_);}this.img_=null;this.map_=null;this.cached_=null;} MCRadar.prototype.clearCache=function(){this.cached_=null;this.cached_=new Array();} MCRadar.prototype.redraw=function(force){if(this.map_==null||this.dtg_==null){return;}var bounds=this.map_.getBounds();if(!force){if (!this.bounds_.containsBounds(bounds)) {var loc_map = this.map_;this.remove();var thisObj = this; var img = document.createElement("img");img.style.opacity = this.transparency_;img.style.position = "absolute";loc_map.getPane(G_MAP_MAP_PANE).appendChild(img);this.map_ = loc_map;this.img_ = img;this.img_.onload = function() {thisObj.imgOnLoad()};this.img_.onerror = function() {thisObj.imgOnError()};this.img_.onabort = function() {thisObj.imgOnAbort()};this.clearCache();}}else{if(this.zoom_==null||this.zoom_!=this.map_.getZoom()){this.cached_=new Array();this.zoom_=this.map_.getZoom();}}var mapSW=bounds.getSouthWest();var mapNE=bounds.getNorthEast();var marginLat=(mapNE.lat()-mapSW.lat());var marginLng=(mapNE.lng()-mapSW.lng());var north=mapNE.lat()+(marginLat*this.border_);var south=mapSW.lat()-(marginLat*this.border_);var west=mapSW.lng()-(marginLng*this.border_);var east=mapNE.lng()+(marginLng*this.border_);this.bounds_=new GLatLngBounds(new GLatLng(south,west),new GLatLng(north,east));if(this.radarbounds_!=null){var rbSW=this.radarbounds_.getSouthWest();var rbNE=this.radarbounds_.getNorthEast();if(north>rbNE.lat())north=rbNE.lat();if(southrbNE.lng())east=rbNE.lng();if(west191)&&(c1<224)){c2=str_data.charCodeAt(i+1);tmp_arr[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2;}else{c2=str_data.charCodeAt(i+1);c3=str_data.charCodeAt(i+2);tmp_arr[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}return tmp_arr.join('');} MCRadar.prototype.base64_decode=function(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,dec="",tmp_arr=[];if(!data){return data;}data+='';do{h1=b64.indexOf(data.charAt(i++));h2=b64.indexOf(data.charAt(i++));h3=b64.indexOf(data.charAt(i++));h4=b64.indexOf(data.charAt(i++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&0xff;o2=bits>>8&0xff;o3=bits&0xff;if(h3==64){tmp_arr[ac++]=String.fromCharCode(o1);}else if(h4==64){tmp_arr[ac++]=String.fromCharCode(o1,o2);}else{tmp_arr[ac++]=String.fromCharCode(o1,o2,o3);}}while(i