AdfUIComponents.createComponentClass("AdfDhtmlGeoMap",{componentType:"oracle.dss.adf.geoMap.GeoMap",propertyKeys:[{name:"id",type:"String"},{name:"centerX",type:"String"},{name:"centerY",type:"String"},{name:"centerSrid",type:"String"},{name:"currentZoom",type:"String"}],namingContainer:!0,superclass:AdfUIComponent});AdfDhtmlGeoMap.prototype.vw=function(){this.Ka("CLOSECUR",!0)};AdfDhtmlGeoMap.prototype._closePolygon=AdfDhtmlGeoMap.prototype.vw;
AdfDhtmlGeoMap.prototype.Ax=function(){this.Ka("MAKECUR",!0)};AdfDhtmlGeoMap.prototype._openPolygon=AdfDhtmlGeoMap.prototype.Ax;
AdfDhtmlGeoMap.prototype.hy=function(){function a(a){"ruler"==b?A_e(c,!0,A_b.Of,a):"area"!=b&&"polygonSelection"!=b||A_e(c,!0,A_b.Zb,a)}var b=this.na,c=this,d=null;if("ruler"==b)d=this.dc.Js(),null!=d&&2<=d.length&&MVSdoGeometry.createLineString(d,this.i.srid).vT("meter",!0,null,a);else if("area"==b||"polygonSelection"==b){var e=null;"polygonSelection"==b?e=this.pb:"area"==b&&(e=this.zb,d=this.i.getFOI("__adf_areaTool_Polygon"),null!=d&&(this.i.removeFOI(d),A_e(this,!0,A_b.Zb,0)));d=e.Js();A_ya(this);
if(2==d.length){var f=A_c(this).getAttribute("POLYSEGMENT_IMAGE_PATH");e.ut(f,5,5);var e=e.LT()[0],f=this.createCallback(this.vw),g=this.createCallback(this.Ax);e.setEventListener("mouse_over",f);e.setEventListener("mouse_out",g)}if("polygonSelection"==b&&null!=d&&2==d.length){e=null;if(null!=this.Ha)f=this.getTheme(this.lb),null!=f&&(e=A_b.Jq(f,this.Ha),e.selectionMode="Unselect");else for(g=this.yn,f=0;f<g.length;f++)null==e&&(e=[],e.selectionMode="Unselect"),A_b.yh(e,g[f]);null!=e&&(e=new A_ca(this,
e),e.setPartial(!0),this.queueEvent(e))}if(null!=d&&6<=d.length){e=[];for(f=0;f<d.length;f++)e.push(d[f]);e.push(d[0]);e.push(d[1]);MVSdoGeometry.createPolygon(e,this.i.srid).Yy("sq_meter",!0)}else null!=this.pb&&(this.pb.kx=!0),A_e(this,!0,A_b.Zb,0)}};AdfDhtmlGeoMap.prototype._showDistanceArea=AdfDhtmlGeoMap.prototype.hy;
AdfDhtmlGeoMap.my=function(){var a=AdfPage.PAGE.findComponent(this.parent._mvMapViewId),b=this.getLayerName();a._getThemeEntry(b).initStatus="Done";for(var b=!0,c=0;c<a._themeInfoTable.length;c++)null!=a._themeInfoTable[c].initStatus&&"Done"!=a._themeInfoTable[c].initStatus&&(b=!1);b&&a.i.setLoadingIconVisible(!1);this.setEventListener("after_refresh",null)};A_a("AdfDhtmlGeoMap._themeDone",AdfDhtmlGeoMap.my);AdfDhtmlGeoMap.fH=function(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))};
AdfDhtmlGeoMap.mw=function(a,b){var c=2,d=document.getElementById(a);null!=d&&null!=d.childNodes&&null!=d.childNodes[0]&&null!=d.childNodes[0].childNodes&&null!=d.childNodes[0].childNodes[0]&&(d=d.childNodes[0].childNodes[0],"0px"!=d.style.width?(d.parentNode.style.width=d.style.width,d.style.width="0px"):"0px"==d.style.width&&(d.style.width=d.parentNode.style.width,--c),0<c?setTimeout("AdfDhtmlGeoMap._blinkPoint('"+a+"', "+c.toString()+',"'+b+'")',500):null!=b&&setTimeout(b,500))};
AdfDhtmlGeoMap.Tm=function(a,b,c,d){var e=1,f=document.getElementById(a);if(null!=f&&null!=f.parentNode){if("tempParent"!=f.parentNode.id){var g=f.parentNode,h=document.createElement("div");h.id="tempParent";h.style.opacity=b?1:0;g.insertBefore(h,f.nextSibling);g.removeChild(f);h.appendChild(f)}g=f.parentNode.style.opacity;g=b?parseFloat(g)-.2:parseFloat(g)+.2;b?0>g&&(g=d?0:1,--e):1<g&&(g=d?1:0,--e);f.parentNode.style.opacity=g;f.width=f.width;g=f.src;f.src="";f.src=g;0<e?(f="",f=d?"AdfDhtmlGeoMap._fadePoint('"+
a+"',"+b.toString()+", "+e.toString()+', "'+c+'", true)':"AdfDhtmlGeoMap._fadePoint('"+a+"',"+b.toString()+", "+e.toString()+', "'+c+'")',setTimeout(f,500)):(b||(f.parentNode.style.opacity=1),d||(g=f.parentNode.parentNode,a=f.parentNode.nextSibling,g.removeChild(f.parentNode),g.insertBefore(f,a)),null!=c&&setTimeout(c,500))}};
AdfDhtmlGeoMap.oe=function(a,b,c){"blink"==b?AdfDhtmlGeoMap.mw(a,c):"fade_in"==b?AdfDhtmlGeoMap.Tm(a,!1,c):"fade_out"==b?AdfDhtmlGeoMap.Tm(a,!0,c):"fade_in_and_blink"==b?AdfDhtmlGeoMap.Tm(a,!1,"AdfDhtmlGeoMap._blinkPoint('"+a+"', 2, '"+c+"')"):"blink_and_fade_out"==b?AdfDhtmlGeoMap.mw(a,"AdfDhtmlGeoMap._fadePoint('"+a+"', true, 1, '"+c+"')"):"fade_out_and_fade_in"==b&&AdfDhtmlGeoMap.Tm(a,!0,"AdfDhtmlGeoMap._fadePoint('"+a+"', false, 1, '"+c+"')",!0)};AdfDhtmlGeoMap.prototype.YK=function(){return this.i};
AdfDhtmlGeoMap.prototype.getMVMapView=AdfDhtmlGeoMap.prototype.YK;AdfDhtmlGeoMap.prototype.tK=function(){return this.lb};AdfDhtmlGeoMap.prototype.getActiveTheme=AdfDhtmlGeoMap.prototype.tK;
AdfDhtmlGeoMap.prototype.ro=function(a){null!=this.lb&&this.lb!=a&&(A_5a(this),"rectSelection"==this.na?(this.Sb.clear(),A_ha(this),this.Sb.init(),this.Sb.setEventListener("on_finish",AdfDhtmlGeoMap.wS)):"circleSelection"==this.na?(this.Kb.clear(),A_ha(this),this.Kb.init(),this.Kb.setEventListener("on_finish",AdfDhtmlGeoMap.iS)):"polygonSelection"==this.na?(this.pb.clear(),this.pb.init(),A_ha(this)):"ruler"==this.na?(this.dc.clear(),A_e(this,!0,A_b.Of,0),this.dc.init()):"area"==this.na?(this.zb.clear(),
A_e(this,!0,A_b.Zb,0),this.zb.init()):"pointSelection"==this.na&&A_ha(this),A_ba(this));this.lb=a};AdfDhtmlGeoMap.prototype.setActiveTheme=AdfDhtmlGeoMap.prototype.ro;AdfDhtmlGeoMap.prototype.gJ=function(){this.Cn=(new Date).getTime()};AdfDhtmlGeoMap.prototype._startLogging=AdfDhtmlGeoMap.prototype.gJ;AdfDhtmlGeoMap.prototype.Nw=function(){AdfLogger.LOGGER.info("Theme rendering time:  "+((new Date).getTime()-this.Cn))};AdfDhtmlGeoMap.prototype._endLogging=AdfDhtmlGeoMap.prototype.Nw;
function A_6a(a){var b=a.getClientId();document.getElementById(b).onmousemove=A_b.uH;var c=A_c(a);c.getAttribute("contextPath");var d="\x3ctable id\x3d'"+AdfRichUIPeer.CreateSubId(b,"infoArea")+"' cellpadding\x3d0 cellspacing\x3d0 align\x3d'left'";AdfAgent.getAgent().getPlatform()==AdfAgent.WEBKIT_PLATFORM&&(d+=" width\x3d'100' ");d+=" valign\x3d'center'\x3e\x3ctr\x3e";if(null==c.getAttribute("infoAreaHidden")){var e=A_b.Ev+":",f=A_b.Fv+":";if(8307==a.i.srid||54004==a.i.srid)e=A_b.Xu+":",f=A_b.Uu+
":";var g=c.getAttribute("xPanelStyleClass"),h=c.getAttribute("yPanelStyleClass"),l=c.getAttribute("panelLeftClass"),m=c.getAttribute("panelRightClass"),n=c.getAttribute("panelCenterClass"),p=c.getAttribute("INFO_IMAGE_PATH"),q=c.getAttribute("SEPARATOR_IMAGE_PATH"),d=d+("\x3ctd align\x3dleft valign\x3dcenter nowrap\x3e\x3ctable id\x3d'"+b+A_b.la+"latlong' style\x3d'display:none;overflow:hidden;' cellspacing\x3d'0' cellpadding\x3d'0'\x3e"),d=d+('\x3ctr\x3e\x3ctd\x3e\x3cdiv class\x3d"'+l+'"\x3e\x3c/div\x3e\x3c/td\x3e')+
('\x3ctd class\x3d"'+n+'"\x3e')+("\x3cdiv height\x3d'33'  id\x3d'"+b+A_b.la+"latitude' class\x3d\""+g+"\"\x3e\x3cimg src\x3d'"+p+"' style\x3d'margin-top:1px;margin-right:4px;vertical-align:text-top'/\x3e"+f+"\x26nbsp;-000.0000\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x3c/div\x3e\x3c/td\x3e"),d=d+('\x3ctd class\x3d"'+n+"\"\x3e\x3cdiv height\x3d'33'\x3e\x3cimg src\x3d'"+q+"' align\x3d'top'/\x3e\x3c/div\x3e\x3c/td\x3e"),d=d+('\x3ctd class\x3d"'+n+'"\x3e'),d=d+("\x3cdiv height\x3d'33' id\x3d'"+b+
A_b.la+"longitude' class\x3d\""+h+'"\x3e'+e+"\x26nbsp;-000.0000\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x3c/div\x3e\x3c/td\x3e"),d=d+("\x3ctd\x3e\x3ctable id\x3d'"+b+A_b.la+"longlatEnd'  cellspacing\x3d'0' cellpadding\x3d'0' style\x3d'display:none;'\x3e"),d=d+('\x3ctr\x3e\x3ctd\x3e\x3cdiv class\x3d"'+m+'"\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e'),d=d+"\x3c/table\x3e\x3c/td\x3e",d=d+("\x3ctd\x3e\x3ctable id\x3d'"+b+A_b.la+"longlatConnector' cellpadding\x3d0 cellspacing\x3d0 align\x3d'left' valign\x3d'center' style\x3d\"display:none\"\x3e"),
d=d+('\x3ctr\x3e\x3ctd class\x3d"'+n+'"\x3e\x3cdiv\x3e\x26nbsp\x26nbsp\x3c/div\x3e\x3c/td\x3e'),d=d+('\x3ctd class\x3d"'+n+"\"\x3e\x3cdiv height\x3d'33'\x3e\x3cimg src\x3d\""+q+"\" align\x3d'top'/\x3e\x3c/div\x3e\x3c/td\x3e"),d=d+('\x3ctd class\x3d"'+n+'"\x3e\x3cdiv\x3e\x26nbsp\x26nbsp\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e'),d=d+"\x3c/table\x3e\x3c/td\x3e",d=d+"\x3c/tr\x3e\x3c/table\x3e\x3c/td\x3e"}e=c.getAttribute("distAreaPanelStyleClass");d+="\x3ctd align\x3dleft valign\x3dcenter nowrap\x3e\x3ctable cellspacing\x3d'0' cellpadding\x3d'0'\x3e\x3ctr\x3e";
d+="\x3ctd\x3e\x3ctable id\x3d'"+b+A_b.la+"distanceAreaStart' cellpadding\x3d0 cellspacing\x3d0 align\x3d'left' valign\x3d'center' width\x3d'100%' style\x3d\"display:none\"\x3e";d+='\x3ctr\x3e\x3ctd\x3e\x3cdiv class\x3d"'+l+'"\x3e\x3c/div\x3e\x3c/td\x3e';d+="\x3c/tr\x3e\x3c/table\x3e\x3c/td\x3e";d+='\x3ctd class\x3d"'+n+"\"\x3e\x3cdiv align\x3d'top' height\x3d'33' id\x3d'"+b+A_b.la+"distanceArea' class\x3d\""+e+'" \x3e';d+="\x3c/div\x3e\x3c/td\x3e";d+="\x3ctd\x3e\x3ctable id\x3d'"+b+A_b.la+"distanceAreaEnd'  width\x3d'5' border\x3d'0' cellspacing\x3d'0' cellpadding\x3d'0' style\x3d'display:none'\x3e";
d+='\x3ctr\x3e\x3ctd\x3e\x3cdiv class\x3d"'+m+'"\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e';d+="\x3c/table\x3e\x3c/td\x3e";d+="\x3c/tr\x3e\x3c/table\x3e\x3c/td\x3e\x3c/tr\x3e";d+="\x3c/table\x3e";b=new MVMapDecoration(d,0,1,0,0);b.enableEventPropagation(!0);null!=c.getAttribute("isShowScaleBar")?b.setOffset(5,-74):b.setOffset(5,-34);a.i.addMapDecoration(b)}
function A_ta(a){var b=a.getClientId(),b=document.getElementById(AdfRichUIPeer.CreateSubId(b,"mapStyle")).getAttribute("navigatorPosition");null==a.Ic&&null!=b&&(a.Ic="EAST"==b?new MVMapDecoration(new MVNavigationPanel(8,!0,!0,!1),1,0,null,null,-60,10):new MVMapDecoration(new MVNavigationPanel(8,!0,!0,!1),0,0,null,null,10,10),a.i.addMapDecoration(a.Ic));null!=b&&a.Ic.setVisible(!0)}function A_c(a){a=a.getClientId();return document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapStyle"))}
function A_ya(a){A_c(a).getAttribute("contextPath")}AdfDhtmlGeoMap.prototype.ry=function(){var a=this.na;"rectSelection"==a?(a=this.Sb,a=a.getWidth("meter")*a.getHeight("meter"),A_e(this,!0,A_b.Zb,a)):"circleSelection"==a&&(a=this.Kb.gL("meter"),A_e(this,!0,A_b.nm,a))};AdfDhtmlGeoMap.prototype._toolDrag=AdfDhtmlGeoMap.prototype.ry;AdfDhtmlGeoMap.prototype.qy=function(){var a=this.getTheme(this.lb);null!=a&&"object"==typeof a[0]&&A_ha(this)};AdfDhtmlGeoMap.prototype._toolBegin=AdfDhtmlGeoMap.prototype.qy;
function A_7a(a){var b=a.na;if("rectSelection"==b)return a.Sb.MT();if("circleSelection"==b)return a.Kb.hT();if("polygonSelection"==b)return a.pb.fL();if("pointSelection"==b)return a.i.getMouseLocation()}
function A_8a(a,b){var c=a.na;if("undefined"!=typeof b.getGeometry()&&b.getGeometry().hU()){var d=A_7a(a);if(null==d)return!1;var e=b.getGeometry().getPointX(),f=b.getGeometry().getPointY();if("rectSelection"==c)return c=d.zT(),e>=c[0]&&e<=c[2]&&f>=c[1]&&f<=c[3]?!0:!1;if("circleSelection"==c){var d=d.Js(),c=d[2],d=d[1],g=a.Kb.gL();return AdfDhtmlGeoMap.fH(e,f,c,d)<=g?!0:!1}if("polygonSelection"==c){var c=d.Js(),d=c.length,h,l,m,n,p,q,u,v=!1;if(3>d/2)e=!1;else{l=c[d-2];m=c[d-1];for(u=0;u<d;u+=2)g=
c[u],h=c[u+1],g>l?(n=l,q=g,p=m,m=h):(n=g,q=l,p=h),g<e==e<=l&&(f-p)*(q-n)<(m-p)*(e-n)&&(v=!v),l=g,m=h;e=v}return e?!0:!1}if("pointSelection"==c)return e=a.Ew,null!=e&&e.id==b.id?!0:!1}}AdfDhtmlGeoMap.prototype.Wr=function(){A_ia(this)};AdfDhtmlGeoMap.prototype._toolFinish=AdfDhtmlGeoMap.prototype.Wr;function A_9a(a,b,c,d){var e="",e=b.Cz?A_Ga(0,b,b.width,b.height,!0):b.Qz;b.TH=!0;b.setHTMLElement(e);b.reDraw();a.yn[d]=b;A_b.yh(c,b)}
function A_ia(a,b){var c=a.na;if("area"==c){var c=a.zb.fL(),d=A_ka(a.getPeer()),c=new MVFOI("__adf_areaTool_Polygon",c,d+".BLACK_LINE");a.i.addFOI(c);A_ba(a)}else if("rectSelection"==c&&3!=a.Sb.sL()||"circleSelection"==c&&3!=a.Kb.sL())A_ba(a);else{if("polygonSelection"==c)if(a.pb.kx)a.pb.kx=!1;else return;if(null!=a.lb){c=a.getTheme(a.lb);if("object"==typeof c[0]){A_ha(a);var d=0,e=[];e.selectionMode="Select";if(null!=b)A_9a(a,b,e,0);else for(var f=0;f<c.length;f++)A_8a(a,c[f])&&(A_9a(a,c[f],e,d),
d++);c=new A_ca(a,e);c.setPartial(!0);a.queueEvent(c)}else if("object"==typeof c&&(A_ha(a),d=null,null==b&&(d=A_7a(a)),null!=b||null!=d)){c=a._getThemeEntry(a.lb);e=a.i.getThemeBasedFOI(a.lb);a.Ha=new MVThemeBasedFOI("selectTheme",e.ST());a.Ha.setBringToTopOnMouseOver(!0);a.Ha.addStyle(c.selectionStyle);if(null==b)a.Ha.DU(!0),a.Ha.BU(d),a.Ha.setNSDP(c.nsdp);else{var d=A_ea(a,a.lb),e=d.getAttribute("themeName"),g=A_$a(d.innerHTML),f=d.getAttribute("locationColumn"),d=new MVNSDP("defaultNSDP");d.setTheme(e);
d.setKeyColumn(f);for(var e={},f=b.name,h="",g=g.split("\x3ctr\x3e"),l=0;l<g.length;l++)if(1<l)for(var m=g[l].split("\x3ctd\x3e"),n=0;n<m.length;n++){if(0<n){var p=m[n].split("\x3c/td\x3e")[0].split("\x3c/tr\x3e");1==n&&p==f&&(p=g[l].split("\x3c/table\x3e"),h+=p[0])}}else h+=g[l]+"\x3ctr\x3e";e.xml=h+"\x3c/table\x3e\x3c/nsdp_xml\x3e";d.setParameters(e);a.Ha.setNSDP(d)}"ColorTheme"==c.type?(a.Ha.setRenderingStyle("BUCKETCOLOR"),a.Ha.setMaxWholeImageLevel(a.kd.config.zoomLevels.length-1-2)):"BarChartTheme"==
c.type?(a.Ha.setRenderingStyle("BARSTYLE"),A_ab(a,a.lb)&&a.Ha.setMaxWholeImageLevel(a.kd.config.zoomLevels.length-1-2)):"PieChartTheme"==c.type&&(a.Ha.setRenderingStyle("PIESTYLE"),A_ab(a,a.lb)&&a.Ha.setMaxWholeImageLevel(a.kd.config.zoomLevels.length-1-2));a.Ha.WS(!1);a.i.addThemeBasedFOI(a.Ha);A_bb(a,c,a.Ha,!0);a.Ha.setEventListener("after_refresh",A_b.cy)}A_ba(a);A_e(a,!1,A_b.Zb,0)}}}
AdfDhtmlGeoMap.prototype.Ka=function(a,b){var c=AdfRichUIPeer.CreateSubId(this.getClientId(),"infoArea"),c=document.getElementById(c),d=this.getClientId()+A_b.la+"copyrightText",d=document.getElementById(d),e=this.i.getAllFOIs(),f;f=a;if(b){var g=A_c(this).getAttribute(a);AdfAgent.getAgent().getPlatform()==AdfAgent.IE_PLATFORM?f=g:(f=[],f.push("url("+g+")"),f.push("default"))}for(g=0;g<e.length;g++)"hand.cur"==a?e[g].setMouseCursorStyle("pointer"):e[g].setMouseCursorStyle(f);this.i.setMouseCursorStyle(f,
"default");this.i.setMouseCursorStyle(f,"dragging");for(g=0;g<this._themeInfoTable.length;g++)e=this.i.getThemeBasedFOI(this._themeInfoTable[g].id),null!=e&&("hand.cur"==a?e.setMouseCursorStyle("pointer"):e.setMouseCursorStyle(f));null!=c&&(c.parentNode.style.cursor=f);null!=d&&(d.style.cursor=f)};
function A_ba(a){A_ya(a);var b=A_ka(a.getPeer()),c=b+".BLACK_LINE",d=b+".NULL_STYLE";a.Ka("HANDCUR",!0);var e=a.na,f=a.createCallback(a.qy),g=a.createCallback(a.Wr),h=a.createCallback(a.ry),b=a.createCallback(a.hy),l=a.getClientId()+A_b.la+"distanceArea",m=document.getElementById(l),l=!1;null!=m&&(l="none"!=m.style.display);"hand"==e?a.Ka("HANDCUR",!0):"rectSelection"==e?(null==a.Sb&&(a.Sb=new MVRectangleTool(d),a.i.addRectangleTool(a.Sb)),a.Sb.init(),a.Sb.setDivBorderStyle("#000000",1,"dashed"),
a.Sb.setEventListener("on_start",f),a.Sb.setEventListener("on_drag",h),a.Sb.setEventListener("on_finish",g),a.Ka("HAIRCUR",!0),l||A_e(a,!0,A_b.Zb,0)):"circleSelection"==e?(null==a.Kb&&(a.Kb=new MVCircleTool(d),a.i.addCircleTool(a.Kb)),a.Kb.init(),a.Kb.setPlotDivFillColor("#000000",1),a.Kb.setEventListener("on_start",f),a.Kb.setEventListener("on_drag",h),a.Kb.setEventListener("on_finish",g),a.Ka("HAIRCUR",!0),l||A_e(a,!0,A_b.nm,0)):"polygonSelection"==e?(null==a.pb&&(a.pb=new MVRedlineTool(c,d),a.pb.setEditingMode({deletePoint:!1,
dragPoint:!1,deleteLine:!1,dragLine:!1}),a.i.addRedLineTool(a.pb),a.pb.setAutoClose(!0),a.pb.setControlPanelVisible(!1),a.pb.attachEventListener(MVEvent.iu,b),a.pb.attachEventListener(MVEvent.ZB,g)),c=A_c(a).getAttribute("POLYSTART_IMAGE_PATH"),a.pb.ut(c,11,11),a.Ka("MAKECUR",!0),a.pb.clear(),a.pb.init(),l||A_e(a,!0,A_b.Zb,0)):"zoomIn"==e?(a.Ka("ZOOMINCUR",!0),a.i.startMarqueeZoom("continuous",{borderColor:"#000000",borderWidth:1,IS:!0,fillColor:"#333333",YS:.1})):"zoomOut"==e?(a.Ka("ZOOMOUTCUR",
!0),a.i.enableDragging(!1)):"ruler"==e?(A_e(a,!0,A_b.Of,0),null==a.dc&&(a.dc=new MVRedlineTool(c,d),a.dc.setEditingMode({fK:!1,jK:!1,eK:!1,iK:!1}),c=A_c(a).getAttribute("POLYSTART_IMAGE_PATH"),a.dc.ut(c,11,11),a.dc.setControlPanelVisible(!1),a.i.addRedLineTool(a.dc),a.dc.attachEventListener(MVEvent.iu,b)),a.dc.init(),a.Ka("HAIRCUR",!0),A_e(a,!0,A_b.Of,0)):"area"==e?(null==a.zb&&(a.zb=new MVRedlineTool(c,c),a.zb.setEditingMode({fK:!1,jK:!1,eK:!1,iK:!1}),a.i.addRedLineTool(a.zb),a.zb.setAutoClose(!0),
a.zb.setControlPanelVisible(!1),a.zb.attachEventListener(MVEvent.iu,b),a.zb.attachEventListener(MVEvent.ZB,g)),a.zb.clear(),a.zb.init(),c=A_c(a).getAttribute("POLYSTART_IMAGE_PATH"),a.zb.ut(c,11,11),a.Ka("MAKECUR",!0),null==a.i.getFOI("__adf_areaTool_Polygon")&&A_e(a,!0,A_b.Zb,0)):"pointSelection"==e&&a.Ka("default")}function A_5a(a){null!=a.Ha&&(A_ha(a),a.gy())}
function A_sa(a,b){if(a.na!=b){var c=!1;if("rectSelection"==b||"circleSelection"==b||"polygonSelection"==b||"pointSelection"==b)c=!0;"rectSelection"==a.na?(c||(A_5a(a),A_ha(a)),a.Sb.clear()):"circleSelection"==a.na?(c||(A_5a(a),A_ha(a)),a.Kb.clear()):"polygonSelection"==a.na?(c||(A_5a(a),A_ha(a)),a.pb.clear()):"zoomIn"==a.na?a.i.stopMarqueeZoom():"ruler"==a.na?a.dc.clear():"area"==a.na?(a.zb.clear(),c=a.i.getFOI("__adf_areaTool_Polygon"),null!=c&&a.i.removeFOI(c)):"pointSelection"!=a.na||c||(A_5a(a),
A_ha(a));A_e(a,!1,A_b.Zb,0);a.i.enableDragging(!0);a.i.enableKeyboardPanning(!0);a.na=b;A_ba(a)}}AdfDhtmlGeoMap.prototype.getImmediate=function(){return!0};AdfDhtmlGeoMap.prototype.getTheme=function(a){var b=this.i.getThemeBasedFOI(a);return null==b?this._foiTheme[a]:b};
function A_ha(a){for(var b=a.yn,c=null,d=0;d<b.length;d++){null==c&&(c=[],c.selectionMode="Unselect");A_b.yh(c,b[d]);var e="",e=b[d].Cz?A_Ga(0,b[d],b[d].width,b[d].height,!1):b[d].originalImages;b[d]._isSelected=!1;b[d].setHTMLElement(e);b[d].reDraw()}null!=a.Ha&&(b=a.getTheme(a.lb),null!=b&&(c=A_b.Jq(b,a.Ha),c.selectionMode="Unselect",a.i.sU(a.Ha),a.Ha=null));null!=c&&(c=new A_ca(a,c),c.setPartial(!0),a.queueEvent(c))}
function A_bb(a,b,c,d){b=2*parseInt(b.themeIndex);d||--b;a.i.setThemeIndex(c,b)}AdfDhtmlGeoMap.prototype.gy=function(){for(var a=0;a<this._themeInfoTable.length;a++){var b=this._themeInfoTable[a],c=this.i.getThemeBasedFOI(b.id);null!=c&&A_bb(this,b,c)}};AdfDhtmlGeoMap.prototype._setThemeIndex=AdfDhtmlGeoMap.prototype.gy;AdfDhtmlGeoMap.prototype._getThemeEntry=function(a){for(var b=0;b<this._themeInfoTable.length;b++)if(this._themeInfoTable[b].id==a)return this._themeInfoTable[b];return null};
AdfDhtmlGeoMap.prototype._getThemeEntry=AdfDhtmlGeoMap.prototype._getThemeEntry;function A_na(a,b){return null!=a.minScale&&b<a.minScale||null!=a.maxScale&&b>a.maxScale?!1:!0}function A_pa(a,b,c){var d=b.id;b.visible=c;var e=a.i.getThemeBasedFOI(d);if(null!=e)e.setVisible(c),c&&A_bb(a,b,e);else{var f=a.Uh;for(i=0;i<f.length;i++)if(f[i].name==d){e=f[i];break}null!=e&&c&&A_bb(a,b,e)}}
AdfDhtmlGeoMap.prototype.fy=function(a,b,c,d){for(var e=this._foiTheme[a];b<c&&b<e.length;b++)if(null!=e[b].parent){if(e[b].Cz){var f=document.getElementById(e[b].getId());if(null!=f){var g=f.getElementsByTagName("img");null!=g&&0<g.length&&(g[0].parentNode.style.visibility=d?"visible":"hidden");e[b].setHTMLElement(f.innerHTML)}}e[b].setVisible(d)}c<e.length&&(b=c,c+=500,c>e.length&&(c=e.length),a=new Function("this._setPointFOIVisible('"+a+"', "+b.toString()+", "+c.toString()+", "+d.toString()+");"),
setTimeout(this.createCallback(a),1))};AdfDhtmlGeoMap.prototype._setPointFOIVisible=AdfDhtmlGeoMap.prototype.fy;function A_oa(a,b,c){var d=b.id;b.visible=c;b=a._foiTheme[d];null!=b&&0<b.length&&b[0].isVisible!=c&&a.fy(d,0,500,c)}
AdfDhtmlGeoMap.IH=function(a,b,c,d,e){c.onload=null;if(null!=a&&null!=b){var f=AdfPage.PAGE.findComponent(a);if(null!=f)for(a=f._foiTheme[b],null==d&&(d=0),null==e&&(e=a?a.length:0);d<e;d++)(new RegExp(a[d].originalImages+"$")).test(c.src)&&(a[d].setWidth(c.width),a[d].setHeight(c.height),a[d].setHTMLElement(A_Ga(0,a[d],c.width,c.height,!1)),a[d]._set||(f.i.addFOI(a[d]),a[d]._set=!0),a[d]._isGeocoded&&null!=a[d].node&&a[d].setVisible(!1))}f.Nw()};A_a("AdfDhtmlGeoMap._imageCallback",AdfDhtmlGeoMap.IH);
AdfDhtmlGeoMap.prototype.vy=function(a,b,c,d,e){if(A_b.Gh(this._themeInfoTable,a,"isImage")){var f=new Image;a="var f\x3darguments.callee;AdfDhtmlGeoMap._imageCallback('"+this.getClientId()+"', '"+a+"', f._image";null!=d&&null!=e&&(a+=", "+d.toString()+" , "+e.toString());a+=");";null!=c&&(a+=c);c=new Function(a);c._image=f;f.onload=c;f.src=b}};AdfDhtmlGeoMap.prototype._updateImageWidthHeight=AdfDhtmlGeoMap.prototype.vy;
function A_Ga(a,b,c,d,e){var f=b._inlineStyle;a=b._inlineClass;var g=b.originalImages;e&&(g=b.selectedImages);e=b._hoverHTML;var h=b._textStyle,l=b._textClass;c="background-image:url("+g+");background-repeat:no-repeat;width:"+c+"px;height:"+d+"px;";null!=f&&(";"!=f.charAt(f.length-1)&&(f+=";"),c=f+c);c="\x3cdiv style\x3d'"+c+"'";null!=a&&(c+=" class\x3d'"+a+"'");null!=e&&(c=c+(' onmouseover\x3d"'+("this.style.backgroundImage\x3d'url("+e+")';")+'"')+(" onmouseout\x3d\"this.style.backgroundImage\x3d'url("+
g+")';\""));c+="\x3e";null!=b.JI&&(c+="\x3ctable width\x3d'100%' height\x3d'100%'\x3e\x3ctr\x3e\x3ctd align\x3d'center'\x3e\x3cdiv",null!=h&&(c+=" style\x3d'"+h+"'"),null!=l&&(c+=" class\x3d'"+l+"'"),c+="\x3e"+b.JI+"\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");return c+="\x3c/div\x3e"}AdfDhtmlGeoMap.bn=function(a,b){document.getElementById(rowId).innerHTML=hoverHTML;b.US(MVEvent.MOUSE_OVER,AdfDhtmlGeoMap.bn)};A_a("AdfDhtmlGeoMap._htmlPointMouseOverListener",AdfDhtmlGeoMap.bn);
AdfDhtmlGeoMap.cx=function(a,b){document.getElementById(rowId).innerHTML=b.TH?selImageHTML:imageHTML;b.attachEventListener(MVEvent.MOUSE_OVER,AdfDhtmlGeoMap.bn)};A_a("AdfDhtmlGeoMap._htmlPointMouseOutListener",AdfDhtmlGeoMap.cx);
AdfDhtmlGeoMap.prototype.cw=function(a,b,c,d,e,f,g,h,l,m,n,p,q,u,v,x,w){var y=A_c(this).getAttribute("startSRID"),r=null,z=!A_b.Gh(this._themeInfoTable,m,"isImage"),C=A_b.Gh(this._themeInfoTable,m,"hoverBehavior"),H=d;null==e&&(e=d);z||(d="\x3cdiv\x3e\x3c/div\x3e");null==b||null==c?(r=MVFOI.createHTMLFOI(a,MVSdoGeometry.createPoint(0,0,y),d),r._isGeocoded=!0):(r=MVFOI.createHTMLFOI(a,MVSdoGeometry.createPoint(b,c,y),d),r._isGeocoded=!1);z?null!=l&&(r.setWidth(-1),r.setHeight(-1),r.attachEventListener(MVEvent.MOUSE_OVER,
AdfDhtmlGeoMap.bn),r.attachEventListener(MVEvent.MOUSE_OUT,AdfDhtmlGeoMap.cx)):(r.setWidth(0),r.setHeight(0));r.attrnames=[f,"__adf_item_Label0"];r.attrs=null==p&&null==g?null:[p,g];r.name=h;r.selectedImages=e;r.originalImages=H;r.isImage=!z;r._isSelected=!1;r._themeID=m;r._category=n;r._hoverBehavior=C;r._originalPointX=b;r._originalPointY=c;r._hoverHTML=l;r._inlineStyle=q;r._inlineClass=u;r._textStyle=v;r._textClass=x;r._rowIndex=w;"Tooltip"==C?r.setInfoTip(h):"InfoWindow"==C&&null!=p&&null!=g&&
r.setEventListener("mouse_over",A_b.wg);r.setEventListener("mouse_click",A_b.lj);r.setEventListener("mouse_right_click",A_b.lj);null==this._foiTheme[m]&&(this._foiTheme[m]=[]);this._foiTheme[m].push(r);z&&this.i.addFOI(r);return r};AdfDhtmlGeoMap.prototype._addPointFOI=AdfDhtmlGeoMap.prototype.cw;function A_ab(a,b){var c=a._getThemeEntry(b);return"ColorTheme"==c.type||("BarChartTheme"==c.type||"PieChartTheme"==c.type)&&"None"==c.leftClickBehavior&&"None"==c.rightClickBehavior?!0:!1}
function A_ea(a,b){for(var c=document.getElementById(AdfRichUIPeer.CreateSubId(a.getClientId(),"themeList")).childNodes,d=0;d<c.length;d++)if(c[d].getAttribute("themeId")==b)return c[d];return null}function A_$a(a){var b=a.indexOf("\x3cnsdp_xml\x3e"),c=a.lastIndexOf("\x3c/nsdp_xml\x3e");return a.substring(b,c+11)}
AdfDhtmlGeoMap.prototype.TF=function(a,b,c,d){if(null==this.i.getThemeBasedFOI(a)){var e=A_ea(this,a),f=A_$a(e.innerHTML),g=e.getAttribute("themeName"),h=e.getAttribute("realThemeName"),l=e.getAttribute("locationColumn"),m=this._getThemeEntry(a),h=new MVThemeBasedFOI(a,h);h.setBringToTopOnMouseOver(!0);h.setEventListener("mouse_click",A_b.lj);h.setEventListener("mouse_right_click",A_b.lj);h.setMouseCursorStyle("pointer");A_ab(this,a)&&h.setMaxWholeImageLevel(this.kd.config.zoomLevels.length-1-2);
if(null!=f&&0<=f.indexOf("nsdp_xml")){var n=new MVNSDP("defaultNSDP");n.setTheme(g);n.setKeyColumn(l);a={};a.xml=f;n.setParameters(a);h.setRenderingStyle(c);m.nsdp=n}c=null;if("ColorTheme"==m.type){c=e.getAttribute("colors").split(";");a=e.getAttribute("minValues").split(";");for(var g=e.getAttribute("maxValues").split(";"),p=e.getAttribute("opacity"),q=c.length,e=[],l=[],u=0;u<q;u++){var v="colorStyle"+u.toString();colorStyle=new MVStyleColor(v,c[u].toString(),"000000");l[u]=new MVNumericRangedBucket(parseFloat(a[u]),
parseFloat(g[u]),v,"label");colorStyle.setFillOpacity(p);e.push(colorStyle)}c=new MVBucketSeries("SCHEMA_CUSTOM");c.setBuckets(l);c=new MVBucketStyle("BUCKETCOLOR",c);e.push(c);c=A_c(this);g=a="ffff00";l=255;null!=c.getAttribute("selectionStrokeColor")&&(a=c.getAttribute("selectionStrokeColor"));null!=c.getAttribute("selectionFillColor")&&(g=c.getAttribute("selectionFillColor"));null!=c.getAttribute("selectionOpaque")&&(l=parseInt(c.getAttribute("selectionOpaque")));null!=m&&(m.selectionStyle=new MVStyleColor("BUCKETCOLOR",
g,a),m.selectionStyle.setFillOpacity(l/100),m.selectionStyle.setStrokeOpacity(255));c=e}else if("BarChartTheme"==m.type){c=e.getAttribute("barWidth");a=e.getAttribute("barHeight");g=e.getAttribute("barColors").split(";");e=e.getAttribute("showXAxis");l=[];for(p=0;p<g.length;p++)l[p]=new MVBarInfo("barStyle"+p.toString(),g[p]);p=new MVBarChartStyle("BARSTYLE",c,a,l);p.setShowXAxis(e);l=[];l.push(p);p=A_c(this);q="ffff00";null!=p.getAttribute("selectionFillColor")&&(q=p.getAttribute("selectionFillColor"));
u=[];for(p=0;p<g.length;p++)u[p]=new MVBarInfo("barStyle"+p.toString(),q);null!=m&&(m.selectionStyle=new MVBarChartStyle("BARSTYLE",c,a,u),m.selectionStyle.setShowXAxis(e));c=l}else if("PieChartTheme"==m.type){c=e.getAttribute("sliceColor").split(";");e=e.getAttribute("pieRadius");a=[];for(g=0;g<c.length;g++)a[g]=new MVPieSlice("pieStyle"+g.toString(),c[g]);g=new MVPieChartStyle("PIESTYLE",e,a);a=[];a.push(g);g=A_c(this);l="ffff00";null!=g.getAttribute("selectionFillColor")&&(l=g.getAttribute("selectionFillColor"));
p=[];for(g=0;g<c.length;g++)p[g]=new MVPieSlice("selPieStyle"+g.toString(),l);null!=m&&(m.selectionStyle=new MVPieChartStyle("PIESTYLE",e,p));c=a}if(null!=c)for(e=0;e<c.length;e++)h.addStyle(c[e]);"centerOnly"==b?h.setBoundingTheme(!0,!0):"zoom"==b&&h.setBoundingTheme(!0);h.setEventListener("after_refresh",AdfDhtmlGeoMap.my);null!=f&&h.setNSDP(n);h.enableImageCaching(!1);this.Uh.push(h);d&&(A_bb(this,m,h),this.i.addThemeBasedFOI(h))}};AdfDhtmlGeoMap.prototype._addNSDPTheme=AdfDhtmlGeoMap.prototype.TF;
function A_cb(a,b,c){if(isNaN(parseFloat(c))||0==c)return"MILES"==a.Zr?b==A_b.Zb?"0 "+A_b.sv:"0 "+A_b.av:b==A_b.Zb?"0 "+A_b.rv:"0 "+A_b.$u;if(b==A_b.Of||b==A_b.nm){if("MILES"==a.Zr){if(1609.344<=c)return msg=A_b.nd(Math.round(6.214E-4*c)),msg+" "+A_b.av;msg=A_b.nd(Math.round(3.2808*c));return msg+" "+A_b.yE}if(1E3<c)return msg=A_b.nd(Math.round(c/1E3)),msg+" "+A_b.FE;msg=A_b.nd(Math.round(c));return msg+" "+A_b.$u}if(b==A_b.Zb){if("MILES"==a.Zr){if(2589988<=c)return msg=A_b.nd(Math.round(c/2589988)),
msg+" "+A_b.sv;if(4046.8564<=c)return msg=A_b.nd(Math.round(c/4046.8564)),msg+" "+A_b.YD;msg=A_b.nd(Math.round(10.7639*c));return msg+" "+A_b.rF}if(1E6<c)return msg=A_b.nd(Math.round(c/1E6)),msg+" "+A_b.rv;msg=A_b.nd(Math.round(c));return msg+" "+A_b.sF}}
function A_e(a,b,c,d){var e=a.getClientId()+A_b.la+"distanceArea",f=a.getClientId()+A_b.la+"distanceAreaStart",g=a.getClientId()+A_b.la+"distanceAreaEnd",h=document.getElementById(e);null==h&&b&&(A_6a(a),h=document.getElementById(e));e=document.getElementById(f);g=document.getElementById(g);b?(c==A_b.Of||c==A_b.nm?imgPath=A_c(a).getAttribute("DISTANCE_IMAGE_PATH"):c==A_b.Zb&&(imgPath=A_c(a).getAttribute("AREA_IMAGE_PATH")),b="\x3cimg src\x3d'"+imgPath,b=b+"' style\x3d'margin-top:1px;margin-right:4px;vertical-align:text-top'/\x3e"+
(c+":")+("\x26nbsp;\x3cfont color\x3d'#FFFFFF'\x3e"+A_cb(a,c,d)+"\x3c/font\x3e\x26nbsp;\x26nbsp;"),null!=h&&(h.style.display="block",h.innerHTML=b.toString()),null!=e&&null!=g&&(e.style.display="block",g.style.display="block")):(null!=h&&(h.style.display="none",h.style.borderWidth="0px",h.innerHTML=""),null!=e&&null!=g&&(e.style.display="none",g.style.display="none"));A_b.Aq(a.getClientId())}
function A_wa(a){a.yn=null;a.Ha=null;a.lb=null;a.Sb=null;a.Kb=null;a.pb=null;a.dc=null;a.zb=null;a.Uh=null;a.kd=null;a.Kc=null;a.Gc=null;a._themeInfoTable=null;if(null!=a._foiTheme)for(var b=0;b<a._foiTheme.length;b++)a._foiTheme[b]=null;a._foiTheme=null};