
﻿dojo.provide("com.ibigroup.NumberLib");com.ibigroup.NumberLib={};com.ibigroup.NumberLib.isNumeric=function(obj)
{return(com.ibigroup.NumberLib.isInt(obj)||com.ibigroup.NumberLib.isFloat(obj));};com.ibigroup.NumberLib.isUnsignedNumber=function(obj)
{return(com.ibigroup.NumberLib.isUnsignedInt(obj)||com.ibigroup.NumberLib.isUnsignedFloat(obj));};com.ibigroup.NumberLib.isPositiveNumber=function(obj)
{return(com.ibigroup.NumberLib.isPositiveInt(obj)||com.ibigroup.NumberLib.isPositiveFloat(obj));};com.ibigroup.NumberLib.isInt=function(obj)
{if(obj==null)
{return false;}
return(/^-?\d+$/).test(obj.toString());};com.ibigroup.NumberLib.isUnsignedInt=function(obj)
{if(obj==null)
{return false;}
return(/^\d+$/).test(obj.toString());};com.ibigroup.NumberLib.isPositiveInt=function(obj)
{if(obj==null)
{return false;}
return(/^0*[1-9]\d*$/).test(obj.toString());};com.ibigroup.NumberLib.isFloat=function(obj)
{if(obj==null)
{return false;}
return(/^-?\d*\.\d+$/).test(obj.toString());};com.ibigroup.NumberLib.isUnsignedFloat=function(obj)
{if(obj==null)
{return false;}
return(/^\d*\.\d+$/).test(obj.toString());};com.ibigroup.NumberLib.isPositiveFloat=function(obj)
{if(obj==null)
{return false;}
return(/^(0*[1-9]\d*\.\d+|\d*\.0*[1-9]\d*)$/).test(obj.toString());};﻿dojo.provide("com.ibigroup.StringLib");dojo.require("com.ibigroup.NumberLib");com.ibigroup.StringLib={};com.ibigroup.StringLib.getHexRGB=function(input)
{return"#"+input.toString(16).lpad("0",6);};String.prototype.ltrim=function()
{return this.replace(/^\s\s*/,'');};String.prototype.rtrim=function()
{return this.replace(/\s\s*$/,'');};String.prototype.trim=function()
{return this.ltrim().rtrim();};String.prototype.lpad=function(pad,length)
{if(typeof(pad)!="string")
{throw new TypeError("Invalid pad");}
if(!com.ibigroup.NumberLib.isUnsignedInt(length))
{throw new TypeError("Invalid length");}
var padLength=parseInt(length,10)-this.length;if(padLength<=0)
{return this;}
else
{var padRepeat=[];for(var i=0;i<Math.ceil(padLength/pad.length);i++)
{padRepeat[i]=pad;}
if((padLength%pad.length)>0)
{padRepeat[0]=padRepeat[0].substring(padRepeat[0].length-(padLength%pad.length));}
return padRepeat.join("")+this;}};String.prototype.rpad=function(pad,length)
{if(typeof(pad)!="string")
{throw new TypeError("Invalid pad");}
if(!com.ibigroup.NumberLib.isUnsignedInt(length))
{throw new TypeError("Invalid length");}
var padLength=parseInt(length,10)-this.length;if(padLength<=0)
{return this;}
else
{var padRepeat=[];for(var i=0;i<Math.ceil(padLength/pad.length);i++)
{padRepeat[i]=pad;}
if((padLength%pad.length)>0)
{padRepeat[padRepeat.length-1]=padRepeat[padRepeat.length-1].substring(0,padLength%pad.length);}
return this+padRepeat.join("");}};String.prototype.pad=function(pad,length)
{if(typeof(pad)!="string")
{throw new TypeError("Invalid pad");}
if(!com.ibigroup.NumberLib.isUnsignedInt(length))
{throw new TypeError("Invalid length");}
var padLength=parseInt(length,10)-this.length;if(padLength<=0)
{return this;}
else
{var leftPadLength=Math.ceil(padLength/2);return this.lpad(pad,this.length+leftPadLength).rpad(pad,length);}};String.prototype.format=function()
{var pattern=/\{\d+\}/g;var args=arguments;return this.replace(pattern,function(capture)
{var index=parseInt(capture.substring(1,capture.length-1),10);return args[index].toString();});};﻿dojo.provide("com.ibigroup.map.ColorSet");dojo.require("com.ibigroup.NumberLib");com.ibigroup.map.ColorSet=function(colors)
{var maxValue=parseInt("ffffff",16);if(colors==null)
{throw new TypeError("colors is not a valid color collection");}
for(var index in colors)
{if(!com.ibigroup.NumberLib.isUnsignedInt(colors[index])||colors[index]>maxValue)
{throw new TypeError("colors is not a valid color collection");}}
this._colors=colors;};com.ibigroup.map.ColorSet.prototype._colors=null;com.ibigroup.map.ColorSet.prototype.DEFAULT_COLOR=0;com.ibigroup.map.ColorSet.prototype.equals=function(other)
{if(!(other instanceof com.ibigroup.map.ColorSet))
{throw new TypeError("other is not of type com.ibigroup.map.ColorSet");}
for(var index in this._colors)
{if(other.getColor(index)!=this._colors[index])
{return false;}}
return true;};com.ibigroup.map.ColorSet.prototype.getColor=function(colorIndex)
{for(var index in this._colors)
{if(index==colorIndex)
{return this._colors[index];}}
return this.DEFAULT_COLOR;};com.ibigroup.map.ColorSet.prototype.getColors=function()
{return this._colors;};com.ibigroup.map.ColorSet.prototype.getDefaultColor=function()
{return this.DEFAULT_COLOR;};﻿dojo.provide("com.ibigroup.map.ColorSelector");dojo.require("com.ibigroup.map.ColorSet");dojo.require("com.ibigroup.StringLib");com.ibigroup.map.ColorSelector=function(colorSets,selectedIndex)
{if(!dojo.isArray(colorSets)||colorSets.length===0)
{throw new TypeError("colorSets is not a valid array");}
for(var i=0;i<colorSets.length;i++){if(!(colorSets[i]instanceof com.ibigroup.map.ColorSet))
{throw new TypeError("colorSets is not an array of com.ibigroup.map.ColorSet objects");}}
this._colorSets=colorSets;this._selectedIndex=0;if(com.ibigroup.NumberLib.isUnsignedInt(selectedIndex)&&selectedIndex<colorSets.length){this._selectedIndex=selectedIndex;}
this.onSelectedColorSetChange(null,this.getSelectedColorSet());};com.ibigroup.map.ColorSelector.prototype._colorSets=null;com.ibigroup.map.ColorSelector.prototype._selectedIndex=null;com.ibigroup.map.ColorSelector.prototype.getColor=function(colorIndex)
{return this.getSelectedColorSet().getColor(colorIndex);};com.ibigroup.map.ColorSelector.prototype.getColorSetAtIndex=function(index)
{if(!com.ibigroup.NumberLib.isUnsignedInt(index))
{throw new TypeError("index is not a valid number");}
if(index>=this._colorSets.length)
{throw new RangeError("index is outside the acceptable range");}
return this._colorSets[index];};com.ibigroup.map.ColorSelector.prototype.getColorSetCount=function()
{return this._colorSets.length;};com.ibigroup.map.ColorSelector.prototype.getSelectedColorSet=function()
{return this._colorSets[this._selectedIndex];};com.ibigroup.map.ColorSelector.prototype.getSelectedIndex=function()
{return this._selectedIndex;};com.ibigroup.map.ColorSelector.prototype.selectColorSet=function(colorSet)
{if(!(colorSet instanceof com.ibigroup.map.ColorSet))
{throw new TypeError("colorSet is not of type com.ibigroup.map.ColorSet");}
for(var i=0;i<this._colorSets.length;i++)
{if(this._colorSets[i].equals(colorSet))
{if(this._selectedIndex!=i)
{var oldColorSet=this.getSelectedColorSet();this._selectedIndex=i;this.onSelectedColorSetChange(oldColorSet,this.getSelectedColorSet());}
break;}}};com.ibigroup.map.ColorSelector.prototype.onSelectedColorSetChange=function(oldColorSet,newColorSet)
{};﻿dojo.provide("com.ibigroup.googlemaps.ToolTip");dojo.require("dojo.fx.easing");com.ibigroup.googlemaps.ToolTip=function(map,container,latLng,priority,trackMouse,overlays)
{if(!(map instanceof com.ibigroup.googlemaps.Map))
{throw new TypeError("map is not of type com.ibigroup.googlemaps.Map");}
this._map=map;if(container.tagName==null)
{throw new TypeError("container is not a valid HTMLElement");}
this._container=container;dojo.style(this._container,"opacity",0);if(!(latLng instanceof GLatLng))
{throw new TypeError("latLng is not of type GLatLng");}
this.setLatLng(latLng);this._priority=com.ibigroup.googlemaps.ToolTip.PRIORITY_NORMAL;if(com.ibigroup.NumberLib.isUnsignedInt(priority))
{this._priority=parseInt(priority.toString(),10);}
this._trackMouse=(trackMouse===true);if(dojo.isArray(overlays))
{for(var i=0;i<overlays.length;i++)
{if(!(overlays[i]instanceof GMarker)&&!(overlays[i]instanceof GPolyline))
{throw new TypeError("overlays is not a valid collection of overlays");}}
this._overlays=overlays;}
else
{this._overlays=[];}};com.ibigroup.googlemaps.ToolTip.STATUS_HIDDEN=0;com.ibigroup.googlemaps.ToolTip.STATUS_SHOWING=1;com.ibigroup.googlemaps.ToolTip.STATUS_SHOWN=2;com.ibigroup.googlemaps.ToolTip.STATUS_HIDING=3;com.ibigroup.googlemaps.ToolTip.PRIORITY_NORMAL=0;com.ibigroup.googlemaps.ToolTip.PRIORITY_MOUSEOVER=1;com.ibigroup.googlemaps.ToolTip.PRIORITY_CLICK=2;com.ibigroup.googlemaps.ToolTip.prototype._map=null;com.ibigroup.googlemaps.ToolTip.prototype._container=null;com.ibigroup.googlemaps.ToolTip.prototype._latLng=null;com.ibigroup.googlemaps.ToolTip.prototype._priority=false;com.ibigroup.googlemaps.ToolTip.prototype._trackMouse=false;com.ibigroup.googlemaps.ToolTip.prototype._status=0;com.ibigroup.googlemaps.ToolTip.prototype._overlays=[];com.ibigroup.googlemaps.ToolTip.prototype._animation=null;com.ibigroup.googlemaps.ToolTip.prototype._animationEndListener=null;com.ibigroup.googlemaps.ToolTip.prototype._mapMousemoveListener=null;com.ibigroup.googlemaps.ToolTip.prototype.MAX_OPACITY=1;com.ibigroup.googlemaps.ToolTip.prototype.ANIMATION_DURATION=500;com.ibigroup.googlemaps.ToolTip.prototype.compareTo=function(other)
{if(!(other instanceof com.ibigroup.googlemaps.ToolTip))
{return 1;}
return this.getPriority()-other.getPriority();};com.ibigroup.googlemaps.ToolTip.prototype.getContainer=function()
{return this._container;};com.ibigroup.googlemaps.ToolTip.prototype.getLatLng=function()
{return this._latLng;};com.ibigroup.googlemaps.ToolTip.prototype.getMap=function()
{return this._map;};com.ibigroup.googlemaps.ToolTip.prototype.getPriority=function()
{return this._priority;};com.ibigroup.googlemaps.ToolTip.prototype.hide=function()
{var container=this.getContainer();var opacity=dojo.style(container,"opacity");if(this._status==0)
{this.animation_end();return;}
if(this._status==2)
{GEvent.trigger(this,"hidestart",this);if(this._mapMousemoveListener!=null)
{GEvent.removeListener(this._mapMousemoveListener);this._mapMousemoveListener=null;}}
this._status=3;if(this.getMap().getToolTipFade())
{if(this._animation!=null)
{dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
this._animation=dojo.animateProperty({node:container,properties:{opacity:0},duration:Math.max(0,Math.min(1,dojo.style(container,"opacity")/this.MAX_OPACITY))*this.ANIMATION_DURATION,easing:dojo.fx.easing.linear});this._animationEndListener=dojo.connect(this._animation,"onEnd",this,this.animation_end);this._animation.play();}
else
{dojo.style(container,"opacity",0);this.animation_end();}};com.ibigroup.googlemaps.ToolTip.prototype.setLatLng=function(latLng)
{if(!(latLng instanceof GLatLng))
{throw new TypeError("latLng is not of type GLatLng");}
this._latLng=latLng;var point=this.getMap().getToolTipPoint(this);dojo.style(this.getContainer(),{left:point.x+"px",top:point.y+"px"});};com.ibigroup.googlemaps.ToolTip.prototype.show=function()
{var map=this.getMap();var container=this.getContainer();var opacity=dojo.style(container,"opacity");if(this._status==2)
{this.animation_end();return;}
if(this._status==0)
{for(var i=0;i<this._overlays.length;i++)
{map.addOverlay(this._overlays[i]);}
GEvent.trigger(this,"showstart",this);}
this._status=1;if(this.getMap().getToolTipFade())
{if(this._animation!=null)
{dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
this._animation=dojo.animateProperty({node:container,properties:{opacity:this.MAX_OPACITY},duration:Math.max(0,Math.min(1,(this.MAX_OPACITY-dojo.style(container,"opacity"))/this.MAX_OPACITY))*this.ANIMATION_DURATION,easing:dojo.fx.easing.linear});this._animationEndListener=dojo.connect(this._animation,"onEnd",this,this.animation_end);this._animation.play();}
else
{dojo.style(container,"opacity",this.MAX_OPACITY);this.animation_end();}};com.ibigroup.googlemaps.ToolTip.prototype.animation_end=function()
{if(this._animation!=null)
{dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
var map=this.getMap();var container=this.getContainer();var opacity=0;if(container!=null)
{opacity=dojo.style(container,"opacity");}
if(this._status==1&&opacity==1)
{if(this._trackMouse)
{this._mapMousemoveListener=GEvent.bind(this.getMap(),"mousemove",this,this.map_mousemove);}
this._status=2;}
else if(this._status==3&&opacity==0)
{for(var i=0;i<this._overlays.length;i++)
{try
{map.removeOverlay(this._overlays[i]);}
catch(exception)
{console.log(exception);}}
if(container.parentNode)
{container.parentNode.removeChild(container);}
this._status=0;}
if(this._status==0)
{GEvent.trigger(this,"hideend",this);}
else if(this._status==2)
{GEvent.trigger(this,"showend",this);}};com.ibigroup.googlemaps.ToolTip.prototype.map_mousemove=function(latLng)
{this.setLatLng(latLng);};﻿dojo.provide("com.ibigroup.googlemaps.Map");dojo.require("com.ibigroup.googlemaps.ToolTip");dojo.require("com.ibigroup.NumberLib");com.ibigroup.googlemaps.Map=function(div,options)
{if(!options)
{options={};}
this._maxZoom=this.DEFAULT_MAX_ZOOM;if(com.ibigroup.NumberLib.isUnsignedInt(options.maxZoom))
{this._maxZoom=Math.max(0,Math.min(this.DEFAULT_MAX_ZOOM,parseInt(options.maxZoom,10)));}
this._minZoom=this.DEFAULT_MIN_ZOOM;if(com.ibigroup.NumberLib.isUnsignedInt(options.minZoom))
{this._minZoom=parseInt(options.minZoom,10);}
this._minZoom=Math.max(this.DEFAULT_MIN_ZOOM,Math.min(this.getMaxZoom(),this.getMinZoom()));if(options.panLimit instanceof GLatLngBounds)
{this._panLimit=options.panLimit;}
this._toolTipFade=(options.toolTipFade===true);if(options.toolTipOffset instanceof GSize)
{this._toolTipOffset=options.toolTipOffset;}
else if(com.ibigroup.NumberLib.isUnsignedInt(options.toolTipOffset))
{var toolTipOffset=parseInt(options.toolTipOffset.toString(),10);this._toolTipOffset=new GSize(toolTipOffset,toolTipOffset);}
else
{this._toolTipOffset=new GSize(10,10);}
this._toolTipConcurrency=(options.toolTipConcurrency!==false);this._toolTipAutoPosition=(options.toolTipAutoPosition!==false);this._toolTipPriority=0;this._queueOverlays=(options.queueOverlays!==false);this._queuedAddOverlays=[];this._queuedRemoveOverlays=[];this._addOverlayLog=[];this._removeOverlayLog=[];this._shownOverlays=[];GMap2.call(this,div,options);this._thisMoveListener=GEvent.bind(this,"move",this,this.this_move);this._thisMousemoveListener=GEvent.bind(this,"mousemove",this,this.this_mousemove);};com.ibigroup.googlemaps.Map__prototype=function(){};com.ibigroup.googlemaps.Map__prototype.prototype=GMap2.prototype;com.ibigroup.googlemaps.Map.prototype=new com.ibigroup.googlemaps.Map__prototype();com.ibigroup.googlemaps.Map.prototype.constructor=com.ibigroup.googlemaps.Map;com.ibigroup.googlemaps.Map.prototype._lastLatLng=null;com.ibigroup.googlemaps.Map.prototype._minZoom=null;com.ibigroup.googlemaps.Map.prototype._maxZoom=null;com.ibigroup.googlemaps.Map.prototype._panLimit=null;com.ibigroup.googlemaps.Map.prototype._queueOverlays=null;com.ibigroup.googlemaps.Map.prototype._queuedAddOverlays=null;com.ibigroup.googlemaps.Map.prototype._queuedRemoveOverlays=null;com.ibigroup.googlemaps.Map.prototype._shownOverlays=null;com.ibigroup.googlemaps.Map.prototype._addOverlayLog=null;com.ibigroup.googlemaps.Map.prototype._removeOverlayLog=null;com.ibigroup.googlemaps.Map.prototype._toolTipDiv=null;com.ibigroup.googlemaps.Map.prototype._toolTipAdjustment=null;com.ibigroup.googlemaps.Map.prototype._toolTipOffset=null;com.ibigroup.googlemaps.Map.prototype._toolTipAutoPosition=true;com.ibigroup.googlemaps.Map.prototype._toolTipConcurrency=true;com.ibigroup.googlemaps.Map.prototype._toolTipFade=false;com.ibigroup.googlemaps.Map.prototype._toolTipPriority=null;com.ibigroup.googlemaps.Map.prototype._activeToolTip=null;com.ibigroup.googlemaps.Map.prototype._pendingToolTip=null;com.ibigroup.googlemaps.Map.prototype._addOverlayTimeout=null;com.ibigroup.googlemaps.Map.prototype._removeOverlayTimeout=null;com.ibigroup.googlemaps.Map.prototype._thisMoveListener=null;com.ibigroup.googlemaps.Map.prototype._thisMousemoveListener=null;com.ibigroup.googlemaps.Map.prototype._toolTipHideendListener=null;com.ibigroup.googlemaps.Map.prototype.DEFAULT_MIN_ZOOM=0;com.ibigroup.googlemaps.Map.prototype.DEFAULT_MAX_ZOOM=17;com.ibigroup.googlemaps.Map.prototype.OVERLAY_COUNT=40;com.ibigroup.googlemaps.Map.prototype.OVERLAY_INTERVAL=250;com.ibigroup.googlemaps.Map.prototype.TOOLTIP_PRIORITY_NORMAL=0;com.ibigroup.googlemaps.Map.prototype.TOOLTIP_PRIORITY_MOUSEOVER=1;com.ibigroup.googlemaps.Map.prototype.TOOLTIP_PRIORITY_CLICK=2;com.ibigroup.googlemaps.Map.prototype.addOverlay=function(overlay)
{var i;if(!this._queueOverlays)
{GMap2.prototype.addOverlay.apply(this,arguments);return;}
if(!(overlay instanceof GMarker)&&!(overlay instanceof GPolyline))
{throw new TypeError("overlay is not of type GMarker or of type GPolyline");}
var queuedForAdd=false;for(i=0;i<this._queuedAddOverlays.length;i++)
{if(this._queuedAddOverlays[i]===overlay)
{queuedForAdd=true;break;}}
if(!queuedForAdd)
{var shown=null;for(i=0;i<this._queuedRemoveOverlays.length;i++)
{if(this._queuedRemoveOverlays[i]===overlay)
{this._queuedRemoveOverlays.splice(i,1);shown=true;break;}}
if(shown==null)
{for(i=0;i<this._shownOverlays.length;i++)
{if(this._shownOverlays[i]===overlay)
{shown=true;break;}}}
if(!shown)
{this._queuedAddOverlays.push(overlay);if(this._addOverlayTimeout==null)
{this.addOverlayTimeout_timeout();}}}};com.ibigroup.googlemaps.Map.prototype.addOverlays=function(overlays)
{if(!dojo.isArray(overlays))
{throw new TypeError("overlays is not a valid array");}
for(var i=0;i<overlays.length;i++)
{this.addOverlay(overlays[i]);}};com.ibigroup.googlemaps.Map.prototype.clearOverlays=function()
{this._queuedAddOverlays=[];this._queuedRemoveOverlays=[];this._addOverlayLog=[];this._removeOverlayLog=[];this._shownOverlays=[];if(this._addOverlayTimeout!=null)
{clearTimeout(this._addOverlayTimeout);}
if(this._removeOverlayTimeout!=null)
{clearTimeout(this._removeOverlayTimeout);}
GMap2.prototype.clearOverlays.call(this);};com.ibigroup.googlemaps.Map.prototype.getActiveToolTip=function()
{return this._activeToolTip;};com.ibigroup.googlemaps.Map.prototype.getLastLatLng=function()
{return this._lastLatLng;};com.ibigroup.googlemaps.Map.prototype.getMaxZoom=function()
{return this._maxZoom;};com.ibigroup.googlemaps.Map.prototype.getMinZoom=function()
{return this._minZoom;};com.ibigroup.googlemaps.Map.prototype.getPanLimit=function()
{return this._panLimit;};com.ibigroup.googlemaps.Map.prototype.getPendingToolTip=function()
{return this._pendingToolTip;};com.ibigroup.googlemaps.Map.prototype.getToolTipFade=function()
{return(this._toolTipFade===true);};com.ibigroup.googlemaps.Map.prototype.getToolTipOffset=function()
{return this._toolTipOffset;};com.ibigroup.googlemaps.Map.prototype.getToolTipPoint=function(toolTip)
{var mapContainer=this.getContainer();var toolTipContainer=toolTip.getContainer();var mapCoords=dojo.coords(mapContainer);var toolTipCoords=dojo.coords(toolTipContainer);var toolTipPoint=this.fromLatLngToContainerPixel(toolTip.getLatLng());var toolTipOffset=this.getToolTipOffset();var offset=new GSize(toolTipOffset.width,toolTipOffset.height);if(this._toolTipAutoPosition)
{offset.width=((toolTipPoint.x>mapCoords.w*0.5)?-1:1)*Math.abs(offset.width);offset.height=((toolTipPoint.y>mapCoords.h*0.5)?-1:1)*Math.abs(offset.height);}
if(offset.width<0)
{offset.width-=toolTipCoords.w;}
if(offset.height<0)
{offset.height-=toolTipCoords.h;}
return new GPoint(toolTipPoint.x+this._toolTipAdjustment.width+offset.width,toolTipPoint.y+this._toolTipAdjustment.height+offset.height);};com.ibigroup.googlemaps.Map.prototype.hideToolTip=function()
{var activeToolTip=this.getActiveToolTip();var pendingToolTip=this.getPendingToolTip();if(pendingToolTip!=null)
{pendingToolTip.hide();this._pendingToolTip=null;}
if(activeToolTip!=null)
{activeToolTip.hide();}};com.ibigroup.googlemaps.Map.prototype.removeOverlay=function(overlay)
{var i;if(!this._queueOverlays)
{GMap2.prototype.removeOverlay.apply(this,arguments);return;}
var timestamp=new Date().valueOf();if(!(overlay instanceof GMarker)&&!(overlay instanceof GPolyline))
{throw new TypeError("overlay is not of a valid type");}
var queuedForRemove=false;for(i=0;i<this._queuedRemoveOverlays.length;i++)
{if(this._queuedRemoveOverlays[i]===overlay)
{queuedForRemove=true;break;}}
if(!queuedForRemove)
{var shown=null;for(i=0;i<this._queuedAddOverlays.length;i++)
{if(this._queuedAddOverlays[i]===overlay)
{this._queuedAddOverlays.splice(i,1);shown=false;break;}}
if(shown==null)
{for(i=0;i<this._shownOverlays.length;i++)
{if(this._shownOverlays[i]===overlay)
{shown=true;break;}}}
if(shown)
{this._queuedRemoveOverlays.push(overlay);if(this._removeOverlayTimeout==null)
{this.removeOverlayTimeout_timeout();}}}};com.ibigroup.googlemaps.Map.prototype.removeOverlays=function(overlays)
{if(!dojo.isArray(overlays))
{throw new TypeError("overlays is not a valid array");}
for(var i=0;i<overlays.length;i++)
{this.removeOverlay(overlays[i]);}};com.ibigroup.googlemaps.Map.prototype.showToolTip=function(innerHTML,latLng,priority,trackMouse,overlays)
{var toolTip=null;var activeToolTip=this.getActiveToolTip();var pendingToolTip=this.getPendingToolTip();if(activeToolTip==null||priority>=activeToolTip.getPriority())
{if(this._toolTipDiv==null)
{var containerDiv=this.getContainer();this._toolTipDiv=document.createElement("div");dojo.place(this._toolTipDiv,containerDiv.parentNode,"last");dojo.style(this._toolTipDiv,{position:"absolute",left:"0px",top:"0px",width:"auto",height:"auto"});this._toolTipDiv.innerHTML="<div style=\"position: relative;\"></div>";var containerCoords=dojo.coords(this.getContainer());var toolTipCoords=dojo.coords(this._toolTipDiv);this._toolTipAdjustment=new GSize(containerCoords.x-toolTipCoords.x,containerCoords.y-toolTipCoords.y);}
var toolTipDiv=document.createElement("div");dojo.place(toolTipDiv,dojo.query("div",this._toolTipDiv)[0],"last");dojo.style(toolTipDiv,{position:"absolute",left:"0px",top:"0px"});toolTipDiv.innerHTML=innerHTML;toolTip=new com.ibigroup.googlemaps.ToolTip(this,toolTipDiv,latLng,priority,trackMouse,overlays);if(pendingToolTip!=null)
{pendingToolTip.hide();}
if(activeToolTip!=null)
{activeToolTip.hide();}
if(this._toolTipConcurrency)
{this._activeToolTip=null;activeToolTip=null;}
this._pendingToolTip=toolTip;if(activeToolTip==null)
{this.tooltip_hideend();}
return toolTip;}};com.ibigroup.googlemaps.Map.prototype.this_mousemove=function(latLng)
{this._lastLatLng=latLng;};com.ibigroup.googlemaps.Map.prototype.this_move=function()
{this.hideToolTip();var adjust=false;var centerLatLng=this.getCenter();var zoom=this.getZoom();var centerLat=centerLatLng.lat();var centerLng=centerLatLng.lng();if(zoom<this.getMinZoom()||zoom>this.getMaxZoom())
{adjust=true;zoom=Math.max(this.getMinZoom(),Math.min(this.getMaxZoom(),zoom));}
var panLimit=this.getPanLimit();if(panLimit!=null&&!panLimit.contains(centerLatLng))
{adjust=true;var panLimitSWLatLng=panLimit.getSouthWest();var panLimitNELatLng=panLimit.getNorthEast();var extentLatLngBounds=new GLatLngBounds(panLimitSWLatLng,panLimitNELatLng);extendBounds.extend(centerLatLng);var extendSWLatLng=extentLatLngBounds.getSouthWest();var extendNELatLng=extentLatLngBounds.getNorthEast();if(!panLimitSWLatLng.equals(new GLatLng(panLimitSWLatLng.lat(),extendSWLatLng.lng())))
{lng=panLimitSWLatLng.lng();}
else if(!panLimitNELatLng.equals(new GLatLng(panLimitNELatLng.lat(),extendNELatLng.lng())))
{lng=panLimitNELatLng.lng();}
if(!panLimitSWLatLng.equals(new GLatLng(extendSWLatLng.lat(),panLimitSWLatLng.lng())))
{lat=panLimitSWLatLng.lat();}
else if(!panLimitNELatLng.equals(new GLatLng(extendNELatLng.lat(),panLimitNELatLng.lng())))
{lat=panLimitNELatLng.lat();}}
if(adjust)
{GEvent.removeListener(this._thisMoveListener);this.setCenter(new GLatLng(lat,lng),zoom);this._thisMoveListener=GEvent.bind(this,"move",this,this.this_move);}};com.ibigroup.googlemaps.Map.prototype.tooltip_hideend=function(toolTip)
{if(toolTip==this.getActiveToolTip())
{if(this._thisHideToolTipListener!=null)
{GEvent.removeListener(this._toolTipHideendListener);this._toolTipHideendListener=null;}
this._activeToolTip=null;var pendingToolTip=this.getPendingToolTip();if(pendingToolTip!=null)
{this._activeToolTip=pendingToolTip;this._pendingToolTip=null;this._toolTipHideendListener=GEvent.bind(pendingToolTip,"hideend",this,this.tooltip_hideend);pendingToolTip.show();}}};com.ibigroup.googlemaps.Map.prototype.addOverlayTimeout_timeout=function()
{var timestamp=new Date().valueOf();if(this._addOverlayTimeout!=null)
{clearTimeout(this._addOverlayTimeout);this._addOverlayTimeout=null;}
if(this._addOverlayLog.length>0)
{var expiredIndex=0;while(this._addOverlayLog[expiredIndex]<timestamp-this.OVERLAY_INTERVAL)
{expiredIndex++;}
this._addOverlayLog.splice(0,expiredIndex);}
var overlay;while(this._queuedAddOverlays.length>0&&this._addOverlayLog.length<this.OVERLAY_COUNT)
{overlay=this._queuedAddOverlays.shift();GMap2.prototype.addOverlay.call(this,overlay);this._shownOverlays.push(overlay);if(this._queueOverlays)
{this._addOverlayLog.push(timestamp);}}
if(this._queuedAddOverlays.length>0)
{var thisObj=this;var delay=this._addOverlayLog[this._addOverlayLog.length-this.OVERLAY_COUNT]+this.OVERLAY_INTERVAL+10-timestamp;this._addOverlayTimeout=setTimeout(function(){thisObj.addOverlayTimeout_timeout();thisObj=null;},delay);}};com.ibigroup.googlemaps.Map.prototype.removeOverlayTimeout_timeout=function()
{var timestamp=new Date().valueOf();if(this._removeOverlayTimeout!=null)
{clearTimeout(this._removeOverlayTimeout);this._removeOverlayTimeout=null;}
if(this._removeOverlayLog.length>0)
{var expiredIndex=0;while(this._removeOverlayLog[expiredIndex]<timestamp-this.OVERLAY_INTERVAL)
{expiredIndex++;}
this._removeOverlayLog.splice(0,expiredIndex);}
var overlay;while(this._queuedRemoveOverlays.length>0&&this._removeOverlayLog.length<this.OVERLAY_COUNT)
{overlay=this._queuedRemoveOverlays.shift();GMap2.prototype.removeOverlay.call(this,overlay);for(var i=0;i<this._shownOverlays.length;i++)
{if(this._shownOverlays[i]===overlay)
{this._shownOverlays.splice(i,1);}}
if(this._queueOverlays)
{this._removeOverlayLog.push(timestamp);}}
if(this._queuedRemoveOverlays.length>0)
{var thisObj=this;var delay=this._removeOverlayLog[this._removeOverlayLog.length-this.OVERLAY_COUNT]+this.OVERLAY_INTERVAL+10-timestamp;this._removeOverlayTimeout=setTimeout(function(){thisObj.removeOverlayTimeout_timeout();thisObj=null;},delay);}};﻿dojo.provide("com.ibigroup.googlemaps.OverlayManager");dojo.require("com.ibigroup.NumberLib");com.ibigroup.googlemaps.OverlayManager=function(map,options)
{if(options==null)
{options={};}
if(!(map instanceof GMap2))
{throw new TypeError("map is not of type GMap2");}
this._map=map;this._minZoom=this.DEFAULT_MIN_ZOOM;this._maxZoom=this.DEFAULT_MAX_ZOOM;this._tilePadding=this.DEFAULT_TILE_PADDING;if(com.ibigroup.NumberLib.isUnsignedInt(options.maxZoom))
{this._maxZoom=Math.max(this.getMinZoom(),parseInt(options.maxZoom.toString(),10));}
if(com.ibigroup.NumberLib.isUnsignedInt(options.minZoom))
{this._minZoom=Math.max(this.getMinZoom(),Math.min(this.getMaxZoom(),parseInt(options.minZoom.toString(),10)));}
var tileSize=this.DEFAULT_TILE_SIZE;if(com.ibigroup.NumberLib.isUnsignedInt(options.tileSize))
{tileSize=parseInt(options.tileSize.toString(),10);}
if(com.ibigroup.NumberLib.isUnsignedInt(options.tilePadding))
{this._tilePadding=parseInt(options.tilePadding.toString(),10);}
this._tileWidth={};for(var i=0;i<=this.getMaxZoom();i++)
{this._tileWidth[i.toString()]=tileSize;tileSize/=2;}
this._reset();this._mapMoveendListener=GEvent.bind(this.getMap(),"moveend",this,this.map_moveend);this._update();};com.ibigroup.googlemaps.OverlayManager.OverlayCount=0;com.ibigroup.googlemaps.OverlayManager.prototype._map=null;com.ibigroup.googlemaps.OverlayManager.prototype._mapBounds=null;com.ibigroup.googlemaps.OverlayManager.prototype._mapZoom=null;com.ibigroup.googlemaps.OverlayManager.prototype._tilePadding=null;com.ibigroup.googlemaps.OverlayManager.prototype._minZoom=null;com.ibigroup.googlemaps.OverlayManager.prototype._maxZoom=null;com.ibigroup.googlemaps.OverlayManager.prototype._overlays=null;com.ibigroup.googlemaps.OverlayManager.prototype._shownOverlays=null;com.ibigroup.googlemaps.OverlayManager.prototype._numShownOverlays=null;com.ibigroup.googlemaps.OverlayManager.prototype._numShownMarkers=null;com.ibigroup.googlemaps.OverlayManager.prototype._numShownPolylines=null;com.ibigroup.googlemaps.OverlayManager.prototype._grid=null;com.ibigroup.googlemaps.OverlayManager.prototype._tileWidth=null;com.ibigroup.googlemaps.OverlayManager.prototype._numOverlays=null;com.ibigroup.googlemaps.OverlayManager.prototype._numMarkers=null;com.ibigroup.googlemaps.OverlayManager.prototype._numPolylines=null;com.ibigroup.googlemaps.OverlayManager.prototype._updateTimeout=null;com.ibigroup.googlemaps.OverlayManager.prototype._mapMoveendListener=null;com.ibigroup.googlemaps.OverlayManager.prototype.DEFAULT_MIN_ZOOM=0;com.ibigroup.googlemaps.OverlayManager.prototype.DEFAULT_MAX_ZOOM=17;com.ibigroup.googlemaps.OverlayManager.prototype.DEFAULT_TILE_SIZE=360;com.ibigroup.googlemaps.OverlayManager.prototype.DEFAULT_TILE_PADDING=1;com.ibigroup.googlemaps.OverlayManager.prototype._getCell=function(x,y,z,create)
{var grid=this._grid[z];if(grid!=null)
{var gridCol=grid[x];if(gridCol!=null)
{var gridCell=gridCol[y];if(gridCell!=null)
{return gridCell;}
else if(create)
{gridCell=gridCol[y]={};return gridCell;}}
else if(create)
{gridCol=this._grid[z][x]=[];gridCol[y]={};return gridCol[y];}}
return null;};com.ibigroup.googlemaps.OverlayManager.prototype._getOverlays=function(tileBounds,zoom)
{var tileWidth=this._tileWidth[zoom.toString()];var gridWidth=Math.ceil(360/tileWidth);var gridHeight=Math.ceil(180/tileWidth);var output={};for(var x=tileBounds.minX;x<=tileBounds.maxX;x++)
{for(var y=tileBounds.minY;y<=tileBounds.maxY;y++)
{cell=this._getCell(x%gridWidth,y%gridHeight,zoom);if(cell!=null)
{for(var index in cell)
{if(output[index]==null)
{output[index]=cell[index];}}}}}
return output;};com.ibigroup.googlemaps.OverlayManager.prototype._getTileBounds=function(latLngBounds,zoom,tilePadding)
{if(!com.ibigroup.NumberLib.isUnsignedInt(tilePadding))
{tilePadding=0;}
var SWLatLng=latLngBounds.getSouthWest();var NELatLng=latLngBounds.getNorthEast();var tileWidth=this._tileWidth[zoom.toString()];var SWPoint=new GPoint(0,0);SWPoint.x=Math.floor((SWLatLng.lng()+180)/tileWidth);SWPoint.y=Math.floor((SWLatLng.lat()+90)/tileWidth);var NEPoint=new GPoint(0,0);NEPoint.x=Math.floor((NELatLng.lng()+180)/tileWidth);NEPoint.y=Math.floor((NELatLng.lat()+90)/tileWidth);var gridWidth=Math.ceil(360/tileWidth);var gridHeight=Math.ceil(180/tileWidth);if(tilePadding>0)
{SWPoint.x=(SWPoint.x-tilePadding+gridWidth)%gridWidth;SWPoint.y=(SWPoint.y-tilePadding+gridHeight)%gridHeight;NEPoint.x=(NEPoint.x+tilePadding+gridWidth)%gridWidth;NEPoint.y=(NEPoint.y+tilePadding+gridHeight)%gridHeight;}
if(NEPoint.x<SWPoint.x)
{NEPoint.x+=gridWidth;}
if(NEPoint.y<SWPoint.y)
{SWPoint.y+=gridHeight;}
return new GBounds([SWPoint,NEPoint]);};com.ibigroup.googlemaps.OverlayManager.prototype._notifyListeners=function()
{GEvent.trigger(this,"changed",this._numShownOverlays);};com.ibigroup.googlemaps.OverlayManager.prototype._reset=function()
{this._overlays={};this._grid={};this._numOverlays={};this._numMarkers={};this._numPolylines={};for(var i=this.getMinZoom();i<=this.getMaxZoom();i++)
{this._grid[i.toString()]=[];this._numOverlays[i.toString()]=0;this._numMarkers[i.toString()]=0;this._numPolylines[i.toString()]=0;}
this._shownOverlays={};this._numShownOverlays=0;this._numShownMarkers=0;this._numShownPolyline=0;this.getMap().clearOverlays();};com.ibigroup.googlemaps.OverlayManager.prototype._update=function(force)
{var index;if(this._updateTimeout!=null)
{clearTimeout(this._updateTimeout);this._updateTimeout=null;}
var mapZoom=this.getMap().getZoom();var mapBounds=this._getTileBounds(this.getMap().getBounds(),mapZoom,this.getTilePadding());if(force||this._mapBounds==null||!mapBounds.equals(this._mapBounds)||mapZoom!=this._mapZoom)
{var showOverlays=this._getOverlays(mapBounds,mapZoom);var hideOverlays={};if(this._mapBounds!=null)
{hideOverlays=this._getOverlays(this._mapBounds,this._mapZoom);}
var changed=false;var map=this.getMap();var overlay=null;for(index in hideOverlays)
{if(showOverlays[index]!=null)
{continue;}
overlay=hideOverlays[index];if(this._shownOverlays[index]===overlay)
{map.removeOverlay(overlay);delete this._shownOverlays[index];if(overlay instanceof GMarker)
{this._numShownMarkers--;}
else
{this._numShownPolylines--;}
this._numShownOverlays--;changed=true;}}
for(index in showOverlays)
{overlay=showOverlays[index];if(this._shownOverlays[index]==null)
{map.addOverlay(overlay);this._shownOverlays[index]=overlay;if(overlay instanceof GMarker)
{this._numShownMarkers++;}
else
{this._numShownPolylines++;}
this._numShownOverlays++;changed=true;}}
this._mapBounds=mapBounds;this._mapZoom=mapZoom;if(changed)
{this._notifyListeners();}}};com.ibigroup.googlemaps.OverlayManager.prototype.addOverlay=function(overlay,minZoom,maxZoom,noUpdate)
{var isMarker=(overlay instanceof GMarker);var isPolyline=(!isMarker&&overlay instanceof GPolyline);if(!isMarker&&!isPolyline)
{throw new TypeError("overlay is not of type GMarker or of type GPolyline");}
if(overlay.__overlayID==null)
{overlay.__overlayID="overlay_"+com.ibigroup.googlemaps.OverlayManager.OverlayCount++;}
if(this._overlays[overlay.__overlayID]==null)
{if(com.ibigroup.NumberLib.isUnsignedInt(maxZoom))
{maxZoom=parseInt(maxZoom.toString(),10);}
else
{maxZoom=this.getMaxZoom();}
maxZoom=Math.max(this.getMinZoom(),Math.min(this.getMaxZoom(),maxZoom));if(com.ibigroup.NumberLib.isUnsignedInt(minZoom))
{minZoom=parseInt(minZoom.toString(),10);}
else
{minZoom=this.getMinZoom();}
minZoom=Math.max(this.getMinZoom(),Math.min(maxZoom,minZoom));var overlayLatLngBounds=null;if(isMarker)
{var markerLatLng=overlay.getLatLng();overlayLatLngBounds=new GLatLngBounds(markerLatLng,markerLatLng);}
else if(isPolyline)
{overlayLatLngBounds=overlay.getBounds();}
var tileWidth=null;var gridWidth=null;var gridHeight=null;var tileBounds=null;var cell=null;var visible=false;for(var i=minZoom;i<=maxZoom;i++)
{tileBounds=this._getTileBounds(overlayLatLngBounds,i);tileWidth=this._tileWidth[i.toString()];gridWidth=Math.ceil(360/tileWidth);gridHeight=Math.ceil(180/tileWidth);if(i==this._mapZoom)
{if(tileBounds.maxX>=this._mapBounds.minX&&this._mapBounds.maxX>=tileBounds.minX)
{if(tileBounds.maxY>=this._mapBounds.minY&&this._mapBounds.maxY>=tileBounds.minY)
{visible=true;}}}
for(var x=tileBounds.minX;x<=tileBounds.maxX;x++)
{for(var y=tileBounds.minY;y<=tileBounds.maxY;y++)
{cell=this._getCell(x%gridWidth,y%gridHeight,i,true);cell[overlay.__overlayID]=overlay;}}
if(isMarker)
{this._numMarkers[i.toString()]++;}
else
{this._numPolylines[i.toString()]++;}
this._numOverlays[i.toString()]++;}
this._overlays[overlay.__overlayID]=overlay;if(!noUpdate&&visible)
{if(this._shownOverlays[overlay.__overlayID]==null)
{this.getMap().addOverlay(overlay);this._shownOverlays[overlay.__overlayID]=overlay;if(isMarker)
{this._numShownMarkers++;}
else
{this._numShownPolylines++;}
this._numShownOverlays++;this._notifyListeners();}}}};com.ibigroup.googlemaps.OverlayManager.prototype.addOverlays=function(overlays)
{if(!dojo.isArray(overlays))
{throw new TypeError("overlays is not an array");}
for(var i=0;i<overlays.length;i++)
{try
{this.addOverlay(overlays[i],true);}
catch(exception)
{console.log(exception);}}
this._update(true);};com.ibigroup.googlemaps.OverlayManager.prototype.clearOverlays=function()
{this._reset();};com.ibigroup.googlemaps.OverlayManager.prototype.getMap=function()
{return this._map;};com.ibigroup.googlemaps.OverlayManager.prototype.getMaxZoom=function()
{return this._maxZoom;};com.ibigroup.googlemaps.OverlayManager.prototype.getMinZoom=function()
{return this._minZoom;};com.ibigroup.googlemaps.OverlayManager.prototype.getTilePadding=function()
{return this._tilePadding;};com.ibigroup.googlemaps.OverlayManager.prototype.refresh=function()
{return this._update(true);};com.ibigroup.googlemaps.OverlayManager.prototype.removeOverlay=function(overlay,noUpdate)
{var isMarker=(overlay instanceof GMarker);var isPolyline=(!isMarker&&overlay instanceof GPolyline);if(!isMarker&&!isPolyline)
{throw new TypeError("overlay is not of type GMarker or of type GPolyline");}
var output=false;if(overlay.__overlayID!=null&&this._overlays[overlay.__overlayID]!=null)
{var overlayLatLngBounds=null;if(isMarker)
{var markerLatLng=overlay.getLatLng();overlayLatLngBounds=new GLatLngBounds(markerLatLng,markerLatLng);}
else if(isPolyline)
{overlayLatLngBounds=overlay.getBounds();}
var tileWidth=null;var gridWidth=null;var gridHeight=null;var tileBounds=null;var cell=null;var counted={};for(var i=this.getMinZoom();i<=this.getMaxZoom();i++)
{tileBounds=this._getTileBounds(overlayLatLngBounds,i);tileWidth=this._tileWidth[i.toString()];gridWidth=Math.ceil(360/tileWidth);gridHeight=Math.ceil(180/tileWidth);for(var x=tileBounds.minX;x<=tileBounds.maxX;x++)
{for(var y=tileBounds.minY;y<=tileBounds.maxY;y++)
{cell=this._getCell(x%gridWidth,y%gridHeight,i);if(cell!=null&&cell[overlay.__overlayID]===overlay)
{delete cell[overlay.__overlayID];counted[i.toString()]=true;}}}
if(counted[i.toString()])
{if(isMarker)
{this._numMarkers[i.toString()]--;}
else
{this._numPolylines[i.toString()]--;}
this._numOverlays[i.toString()]--;}}
delete this._overlays[overlay.__overlayID];if(this._shownOverlays[overlay.__overlayID]===overlay)
{this.getMap().removeOverlay(overlay);delete this._shownOverlays[overlay.__overlayID];if(isMarker)
{this._numShownMarkers--;}
else
{this._numShownPolylines--;}
this._numShownOverlays--;if(!noUpdate)
{this._notifyListeners();}
output=true;}}
return output;};com.ibigroup.googlemaps.OverlayManager.prototype.removeOverlays=function(overlays)
{if(!dojo.isArray(overlays))
{throw new TypeError("overlays is not an array");}
var changed=false;for(var i=0;i<overlays.length;i++)
{try
{changed=this.removeOverlay(overlays[i],true)||changed;}
catch(exception)
{console.log(exception);}}
if(changed)
{this._notifyListeners();}};com.ibigroup.googlemaps.OverlayManager.prototype.map_moveend=function()
{if(this._updateTimeout!=null)
{clearTimeout(this._updateTimeout);this._updateTimeout=null;}
var thisObj=this;this._updateTimeout=setTimeout(function(){thisObj._update();thisObj=null;},0);};﻿dojo.provide("gov.wi511.map.LoadingUI");gov.wi511.map.LoadingUI=function(loadingElement,legendItems)
{var i;if(!("innerHTML"in loadingElement))
{throw new TypeError("loadingElement is not a valid HTMLElement");}
this._loadingElement=loadingElement;dojo.style(this._loadingElement,"display","block");var loadingCoords=dojo.coords(this._loadingElement);var parentCoords=dojo.coords(this._loadingElement.parentNode);dojo.style(this._loadingElement,{left:((parentCoords.w-loadingCoords.w)/2)+"px",top:((parentCoords.h-loadingCoords.h)/2)+"px",display:"none"});this._activeLegendItems=[];this._legendItemXhrCreateListeners=[];this._legendItemXhrDestroyListeners=[];if(!dojo.isArray(legendItems))
{throw new TypeError("legendItems is not a valid array");}
for(i=0;i<legendItems.length;i++)
{if(!(legendItems[i]instanceof com.ibigroup.googlemaps.LegendItem))
{throw new TypeError("legendItems is not a valid array");}}
for(i=0;i<legendItems.length;i++)
{this._legendItemXhrCreateListeners.push(dojo.connect(legendItems[i],"onXhrCreate",this,this.legendItem_xhrCreate));this._legendItemXhrDestroyListeners.push(dojo.connect(legendItems[i],"onXhrDestroy",this,this.legendItem_xhrDestroy));if(legendItems[i].isXhrActive())
{this.legendItem_xhrCreate(legendItems[i]);}}};gov.wi511.map.LoadingUI.prototype._loadingElement=null;gov.wi511.map.LoadingUI.prototype._activeLegendItems=null;gov.wi511.map.LoadingUI.prototype._legendItemXhrCreateListeners=null;gov.wi511.map.LoadingUI.prototype._legendItemXhrDestroyListeners=null;gov.wi511.map.LoadingUI.prototype._hide=function()
{if(dojo.style(this.getLoadingElement(),"display")=="block")
{dojo.style(this.getLoadingElement(),"display","none");this.onHide(this);}};gov.wi511.map.LoadingUI.prototype._show=function()
{if(dojo.style(this.getLoadingElement(),"display")=="none")
{dojo.style(this.getLoadingElement(),"display","block");this.onShow(this);}};gov.wi511.map.LoadingUI.prototype.getLoadingElement=function()
{return this._loadingElement;};gov.wi511.map.LoadingUI.prototype.legendItem_xhrCreate=function(legendItem)
{if(!(legendItem instanceof com.ibigroup.googlemaps.LegendItem))
{throw new TypeError("legendItem is not of type com.ibigroup.googlemaps.LegendItem");}
var found=false;for(var i=0;i<this._activeLegendItems.length;i++)
{if(this._activeLegendItems[i]===legendItem)
{found=true;break;}}
if(!found)
{this._activeLegendItems.push(legendItem);}
if(this._activeLegendItems.length>0)
{this._show();}};gov.wi511.map.LoadingUI.prototype.legendItem_xhrDestroy=function(legendItem)
{if(!(legendItem instanceof com.ibigroup.googlemaps.LegendItem))
{throw new TypeError("legendItem is not of type com.ibigroup.googlemaps.LegendItem");}
for(var i=0;i<this._activeLegendItems.length;i++)
{if(this._activeLegendItems[i]===legendItem)
{this._activeLegendItems.splice(i,1);break;}}
if(this._activeLegendItems.length==0)
{this._hide();}};gov.wi511.map.LoadingUI.prototype.onHide=function(thisObj)
{};gov.wi511.map.LoadingUI.prototype.onShow=function(thisObj)
{};﻿dojo.provide("gov.wi511.map.LegendUI");dojo.require("dojo.fx.easing");gov.wi511.map.LegendUI=function(legendElement,triggerElement)
{if(!("innerHTML"in legendElement))
{throw new TypeError("legendElement is not a valid HTMLElement");}
this._legendElement=legendElement;if(!("innerHTML"in triggerElement))
{throw new TypeError("triggerElement is not a valid HTMLElement");}
this._triggerElement=triggerElement;this._triggerClickListener=dojo.connect(this.getTriggerElement(),"onclick",this,this.trigger_click);};gov.wi511.map.LegendUI.prototype._legendElement=null;gov.wi511.map.LegendUI.prototype._triggerElement=null;gov.wi511.map.LegendUI.prototype._animation=null;gov.wi511.map.LegendUI.prototype._triggerClickListener=null;gov.wi511.map.LegendUI.prototype._animationAnimateListener=null;gov.wi511.map.LegendUI.prototype._animationEndListener=null;gov.wi511.map.LegendUI.prototype.ANIMATION_DURATION=250;gov.wi511.map.LegendUI.prototype.getLegendElement=function()
{return this._legendElement;};gov.wi511.map.LegendUI.prototype.getTriggerElement=function()
{return this._triggerElement;};gov.wi511.map.LegendUI.prototype.hide=function()
{var outerElement=this.getLegendElement();var innerElement=dojo.query("> div",outerElement)[0];var outerWidth=dojo.coords(outerElement).w;var innerWidth=dojo.coords(innerElement).w;if(outerWidth>0)
{if(outerWidth==innerWidth)
{this.onHideStart(this);}
if(this._animation!=null)
{dojo.disconnect(this._animationAnimateListener);dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
this._animation=dojo.animateProperty({node:outerElement,properties:{width:0},duration:Math.max(0,Math.min(1,outerWidth/innerWidth))*this.ANIMATION_DURATION,easing:dojo.fx.easing.linear});this._animationAnimateListener=dojo.connect(this._animation,"onAnimate",this,this.animation_animate);this._animationEndListener=dojo.connect(this._animation,"onEnd",this,this.animation_end);this._animation.play();}};gov.wi511.map.LegendUI.prototype.show=function()
{var outerElement=this.getLegendElement();var innerElement=dojo.query("> div",outerElement)[0];var outerWidth=dojo.coords(outerElement).w;var innerWidth=dojo.coords(innerElement).w;if(outerWidth<innerWidth)
{if(outerWidth==0)
{this.onShowStart(this);dojo.addClass(dojo.query("> div",this.getTriggerElement())[0],"expanded");}
if(this._animation!=null)
{dojo.disconnect(this._animationAnimateListener);dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
this._animation=dojo.animateProperty({node:outerElement,properties:{width:innerWidth},duration:Math.max(0,Math.min(1,(innerWidth-outerWidth)/innerWidth))*this.ANIMATION_DURATION,easing:dojo.fx.easing.linear});this._animationAnimateListener=dojo.connect(this._animation,"onAnimate",this,this.animation_animate);this._animationEndListener=dojo.connect(this._animation,"onEnd",this,this.animation_end);this._animation.play();}};gov.wi511.map.LegendUI.prototype.animation_animate=function(properties)
{dojo.style(this.getTriggerElement(),"right",properties.width);};gov.wi511.map.LegendUI.prototype.animation_end=function()
{if(this._animation!=null)
{dojo.disconnect(this._animationAnimateListener);dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
var outerElement=this.getLegendElement();var innerElement=dojo.query("> div",outerElement)[0];var outerWidth=dojo.coords(outerElement).w;var innerWidth=dojo.coords(innerElement).w;if(outerWidth==innerWidth)
{this.onShowEnd(this);}
else if(outerWidth==0)
{dojo.removeClass(dojo.query("> div",this.getTriggerElement())[0],"expanded");this.onHideEnd(this);}};gov.wi511.map.LegendUI.prototype.trigger_click=function()
{if(dojo.hasClass(dojo.query("> div",this.getTriggerElement())[0],"expanded"))
{this.hide();}
else
{this.show();}};gov.wi511.map.LegendUI.prototype.onHideEnd=function(thisObj)
{};gov.wi511.map.LegendUI.prototype.onHideStart=function(thisObj)
{};gov.wi511.map.LegendUI.prototype.onShowEnd=function(thisObj)
{};gov.wi511.map.LegendUI.prototype.onShowStart=function(thisObj)
{};﻿dojo.provide("gov.wi511.map.WarningUI");dojo.require("dojo.fx.easing");dojo.require("com.ibigroup.NumberLib");gov.wi511.map.WarningUI=function(warningElement,showDuration)
{if(!("innerHTML"in warningElement))
{throw new TypeError("warningElement is not a valid HTMLElement");}
this._warningElement=warningElement;this._showDuration=this.DEFAULT_SHOW_DURATION;if(com.ibigroup.NumberLib.isUnsignedInt(showDuration))
{this._showDuration=parseInt(showDuration.toString(),10);}
dojo.style(this.getWarningElement(),{opacity:0,display:"none"});};gov.wi511.map.WarningUI.prototype._warningElement=null;gov.wi511.map.WarningUI.prototype._showDuration=null;gov.wi511.map.WarningUI.prototype._animation=null;gov.wi511.map.WarningUI.prototype._animationEndListener=null;gov.wi511.map.WarningUI.prototype.DEFAULT_SHOW_DURATION=3000;gov.wi511.map.WarningUI.prototype.ANIMATION_DURATION=1500;gov.wi511.map.WarningUI.prototype._hide=function()
{var element=this.getWarningElement();var opacity=dojo.style(element,"opacity");if(opacity>0)
{if(this._animation!=null)
{dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
this._animation=dojo.animateProperty({node:element,properties:{opacity:0},duration:Math.max(0,Math.min(1,opacity))*this.ANIMATION_DURATION,easing:dojo.fx.easing.linear});this._animationEndListener=dojo.connect(this._animation,"onEnd",this,this.animation_end);this._animation.play();}};gov.wi511.map.WarningUI.prototype._refresh=function()
{if(this._animation!=null)
{dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
if(this._hideTimeout!=null)
{clearTimeout(this._hideTimeout);this._hideTimeout=null;}
var thisObj=this;this._hideTimeout=setTimeout(function(){thisObj.hideTimeout_timeout();},this.getShowDuration());};gov.wi511.map.WarningUI.prototype.getShowDuration=function()
{return this._showDuration;};gov.wi511.map.WarningUI.prototype.getWarningElement=function()
{return this._warningElement;};gov.wi511.map.WarningUI.prototype.show=function()
{var element=this.getWarningElement();dojo.style(element,{display:"block",opacity:1});this._refresh();};gov.wi511.map.WarningUI.prototype.animation_end=function()
{if(this._animation!=null)
{dojo.disconnect(this._animationEndListener);this._animation.stop();this._animation=null;}
var element=this.getWarningElement();var opacity=dojo.style(element,"opacity");if(opacity==0)
{dojo.style(element,"display","none");}};gov.wi511.map.WarningUI.prototype.hideTimeout_timeout=function()
{if(this._hideTimeout!=null)
{clearTimeout(this._hideTimeout);this._hideTimeout=null;}
this._hide();};﻿dojo.provide("gov.wi511.map.ColorSelectUI");dojo.require("com.ibigroup.StringLib");dojo.require("com.ibigroup.map.ColorSelector");gov.wi511.map.ColorSelectUI=function(displayElement,showElement,hideElement,roadConditionColorSelector,trafficSpeedColorSelector)
{var index;var i;if(!("innerHTML"in displayElement))
{throw new TypeError("displayElement is not a valid HTMLElement");}
this._displayElement=displayElement;if(!("innerHTML"in showElement))
{throw new TypeError("showElement is not a valid HTMLElement");}
this._showElement=showElement;if(!("innerHTML"in hideElement))
{throw new TypeError("hideElement is not a valid HTMLElement");}
this._hideElement=hideElement;if(!(roadConditionColorSelector instanceof com.ibigroup.map.ColorSelector))
{throw new TypeError("roadConditionColorSelector is not of type com.ibigroup.map.ColorSelector");}
this._roadConditionColorSelector=roadConditionColorSelector;if(!(trafficSpeedColorSelector instanceof com.ibigroup.map.ColorSelector))
{throw new TypeError("trafficSpeedColorSelector is not of type com.ibigroup.map.ColorSelector");}
this._trafficSpeedColorSelector=trafficSpeedColorSelector;var colorSet=null;var colors=null;for(i=0;i<3;i++)
{colorSet=this._roadConditionColorSelector.getColorSetAtIndex(i);colors=colorSet.getColors();for(index in colors)
{dojo.query("div.roadConditionColorDiv .color_"+index+" div.set"+i+"Div .swatchDiv",this._displayElement).style("backgroundColor",com.ibigroup.StringLib.getHexRGB(colors[index]));}
colorSet=this._trafficSpeedColorSelector.getColorSetAtIndex(i);colors=colorSet.getColors();for(index in colors)
{dojo.query("div.trafficSpeedColorDiv .color_"+index+" div.set"+i+"Div .swatchDiv",this._displayElement).style("backgroundColor",com.ibigroup.StringLib.getHexRGB(colors[index]));}}
this._showElementClickListener=dojo.connect(this.getShowElement(),"onclick",this,this.showElement_click);this._hideElementClickListener=dojo.connect(this.getHideElement(),"onclick",this,this.hideElement_click);displayElement=this.getDisplayElement();this._radioClickListeners=[];var roadConditionRadioButtons=dojo.query("div.roadConditionColorDiv input",displayElement);if(roadConditionRadioButtons!=null)
{for(i=0;i<roadConditionRadioButtons.length;i++)
{this._radioClickListeners.push(dojo.connect(roadConditionRadioButtons[i],"onclick",this,this.roadConditionRadio_click));}}
var trafficSpeedRadioButtons=dojo.query("div.trafficSpeedColorDiv input",displayElement);if(trafficSpeedRadioButtons!=null)
{for(i=0;i<trafficSpeedRadioButtons.length;i++)
{this._radioClickListeners.push(dojo.connect(trafficSpeedRadioButtons[i],"onclick",this,this.trafficSpeedRadio_click));}}
this._roadConditionColorChangeListener=dojo.connect(this.getRoadConditionColorSelector(),"onSelectedColorSetChange",this,this.roadCondition_colorChange);this._trafficSpeedColorChangeListener=dojo.connect(this.getTrafficSpeedColorSelector(),"onSelectedColorSetChange",this,this.trafficSpeed_colorChange);this.roadCondition_colorChange();this.trafficSpeed_colorChange();};gov.wi511.map.ColorSelectUI.prototype._displayElement=null;gov.wi511.map.ColorSelectUI.prototype._hideElement=null;gov.wi511.map.ColorSelectUI.prototype._showElement=null;gov.wi511.map.ColorSelectUI.prototype._roadConditionColorSelector=null;gov.wi511.map.ColorSelectUI.prototype._trafficSpeedColorSelector=null;gov.wi511.map.ColorSelectUI.prototype._showElementClickListener=null;gov.wi511.map.ColorSelectUI.prototype._hideElementClickListener=null;gov.wi511.map.ColorSelectUI.prototype._radioClickListeners=null;gov.wi511.map.ColorSelectUI.prototype._roadConditionColorChangeListener=null;gov.wi511.map.ColorSelectUI.prototype._trafficSpeedColorChangeListener=null;gov.wi511.map.ColorSelectUI.prototype.getDisplayElement=function()
{return this._displayElement;};gov.wi511.map.ColorSelectUI.prototype.getHideElement=function()
{return this._hideElement;};gov.wi511.map.ColorSelectUI.prototype.getRoadConditionColorSelector=function()
{return this._roadConditionColorSelector;};gov.wi511.map.ColorSelectUI.prototype.getShowElement=function()
{return this._showElement;};gov.wi511.map.ColorSelectUI.prototype.getTrafficSpeedColorSelector=function()
{return this._trafficSpeedColorSelector;};gov.wi511.map.ColorSelectUI.prototype.hide=function()
{var element=this.getDisplayElement();dojo.style(element,"display","none");};gov.wi511.map.ColorSelectUI.prototype.show=function()
{var element=this.getDisplayElement();dojo.style(element,"display","block");};gov.wi511.map.ColorSelectUI.prototype.showElement_click=function(evt)
{var element=this.getDisplayElement();if(dojo.style(element,"display")=="block")
{this.hide();}
else
{this.show();}};gov.wi511.map.ColorSelectUI.prototype.hideElement_click=function(evt)
{var element=this.getDisplayElement();this.hide();};gov.wi511.map.ColorSelectUI.prototype.roadCondition_colorChange=function(oldColorSet,newColorSet)
{var element=this.getDisplayElement();var index=this.getRoadConditionColorSelector().getSelectedIndex();var radioButtons=dojo.query("div.roadConditionColorDiv input",element);if(radioButtons!=null)
{for(var i=0;i<radioButtons.length;i++)
{radioButtons[i].checked=(i==index);}}};gov.wi511.map.ColorSelectUI.prototype.trafficSpeed_colorChange=function(oldColorSet,newColorSet)
{var element=this.getDisplayElement();var index=this.getTrafficSpeedColorSelector().getSelectedIndex();var radioButtons=dojo.query("div.trafficSpeedColorDiv input",element);if(radioButtons!=null)
{for(var i=0;i<radioButtons.length;i++)
{radioButtons[i].checked=(i==index);}}};gov.wi511.map.ColorSelectUI.prototype.roadConditionRadio_click=function(evt)
{var element=this.getDisplayElement();var colorSelector=this.getRoadConditionColorSelector();var radioButtons=dojo.query("div.roadConditionColorDiv input",element);if(radioButtons!=null)
{for(var i=0;i<radioButtons.length;i++)
{if(radioButtons[i]==evt.target)
{colorSelector.selectColorSet(colorSelector.getColorSetAtIndex(i));}}}};gov.wi511.map.ColorSelectUI.prototype.trafficSpeedRadio_click=function(evt)
{var element=this.getDisplayElement();var colorSelector=this.getTrafficSpeedColorSelector();var radioButtons=dojo.query("div.trafficSpeedColorDiv input",element);if(radioButtons!=null)
{for(var i=0;i<radioButtons.length;i++)
{if(radioButtons[i]==evt.target)
{colorSelector.selectColorSet(colorSelector.getColorSetAtIndex(i));}}}};﻿
dojo.provide("gov.wi511.googlemaps.Icons");gov.wi511.googlemaps.CameraIcon=function()
{GIcon.apply(this,arguments);this.image="images/map/icon_camera.png";this.iconSize=new GSize(16,16);this.iconAnchor=new GPoint(8,8);this.infoWindowAnchor=new GPoint(12,4);};gov.wi511.googlemaps.CameraIcon__prototoype=function(){}
gov.wi511.googlemaps.CameraIcon__prototoype.prototype=GIcon.prototype;gov.wi511.googlemaps.CameraIcon.prototype=new gov.wi511.googlemaps.CameraIcon__prototoype();gov.wi511.googlemaps.CameraIcon.prototype.constructor=gov.wi511.googlemaps.CameraIcon;gov.wi511.googlemaps.MessageSignIcon=function()
{GIcon.apply(this,arguments);this.image="images/map/icon_messagesign.png";this.iconSize=new GSize(16,16);this.iconAnchor=new GPoint(8,8);this.infoWindowAnchor=new GPoint(8,8);};gov.wi511.googlemaps.MessageSignIcon__prototoype=function(){}
gov.wi511.googlemaps.MessageSignIcon__prototoype.prototype=GIcon.prototype;gov.wi511.googlemaps.MessageSignIcon.prototype=new gov.wi511.googlemaps.MessageSignIcon__prototoype();gov.wi511.googlemaps.MessageSignIcon.prototype.constructor=gov.wi511.googlemaps.MessageSignIcon;gov.wi511.googlemaps.IncidentIcon=function()
{GIcon.apply(this,arguments);this.image="images/map/icon_incident.png";this.iconSize=new GSize(16,16);this.iconAnchor=new GPoint(8,8);this.infoWindowAnchor=new GPoint(12,4);};gov.wi511.googlemaps.IncidentIcon__prototoype=function(){}
gov.wi511.googlemaps.IncidentIcon__prototoype.prototype=GIcon.prototype;gov.wi511.googlemaps.IncidentIcon.prototype=new gov.wi511.googlemaps.IncidentIcon__prototoype();gov.wi511.googlemaps.IncidentIcon.prototype.constructor=gov.wi511.googlemaps.IncidentIcon;gov.wi511.googlemaps.RoadClosureIcon=function()
{GIcon.apply(this,arguments);this.image="images/map/icon_roadclosure.png";this.iconSize=new GSize(16,16);this.iconAnchor=new GPoint(8,8);this.infoWindowAnchor=new GPoint(12,4);};gov.wi511.googlemaps.RoadClosureIcon__prototoype=function(){}
gov.wi511.googlemaps.RoadClosureIcon__prototoype.prototype=GIcon.prototype;gov.wi511.googlemaps.RoadClosureIcon.prototype=new gov.wi511.googlemaps.RoadClosureIcon__prototoype();gov.wi511.googlemaps.RoadClosureIcon.prototype.constructor=gov.wi511.googlemaps.RoadClosureIcon;gov.wi511.googlemaps.FutureRoadClosureIcon=function()
{GIcon.apply(this,arguments);this.image="images/map/icon_futureroadclosure.png";this.iconSize=new GSize(16,16);this.iconAnchor=new GPoint(8,8);this.infoWindowAnchor=new GPoint(12,4);};gov.wi511.googlemaps.FutureRoadClosureIcon__prototoype=function(){}
gov.wi511.googlemaps.FutureRoadClosureIcon__prototoype.prototype=GIcon.prototype;gov.wi511.googlemaps.FutureRoadClosureIcon.prototype=new gov.wi511.googlemaps.FutureRoadClosureIcon__prototoype();gov.wi511.googlemaps.FutureRoadClosureIcon.prototype.constructor=gov.wi511.googlemaps.FutureRoadClosureIcon;﻿
dojo.provide("com.ibigroup.googlemaps.LegendItem");dojo.require("com.ibigroup.NumberLib");dojo.require("com.ibigroup.googlemaps.Map");dojo.require("com.ibigroup.googlemaps.OverlayManager");com.ibigroup.googlemaps.LegendItem=function(options)
{if(options==null)
{options={};}
if(!(options.map instanceof com.ibigroup.googlemaps.Map))
{throw new TypeError("options.map is not of type com.ibigroup.googlemaps.Map");}
this._map=options.map;if(options.overlayManager instanceof com.ibigroup.googlemaps.OverlayManager)
{this._overlayManager=options.overlayManager;}
if(options.checkbox==null||!("tagName"in options.checkbox)||options.checkbox.tagName.toLowerCase()!="input")
{throw new TypeError("options.checkbox is not a valid HTMLElement");}
this._checkbox=options.checkbox;if(typeof(options.name)!="string")
{throw new TypeError("options.name is not a valid string");}
this._name=options.name;this._maxZoom=this.DEFAULT_MAX_ZOOM;if(com.ibigroup.NumberLib.isUnsignedInt(options.maxZoom))
{this._maxZoom=Math.max(0,Math.min(this.DEFAULT_MAX_ZOOM,parseInt(options.maxZoom,10)));}
this._minZoom=this.DEFAULT_MIN_ZOOM;if(com.ibigroup.NumberLib.isUnsignedInt(options.minZoom))
{this._minZoom=parseInt(options.minZoom,10);}
this._minZoom=Math.max(this.DEFAULT_MIN_ZOOM,Math.min(this.getMaxZoom(),this.getMinZoom()));if(typeof(options.xhrUrl)!="string")
{throw new TypeError("options.xhrUrl is not a valid string");}
this._xhrUrl=options.xhrUrl;if(com.ibigroup.NumberLib.isUnsignedInt(options.xhrInterval))
{this._xhrInterval=parseInt(options.xhrInterval.toString(),10);}
else
{this._xhrInterval=this.DEFAULT_XHR_INTERVAL;}
this._xhrConfig={url:this.getXhrUrl(),contentType:"application/json; charset=utf-8",handleAs:"json",load:function()
{arguments[1].args.host.xhr_success.call(arguments[1].args.host,arguments[0]);},error:function()
{arguments[1].args.host.xhr_failure.call(arguments[1].args.host,arguments[0]);},host:this};this._overlays={};var checkbox=this.getCheckbox();var checked=checkbox.checked;checkbox.checked=false;checkbox.disabled=true;this.map_zoomend(0,this.getMap().getZoom());this.setChecked(checked);this._mapZoomEndListener=GEvent.bind(this.getMap(),"zoomend",this,this.map_zoomend);this._mapMoveEndListener=GEvent.bind(this.getMap(),"moveend",this,this.map_moveend);};com.ibigroup.googlemaps.LegendItem.checkedItems=[];com.ibigroup.googlemaps.LegendItem.prototype._map=null;com.ibigroup.googlemaps.LegendItem.prototype._overlayManager=null;com.ibigroup.googlemaps.LegendItem.prototype._checkbox=null;com.ibigroup.googlemaps.LegendItem.prototype._name=null;com.ibigroup.googlemaps.LegendItem.prototype._overlays=null;com.ibigroup.googlemaps.LegendItem.prototype._xhr=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrConfig=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrUrl=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrInterval=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrTimeout=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrSWLat=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrSWLng=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrSpanLat=null;com.ibigroup.googlemaps.LegendItem.prototype._xhrSpanLng=null;com.ibigroup.googlemaps.LegendItem.prototype._minZoom=null;com.ibigroup.googlemaps.LegendItem.prototype._maxZoom=null;com.ibigroup.googlemaps.LegendItem.prototype._enabled=false;com.ibigroup.googlemaps.LegendItem.prototype._checked=false;com.ibigroup.googlemaps.LegendItem.prototype._checkedChangeTimeout=null;com.ibigroup.googlemaps.LegendItem.prototype._checkboxClickListener=null;com.ibigroup.googlemaps.LegendItem.prototype._mapMoveEndListener=null;com.ibigroup.googlemaps.LegendItem.prototype._mapZoomEndListener=null;com.ibigroup.googlemaps.LegendItem.prototype.DEFAULT_XHR_INTERVAL=60000;com.ibigroup.googlemaps.LegendItem.prototype.DEFAULT_MIN_ZOOM=0;com.ibigroup.googlemaps.LegendItem.prototype.DEFAULT_MAX_ZOOM=17;com.ibigroup.googlemaps.LegendItem.register=function(legendItem)
{var found=false;var checkedItems=com.ibigroup.googlemaps.LegendItem.checkedItems;for(var i=0;i<checkedItems.length;i++)
{if(checkedItems[i]===legendItem)
{found=true;break;}}
if(!found)
{checkedItems.push(legendItem);}};com.ibigroup.googlemaps.LegendItem.unregister=function(legendItem)
{var checkedItems=com.ibigroup.googlemaps.LegendItem.checkedItems;for(var i=0;i<checkedItems.length;i++)
{if(checkedItems[i]===legendItem)
{checkedItems.splice(i,1);break;}}};com.ibigroup.googlemaps.LegendItem.prototype._createXhr=function()
{if(this.getChecked())
{var mapLatLngBounds=this.getMap().getBounds();var mapSWLatLng=mapLatLngBounds.getSouthWest();var mapSpanLatLng=mapLatLngBounds.toSpan();var swLat=mapSWLatLng.lat()
var swLng=mapSWLatLng.lng();var spanLat=mapSpanLatLng.lat();var spanLng=mapSpanLatLng.lng();if(this._xhr!=null&&(this._xhrSWLat!=swLat||this._xhrSWLng!=swLng||this._xhrSpanLat!=spanLat||this._xhrSpanLng!=spanLng))
{this._destroyXhr();}
if(this._xhr==null)
{if(this._xhrTimeout!=null)
{clearTimeout(this._xhrTimeout);this._xhrTimeout=null;}
this._xhrSWLat=swLat;this._xhrSWLng=swLng;this._xhrSpanLat=spanLat;this._xhrSpanLng=spanLng;this._xhrConfig.postData=dojo.toJson({SWLat:swLat,SWLng:swLng,latSpan:spanLat,lngSpan:spanLng});this._xhr=dojo.rawXhrPost(this._xhrConfig);this.onXhrCreate(this);}}};com.ibigroup.googlemaps.LegendItem.prototype._compareOverlays=function(overlays)
{var match;for(var index in overlays)
{if(this._overlays[index]==null)
{this.overlay_add(overlays[index]);}
else
{try
{match=this._overlays[index].equals(overlays[index]);if(match)
{this.overlay_match(this._overlays[index],overlays[index]);}
else
{this.overlay_remove(this._overlays[index]);this.overlay_add(overlays[index]);}}
catch(exception)
{console.log(exception);this.overlay_remove(this._overlays[index]);}}}
for(var index in this._overlays)
{if(overlays[index]==null)
{this.overlay_notpresent(this._overlays[index]);}}
var overlayManager=this.getOverlayManager();if(overlayManager.refresh)
{overlayManager.refresh();}};com.ibigroup.googlemaps.LegendItem.prototype._createOverlays=function(data)
{throw new Error("This is an abstract class, and this method has not be implemented. Please extend this class to implement this method.");};com.ibigroup.googlemaps.LegendItem.prototype._destroyXhr=function()
{if(this._xhrTimeout!=null)
{clearTimeout(this._xhrTimeout);this._xhrTimeout=null;}
if(this._xhr!=null)
{this._xhr.cancel();}
if(this._xhr!=null)
{this._xhr=null;this.onXhrDestroy(this);}};com.ibigroup.googlemaps.LegendItem.prototype._setupXhrTimeout=function()
{if(this._xhr!=null)
{this._xhr=null;this.onXhrDestroy(this);}
if(this._xhrTimeout!=null)
{clearTimeout(this._xhrTimeout);this._xhrTimeout=null;}
var thisObj=this;this._xhrTimeout=setTimeout(function(){thisObj.xhrTimeout_timeout();thisObj=null;},this.getXhrInterval());};com.ibigroup.googlemaps.LegendItem.prototype.getCheckbox=function()
{return this._checkbox;};com.ibigroup.googlemaps.LegendItem.prototype.getChecked=function()
{return(this._checked===true);};com.ibigroup.googlemaps.LegendItem.prototype.getEnabled=function()
{return(this._enabled===true);};com.ibigroup.googlemaps.LegendItem.prototype.getMap=function()
{return this._map;};com.ibigroup.googlemaps.LegendItem.prototype.getMaxZoom=function()
{return this._maxZoom;};com.ibigroup.googlemaps.LegendItem.prototype.getMinZoom=function()
{return this._minZoom;};com.ibigroup.googlemaps.LegendItem.prototype.getName=function()
{return this._name;};com.ibigroup.googlemaps.LegendItem.prototype.getOverlayManager=function()
{if(this._overlayManager!=null)
{return this._overlayManager;}
return this._map;};com.ibigroup.googlemaps.LegendItem.prototype.getXhrUrl=function()
{return this._xhrUrl;};com.ibigroup.googlemaps.LegendItem.prototype.getXhrInterval=function()
{return this._xhrInterval;};com.ibigroup.googlemaps.LegendItem.prototype.isXhrActive=function()
{return(this._xhr!=null);};com.ibigroup.googlemaps.LegendItem.prototype.reset=function()
{this._destroyXhr();this._createXhr();};com.ibigroup.googlemaps.LegendItem.prototype.setEnabled=function(state)
{state=(state===true);if(this.getEnabled()!==state)
{this._enabled=state;var checkbox=this.getCheckbox();if(state)
{checkbox.disabled=false;this._checkboxClickListener=dojo.connect(checkbox,"onclick",this,this.checkbox_click);}
else
{dojo.disconnect(this._checkboxClickListener);checkbox.disabled=true;checkbox.checked=false;this.setChecked(false);}}};com.ibigroup.googlemaps.LegendItem.prototype.setChecked=function(state)
{state=(this.getEnabled()===true&&state===true);if(this.getChecked()!==state)
{this._checked=state;var checkbox=this.getCheckbox();if(state)
{com.ibigroup.googlemaps.LegendItem.register(this);checkbox.checked=true;this._createXhr();}
else
{com.ibigroup.googlemaps.LegendItem.unregister(this);checkbox.checked=false;this._destroyXhr();}
if(this._checkedChangeTimeout!=null)
{clearTimeout(this._checkedChangeTimeout);this._checkedChangeTimeout=null;}
var thisObj=this;this._checkedChangeTimeout=setTimeout(function(){thisObj.checkedChangeTimeout_timeout();},0);}};com.ibigroup.googlemaps.LegendItem.prototype.checkbox_click=function()
{this.setChecked(this.getCheckbox().checked);};com.ibigroup.googlemaps.LegendItem.prototype.map_moveend=function()
{this._createXhr();};com.ibigroup.googlemaps.LegendItem.prototype.map_zoomend=function(oldZoom,newZoom)
{this.setEnabled(newZoom>=this.getMinZoom()&&newZoom<=this.getMaxZoom());};com.ibigroup.googlemaps.LegendItem.prototype.xhr_success=function(data)
{if(data.d)
this._compareOverlays(this._createOverlays(data.d));else
this._compareOverlays(this._createOverlays(data));this._setupXhrTimeout();};com.ibigroup.googlemaps.LegendItem.prototype.xhr_failure=function(error)
{this._setupXhrTimeout();};com.ibigroup.googlemaps.LegendItem.prototype.xhrTimeout_timeout=function()
{if(this._xhrTimeout!=null)
{clearTimeout(this._xhrTimeout);this._xhrTimeout=null;}
this._createXhr();};com.ibigroup.googlemaps.LegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{};com.ibigroup.googlemaps.LegendItem.prototype.overlay_nomatch=function(oldOverlay,newOverlay)
{this.overlay_remove(oldOverlay);this.overlay_add(newOverlay);};com.ibigroup.googlemaps.LegendItem.prototype.overlay_add=function(overlay)
{this.getOverlayManager().addOverlay(overlay);};com.ibigroup.googlemaps.LegendItem.prototype.overlay_remove=function(overlay)
{this.getOverlayManager().removeOverlay(overlay);};com.ibigroup.googlemaps.LegendItem.prototype.overlay_notpresent=function(overlay)
{this.overlay_remove(overlay);};com.ibigroup.googlemaps.LegendItem.prototype.checkedChangeTimeout_timeout=function()
{if(this._checkedChangeTimeout!=null)
{clearTimeout(this._checkedChangeTimeout);this._checkedChangeTimeout=null;}
this.onCheckedChange(this);};com.ibigroup.googlemaps.LegendItem.prototype.onCheckedChange=function(legendItem)
{};com.ibigroup.googlemaps.LegendItem.prototype.onXhrCreate=function(legendItem)
{};com.ibigroup.googlemaps.LegendItem.prototype.onXhrDestroy=function(legendItem)
{};﻿
dojo.provide("com.ibigroup.googlemaps.ExpiringPolyline");dojo.require("com.ibigroup.NumberLib");GPolyline.prototype._map=null;GPolyline.prototype._expireTimeout=null;GPolyline.prototype._expireDuration=null;GPolyline.prototype.DEFAULT_EXPIRE_DURATION=65000;GPolyline.prototype.cleanUp=function()
{if(this._expireTimeout!=null)
{clearTimeout(this._expireTimeout);this._expireTimeout=null;}};GPolyline.prototype.getExpireDuration=function()
{if(com.ibigroup.NumberLib.isUnsignedInt(this._expireDuration))
{return this._expireDuration;}
return this.DEFAULT_EXPIRE_DURATION;};GPolyline.prototype.refresh=function()
{this.cleanUp();var thisObj=this;this._expireTimeout=setTimeout(function(){thisObj.expireTimeout_timeout();thisObj=null;},this.getExpireDuration());};GPolyline.prototype.setExpireDuration=function(duration)
{if(!com.ibigroup.NumberLib.isUnsignedInt(duration))
{throw new TypeError("duration is not a valid number");}
this._expireDuration=parseInt(duration.toString(),10);if(this._expireTimeout!=null)
{this.refresh();}};GPolyline.prototype.expireTimeout_timeout=function()
{this.onExpire(this);};GPolyline.prototype.onExpire=function(thisObj)
{console.log("GPolyline.onExpire event");console.log(arguments);};﻿
dojo.provide("gov.wi511.googlemaps.Polyline");GPolyline.prototype._map=null;GPolyline.prototype._mouseoverToolTip=null;GPolyline.prototype._clickToolTip=null;GPolyline.prototype._innerObject=null;GPolyline.prototype._thisMouseoverListener=null;GPolyline.prototype._thisMouseoutListener=null;GPolyline.prototype._thisClickListener=null;GPolyline.prototype._mouseoverToolTipHideendListener=null;GPolyline.prototype._clickToolTipHideendListener=null;GPolyline.prototype._clickToolTipCloseListener=null;GPolyline.prototype._getInnerItem=function(latLng)
{if(!(latLng instanceof GLatLng))
{throw new TypeError("latLng is not of type GLatLng");}
var innerItems=this.getInnerItems();var distance;var minDistance;var selectedIndex;var bounds;for(var index in innerItems)
{bounds=new GLatLngBounds(new GLatLng(innerItems[index].getSWLatitude(),innerItems[index].getSWLongitude()),new GLatLng(innerItems[index].getNELatitude(),innerItems[index].getNELongitude()));distance=latLng.distanceFrom(bounds.getCenter());if(minDistance==null||distance<minDistance)
{minDistance=distance;selectedIndex=index;}}
if(selectedIndex!=null)
{return innerItems[selectedIndex];}
return null;};GPolyline.prototype.equals=function(other)
{if(!(other instanceof GPolyline))
{throw new TypeError("other is not of type GPolyline");}
return this.getInnerObject().equals(other.getInnerObject());};GPolyline.prototype.getClickToolTip=function()
{return this._clickToolTip;};GPolyline.prototype.getID=function()
{return this.getInnerObject().getID();};GPolyline.prototype.getInnerItems=function()
{return this.getInnerObject().getInnerItems();};GPolyline.prototype.getInnerObject=function()
{return this._innerObject;};GPolyline.prototype.getMap=function()
{return this._map;};GPolyline.prototype.getMouseoverToolTip=function()
{return this._mouseoverToolTip;};GPolyline.prototype.initialize_gov_wi511_googlemaps_Polyline=GPolyline.prototype.initialize;GPolyline.prototype.initialize=function(map)
{GPolyline.prototype.initialize_gov_wi511_googlemaps_Polyline.apply(this,arguments);this._map=map;};GPolyline.prototype.setInnerItems=function(items)
{this.getInnerObject().setInnerItems(items);};GPolyline.prototype.setInnerObject=function(innerObject)
{if(typeof(innerObject.getID())!="string")
{throw new TypeError("innerObject is not a valid object");}
if(innerObject.equals(innerObject)!==true)
{throw new TypeError("innerObject is not a valid object");}
if(!("getInnerItems"in innerObject))
{throw new TypeError("innerObject is not a valid object");}
if(!("setInnerItems"in innerObject))
{throw new TypeError("innerObject is not a valid object");}
if(this.this_mouseover)
this._thisMouseoverListener=GEvent.bind(this,"mouseover",this,this.this_mouseover);if(this.this_mouseout)
this._thisMouseoutListener=GEvent.bind(this,"mouseout",this,this.this_mouseout);if(this.this_click)
this._thisClickListener=GEvent.bind(this,"click",this,this.this_click);this._innerObject=innerObject;};GPolyline.prototype.this_mouseout=function()
{var mouseoverToolTip=this.getMouseoverToolTip();if(mouseoverToolTip!=null)
{mouseoverToolTip.hide();}};GPolyline.prototype.this_mouseover=function()
{var mouseoverToolTip=this.getMouseoverToolTip();var clickToolTip=this.getClickToolTip();if(mouseoverToolTip==null&&clickToolTip==null)
{var innerItem=this._getInnerItem(this.getMap().getLastLatLng());console.log(innerItem);if(innerItem!=null)
{var innerHTML=[];innerHTML.push("<div class=\"toolTipDiv\">");innerHTML.push("<div class=\"toolTipInnerDiv\">");innerHTML.push(innerItem.toHTML());innerHTML.push("</div>");innerHTML.push("</div>");var toolTip=this.getMap().showToolTip(innerHTML.join(""),this.getMap().getLastLatLng(),com.ibigroup.googlemaps.ToolTip.PRIORITY_MOUSEOVER);if(toolTip!=null)
{this._mouseoverToolTip=toolTip;this._mouseoverToolTipHideendListener=GEvent.bind(toolTip,"hideend",this,this.tooltip_hideend);}}}};GPolyline.prototype.tooltip_hideend=function(toolTip)
{var mouseoverToolTip=this.getMouseoverToolTip();var clickToolTip=this.getClickToolTip();if(toolTip===mouseoverToolTip)
{if(this._mouseoverToolTipHideendListener!=null)
{GEvent.removeListener(this._mouseoverToolTipHideendListener);this._mouseoverToolTipHideendListener=null;}
this._mouseoverToolTip=null;}
else if(toolTip===clickToolTip)
{if(this._clickToolTipHideendListener!=null)
{GEvent.removeListener(this._clickToolTipHideendListener);this._clickToolTipHideendListener=null;}
if(this._clickToolTipCloseListener!=null)
{dojo.disconnect(this._clickToolTipCloseListener);this._clickToolTipCloseListener=null;}
this._clickToolTip=null;}};﻿
dojo.provide("gov.wi511.map.Route");gov.wi511.map.Route=function(data)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(typeof(data.routeName)!="string")
{throw new TypeError("data.routeName is not a string");}
this._routeName=data.routeName;if(!com.ibigroup.NumberLib.isNumeric(data.startLatitude))
{throw new TypeError("data.startLatitude is not a valid number");}
this._startLatitude=data.startLatitude;if(!com.ibigroup.NumberLib.isNumeric(data.startLongitude))
{throw new TypeError("data.startLongitude is not a valid number");}
this._startLongitude=data.startLongitude;if(!com.ibigroup.NumberLib.isNumeric(data.endLatitude))
{throw new TypeError("data.endLatitude is not a valid number");}
this._endLatitude=data.endLatitude;if(!com.ibigroup.NumberLib.isNumeric(data.endLongitude))
{throw new TypeError("data.endLongitude is not a valid number");}
this._endLongitude=data.endLongitude;gov.wi511.map.Route.Routes[this.getID()]=this;};gov.wi511.map.Route.Routes={};gov.wi511.map.Route.prototype._ID=null;gov.wi511.map.Route.prototype._routeName=null;gov.wi511.map.Route.prototype._startLatitude=null;gov.wi511.map.Route.prototype._startLongitude=null;gov.wi511.map.Route.prototype._endLatitude=null;gov.wi511.map.Route.prototype._endLongitude=null;gov.wi511.map.Route.prototype.getEndLatitude=function()
{return this._endLatitude;};gov.wi511.map.Route.prototype.getEndLongitude=function()
{return this._endLongitude;};gov.wi511.map.Route.prototype.getID=function()
{return this._ID;};gov.wi511.map.Route.prototype.getRouteName=function()
{return this._routeName;};gov.wi511.map.Route.prototype.getStartLatitude=function()
{return this._startLatitude;};gov.wi511.map.Route.prototype.getStartLongitude=function()
{return this._startLongitude;};﻿
dojo.provide("gov.wi511.map.RoadConditionRoute");dojo.require("gov.wi511.map.Route");gov.wi511.map.RoadConditionRoute=function(data)
{if(data==null)
{data={};}
if(typeof(data.routeStatus)!="string")
{throw new TypeError("data.routeStatus is not a valid string");}
this._routeStatus=data.routeStatus;if(!com.ibigroup.NumberLib.isNumeric(data.SWLatitude))
{throw new TypeError("data.SWLatitude is not a valid number");}
this._SWLatitude=data.SWLatitude;if(!com.ibigroup.NumberLib.isNumeric(data.SWLongitude))
{throw new TypeError("data.SWLongitude is not a valid number");}
this._SWLongitude=data.SWLongitude;if(!com.ibigroup.NumberLib.isNumeric(data.NELatitude))
{throw new TypeError("data.NELatitude is not a valid number");}
this._NELatitude=data.NELatitude;if(!com.ibigroup.NumberLib.isNumeric(data.NELongitude))
{throw new TypeError("data.NELongitude is not a valid number");}
this._NELongitude=data.NELongitude;if(typeof(data.lastUpdateDateTime)!="string")
{throw new TypeError("data.lastUpdateDateTime is not a string");}
this._lastUpdateDate=data.lastUpdateDateTime;gov.wi511.map.Route.call(this,data);};gov.wi511.map.RoadConditionRoute__prototoype=function(){}
gov.wi511.map.RoadConditionRoute__prototoype.prototype=gov.wi511.map.Route.prototype;gov.wi511.map.RoadConditionRoute.prototype=new gov.wi511.map.RoadConditionRoute__prototoype();gov.wi511.map.RoadConditionRoute.prototype.constructor=gov.wi511.map.RoadConditionRoute;gov.wi511.map.RoadConditionRoute.prototype._routeStatus=null;gov.wi511.map.RoadConditionRoute.prototype._SWLatitude=null;gov.wi511.map.RoadConditionRoute.prototype._SWLongitude=null;gov.wi511.map.RoadConditionRoute.prototype._NELatitude=null;gov.wi511.map.RoadConditionRoute.prototype._NELongitude=null;gov.wi511.map.RoadConditionRoute.prototype._lastUpdateDate=null;gov.wi511.map.RoadConditionRoute.prototype.getNELatitude=function()
{return this._NELatitude;};gov.wi511.map.RoadConditionRoute.prototype.getNELongitude=function()
{return this._NELongitude;};gov.wi511.map.RoadConditionRoute.prototype.getRouteStatus=function()
{return this._routeStatus;};gov.wi511.map.RoadConditionRoute.prototype.getSWLatitude=function()
{return this._SWLatitude;};gov.wi511.map.RoadConditionRoute.prototype.getSWLongitude=function()
{return this._SWLongitude;};gov.wi511.map.RoadConditionRoute.prototype.equals=function(other)
{if(other.getLastUpdateDate()!=this.getLastUpdateDate())
{return false;}
return true;}
gov.wi511.map.RoadConditionRoute.prototype.getLastUpdateDate=function()
{return this._lastUpdateDate;};gov.wi511.map.RoadConditionRoute.prototype.toHTML=function()
{var output=[];output.push("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");output.push("<tr class=\"headerTr\"><td class=\"labelTd\" style=\"width: 35%;\"><span>Highway:</span></td><td class=\"dataTd\" style=\"width: 65%;\"><span>"+this.getRouteName()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Status:</span></td><td class=\"dataTd\"><span>"+this.getRouteStatus()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Updated:</td><td class=\"dataTd\"><span>"+this.getLastUpdateDate()+"</span></td></tr>");output.push("</table>");return output.join("");};﻿
dojo.provide("gov.wi511.map.RoadCondition");dojo.require("gov.wi511.map.RoadConditionRoute");dojo.require("com.ibigroup.map.ColorSet");gov.wi511.map.RoadCondition=function(data,colorSet)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(typeof(data.encodedPoints)!="string")
{throw new TypeError("data.encodedPoints is not a string");}
this._encodedPoints=data.encodedPoints;if(typeof(data.encodedLevels)!="string")
{throw new TypeError("data.encodedLevels is not a string");}
this._encodedLevels=data.encodedLevels;if(typeof(data.type)!="string")
{throw new TypeError("data.type is not a string");}
if(!(colorSet instanceof com.ibigroup.map.ColorSet))
{throw new TypeError("colorSet is not of type com.ibigroup.map.ColorSet");}
this._color=colorSet.getColor(data.type);this._routes=[];var route=null;for(var i=0;i<data.routes.length;i++)
{route=new gov.wi511.map.RoadConditionRoute(data.routes[i]);this._routes[route.getID()]=route;}};gov.wi511.map.RoadCondition.prototype._ID=null;gov.wi511.map.RoadCondition.prototype._encodedPoints=null;gov.wi511.map.RoadCondition.prototype._encodedLevels=null;gov.wi511.map.RoadCondition.prototype._color=null;gov.wi511.map.RoadCondition.prototype._routes=null;gov.wi511.map.RoadCondition.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.map.RoadCondition))
{throw new TypeError("other is not of type gov.wi511.map.RoadCondition");}
if(other.getID()!=this.getID())
{return false;}
if(other.getEncodedPoints()!=this.getEncodedPoints())
{return false}
if(other.getEncodedLevels()!=this.getEncodedLevels())
{return false}
if(other.getColor()!=this.getColor())
{return false;}
return true;};gov.wi511.map.RoadCondition.prototype.getColor=function()
{return this._color;};gov.wi511.map.RoadCondition.prototype.getEncodedLevels=function()
{return this._encodedLevels;};gov.wi511.map.RoadCondition.prototype.getEncodedPoints=function()
{return this._encodedPoints;};gov.wi511.map.RoadCondition.prototype.getID=function()
{return this._ID;};gov.wi511.map.RoadCondition.prototype.getInnerItems=function()
{return this._routes;};gov.wi511.map.RoadCondition.prototype.setInnerItems=function(items)
{for(var index in items)
{if(!(items[index]instanceof gov.wi511.map.RoadConditionRoute))
{throw new TypeError("items is not a collection of gov.wi511.map.RoadConditionRoute objects");}}
this._routes=items;};﻿
dojo.provide("gov.wi511.googlemaps.RoadConditionLegendItem");dojo.require("com.ibigroup.StringLib");dojo.require("com.ibigroup.map.ColorSelector");dojo.require("com.ibigroup.googlemaps.LegendItem");dojo.require("com.ibigroup.googlemaps.ExpiringPolyline");dojo.require("gov.wi511.googlemaps.Polyline");dojo.require("gov.wi511.map.RoadCondition");gov.wi511.googlemaps.RoadConditionLegendItem=function(options)
{this._expiryListeners={};if(!(options.colorSelector instanceof com.ibigroup.map.ColorSelector))
{throw new TypeError("options.colorSelector is not of type com.ibigroup.map.ColorSelector");}
this._colorSelector=options.colorSelector;this._colorSelectorChangeListener=dojo.connect(this._colorSelector,"onSelectedColorSetChange",this,this.colorSelector_selectedColorSetChange);com.ibigroup.googlemaps.LegendItem.apply(this,arguments);};gov.wi511.googlemaps.RoadConditionLegendItem__prototoype=function(){}
gov.wi511.googlemaps.RoadConditionLegendItem__prototoype.prototype=com.ibigroup.googlemaps.LegendItem.prototype;gov.wi511.googlemaps.RoadConditionLegendItem.prototype=new gov.wi511.googlemaps.RoadConditionLegendItem__prototoype();gov.wi511.googlemaps.RoadConditionLegendItem.prototype.constructor=gov.wi511.googlemaps.RoadConditionLegendItem;gov.wi511.googlemaps.RoadConditionLegendItem.prototype._colorSelector=null;gov.wi511.googlemaps.RoadConditionLegendItem.prototype._colorSelectorChangeListener=null;gov.wi511.googlemaps.RoadConditionLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data))
{throw new TypeError("data is not an array");}
var output={};var dataObj;var dataOverlay;var colorSet=this.getColorSelector().getSelectedColorSet();for(var i=0;i<data.length;i++)
{try
{dataObj=new gov.wi511.map.RoadCondition(data[i],colorSet);dataOverlay=GPolyline.fromEncoded
({color:com.ibigroup.StringLib.getHexRGB(dataObj.getColor()),weight:4,opacity:0.8,points:dataObj.getEncodedPoints(),levels:dataObj.getEncodedLevels(),zoomFactor:2,numLevels:18});dataOverlay.setInnerObject(dataObj);dataOverlay.setExpireDuration(this.getXhrInterval()*2);output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
return output;};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.getColorSelector=function()
{return this._colorSelector;};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.reset=function()
{var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};this.getOverlayManager().removeOverlays(overlays);com.ibigroup.googlemaps.LegendItem.prototype.reset.call(this);};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.setChecked=function(state)
{var beforeChecked=this.getChecked();com.ibigroup.googlemaps.LegendItem.prototype.setChecked.call(this,state);var checked=this.getChecked();if(beforeChecked!=checked)
{var overlays=[];for(var index in this._overlays)
{if(checked)
{this._overlays[index].refresh();}
overlays.push(this._overlays[index]);}
var overlayManager=this.getOverlayManager();if(checked)
{overlayManager.addOverlays(overlays);}
else
{overlayManager.removeOverlays(overlays);}}};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.colorSelector_selectedColorSetChange=function()
{this._destroyXhr();var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};if(this.getChecked())
{this.getOverlayManager().removeOverlays(overlays);this._createXhr();}};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{oldOverlay.refresh();oldOverlay.setInnerItems(newOverlay.getInnerItems());};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.overlay_add=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]==null)
{this._overlays[overlay.getID()]=overlay;this._expiryListeners[overlay.getID()]=dojo.connect(overlay,"onExpire",this,this.overlay_expire);overlay.refresh();if(this.getChecked())
{overlayManager.addOverlay(overlay);}}};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.overlay_remove=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]!=null)
{overlay.cleanUp();delete this._overlays[overlay.getID()];dojo.disconnect(this._expiryListeners[overlay.getID()]);delete this._expiryListeners[overlay.getID()];if(this.getChecked())
{overlayManager.removeOverlay(overlay);}}};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.overlay_notpresent=function(overlay)
{this.overlay_remove(overlay);};gov.wi511.googlemaps.RoadConditionLegendItem.prototype.overlay_expire=function(overlay)
{this.overlay_remove(overlay);};﻿
dojo.provide("gov.wi511.map.TravelTimeRoute");dojo.require("gov.wi511.map.Route");gov.wi511.map.TravelTimeRoute=function(data)
{if(data==null)
{data={};}
if(!com.ibigroup.NumberLib.isUnsignedNumber(data.routeLength))
{throw new TypeError("data.routeLength is not a valid number");}
this._routeLength=data.routeLength;if(!com.ibigroup.NumberLib.isUnsignedInt(data.travelTime))
{throw new TypeError("data.travelTime is not a valid number");}
this._travelTime=data.travelTime;gov.wi511.map.Route.call(this,data);};gov.wi511.map.TravelTimeRoute__prototoype=function(){}
gov.wi511.map.TravelTimeRoute__prototoype.prototype=gov.wi511.map.Route.prototype;gov.wi511.map.TravelTimeRoute.prototype=new gov.wi511.map.TravelTimeRoute__prototoype();gov.wi511.map.TravelTimeRoute.prototype.constructor=gov.wi511.map.TravelTimeRoute;gov.wi511.map.Route.prototype._routeLength=null;gov.wi511.map.Route.prototype._travelTime=null;gov.wi511.map.Route.prototype.getRouteLength=function()
{return this._routeLength;};gov.wi511.map.Route.prototype.getTravelTime=function()
{return this._travelTime;};﻿
dojo.provide("gov.wi511.map.TrafficSpeedLink");dojo.require("com.ibigroup.NumberLib");dojo.require("gov.wi511.map.TravelTimeRoute");gov.wi511.map.TrafficSpeedLink=function(data)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(typeof(data.oppositeLinkID)=="string")
{this._oppositeLinkID=data.oppositeLinkID;}
if(typeof(data.linkName)!="string")
{throw new TypeError("data.linkName is not a string");}
this._linkName=data.linkName;if(!com.ibigroup.NumberLib.isUnsignedInt(data.trafficSpeed))
{throw new TypeError("data.trafficSpeed is not a valid number");}
this._trafficSpeed=data.trafficSpeed;if(!com.ibigroup.NumberLib.isNumeric(data.SWLatitude))
{throw new TypeError("data.SWLatitude is not a valid number");}
this._SWLatitude=data.SWLatitude;if(!com.ibigroup.NumberLib.isNumeric(data.SWLongitude))
{throw new TypeError("data.SWLongitude is not a valid number");}
this._SWLongitude=data.SWLongitude;if(!com.ibigroup.NumberLib.isNumeric(data.NELatitude))
{throw new TypeError("data.NELatitude is not a valid number");}
this._NELatitude=data.NELatitude;if(!com.ibigroup.NumberLib.isNumeric(data.NELongitude))
{throw new TypeError("data.NELongitude is not a valid number");}
this._NELongitude=data.NELongitude;if(!dojo.isArray(data.routeIDs))
{throw new TypeError("data.routeIDs is not a valid array");}
this._routeIDs=[];for(var i=0;i<data.routeIDs.length;i++)
{if(typeof(data.routeIDs[i])!="string")
{throw new TypeError("data.routeIDs is not a valid array");}
this._routeIDs.push(data.routeIDs[i]);}
gov.wi511.map.TrafficSpeedLink.Links[this.getID()]=this;};gov.wi511.map.TrafficSpeedLink.Links={};gov.wi511.map.TrafficSpeedLink.prototype._ID=null;gov.wi511.map.TrafficSpeedLink.prototype._oppositeLinkID=null;gov.wi511.map.TrafficSpeedLink.prototype._linkName=null;gov.wi511.map.TrafficSpeedLink.prototype._trafficSpeed=null;gov.wi511.map.TrafficSpeedLink.prototype._SWLatitude=null;gov.wi511.map.TrafficSpeedLink.prototype._SWLongitude=null;gov.wi511.map.TrafficSpeedLink.prototype._NELatitude=null;gov.wi511.map.TrafficSpeedLink.prototype._NELongitude=null;gov.wi511.map.TrafficSpeedLink.prototype._routeIDs=null;gov.wi511.map.TrafficSpeedLink.prototype.getID=function()
{return this._ID;};gov.wi511.map.TrafficSpeedLink.prototype.getFullRoadwayDirection=function()
{var replacements={north:"Northbound",east:"Eastbound",south:"Southbound",west:"Westbound"}
return replacements[this.getRoadwayDirection()];};gov.wi511.map.TrafficSpeedLink.prototype.getLinkName=function()
{return this._linkName;};gov.wi511.map.TrafficSpeedLink.prototype.getNELatitude=function()
{return this._NELatitude;};gov.wi511.map.TrafficSpeedLink.prototype.getNELongitude=function()
{return this._NELongitude;};gov.wi511.map.TrafficSpeedLink.prototype.getOppositeLink=function()
{return gov.wi511.map.TrafficSpeedLink.Links[this.getOppositeLinkID()];};gov.wi511.map.TrafficSpeedLink.prototype.getOppositeLinkID=function()
{return this._oppositeLinkID;};gov.wi511.map.TrafficSpeedLink.prototype.getSWLatitude=function()
{return this._SWLatitude;};gov.wi511.map.TrafficSpeedLink.prototype.getSWLongitude=function()
{return this._SWLongitude;};gov.wi511.map.TrafficSpeedLink.prototype.getRoutes=function()
{var output={};var route=null;for(var i=0;i<this._routeIDs.length;i++)
{route=gov.wi511.map.Route.Routes[this._routeIDs[i]];if(route instanceof gov.wi511.map.TravelTimeRoute)
{output[route.getID()]=route;}}
return output;};gov.wi511.map.TrafficSpeedLink.prototype.getTrafficSpeed=function()
{return this._trafficSpeed;};gov.wi511.map.TrafficSpeedLink.prototype.getTrafficSpeedFormatted=function()
{var trafficSpeed=this.getTrafficSpeed();if(trafficSpeed>0)
{return trafficSpeed+" mph";}
else
{return"No Information";}};gov.wi511.map.TrafficSpeedLink.prototype.toHTML=function()
{var oppositeLink=this.getOppositeLink();var output=[];var routes=this.getRoutes();if(oppositeLink!=null)
{var oppositeRoutes=oppositeLink.getRoutes();for(var index in oppositeRoutes)
{if(routes[index]==null)
{routes[index]=oppositeRoutes[index];}}}
output.push("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");output.push("<tr class=\"headerTr\"><td colspan=\"2\"><span>"+this.getLinkName()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\" style=\"width: 35%;\"><span>Speed:</span></td><td class=\"dataTd\" style=\"width: 65%;\"><span>"+this.getTrafficSpeedFormatted()+"</span></td></tr>");if(oppositeLink!=null)
{output.push("<tr class=\"headerTr\"><td colspan=\"2\"><span>"+oppositeLink.getLinkName()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Speed:</span></td><td class=\"dataTd\"><span>"+oppositeLink.getTrafficSpeedFormatted()+"</span></td></tr>");}
var header=false;for(var index in routes)
{if(!header)
{output.push("<tr class=\"headerTr\"><td colspan=\"2\"><span>Travel Times</span></td></tr>");header=true;}
output.push("<tr class=\"headerTr routeTr\"><td colspan=\"2\"><span>"+routes[index].getRouteName()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Length:</span></td><td class=\"dataTd\"><span>"+routes[index].getRouteLength()+" miles</span></td></tr>");var travelTime=parseInt(routes[index].getTravelTime(),10);if(travelTime<1)
{output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Travel Time:</span></td><td class=\"dataTd\"><span>&nbsp;</span></td></tr>");}
else
{output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Travel Time:</span></td><td class=\"dataTd\"><span>"+routes[index].getTravelTime()+" minutes</span></td></tr>");}}
output.push("</table>");return output.join("");};﻿
dojo.provide("gov.wi511.map.TrafficSpeed");dojo.require("gov.wi511.map.TrafficSpeedLink");dojo.require("com.ibigroup.map.ColorSet");gov.wi511.map.TrafficSpeed=function(data,colorSet)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(typeof(data.encodedPoints)!="string")
{throw new TypeError("data.encodedPoints is not a string");}
this._encodedPoints=data.encodedPoints;if(typeof(data.encodedLevels)!="string")
{throw new TypeError("data.encodedLevels is not a string");}
this._encodedLevels=data.encodedLevels;if(typeof(data.type)!="string")
{throw new TypeError("data.type is not a string");}
if(!(colorSet instanceof com.ibigroup.map.ColorSet))
{throw new TypeError("colorSet is not of type com.ibigroup.map.ColorSet");}
this._color=colorSet.getColor(data.type);this._links=[];var link=null;for(var i=0;i<data.links.length;i++)
{link=new gov.wi511.map.TrafficSpeedLink(data.links[i]);this._links[link.getID()]=link;}};gov.wi511.map.TrafficSpeed.prototype._ID=null;gov.wi511.map.TrafficSpeed.prototype._encodedPoints=null;gov.wi511.map.TrafficSpeed.prototype._encodedLevels=null;gov.wi511.map.TrafficSpeed.prototype._color=null;gov.wi511.map.TrafficSpeed.prototype._links=null;gov.wi511.map.TrafficSpeed.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.map.TrafficSpeed))
{throw new TypeError("other is not of type gov.wi511.map.TrafficSpeed");}
if(other.getID()!=this.getID())
{return false;}
if(other.getEncodedPoints()!=this.getEncodedPoints())
{return false}
if(other.getEncodedLevels()!=this.getEncodedLevels())
{return false}
if(other.getColor()!=this.getColor())
{return false;}
return true;};gov.wi511.map.TrafficSpeed.prototype.getColor=function()
{return this._color;};gov.wi511.map.TrafficSpeed.prototype.getEncodedLevels=function()
{return this._encodedLevels;var output=[];output.push("P");for(var i=1;i<this._encodedLevels.length-1;i++)
{output.push("?");}
output.push("P");return output.join("");};gov.wi511.map.TrafficSpeed.prototype.getEncodedPoints=function()
{return this._encodedPoints;};gov.wi511.map.TrafficSpeed.prototype.getID=function()
{return this._ID;};gov.wi511.map.TrafficSpeed.prototype.getInnerItems=function()
{return this._links;};gov.wi511.map.TrafficSpeed.prototype.setInnerItems=function(items)
{for(var index in items)
{if(!(items[index]instanceof gov.wi511.map.TrafficSpeedLink))
{throw new TypeError("items is not an array of gov.wi511.map.TrafficSpeedLink objects");}}
this._links=items;};﻿
dojo.provide("gov.wi511.googlemaps.TrafficSpeedLegendItem");dojo.require("com.ibigroup.StringLib");dojo.require("com.ibigroup.map.ColorSelector");dojo.require("com.ibigroup.googlemaps.LegendItem");dojo.require("com.ibigroup.googlemaps.ExpiringPolyline");dojo.require("gov.wi511.googlemaps.Polyline");dojo.require("gov.wi511.map.TrafficSpeed");dojo.require("gov.wi511.map.TravelTimeRoute");gov.wi511.googlemaps.TrafficSpeedLegendItem=function(options)
{this._expiryListeners={};if(!(options.colorSelector instanceof com.ibigroup.map.ColorSelector))
{throw new TypeError("options.colorSelector is not of type com.ibigroup.map.ColorSelector");}
this._colorSelector=options.colorSelector;this._colorSelectorChangeListener=dojo.connect(this._colorSelector,"onSelectedColorSetChange",this,this.colorSelector_selectedColorSetChange);com.ibigroup.googlemaps.LegendItem.apply(this,arguments);};gov.wi511.googlemaps.TrafficSpeedLegendItem__prototoype=function(){}
gov.wi511.googlemaps.TrafficSpeedLegendItem__prototoype.prototype=com.ibigroup.googlemaps.LegendItem.prototype;gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype=new gov.wi511.googlemaps.TrafficSpeedLegendItem__prototoype();gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.constructor=gov.wi511.googlemaps.TrafficSpeedLegendItem;gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype._expiryListeners=null;gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype._colorSelector=null;gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype._colorSelectorChangeListener=null;gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data.speeds)||!dojo.isArray(data.travelTimes))
{throw new TypeError("data is not a valid object");}
var output={};var dataObj;var dataOverlay;var colorSet=this.getColorSelector().getSelectedColorSet();for(var i=0;i<data.speeds.length;i++)
{try
{dataObj=new gov.wi511.map.TrafficSpeed(data.speeds[i],colorSet);dataOverlay=GPolyline.fromEncoded
({color:com.ibigroup.StringLib.getHexRGB(dataObj.getColor()),weight:4,opacity:0.8,points:dataObj.getEncodedPoints(),levels:dataObj.getEncodedLevels(),zoomFactor:2,numLevels:18});dataOverlay.setInnerObject(dataObj);dataOverlay.setExpireDuration(this.getXhrInterval()*2);output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
var routeObj=null;for(var i=0;i<data.travelTimes.length;i++)
{try
{routeObj=new gov.wi511.map.TravelTimeRoute(data.travelTimes[i]);}
catch(exception)
{console.log(exception);}}
return output;};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.getColorSelector=function()
{return this._colorSelector;};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.reset=function()
{var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};this.getOverlayManager().removeOverlays(overlays);com.ibigroup.googlemaps.LegendItem.prototype.reset.call(this);};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.setChecked=function(state)
{var beforeChecked=this.getChecked();com.ibigroup.googlemaps.LegendItem.prototype.setChecked.call(this,state);var checked=this.getChecked();if(beforeChecked!=checked)
{var overlays=[];for(var index in this._overlays)
{if(checked)
{this._overlays[index].refresh();}
overlays.push(this._overlays[index]);}
var overlayManager=this.getOverlayManager();if(checked)
{overlayManager.addOverlays(overlays);}
else
{overlayManager.removeOverlays(overlays);}}};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.colorSelector_selectedColorSetChange=function()
{this._destroyXhr();var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};if(this.getChecked())
{this.getOverlayManager().removeOverlays(overlays);this._createXhr();}};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{oldOverlay.refresh();oldOverlay.setInnerItems(newOverlay.getInnerItems());};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.overlay_add=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]==null)
{this._overlays[overlay.getID()]=overlay;this._expiryListeners[overlay.getID()]=dojo.connect(overlay,"onExpire",this,this.overlay_expire);overlay.refresh();if(this.getChecked())
{overlayManager.addOverlay(overlay);}}};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.overlay_remove=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]!=null)
{overlay.cleanUp();delete this._overlays[overlay.getID()];dojo.disconnect(this._expiryListeners[overlay.getID()]);delete this._expiryListeners[overlay.getID()];if(this.getChecked())
{overlayManager.removeOverlay(overlay);}}};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.overlay_notpresent=function(overlay)
{this.overlay_remove(overlay);};gov.wi511.googlemaps.TrafficSpeedLegendItem.prototype.overlay_expire=function(overlay)
{this.overlay_remove(overlay);};﻿
dojo.provide("com.ibigroup.googlemaps.ExpiringMarker");dojo.require("com.ibigroup.NumberLib");com.ibigroup.googlemaps.ExpiringMarker=function(latLng,options)
{if(options==null)
{options={};}
if(com.ibigroup.NumberLib.isUnsignedInt(options.expireDuration))
{this._expireDuration=parseInt(options.expireDuration.toString(),10);}
else
{this._expireDuration=this.DEFAULT_EXPIRE_DURATION;}
GMarker.call(this,latLng,options);};com.ibigroup.googlemaps.ExpiringMarker__prototoype=function(){}
com.ibigroup.googlemaps.ExpiringMarker__prototoype.prototype=GMarker.prototype;com.ibigroup.googlemaps.ExpiringMarker.prototype=new com.ibigroup.googlemaps.ExpiringMarker__prototoype();com.ibigroup.googlemaps.ExpiringMarker.prototype.constructor=com.ibigroup.googlemaps.ExpiringMarker;com.ibigroup.googlemaps.ExpiringMarker.prototype._expireTimeout=null;com.ibigroup.googlemaps.ExpiringMarker.prototype._expireDuration=null;com.ibigroup.googlemaps.ExpiringMarker.prototype.DEFAULT_EXPIRE_DURATION=65000;com.ibigroup.googlemaps.ExpiringMarker.prototype.cleanUp=function()
{if(this._expireTimeout!=null)
{clearTimeout(this._expireTimeout);this._expireTimeout=null;}};com.ibigroup.googlemaps.ExpiringMarker.prototype.getExpireDuration=function()
{return this._expireDuration;};com.ibigroup.googlemaps.ExpiringMarker.prototype.refresh=function()
{this.cleanUp();var thisObj=this;this._expireTimeout=setTimeout(function(){thisObj.expireTimeout_timeout();thisObj=null;},this.getExpireDuration());};com.ibigroup.googlemaps.ExpiringMarker.prototype.expireTimeout_timeout=function()
{this.onExpire(this);};com.ibigroup.googlemaps.ExpiringMarker.prototype.onExpire=function(marker)
{};dojo.provide("gov.wi511.map.Camera");dojo.require("com.ibigroup.NumberLib");gov.wi511.map.Camera=function(data)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(!com.ibigroup.NumberLib.isNumeric(data.latitude))
{throw new TypeError("data.latitude is not a valid number");}
this._latitude=data.latitude;if(!com.ibigroup.NumberLib.isNumeric(data.longitude))
{throw new TypeError("data.longitude is not a valid number");}
this._longitude=data.longitude;if(typeof(data.county)!="string")
{throw new TypeError("data.county is not a string");}
this._county=data.county;if(typeof(data.roadwayName)!="string")
{throw new TypeError("data.roadwayName is not a string");}
this._roadwayName=data.roadwayName;if(typeof(data.cameraLocation)!="string")
{throw new TypeError("data.cameraLocation is not a string");}
this._cameraLocation=data.cameraLocation;if(typeof(data.cameraImageUrl)=="string")
{this._cameraImageUrl=data.cameraImageUrl;}};gov.wi511.map.Camera.prototype._ID=null;gov.wi511.map.Camera.prototype._latitude=null;gov.wi511.map.Camera.prototype._longitude=null;gov.wi511.map.Camera.prototype._county=null;gov.wi511.map.Camera.prototype._roadwayName=null;gov.wi511.map.Camera.prototype._cameraLocation=null;gov.wi511.map.Camera.prototype._cameraImageUrl=null;gov.wi511.map.Camera.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.map.Camera))
{throw new TypeError("other is not of type gov.wi511.map.Camera");}
return true;};gov.wi511.map.Camera.prototype.getCounty=function()
{return this._county;};gov.wi511.map.Camera.prototype.getCameraImageUrl=function()
{return this._cameraImageUrl;};gov.wi511.map.Camera.prototype.getCameraLocation=function()
{return this._cameraLocation;};gov.wi511.map.Camera.prototype.getID=function()
{return this._ID;};gov.wi511.map.Camera.prototype.getLatitude=function()
{return this._latitude;};gov.wi511.map.Camera.prototype.getLongitude=function()
{return this._longitude;};gov.wi511.map.Camera.prototype.getRoadwayName=function()
{return this._roadwayName;};gov.wi511.map.Camera.prototype.toHTML=function()
{var output=[];output.push("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");output.push("<tr class=\"headerTr\"><td class=\"labelTd\" style=\"width: 35%;\"><span>Camera Location:</span></td><td class=\"dataTd\" style=\"width: 65%;\"><span>"+this.getCameraLocation()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>County:</span></td><td class=\"dataTd\"><span>"+this.getCounty()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Highway:</span></td><td class=\"dataTd\"><span>"+this.getRoadwayName()+"</span></td></tr>");var cameraImageUrl=this.getCameraImageUrl();output.push("<tr class=\"imageTr\"><td colspan=\"2\"><span>");if(cameraImageUrl==null)
{output.push("No image.");}
else
{output.push("<img src=\"blank.gif\" alt=\"camera image\">");}
output.push("</span></td></tr>");output.push("</table>");return output.join("");};﻿
dojo.provide("gov.wi511.googlemaps.ExpiringToolTipMarker");dojo.require("com.ibigroup.googlemaps.ExpiringMarker");dojo.require("gov.wi511.googlemaps.Icons");dojo.require("gov.wi511.map.Camera");gov.wi511.googlemaps.ExpiringToolTipMarker=function(latLng,options)
{if(options==null)
{options={};}
com.ibigroup.googlemaps.ExpiringMarker.call(this,latLng,options);this._thisMouseoverListener=GEvent.bind(this,"mouseover",this,this.this_mouseover);this._thisMouseoutListener=GEvent.bind(this,"mouseout",this,this.this_mouseout);this._thisClickListener=GEvent.bind(this,"click",this,this.this_click);};gov.wi511.googlemaps.ExpiringToolTipMarker__prototoype=function(){}
gov.wi511.googlemaps.ExpiringToolTipMarker__prototoype.prototype=com.ibigroup.googlemaps.ExpiringMarker.prototype;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype=new gov.wi511.googlemaps.ExpiringToolTipMarker__prototoype();gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.constructor=gov.wi511.googlemaps.ExpiringToolTipMarker;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._map=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._mouseoverToolTip=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._clickToolTip=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._thisMouseoverListener=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._thisMouseoutListener=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._thisClickListener=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._mouseoverToolTipHideendListener=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._clickToolTipHideendListener=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype._clickToolTipCloseListener=null;gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.getClickToolTip=function()
{return this._clickToolTip;};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.getMap=function()
{return this._map;};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.getMouseoverToolTip=function()
{return this._mouseoverToolTip;};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.initialize=function(map)
{this._map=map;com.ibigroup.googlemaps.ExpiringMarker.prototype.initialize.apply(this,arguments);};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_click=function(latLng)
{var clickToolTip=this.getClickToolTip();if(clickToolTip==null)
{var innerHTML=[];if(this.getInnerObject()instanceof gov.wi511.map.Camera)
innerHTML.push("<div class=\"cameraToolTipDiv\">");else
innerHTML.push("<div class=\"toolTipDiv\">");innerHTML.push("<div class=\"toolTipInnerDiv\">");innerHTML.push(this.getInnerObject().toHTML());innerHTML.push("<div class=\"closeDiv\">&nbsp;</div>");innerHTML.push("</div>");innerHTML.push("</div>");var toolTip=this.getMap().showToolTip(innerHTML.join(""),latLng,com.ibigroup.googlemaps.ToolTip.PRIORITY_CLICK);if(toolTip!=null)
{this._clickToolTip=toolTip;this._clickToolTipHideendListener=GEvent.bind(toolTip,"hideend",this,this.tooltip_hideend);var closeDiv=dojo.query("div.closeDiv",toolTip.getContainer())[0];if(this._clickToolTipCloseListener!=null)
{dojo.disconnect(this._clickToolTipCloseListener);this._clickToolTipCloseListener=null;}
this._clickToolTipCloseListener=dojo.connect(closeDiv,"onclick",toolTip,toolTip.hide);}}};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_mouseout=function()
{var mouseoverToolTip=this.getMouseoverToolTip();if(mouseoverToolTip!=null)
{mouseoverToolTip.hide();}};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_mouseover=function(latLng)
{var mouseoverToolTip=this.getMouseoverToolTip();var clickToolTip=this.getClickToolTip();if(mouseoverToolTip==null&&clickToolTip==null)
{var innerHTML=[];if(this.getInnerObject()instanceof gov.wi511.map.Camera)
innerHTML.push("<div class=\"cameraToolTipDiv\">");else
innerHTML.push("<div class=\"toolTipDiv\">");innerHTML.push("<div class=\"toolTipInnerDiv\">");innerHTML.push(this.getInnerObject().toHTML());innerHTML.push("</div>");innerHTML.push("</div>");var toolTip=this.getMap().showToolTip(innerHTML.join(""),latLng,com.ibigroup.googlemaps.ToolTip.PRIORITY_MOUSEOVER);if(toolTip!=null)
{this._mouseoverToolTip=toolTip;this._mouseoverToolTipHideendListener=GEvent.bind(toolTip,"hideend",this,this.tooltip_hideend);}}};gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.tooltip_hideend=function(toolTip)
{var mouseoverToolTip=this.getMouseoverToolTip();var clickToolTip=this.getClickToolTip();if(toolTip===mouseoverToolTip)
{if(this._mouseoverToolTipHideendListener!=null)
{GEvent.removeListener(this._mouseoverToolTipHideendListener);this._mouseoverToolTipHideendListener=null;}
this._mouseoverToolTip=null;}
else if(toolTip===clickToolTip)
{if(this._clickToolTipHideendListener!=null)
{GEvent.removeListener(this._clickToolTipHideendListener);this._clickToolTipHideendListener=null;}
if(this._clickToolTipCloseListener!=null)
{dojo.disconnect(this._clickToolTipCloseListener);this._clickToolTipCloseListener=null;}
this._clickToolTip=null;}};dojo.provide("gov.wi511.googlemaps.CameraMarker");dojo.require("gov.wi511.googlemaps.ExpiringToolTipMarker");dojo.require("gov.wi511.googlemaps.Icons");dojo.require("gov.wi511.map.Camera");gov.wi511.googlemaps.CameraMarker=function(latLng,options)
{if(options==null)
{options={};}
if(!(options.innerObject instanceof gov.wi511.map.Camera))
{throw new TypeError("options.innerObject is not of type gov.wi511.map.Camera");}
this._innerObject=options.innerObject;if(!(options.icon instanceof GIcon))
{options.icon=new gov.wi511.googlemaps.CameraIcon();}
gov.wi511.googlemaps.ExpiringToolTipMarker.call(this,latLng,options);};gov.wi511.googlemaps.CameraMarker__prototoype=function(){}
gov.wi511.googlemaps.CameraMarker__prototoype.prototype=gov.wi511.googlemaps.ExpiringToolTipMarker.prototype;gov.wi511.googlemaps.CameraMarker.prototype=new gov.wi511.googlemaps.CameraMarker__prototoype();gov.wi511.googlemaps.CameraMarker.prototype.constructor=gov.wi511.googlemaps.CameraMarker;gov.wi511.googlemaps.CameraMarker.prototype._innerObject=null;gov.wi511.googlemaps.CameraMarker.prototype._updateTimeout=null;gov.wi511.googlemaps.CameraMarker.prototype.UPDATE_INTERVAL=180000;gov.wi511.googlemaps.CameraMarker.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.googlemaps.CameraMarker))
{throw new TypeError("other is not of type gov.wi511.googlemaps.CameraMarker");}
return this.getInnerObject().equals(other.getInnerObject());};gov.wi511.googlemaps.CameraMarker.prototype.getID=function()
{return this.getInnerObject().getID();};gov.wi511.googlemaps.CameraMarker.prototype.getInnerObject=function()
{return this._innerObject;};gov.wi511.googlemaps.CameraMarker.prototype.this_click=function(latLng)
{gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_click.apply(this,arguments);var toolTip=this.getClickToolTip();if(toolTip!=null)
{this.updateTimeout_timeout();}};gov.wi511.googlemaps.CameraMarker.prototype.this_mouseover=function(latLng)
{gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_mouseover.apply(this,arguments);var toolTip=this.getMouseoverToolTip();if(toolTip!=null)
{this.updateTimeout_timeout();}};gov.wi511.googlemaps.CameraMarker.prototype.updateTimeout_timeout=function()
{if(this._updateTimeout!=null)
{clearTimeout(this._updateTimeout);this._updateTimeout=null;}
var cameraImageUrl=this.getInnerObject().getCameraImageUrl();var clickToolTip=this.getClickToolTip();var mouseoverToolTip=this.getMouseoverToolTip();var imageElements=null;if(clickToolTip!=null)
{imageElements=dojo.query("tr.imageTr img",clickToolTip.getContainer());}
else if(mouseoverToolTip!=null)
{imageElements=dojo.query("tr.imageTr img",mouseoverToolTip.getContainer());}
if(imageElements!=null&&imageElements.length>0)
{imageElements[0].src=cameraImageUrl+"?"+(new Date().valueOf()).toString();var thisObj=this;this._updateTimeout=setTimeout(function(){thisObj.updateTimeout_timeout();thisObj=null;},this.UPDATE_INTERVAL);}};dojo.provide("gov.wi511.googlemaps.CameraLegendItem");dojo.require("com.ibigroup.googlemaps.LegendItem");dojo.require("gov.wi511.googlemaps.CameraMarker");dojo.require("gov.wi511.map.Camera");gov.wi511.googlemaps.CameraLegendItem=function(options)
{this._expiryListeners={};com.ibigroup.googlemaps.LegendItem.apply(this,arguments);};gov.wi511.googlemaps.CameraLegendItem__prototoype=function(){}
gov.wi511.googlemaps.CameraLegendItem__prototoype.prototype=com.ibigroup.googlemaps.LegendItem.prototype;gov.wi511.googlemaps.CameraLegendItem.prototype=new gov.wi511.googlemaps.CameraLegendItem__prototoype();gov.wi511.googlemaps.CameraLegendItem.prototype.constructor=gov.wi511.googlemaps.CameraLegendItem;gov.wi511.googlemaps.CameraLegendItem.prototype._expiryListeners=null;gov.wi511.googlemaps.CameraLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data))
{throw new TypeError("data is not an array");}
var output={};var dataObj;var dataOverlay;for(var i=0;i<data.length;i++)
{try
{dataObj=new gov.wi511.map.Camera(data[i]);dataOverlay=new gov.wi511.googlemaps.CameraMarker(new GLatLng(dataObj.getLatitude(),dataObj.getLongitude()),{innerObject:dataObj,expireDuration:this.getXhrInterval()*2});output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
return output;};gov.wi511.googlemaps.CameraLegendItem.prototype.reset=function()
{var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};this.getOverlayManager().removeOverlays(overlays);com.ibigroup.googlemaps.LegendItem.prototype.reset.call(this);};gov.wi511.googlemaps.CameraLegendItem.prototype.setChecked=function(state)
{var beforeChecked=this.getChecked();com.ibigroup.googlemaps.LegendItem.prototype.setChecked.call(this,state);var checked=this.getChecked();if(beforeChecked!=checked)
{var overlays=[];for(var index in this._overlays)
{if(checked)
{this._overlays[index].refresh();}
overlays.push(this._overlays[index]);}
var overlayManager=this.getOverlayManager();if(checked)
{overlayManager.addOverlays(overlays);}
else
{overlayManager.removeOverlays(overlays);}}};gov.wi511.googlemaps.CameraLegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{oldOverlay.refresh();};gov.wi511.googlemaps.CameraLegendItem.prototype.overlay_nomatch=function(oldOverlay,newOverlay)
{this.overlay_remove(oldOverlay);this.overlay_add(newOverlay);};gov.wi511.googlemaps.CameraLegendItem.prototype.overlay_add=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]==null)
{this._overlays[overlay.getID()]=overlay;this._expiryListeners[overlay.getID()]=dojo.connect(overlay,"onExpire",this,this.overlay_expire);overlay.refresh();if(this.getChecked())
{overlayManager.addOverlay(overlay);}}};gov.wi511.googlemaps.CameraLegendItem.prototype.overlay_remove=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]!=null)
{overlay.cleanUp();delete this._overlays[overlay.getID()];dojo.disconnect(this._expiryListeners[overlay.getID()]);delete this._expiryListeners[overlay.getID()];if(this.getChecked())
{overlayManager.removeOverlay(overlay);}}};gov.wi511.googlemaps.CameraLegendItem.prototype.overlay_notpresent=function(overlay)
{};gov.wi511.googlemaps.CameraLegendItem.prototype.overlay_expire=function(overlay)
{this.overlay_remove(overlay);};dojo.provide("gov.wi511.map.MessageSign");dojo.require("com.ibigroup.NumberLib");gov.wi511.map.MessageSign=function(data)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(!com.ibigroup.NumberLib.isNumeric(data.latitude))
{throw new TypeError("data.latitude is not a valid number");}
this._latitude=data.latitude;if(!com.ibigroup.NumberLib.isNumeric(data.longitude))
{throw new TypeError("data.longitude is not a valid number");}
this._longitude=data.longitude;if(typeof(data.county)!="string")
{throw new TypeError("data.county is not a string");}
this._county=data.county;if(typeof(data.roadwayName)!="string")
{throw new TypeError("data.roadwayName is not a string");}
this._roadwayName=data.roadwayName;if(typeof(data.roadwayDirection)=="string")
{this._roadwayDirection=data.roadwayDirection;}
if(typeof(data.signLocation)!="string")
{throw new TypeError("data.signLocation is not a string");}
this._signLocation=data.signLocation;if(!dojo.isArray(data.phases))
{throw new TypeError("data.phases is not a valid array");}
this._phases=data.phases;};gov.wi511.map.MessageSign.prototype._ID=null;gov.wi511.map.MessageSign.prototype._latitude=null;gov.wi511.map.MessageSign.prototype._longitude=null;gov.wi511.map.MessageSign.prototype._county=null;gov.wi511.map.MessageSign.prototype._roadwayName=null;gov.wi511.map.MessageSign.prototype._roadwayDirection=null;gov.wi511.map.MessageSign.prototype._signLocation=null;gov.wi511.map.MessageSign.prototype._phases=null;gov.wi511.map.MessageSign.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.map.MessageSign))
{throw new TypeError("other is not of type gov.wi511.map.MessageSign");}
return true;};gov.wi511.map.MessageSign.prototype.getCounty=function()
{return this._county;};gov.wi511.map.MessageSign.prototype.getFullRoadwayName=function()
{var replacements={north:"Northbound",east:"Eastbound",south:"Southbound",west:"Westbound"}
return this.getRoadwayName()+" "+replacements[this.getRoadwayDirection()];};gov.wi511.map.MessageSign.prototype.getID=function()
{return this._ID;};gov.wi511.map.MessageSign.prototype.getLatitude=function()
{return this._latitude;};gov.wi511.map.MessageSign.prototype.getLongitude=function()
{return this._longitude;};gov.wi511.map.MessageSign.prototype.getPhases=function()
{return this._phases;};gov.wi511.map.MessageSign.prototype.getRoadwayDirection=function()
{return this._roadwayDirection;};gov.wi511.map.MessageSign.prototype.getRoadwayName=function()
{return this._roadwayName;};gov.wi511.map.MessageSign.prototype.getSignLocation=function()
{return this._signLocation;};gov.wi511.map.MessageSign.prototype.toHTML=function()
{var output=[];output.push("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");output.push("<tr class=\"headerTr\"><td class=\"labelTd\" style=\"width: 35%;\"><span>County:</span></td><td class=\"dataTd\" style=\"width: 65%;\"><span>"+this.getCounty()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Highway / Direction:</span></td><td class=\"dataTd\"><span>"+this.getFullRoadwayName()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Sign Location:</span></td><td class=\"dataTd\"><span>"+this.getSignLocation()+"</span></td></tr>");output.push("<tr class=\"messageTr\"><td colspan=\"2\"><span>&nbsp;</span></td></tr>");output.push("</table>");return output.join("");};dojo.provide("gov.wi511.googlemaps.MessageSignMarker");dojo.require("gov.wi511.googlemaps.ExpiringToolTipMarker");dojo.require("gov.wi511.googlemaps.Icons");dojo.require("gov.wi511.map.MessageSign");gov.wi511.googlemaps.MessageSignMarker=function(latLng,options)
{if(options==null)
{options={};}
if(!(options.innerObject instanceof gov.wi511.map.MessageSign))
{throw new TypeError("options.innerObject is not of type gov.wi511.map.MessageSign");}
this._innerObject=options.innerObject;if(!(options.icon instanceof GIcon))
{options.icon=new gov.wi511.googlemaps.MessageSignIcon();}
this._phaseIndex=0;gov.wi511.googlemaps.ExpiringToolTipMarker.call(this,latLng,options);};gov.wi511.googlemaps.MessageSignMarker__prototoype=function(){}
gov.wi511.googlemaps.MessageSignMarker__prototoype.prototype=gov.wi511.googlemaps.ExpiringToolTipMarker.prototype;gov.wi511.googlemaps.MessageSignMarker.prototype=new gov.wi511.googlemaps.MessageSignMarker__prototoype();gov.wi511.googlemaps.MessageSignMarker.prototype.constructor=gov.wi511.googlemaps.MessageSignMarker;gov.wi511.googlemaps.MessageSignMarker.prototype._innerObject=null;gov.wi511.googlemaps.MessageSignMarker.prototype._phaseIndex=null;gov.wi511.googlemaps.MessageSignMarker.prototype._updateTimeout=null;gov.wi511.googlemaps.MessageSignMarker.prototype.UPDATE_INTERVAL=2000;gov.wi511.googlemaps.MessageSignMarker.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.googlemaps.MessageSignMarker))
{throw new TypeError("other is not of type gov.wi511.googlemaps.MessageSignMarker");}
return this.getInnerObject().equals(other.getInnerObject());};gov.wi511.googlemaps.MessageSignMarker.prototype.getID=function()
{return this.getInnerObject().getID();};gov.wi511.googlemaps.MessageSignMarker.prototype.getInnerObject=function()
{return this._innerObject;};gov.wi511.googlemaps.MessageSignMarker.prototype.this_click=function(latLng)
{gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_click.apply(this,arguments);var toolTip=this.getClickToolTip();if(toolTip!=null)
{this.updateTimeout_timeout();}};gov.wi511.googlemaps.MessageSignMarker.prototype.this_mouseover=function(latLng)
{gov.wi511.googlemaps.ExpiringToolTipMarker.prototype.this_mouseover.apply(this,arguments);var toolTip=this.getMouseoverToolTip();if(toolTip!=null)
{this.updateTimeout_timeout();}};gov.wi511.googlemaps.MessageSignMarker.prototype.updateTimeout_timeout=function()
{console.log("updateTimeout_timeout");if(this._updateTimeout!=null)
{clearTimeout(this._updateTimeout);this._updateTimeout=null;}
var phases=this.getInnerObject().getPhases();if(phases.length==0)
{phases=["blank"];}
var clickToolTip=this.getClickToolTip();var mouseoverToolTip=this.getMouseoverToolTip();var messageElements=null;if(clickToolTip!=null)
{messageElements=dojo.query("tr.messageTr span",clickToolTip.getContainer());}
else if(mouseoverToolTip!=null)
{messageElements=dojo.query("tr.messageTr span",mouseoverToolTip.getContainer());}
if(messageElements.length>0)
{messageElements[0].innerHTML=phases[this._phaseIndex%phases.length].split("\n").join("<br />");this._phaseIndex++;if(phases.length>1)
{var thisObj=this;this._updateTimeout=setTimeout(function(){thisObj.updateTimeout_timeout();thisObj=null;},this.UPDATE_INTERVAL);}}};﻿
dojo.provide("gov.wi511.googlemaps.MessageSignLegendItem");dojo.require("com.ibigroup.googlemaps.LegendItem");dojo.require("gov.wi511.googlemaps.MessageSignMarker");dojo.require("gov.wi511.map.MessageSign");gov.wi511.googlemaps.MessageSignLegendItem=function(options)
{this._expiryListeners={};com.ibigroup.googlemaps.LegendItem.apply(this,arguments);};gov.wi511.googlemaps.MessageSignLegendItem__prototoype=function(){}
gov.wi511.googlemaps.MessageSignLegendItem__prototoype.prototype=com.ibigroup.googlemaps.LegendItem.prototype;gov.wi511.googlemaps.MessageSignLegendItem.prototype=new gov.wi511.googlemaps.MessageSignLegendItem__prototoype();gov.wi511.googlemaps.MessageSignLegendItem.prototype.constructor=gov.wi511.googlemaps.MessageSignLegendItem;gov.wi511.googlemaps.MessageSignLegendItem.prototype._expiryListeners=null;gov.wi511.googlemaps.MessageSignLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data))
{throw new TypeError("data is not an array");}
var output={};var dataObj;var dataOverlay;for(var i=0;i<data.length;i++)
{try
{dataObj=new gov.wi511.map.MessageSign(data[i]);dataOverlay=new gov.wi511.googlemaps.MessageSignMarker(new GLatLng(dataObj.getLatitude(),dataObj.getLongitude()),{innerObject:dataObj,expireDuration:this.getXhrInterval()*2});output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
return output;};gov.wi511.googlemaps.MessageSignLegendItem.prototype.reset=function()
{var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};this.getOverlayManager().removeOverlays(overlays);com.ibigroup.googlemaps.LegendItem.prototype.reset.call(this);};gov.wi511.googlemaps.MessageSignLegendItem.prototype.setChecked=function(state)
{var beforeChecked=this.getChecked();com.ibigroup.googlemaps.LegendItem.prototype.setChecked.call(this,state);var checked=this.getChecked();if(beforeChecked!=checked)
{var overlays=[];for(var index in this._overlays)
{if(checked)
{this._overlays[index].refresh();}
overlays.push(this._overlays[index]);}
var overlayManager=this.getOverlayManager();if(checked)
{overlayManager.addOverlays(overlays);}
else
{overlayManager.removeOverlays(overlays);}}};gov.wi511.googlemaps.MessageSignLegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{oldOverlay.refresh();};gov.wi511.googlemaps.MessageSignLegendItem.prototype.overlay_nomatch=function(oldOverlay,newOverlay)
{this.overlay_remove(oldOverlay);this.overlay_add(newOverlay);};gov.wi511.googlemaps.MessageSignLegendItem.prototype.overlay_add=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]==null)
{this._overlays[overlay.getID()]=overlay;this._expiryListeners[overlay.getID()]=dojo.connect(overlay,"onExpire",this,this.overlay_expire);if(this.getChecked())
{overlayManager.addOverlay(overlay);}
overlay.refresh();}};gov.wi511.googlemaps.MessageSignLegendItem.prototype.overlay_remove=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]!=null)
{overlay.cleanUp();delete this._overlays[overlay.getID()];dojo.disconnect(this._expiryListeners[overlay.getID()]);delete this._expiryListeners[overlay.getID()];if(this.getChecked())
{overlayManager.removeOverlay(overlay);}}};gov.wi511.googlemaps.MessageSignLegendItem.prototype.overlay_notpresent=function(overlay)
{};gov.wi511.googlemaps.MessageSignLegendItem.prototype.overlay_expire=function(overlay)
{this.overlay_remove(overlay);};dojo.provide("gov.wi511.map.Incident");dojo.require("com.ibigroup.NumberLib");gov.wi511.map.Incident=function(data)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(!com.ibigroup.NumberLib.isNumeric(data.latitude))
{throw new TypeError("data.latitude is not a valid number");}
this._latitude=data.latitude;if(!com.ibigroup.NumberLib.isNumeric(data.longitude))
{throw new TypeError("data.longitude is not a valid number");}
this._longitude=data.longitude;if(typeof(data.type)!="string")
{throw new TypeError("data.type is not a string");}
this._type=data.type;if(typeof(data.county)!="string")
{throw new TypeError("data.county is not a string");}
this._county=data.county;if(typeof(data.roadwayName)!="string")
{throw new TypeError("data.roadwayName is not a string");}
this._roadwayName=data.roadwayName;if(typeof(data.atLocation)!="string")
{throw new TypeError("data.atLocation is not a string");}
this._atLocation=data.atLocation;if(typeof(data.description)!="string")
{throw new TypeError("data.description is not a string");}
this._description=data.description;if(typeof(data.lastUpdateDateTime)!="string")
{throw new TypeError("data.lastUpdateDateTime is not a string");}
this._lastUpdateDate=data.lastUpdateDateTime;if(typeof(data.HasDetourInformation)!="boolean"){throw new TypeError("data.HasDetourInformation is not a boolean");}
this._hasDetourInformation=data.HasDetourInformation;if(typeof(data.NetworkId)!="string"){throw new TypeError("data.NetworkId is not a String");}
this._networkId=data.NetworkId;if(typeof(data.ItemId)!="string"){throw new TypeError("data.ItemId is not a String");}
this._eventId=data.ItemId;};gov.wi511.map.Incident.prototype._ID=null;gov.wi511.map.Incident.prototype._latitude=null;gov.wi511.map.Incident.prototype._longitude=null;gov.wi511.map.Incident.prototype._county=null;gov.wi511.map.Incident.prototype._roadwayName=null;gov.wi511.map.Incident.prototype._atLocation=null;gov.wi511.map.Incident.prototype._type=null;gov.wi511.map.Incident.prototype._description=null;gov.wi511.map.Incident.prototype._lastUpdateDate=null;gov.wi511.map.Incident.prototype._hasDetourInformation=null;gov.wi511.map.Incident.prototype._networkId=null;gov.wi511.map.Incident.prototype._eventId=null;gov.wi511.map.Incident.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.map.Incident))
{throw new TypeError("other is not of type gov.wi511.map.Incident");}
if(other.getID()!=this.getID())
{return false;}
if(other.getLatitude()!=this.getLatitude())
{return false;}
if(other.getLongitude()!=this.getLongitude())
{return false;}
if(other.getType()!=this.getType())
{return false;}
if(other.getCounty()!=this.getCounty())
{return false;}
if(other.getRoadwayName()!=this.getRoadwayName())
{return false;}
if(other.getAtLocation()!=this.getAtLocation())
{return false;}
if(other.getDescription()!=this.getDescription())
{return false;}
if(other.getLastUpdateDate()!=this.getLastUpdateDate())
{return false;}
return true;};gov.wi511.map.Incident.prototype.getAtLocation=function()
{return this._atLocation;};gov.wi511.map.Incident.prototype.getCounty=function()
{return this._county;};gov.wi511.map.Incident.prototype.getDescription=function()
{return this._description;};gov.wi511.map.Incident.prototype.getFullRoadwayName=function()
{var replacements={NB:"Northbound",EB:"Eastbound",SB:"Southbound",WB:"Westbound"}
var output=this._roadwayName;for(var index in replacements)
{output=output.split(" "+index).join(" "+replacements[index]);}
return output;};gov.wi511.map.Incident.prototype.getID=function()
{return this._ID;};gov.wi511.map.Incident.prototype.getLastUpdateDate=function()
{return this._lastUpdateDate;};gov.wi511.map.Incident.prototype.getLatitude=function()
{return this._latitude;};gov.wi511.map.Incident.prototype.getLongitude=function()
{return this._longitude;};gov.wi511.map.Incident.prototype.getRoadwayName=function()
{return this._roadwayName;};gov.wi511.map.Incident.prototype.getType=function()
{return this._type;};gov.wi511.map.Incident.prototype.toHTML=function()
{var output=[];output.push("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");output.push("<tr class=\"headerTr\"><td class=\"labelTd\" style=\"width: 35%;\"><span>Type:</span></td><td class=\"dataTd\" style=\"width: 65%;\"><span>"+this.getType()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>County:</span></td><td class=\"dataTd\"><span>"+this.getCounty()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Highway / Direction:</span></td><td class=\"dataTd\"><span>"+this.getFullRoadwayName()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>At:</span></td><td class=\"dataTd\"><span>"+this.getAtLocation()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Description / Location:</span></td><td class=\"dataTd\"><span>"+this.getDescription()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Updated:</span></td><td class=\"dataTd\"><span>"+this.getLastUpdateDate()+"</span></td></tr>");if(this._hasDetourInformation){var url=encodeURI("Incidents.aspx?dispNetId="+this._networkId+"&dispEventId="+this._eventId);output.push("<tr><td colspan='2' class=\"labelTd\" align='right'><a target='_blank' href='"+url+"'>Show Details</a></td></tr>");}
output.push("</table>");return output.join("");};dojo.provide("gov.wi511.googlemaps.IncidentMarker");dojo.require("gov.wi511.googlemaps.ExpiringToolTipMarker");dojo.require("gov.wi511.googlemaps.Icons");dojo.require("gov.wi511.map.Incident");gov.wi511.googlemaps.IncidentMarker=function(latLng,options)
{if(options==null)
{options={};}
if(!(options.innerObject instanceof gov.wi511.map.Incident))
{throw new TypeError("options.innerObject is not of type gov.wi511.map.Incident");}
this._innerObject=options.innerObject;if(!(options.icon instanceof GIcon))
{options.icon=new gov.wi511.googlemaps.IncidentIcon();}
gov.wi511.googlemaps.ExpiringToolTipMarker.call(this,latLng,options);};gov.wi511.googlemaps.IncidentMarker__prototoype=function(){}
gov.wi511.googlemaps.IncidentMarker__prototoype.prototype=gov.wi511.googlemaps.ExpiringToolTipMarker.prototype;gov.wi511.googlemaps.IncidentMarker.prototype=new gov.wi511.googlemaps.IncidentMarker__prototoype();gov.wi511.googlemaps.IncidentMarker.prototype.constructor=gov.wi511.googlemaps.IncidentMarker;gov.wi511.googlemaps.IncidentMarker.prototype._innerObject=null;gov.wi511.googlemaps.IncidentMarker.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.googlemaps.IncidentMarker))
{throw new TypeError("other is not of type gov.wi511.googlemaps.IncidentMarker");}
return this.getInnerObject().equals(other.getInnerObject());};gov.wi511.googlemaps.IncidentMarker.prototype.getID=function()
{return this.getInnerObject().getID();};gov.wi511.googlemaps.IncidentMarker.prototype.getInnerObject=function()
{return this._innerObject;};﻿
dojo.provide("gov.wi511.googlemaps.IncidentLegendItem");dojo.require("com.ibigroup.googlemaps.LegendItem");dojo.require("gov.wi511.googlemaps.IncidentMarker");dojo.require("gov.wi511.map.Incident");gov.wi511.googlemaps.IncidentLegendItem=function(options)
{this._expiryListeners={};com.ibigroup.googlemaps.LegendItem.apply(this,arguments);};gov.wi511.googlemaps.IncidentLegendItem__prototoype=function(){}
gov.wi511.googlemaps.IncidentLegendItem__prototoype.prototype=com.ibigroup.googlemaps.LegendItem.prototype;gov.wi511.googlemaps.IncidentLegendItem.prototype=new gov.wi511.googlemaps.IncidentLegendItem__prototoype();gov.wi511.googlemaps.IncidentLegendItem.prototype.constructor=gov.wi511.googlemaps.IncidentLegendItem;gov.wi511.googlemaps.IncidentLegendItem.prototype._expiryListeners=null;gov.wi511.googlemaps.IncidentLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data))
{throw new TypeError("data is not an array");}
var output={};var dataObj;var dataOverlay;for(var i=0;i<data.length;i++)
{try
{dataObj=new gov.wi511.map.Incident(data[i]);dataOverlay=new gov.wi511.googlemaps.IncidentMarker(new GLatLng(dataObj.getLatitude(),dataObj.getLongitude()),{innerObject:dataObj,expireDuration:this.getXhrInterval()*2});output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
return output;};gov.wi511.googlemaps.IncidentLegendItem.prototype.reset=function()
{var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};this.getOverlayManager().removeOverlays(overlays);com.ibigroup.googlemaps.LegendItem.prototype.reset.call(this);};gov.wi511.googlemaps.IncidentLegendItem.prototype.setChecked=function(state)
{var beforeChecked=this.getChecked();com.ibigroup.googlemaps.LegendItem.prototype.setChecked.call(this,state);var checked=this.getChecked();if(beforeChecked!=checked)
{var overlays=[];for(var index in this._overlays)
{if(checked)
{this._overlays[index].refresh();}
overlays.push(this._overlays[index]);}
var overlayManager=this.getOverlayManager();if(checked)
{overlayManager.addOverlays(overlays);}
else
{overlayManager.removeOverlays(overlays);}}};gov.wi511.googlemaps.IncidentLegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{oldOverlay.refresh();};gov.wi511.googlemaps.IncidentLegendItem.prototype.overlay_nomatch=function(oldOverlay,newOverlay)
{this.overlay_remove(oldOverlay);this.overlay_add(newOverlay);};gov.wi511.googlemaps.IncidentLegendItem.prototype.overlay_add=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]==null)
{this._overlays[overlay.getID()]=overlay;this._expiryListeners[overlay.getID()]=dojo.connect(overlay,"onExpire",this,this.overlay_expire);overlay.refresh();if(this.getChecked())
{overlayManager.addOverlay(overlay);}}};gov.wi511.googlemaps.IncidentLegendItem.prototype.overlay_remove=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]!=null)
{overlay.cleanUp();delete this._overlays[overlay.getID()];dojo.disconnect(this._expiryListeners[overlay.getID()]);delete this._expiryListeners[overlay.getID()];if(this.getChecked())
{overlayManager.removeOverlay(overlay);}}};gov.wi511.googlemaps.IncidentLegendItem.prototype.overlay_notpresent=function(overlay)
{};gov.wi511.googlemaps.IncidentLegendItem.prototype.overlay_expire=function(overlay)
{this.overlay_remove(overlay);};dojo.provide("gov.wi511.map.RoadClosure");dojo.require("com.ibigroup.NumberLib");gov.wi511.map.RoadClosure=function(data)
{if(data==null)
{data={};}
if(typeof(data.ID)!="string")
{throw new TypeError("data.ID is not a string");}
this._ID=data.ID;if(!com.ibigroup.NumberLib.isNumeric(data.latitude))
{throw new TypeError("data.latitude is not a valid number");}
this._latitude=data.latitude;if(!com.ibigroup.NumberLib.isNumeric(data.longitude))
{throw new TypeError("data.longitude is not a valid number");}
this._longitude=data.longitude;if(typeof(data.type)!="string")
{throw new TypeError("data.type is not a string");}
this._type=data.type;if(typeof(data.county)!="string")
{throw new TypeError("data.county is not a string");}
this._county=data.county;if(typeof(data.roadwayName)!="string")
{throw new TypeError("data.roadwayName is not a string");}
this._roadwayName=data.roadwayName;if(typeof(data.fromLocation)!="string")
{throw new TypeError("data.fromLocation is not a string");}
this._fromLocation=data.fromLocation;if(typeof(data.toLocation)!="string")
{throw new TypeError("data.toLocation is not a string");}
this._toLocation=data.toLocation;if(typeof(data.description)!="string")
{throw new TypeError("data.description is not a string");}
this._description=data.description;if(typeof(data.timing)!="string")
{throw new TypeError("data.timing is not a valid string");}
this._timing=data.timing;if(typeof(data.HasDetourInformation)!="boolean"){throw new TypeError("data.HasDetourInformation is not a boolean");}
this._hasDetourInformation=data.HasDetourInformation;if(typeof(data.NetworkId)!="string"){throw new TypeError("data.NetworkId is not a String");}
this._networkId=data.NetworkId;if(typeof(data.ItemId)!="string"){throw new TypeError("data.ItemId is not a String");}
this._eventId=data.ItemId;if(typeof(data.lastUpdateDateTime)!="string")
{throw new TypeError("data.lastUpdateDateTime is not a valid string");}
this._lastUpdateDate=data.lastUpdateDateTime;};gov.wi511.map.RoadClosure.prototype._ID=null;gov.wi511.map.RoadClosure.prototype._latitude=null;gov.wi511.map.RoadClosure.prototype._longitude=null;gov.wi511.map.RoadClosure.prototype._type=null;gov.wi511.map.RoadClosure.prototype._county=null;gov.wi511.map.RoadClosure.prototype._roadwayName=null;gov.wi511.map.RoadClosure.prototype._fromLocation=null;gov.wi511.map.RoadClosure.prototype._toLocation=null;gov.wi511.map.RoadClosure.prototype._description=null;gov.wi511.map.RoadClosure.prototype._timing=null;gov.wi511.map.RoadClosure.prototype._lastUpdateDate=null;gov.wi511.map.RoadClosure.prototype._hasDetourInformation=null;gov.wi511.map.RoadClosure.prototype._networkId=null;gov.wi511.map.RoadClosure.prototype._eventId=null;gov.wi511.map.RoadClosure.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.map.RoadClosure))
{throw new TypeError("other is not of type gov.wi511.map.RoadClosure");}
if(other.getID()!=this.getID())
{return false;}
if(other.getLatitude()!=this.getLatitude())
{return false;}
if(other.getLongitude()!=this.getLongitude())
{return false;}
if(other.getType()!=this.getType())
{return false;}
if(other.getCounty()!=this.getCounty())
{return false;}
if(other.getRoadwayName()!=this.getRoadwayName())
{return false;}
if(other.getFromLocation()!=this.getFromLocation())
{return false;}
if(other.getToLocation()!=this.getToLocation())
{return false;}
if(other.getDescription()!=this.getDescription())
{return false;}
if(other.getTiming()!=this.getTiming())
{return false;}
if(other.getLastUpdateDate()!=this.getLastUpdateDate())
{return false;}
return true;};gov.wi511.map.RoadClosure.prototype.getCounty=function()
{return this._county;};gov.wi511.map.RoadClosure.prototype.getDescription=function()
{return this._description;};gov.wi511.map.RoadClosure.prototype.getFullRoadwayName=function()
{var replacements={NB:"Northbound",EB:"Eastbound",SB:"Southbound",WB:"Westbound"}
var output=this._roadwayName;for(var index in replacements)
{output=output.split(" "+index).join(" "+replacements[index]);}
return output;};gov.wi511.map.RoadClosure.prototype.getFromLocation=function()
{return this._fromLocation;};gov.wi511.map.RoadClosure.prototype.getID=function()
{return this._ID;};gov.wi511.map.RoadClosure.prototype.getLastUpdateDate=function()
{return this._lastUpdateDate;};gov.wi511.map.RoadClosure.prototype.getLatitude=function()
{return this._latitude;};gov.wi511.map.RoadClosure.prototype.getLongitude=function()
{return this._longitude;};gov.wi511.map.RoadClosure.prototype.getRoadwayName=function()
{return this._roadwayName;};gov.wi511.map.RoadClosure.prototype.getTiming=function()
{return this._timing;};gov.wi511.map.RoadClosure.prototype.getToLocation=function()
{return this._toLocation;};gov.wi511.map.RoadClosure.prototype.getType=function()
{return this._type;};gov.wi511.map.RoadClosure.prototype.toHTML=function(){var output=[];output.push("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");output.push("<tr class=\"headerTr\"><td class=\"labelTd\" style=\"width: 35%;\"><span>Type:</span></td><td class=\"dataTd\" style=\"width: 65%;\"><span>"+this.getType()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>County:</span></td><td class=\"dataTd\"><span>"+this.getCounty()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Highway / Direction:</span></td><td class=\"dataTd\"><span>"+this.getFullRoadwayName()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>From:</span></td><td class=\"dataTd\"><span>"+this.getFromLocation()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>To:</span></td><td class=\"dataTd\"><span>"+this.getToLocation()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Description / Location:</span></td><td class=\"dataTd\"><span>"+this.getDescription()+"</span></td></tr>");output.push("<tr class=\"evenTr\"><td class=\"labelTd\"><span>Start / Expected End Time:</span></td><td class=\"dataTd\"><span>"+this.getTiming()+"</span></td></tr>");output.push("<tr><td class=\"labelTd\"><span>Updated:</span></td><td class=\"dataTd\"><span>"+this.getLastUpdateDate()+"</span></td></tr>");if(this._hasDetourInformation){var url=encodeURI("Incidents.aspx?dispNetId="+this._networkId+"&dispEventId="+this._eventId);output.push("<tr><td colspan='2' class=\"labelTd\" align='right'><a target='_blank' href='"+url+"'>Show Details</a></td></tr>");}
output.push("</table>");return output.join("");}
dojo.provide("gov.wi511.googlemaps.RoadClosureMarker");dojo.require("gov.wi511.googlemaps.ExpiringToolTipMarker");dojo.require("gov.wi511.googlemaps.Icons");dojo.require("gov.wi511.map.RoadClosure");gov.wi511.googlemaps.RoadClosureMarker=function(latLng,options)
{if(options==null)
{options={};}
if(!(options.innerObject instanceof gov.wi511.map.RoadClosure))
{throw new TypeError("options.innerObject is not of type gov.wi511.map.RoadClosure");}
this._innerObject=options.innerObject;if(!(options.icon instanceof GIcon))
{options.icon=new gov.wi511.googlemaps.RoadClosureIcon();}
gov.wi511.googlemaps.ExpiringToolTipMarker.call(this,latLng,options);};gov.wi511.googlemaps.RoadClosureMarker__prototoype=function(){}
gov.wi511.googlemaps.RoadClosureMarker__prototoype.prototype=gov.wi511.googlemaps.ExpiringToolTipMarker.prototype;gov.wi511.googlemaps.RoadClosureMarker.prototype=new gov.wi511.googlemaps.RoadClosureMarker__prototoype();gov.wi511.googlemaps.RoadClosureMarker.prototype.constructor=gov.wi511.googlemaps.RoadClosureMarker;gov.wi511.googlemaps.RoadClosureMarker.prototype._innerObject=null;gov.wi511.googlemaps.RoadClosureMarker.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.googlemaps.RoadClosureMarker))
{throw new TypeError("other is not of type gov.wi511.googlemaps.RoadClosureMarker");}
return this.getInnerObject().equals(other.getInnerObject());};gov.wi511.googlemaps.RoadClosureMarker.prototype.getID=function()
{return this.getInnerObject().getID();};gov.wi511.googlemaps.RoadClosureMarker.prototype.getInnerObject=function()
{return this._innerObject;};﻿
dojo.provide("gov.wi511.googlemaps.RoadClosureLegendItem");dojo.require("com.ibigroup.googlemaps.LegendItem");dojo.require("gov.wi511.googlemaps.RoadClosureMarker");dojo.require("gov.wi511.map.RoadClosure");gov.wi511.googlemaps.RoadClosureLegendItem=function(options)
{this._expiryListeners={};com.ibigroup.googlemaps.LegendItem.apply(this,arguments);};gov.wi511.googlemaps.RoadClosureLegendItem__prototoype=function(){}
gov.wi511.googlemaps.RoadClosureLegendItem__prototoype.prototype=com.ibigroup.googlemaps.LegendItem.prototype;gov.wi511.googlemaps.RoadClosureLegendItem.prototype=new gov.wi511.googlemaps.RoadClosureLegendItem__prototoype();gov.wi511.googlemaps.RoadClosureLegendItem.prototype.constructor=gov.wi511.googlemaps.RoadClosureLegendItem;gov.wi511.googlemaps.RoadClosureLegendItem.prototype._expiryListeners=null;gov.wi511.googlemaps.RoadClosureLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data))
{throw new TypeError("data is not an array");}
var output={};var dataObj;var dataOverlay;for(var i=0;i<data.length;i++)
{try
{dataObj=new gov.wi511.map.RoadClosure(data[i]);dataOverlay=new gov.wi511.googlemaps.RoadClosureMarker(new GLatLng(dataObj.getLatitude(),dataObj.getLongitude()),{innerObject:dataObj,expireDuration:this.getXhrInterval()*2});output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
return output;};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.reset=function()
{var overlays=[];for(var index in this._overlays)
{this._overlays[index].cleanUp();overlays.push(this._overlays[index]);}
this._overlays={};this.getOverlayManager().removeOverlays(overlays);com.ibigroup.googlemaps.LegendItem.prototype.reset.call(this);};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.setChecked=function(state)
{var beforeChecked=this.getChecked();com.ibigroup.googlemaps.LegendItem.prototype.setChecked.call(this,state);var checked=this.getChecked();if(beforeChecked!=checked)
{var overlays=[];for(var index in this._overlays)
{if(checked)
{this._overlays[index].refresh();}
overlays.push(this._overlays[index]);}
var overlayManager=this.getOverlayManager();if(checked)
{overlayManager.addOverlays(overlays);}
else
{overlayManager.removeOverlays(overlays);}}};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.overlay_match=function(oldOverlay,newOverlay)
{oldOverlay.refresh();};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.overlay_nomatch=function(oldOverlay,newOverlay)
{this.overlay_remove(oldOverlay);this.overlay_add(newOverlay);};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.overlay_add=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]==null)
{this._overlays[overlay.getID()]=overlay;this._expiryListeners[overlay.getID()]=dojo.connect(overlay,"onExpire",this,this.overlay_expire);overlay.refresh();if(this.getChecked())
{overlayManager.addOverlay(overlay);}}};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.overlay_remove=function(overlay)
{var overlayManager=this.getOverlayManager();if(this._overlays[overlay.getID()]!=null)
{overlay.cleanUp();delete this._overlays[overlay.getID()];dojo.disconnect(this._expiryListeners[overlay.getID()]);delete this._expiryListeners[overlay.getID()];if(this.getChecked())
{overlayManager.removeOverlay(overlay);}}};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.overlay_notpresent=function(overlay)
{};gov.wi511.googlemaps.RoadClosureLegendItem.prototype.overlay_expire=function(overlay)
{this.overlay_remove(overlay);};dojo.provide("gov.wi511.googlemaps.FutureRoadClosureMarker");dojo.require("gov.wi511.googlemaps.RoadClosureMarker");dojo.require("gov.wi511.googlemaps.Icons");gov.wi511.googlemaps.FutureRoadClosureMarker=function(latLng,options)
{if(options==null)
{options={};}
if(!(options.icon instanceof GIcon))
{options.icon=new gov.wi511.googlemaps.FutureRoadClosureIcon();}
gov.wi511.googlemaps.RoadClosureMarker.call(this,latLng,options);};gov.wi511.googlemaps.FutureRoadClosureMarker__prototoype=function(){}
gov.wi511.googlemaps.FutureRoadClosureMarker__prototoype.prototype=gov.wi511.googlemaps.RoadClosureMarker.prototype;gov.wi511.googlemaps.FutureRoadClosureMarker.prototype=new gov.wi511.googlemaps.FutureRoadClosureMarker__prototoype();gov.wi511.googlemaps.FutureRoadClosureMarker.prototype.constructor=gov.wi511.googlemaps.FutureRoadClosureMarker;gov.wi511.googlemaps.FutureRoadClosureMarker.prototype.equals=function(other)
{if(!(other instanceof gov.wi511.googlemaps.FutureRoadClosureMarker))
{throw new TypeError("other is not of type gov.wi511.googlemaps.FutureRoadClosureMarker");}
return this.getInnerObject().equals(other.getInnerObject());};﻿
dojo.provide("gov.wi511.googlemaps.FutureRoadClosureLegendItem");dojo.require("gov.wi511.googlemaps.RoadClosureLegendItem");dojo.require("gov.wi511.googlemaps.FutureRoadClosureMarker");dojo.require("gov.wi511.map.RoadClosure");gov.wi511.googlemaps.FutureRoadClosureLegendItem=function(options)
{gov.wi511.googlemaps.RoadClosureLegendItem.apply(this,arguments);};gov.wi511.googlemaps.FutureRoadClosureLegendItem__prototoype=function(){}
gov.wi511.googlemaps.FutureRoadClosureLegendItem__prototoype.prototype=gov.wi511.googlemaps.RoadClosureLegendItem.prototype;gov.wi511.googlemaps.FutureRoadClosureLegendItem.prototype=new gov.wi511.googlemaps.FutureRoadClosureLegendItem__prototoype();gov.wi511.googlemaps.FutureRoadClosureLegendItem.prototype.constructor=gov.wi511.googlemaps.FutureRoadClosureLegendItem;gov.wi511.googlemaps.FutureRoadClosureLegendItem.prototype._createOverlays=function(data)
{if(!dojo.isArray(data))
{throw new TypeError("data is not an array");}
var output={};var dataObj;var dataOverlay;for(var i=0;i<data.length;i++)
{try
{dataObj=new gov.wi511.map.RoadClosure(data[i]);dataOverlay=new gov.wi511.googlemaps.FutureRoadClosureMarker(new GLatLng(dataObj.getLatitude(),dataObj.getLongitude()),{innerObject:dataObj,expireDuration:this.getXhrInterval()*2});output[dataOverlay.getID()]=dataOverlay;}
catch(exception)
{console.log(exception);}}
return output;};﻿
dojo.provide("gov.wi511.googlemaps.Other511Marker");gov.wi511.googlemaps.Other511Marker=function(latLng,options)
{if(options==null)
{options={};}
if(typeof(options.url)!="string")
{throw new TypeError("options.url is not a valid string");}
this._url=options.url;if(typeof(options.iconImage)!="string")
{throw new TypeError("options.iconImage is not a valid string");}
if(!(options.icon instanceof GIcon))
{options.icon=new GIcon(null,options.iconImage);options.icon.shadow="";options.icon.iconSize=new GSize(60,60);options.icon.iconAnchor=new GPoint(30,30);}
GMarker.call(this,latLng,options);this._thisClickListener=GEvent.bind(this,"click",this,this.this_click);};gov.wi511.googlemaps.Other511Marker__prototoype=function(){}
gov.wi511.googlemaps.Other511Marker__prototoype.prototype=GMarker.prototype;gov.wi511.googlemaps.Other511Marker.prototype=new gov.wi511.googlemaps.Other511Marker__prototoype();gov.wi511.googlemaps.Other511Marker.prototype.constructor=gov.wi511.googlemaps.Other511Marker;gov.wi511.googlemaps.Other511Marker.prototype._url=null;gov.wi511.googlemaps.Other511Marker.prototype._thisClickListener=null;gov.wi511.googlemaps.Other511Marker.prototype.getUrl=function()
{return this._url};gov.wi511.googlemaps.Other511Marker.prototype.this_click=function(latLng)
{var myWin=window.open(this.getUrl(),"_blank","menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes");};
