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:A_b,superclass:AdfUIComponent});AdfDhtmlGeoMap.prototype.Gv=function(){this.Ca("CLOSECUR",A_b)};A_h("AdfDhtmlGeoMap.prototype._closePolygon",AdfDhtmlGeoMap.prototype.Gv);
AdfDhtmlGeoMap.prototype.Nw=function(){this.Ca("MAKECUR",A_b)};A_h("AdfDhtmlGeoMap.prototype._openPolygon",AdfDhtmlGeoMap.prototype.Nw);
AdfDhtmlGeoMap.prototype.tx=function(){function a(a){"ruler"==b?A_l(c,A_b,A_i.zf,a):("area"==b||"polygonSelection"==b)&&A_l(c,A_b,A_i.Qb,a)}var b=this.ga,c=this,d=A_;if("ruler"==b)d=this.Vb.Yr(),d!=A_&&2<=d.length&&MVSdoGeometry.createLineString(d,this.g.srid).kT("meter",A_b,A_,a);else if("area"==b||"polygonSelection"==b){var e=A_;"polygonSelection"==b?e=this.gb:"area"==b&&(e=this.qb,d=this.g.getFOI("__adf_areaTool_Polygon"),d!=A_&&(this.g.removeFOI(d),A_l(this,A_b,A_i.Qb,0)));d=e.Yr();A_Ja(this);
if(2==d.length){var f=A_j(this).getAttribute("POLYSEGMENT_IMAGE_PATH");e.Js(f,5,5);var e=e.AT()[0],f=this.createCallback(this.Gv),g=this.createCallback(this.Nw);e.setEventListener("mouse_over",f);e.setEventListener("mouse_out",g)}if("polygonSelection"==b&&d!=A_&&2==d.length){e=A_;if(this.xa!=A_)f=this.getTheme(this.cb),f!=A_&&(e=A_i.dq(f,this.xa),e.selectionMode="Unselect");else{g=this.Xm;for(f=0;f<g.length;f++)e==A_&&(e=[],e.selectionMode="Unselect"),A_i.jh(e,g[f])}e!=A_&&(e=new A_oa(this,e),e.setPartial(A_b),
this.queueEvent(e))}if(d!=A_&&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.g.srid).jy("sq_meter",A_b)}else this.gb!=A_&&(this.gb.yw=A_b),A_l(this,A_b,A_i.Qb,0)}};A_h("AdfDhtmlGeoMap.prototype._showDistanceArea",AdfDhtmlGeoMap.prototype.tx);
AdfDhtmlGeoMap.zx=function(){var a=AdfPage.PAGE.findComponent(this.parent._mvMapViewId),b=this.getLayerName();a._getThemeEntry(b).initStatus="Done";for(var b=A_b,c=0;c<a._themeInfoTable.length;c++)a._themeInfoTable[c].initStatus!=A_&&"Done"!=a._themeInfoTable[c].initStatus&&(b=A_c);b&&a.g.setLoadingIconVisible(A_c);this.setEventListener("after_refresh",A_)};A_h("AdfDhtmlGeoMap._themeDone",AdfDhtmlGeoMap.zx);AdfDhtmlGeoMap.lG=function(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))};
AdfDhtmlGeoMap.xv=function(a,b){var c=2,d=document.getElementById(a);d==A_||(d.childNodes==A_||d.childNodes[0]==A_||d.childNodes[0].childNodes==A_||d.childNodes[0].childNodes[0]==A_)||(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-=1),0<c?setTimeout("AdfDhtmlGeoMap._blinkPoint('"+a+"', "+c.toString()+',"'+b+'")',500):b!=A_&&setTimeout(b,500))};
AdfDhtmlGeoMap.qm=function(a,b,c,d){var e=1,f=document.getElementById(a);if(!(f==A_||f.parentNode==A_)){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)-0.2:parseFloat(g)+0.2;b?0>g&&(g=d?0:1,e-=1):1<g&&(g=d?1:0,e-=1);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)),c!=A_&&setTimeout(c,500))}};
AdfDhtmlGeoMap.Wp=function(a,b){"blink"==b?AdfDhtmlGeoMap.xv(a,A_a):"fade_in"==b?AdfDhtmlGeoMap.qm(a,A_c,A_a):"fade_out"==b?AdfDhtmlGeoMap.qm(a,A_b,A_a):"fade_in_and_blink"==b?AdfDhtmlGeoMap.qm(a,A_c,"AdfDhtmlGeoMap._blinkPoint('"+a+"', 2, 'undefined')"):"blink_and_fade_out"==b?AdfDhtmlGeoMap.xv(a,"AdfDhtmlGeoMap._fadePoint('"+a+"', true, 1, 'undefined')"):"fade_out_and_fade_in"==b&&AdfDhtmlGeoMap.qm(a,A_b,"AdfDhtmlGeoMap._fadePoint('"+a+"', false, 1, 'undefined')",A_b)};
AdfDhtmlGeoMap.prototype.gK=A_aa("g");A_h("AdfDhtmlGeoMap.prototype.getMVMapView",AdfDhtmlGeoMap.prototype.gK);AdfDhtmlGeoMap.prototype.DJ=A_aa("cb");A_h("AdfDhtmlGeoMap.prototype.getActiveTheme",AdfDhtmlGeoMap.prototype.DJ);
AdfDhtmlGeoMap.prototype.Jn=function(a){this.cb!=A_&&this.cb!=a&&(A_9a(this),"rectSelection"==this.ga?(this.Jb.clear(),A_ta(this),this.Jb.init(),this.Jb.setEventListener("on_finish",AdfDhtmlGeoMap.aS)):"circleSelection"==this.ga?(this.Cb.clear(),A_ta(this),this.Cb.init(),this.Cb.setEventListener("on_finish",AdfDhtmlGeoMap.zR)):"polygonSelection"==this.ga?(this.gb.clear(),this.gb.init(),A_ta(this)):"ruler"==this.ga?(this.Vb.clear(),A_l(this,A_b,A_i.zf,0),this.Vb.init()):"area"==this.ga?(this.qb.clear(),
A_l(this,A_b,A_i.Qb,0),this.qb.init()):"pointSelection"==this.ga&&A_ta(this),A_na(this));this.cb=a};A_h("AdfDhtmlGeoMap.prototype.setActiveTheme",AdfDhtmlGeoMap.prototype.Jn);AdfDhtmlGeoMap.prototype.mI=function(){this.an=(new Date).getTime()};A_h("AdfDhtmlGeoMap.prototype._startLogging",AdfDhtmlGeoMap.prototype.mI);AdfDhtmlGeoMap.prototype.Zv=function(){AdfLogger.LOGGER.info("Theme rendering time:  "+((new Date).getTime()-this.an))};A_h("AdfDhtmlGeoMap.prototype._endLogging",AdfDhtmlGeoMap.prototype.Zv);
function A_$a(a){var b=a.getClientId();document.getElementById(b).onmousemove=A_i.AG;var c=A_j(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(c.getAttribute("infoAreaHidden")==A_){var e=A_i.Ru+":",f=A_i.Su+":";if(8307==a.g.srid||54004==a.g.srid)e=A_i.ju+":",f=A_i.gu+":";
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_i.ea+"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'),d=d+("\x3cdiv height\x3d'33'  id\x3d'"+b+A_i.ea+"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_i.ea+"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_i.ea+"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_i.ea+"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_i.ea+"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_i.ea+"distanceArea' class\x3d\""+e+'" \x3e';d+="\x3c/div\x3e\x3c/td\x3e";d+="\x3ctd\x3e\x3ctable id\x3d'"+b+A_i.ea+"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(A_b);c.getAttribute("isShowScaleBar")!=A_?b.setOffset(5,-74):b.setOffset(5,-34);a.g.addMapDecoration(b)}
function A_Fa(a){var b=a.getClientId(),b=document.getElementById(AdfRichUIPeer.CreateSubId(b,"mapStyle")).getAttribute("navigatorPosition");a.Ac==A_&&b!=A_&&(a.Ac="EAST"==b?new MVMapDecoration(new MVNavigationPanel(8,A_b,A_b,A_c),1,0,A_,A_,-60,10):new MVMapDecoration(new MVNavigationPanel(8,A_b,A_b,A_c),0,0,A_,A_,10,10),a.g.addMapDecoration(a.Ac));b!=A_&&a.Ac.setVisible(A_b)}function A_j(a){a=a.getClientId();return document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapStyle"))}
function A_Ja(a){A_j(a).getAttribute("contextPath")}AdfDhtmlGeoMap.prototype.Ex=function(){var a=this.ga;"rectSelection"==a?(a=this.Jb,a=a.getWidth("meter")*a.getHeight("meter"),A_l(this,A_b,A_i.Qb,a)):"circleSelection"==a&&(a=this.Cb.pK("meter"),A_l(this,A_b,A_i.Ml,a))};A_h("AdfDhtmlGeoMap.prototype._toolDrag",AdfDhtmlGeoMap.prototype.Ex);AdfDhtmlGeoMap.prototype.Dx=function(){var a=this.getTheme(this.cb);a!=A_&&"object"==typeof a[0]&&A_ta(this)};A_h("AdfDhtmlGeoMap.prototype._toolBegin",AdfDhtmlGeoMap.prototype.Dx);
function A_ab(a){var b=a.ga;if("rectSelection"==b)return a.Jb.BT();if("circleSelection"==b)return a.Cb.XS();if("polygonSelection"==b)return a.gb.oK();if("pointSelection"==b)return a.g.getMouseLocation()}
function A_bb(a,b){var c=a.ga;if("undefined"!=typeof b.getGeometry()&&b.getGeometry().XT()){var d=A_ab(a);if(d==A_)return A_c;var e=b.getGeometry().getPointX(),f=b.getGeometry().getPointY();if("rectSelection"==c)return c=d.oT(),e>=c[0]&&e<=c[2]&&f>=c[1]&&f<=c[3]?A_b:A_c;if("circleSelection"==c){var d=d.Yr(),c=d[2],d=d[1],g=a.Cb.pK();return AdfDhtmlGeoMap.lG(e,f,c,d)<=g?A_b:A_c}if("polygonSelection"==c){var c=d.Yr(),d=c.length,h,l,m,n,p,q,v,u=A_c;if(3>d/2)e=A_c;else{l=c[d-2];m=c[d-1];for(v=0;v<d;v+=
2)g=c[v],h=c[v+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)&&(u=!u),l=g,m=h;e=u}return e?A_b:A_c}if("pointSelection"==c)return e=a.Pv,e!=A_&&e.id==b.id?A_b:A_c}}AdfDhtmlGeoMap.prototype.jr=function(){A_ua(this)};A_h("AdfDhtmlGeoMap.prototype._toolFinish",AdfDhtmlGeoMap.prototype.jr);function A_cb(a,b,c,d){var e="",e=b.Py?A_db(b,b.width,b.height,A_b):b.rU;b.ZG=A_b;b.setHTMLElement(e);b.reDraw();a.Xm[d]=b;A_i.jh(c,b)}
function A_ua(a,b){var c=a.ga;if("area"==c){var c=a.qb.oK(),d=A_wa(a.getPeer()),c=new MVFOI("__adf_areaTool_Polygon",c,d+".BLACK_LINE");a.g.addFOI(c);A_na(a)}else if("rectSelection"==c&&3!=a.Jb.BK()||"circleSelection"==c&&3!=a.Cb.BK())A_na(a);else{if("polygonSelection"==c)if(a.gb.yw)a.gb.yw=A_c;else return;if(a.cb!=A_){c=a.getTheme(a.cb);if("object"==typeof c[0]){A_ta(a);var d=0,e=[];e.selectionMode="Select";if(b!=A_)A_cb(a,b,e,0);else for(var f=0;f<c.length;f++)A_bb(a,c[f])&&(A_cb(a,c[f],e,d),d++);
c=new A_oa(a,e);c.setPartial(A_b);a.queueEvent(c)}else if("object"==typeof c&&(A_ta(a),d=A_,b==A_&&(d=A_ab(a)),!(b==A_&&d==A_))){c=a._getThemeEntry(a.cb);e=a.g.getThemeBasedFOI(a.cb);a.xa=new MVThemeBasedFOI("selectTheme",e.HT());a.xa.setBringToTopOnMouseOver(A_b);a.xa.addStyle(c.selectionStyle);if(b==A_)a.xa.xU(A_b),a.xa.vU(d),a.xa.setNSDP(c.nsdp);else{var d=A_qa(a,a.cb),e=d.getAttribute("themeName"),g=A_eb(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.xa.setNSDP(d)}"ColorTheme"==c.type?(a.xa.setRenderingStyle("BUCKETCOLOR"),a.xa.setMaxWholeImageLevel(a.$c.config.zoomLevels.length-1-2)):"BarChartTheme"==
c.type?(a.xa.setRenderingStyle("BARSTYLE"),A_fb(a,a.cb)&&a.xa.setMaxWholeImageLevel(a.$c.config.zoomLevels.length-1-2)):"PieChartTheme"==c.type&&(a.xa.setRenderingStyle("PIESTYLE"),A_fb(a,a.cb)&&a.xa.setMaxWholeImageLevel(a.$c.config.zoomLevels.length-1-2));a.xa.KS(A_c);a.g.addThemeBasedFOI(a.xa);A_gb(a,c,a.xa,A_b);a.xa.setEventListener("after_refresh",A_i.ox)}A_na(a);A_l(a,A_c,A_i.Qb,0)}}}
AdfDhtmlGeoMap.prototype.Ca=function(a,b){var c=AdfRichUIPeer.CreateSubId(this.getClientId(),"infoArea"),c=document.getElementById(c),d=this.getClientId()+A_i.ea+"copyrightText",d=document.getElementById(d),e=this.g.getAllFOIs(),f;f=a;if(b){var g=A_j(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.g.setMouseCursorStyle(f,
"default");this.g.setMouseCursorStyle(f,"dragging");for(g=0;g<this._themeInfoTable.length;g++)e=this.g.getThemeBasedFOI(this._themeInfoTable[g].id),e!=A_&&("hand.cur"==a?e.setMouseCursorStyle("pointer"):e.setMouseCursorStyle(f));c!=A_&&(c.parentNode.style.cursor=f);d!=A_&&(d.style.cursor=f)};
function A_na(a){A_Ja(a);var b=A_wa(a.getPeer()),c=b+".BLACK_LINE",d=b+".NULL_STYLE";a.Ca("HANDCUR",A_b);var e=a.ga,f=a.createCallback(a.Dx),g=a.createCallback(a.jr),h=a.createCallback(a.Ex),b=a.createCallback(a.tx),l=a.getClientId()+A_i.ea+"distanceArea",m=document.getElementById(l),l=A_c;m!=A_&&(l="none"!=m.style.display);"hand"==e?a.Ca("HANDCUR",A_b):"rectSelection"==e?(a.Jb==A_&&(a.Jb=new MVRectangleTool(d),a.g.addRectangleTool(a.Jb)),a.Jb.init(),a.Jb.setDivBorderStyle("#000000",1,"dashed"),a.Jb.setEventListener("on_start",
f),a.Jb.setEventListener("on_drag",h),a.Jb.setEventListener("on_finish",g),a.Ca("HAIRCUR",A_b),l||A_l(a,A_b,A_i.Qb,0)):"circleSelection"==e?(a.Cb==A_&&(a.Cb=new MVCircleTool(d),a.g.addCircleTool(a.Cb)),a.Cb.init(),a.Cb.setPlotDivFillColor("#000000",1),a.Cb.setEventListener("on_start",f),a.Cb.setEventListener("on_drag",h),a.Cb.setEventListener("on_finish",g),a.Ca("HAIRCUR",A_b),l||A_l(a,A_b,A_i.Ml,0)):"polygonSelection"==e?(a.gb==A_&&(a.gb=new MVRedlineTool(c,d),a.gb.setEditingMode({deletePoint:A_c,
dragPoint:A_c,deleteLine:A_c,dragLine:A_c}),a.g.addRedLineTool(a.gb),a.gb.setAutoClose(A_b),a.gb.setControlPanelVisible(A_c),a.gb.attachEventListener(MVEvent.wt,b),a.gb.attachEventListener(MVEvent.iB,g)),c=A_j(a).getAttribute("POLYSTART_IMAGE_PATH"),a.gb.Js(c,11,11),a.Ca("MAKECUR",A_b),a.gb.clear(),a.gb.init(),l||A_l(a,A_b,A_i.Qb,0)):"zoomIn"==e?(a.Ca("ZOOMINCUR",A_b),a.g.startMarqueeZoom("continuous",{borderColor:"#000000",borderWidth:1,pS:A_b,fillColor:"#333333",MS:0.1})):"zoomOut"==e?(a.Ca("ZOOMOUTCUR",
A_b),a.g.enableDragging(A_c)):"ruler"==e?(A_l(a,A_b,A_i.zf,0),a.Vb==A_&&(a.Vb=new MVRedlineTool(c,d),a.Vb.setEditingMode({qJ:A_c,uJ:A_c,pJ:A_c,tJ:A_c}),c=A_j(a).getAttribute("POLYSTART_IMAGE_PATH"),a.Vb.Js(c,11,11),a.Vb.setControlPanelVisible(A_c),a.g.addRedLineTool(a.Vb),a.Vb.attachEventListener(MVEvent.wt,b)),a.Vb.init(),a.Ca("HAIRCUR",A_b),A_l(a,A_b,A_i.zf,0)):"area"==e?(a.qb==A_&&(a.qb=new MVRedlineTool(c,c),a.qb.setEditingMode({qJ:A_c,uJ:A_c,pJ:A_c,tJ:A_c}),a.g.addRedLineTool(a.qb),a.qb.setAutoClose(A_b),
a.qb.setControlPanelVisible(A_c),a.qb.attachEventListener(MVEvent.wt,b),a.qb.attachEventListener(MVEvent.iB,g)),a.qb.clear(),a.qb.init(),c=A_j(a).getAttribute("POLYSTART_IMAGE_PATH"),a.qb.Js(c,11,11),a.Ca("MAKECUR",A_b),a.g.getFOI("__adf_areaTool_Polygon")==A_&&A_l(a,A_b,A_i.Qb,0)):"pointSelection"==e&&a.Ca("default")}function A_9a(a){a.xa!=A_&&(A_ta(a),a.sx())}
function A_Ea(a,b){if(a.ga!=b){var c=A_c;if("rectSelection"==b||"circleSelection"==b||"polygonSelection"==b||"pointSelection"==b)c=A_b;"rectSelection"==a.ga?(c||(A_9a(a),A_ta(a)),a.Jb.clear()):"circleSelection"==a.ga?(c||(A_9a(a),A_ta(a)),a.Cb.clear()):"polygonSelection"==a.ga?(c||(A_9a(a),A_ta(a)),a.gb.clear()):"zoomIn"==a.ga?a.g.stopMarqueeZoom():"ruler"==a.ga?a.Vb.clear():"area"==a.ga?(a.qb.clear(),c=a.g.getFOI("__adf_areaTool_Polygon"),c!=A_&&a.g.removeFOI(c)):"pointSelection"==a.ga&&!c&&(A_9a(a),
A_ta(a));A_l(a,A_c,A_i.Qb,0);a.g.enableDragging(A_b);a.g.enableKeyboardPanning(A_b);a.ga=b;A_na(a)}}AdfDhtmlGeoMap.prototype.getImmediate=A_f(A_b);AdfDhtmlGeoMap.prototype.getTheme=function(a){var b=this.g.getThemeBasedFOI(a);return b==A_?this._foiTheme[a]:b};
function A_ta(a){for(var b=a.Xm,c=A_,d=0;d<b.length;d++){c==A_&&(c=[],c.selectionMode="Unselect");A_i.jh(c,b[d]);var e="",e=b[d].Py?A_db(b[d],b[d].width,b[d].height,A_c):b[d].originalImages;b[d]._isSelected=A_c;b[d].setHTMLElement(e);b[d].reDraw()}a.xa!=A_&&(b=a.getTheme(a.cb),b!=A_&&(c=A_i.dq(b,a.xa),c.selectionMode="Unselect",a.g.kU(a.xa),a.xa=A_));c!=A_&&(c=new A_oa(a,c),c.setPartial(A_b),a.queueEvent(c));a.dS=[]}
function A_gb(a,b,c,d){b=2*parseInt(b.themeIndex);d||(b-=1);a.g.setThemeIndex(c,b)}AdfDhtmlGeoMap.prototype.sx=function(){for(var a=0;a<this._themeInfoTable.length;a++){var b=this._themeInfoTable[a],c=this.g.getThemeBasedFOI(b.id);c!=A_&&A_gb(this,b,c)}};A_h("AdfDhtmlGeoMap.prototype._setThemeIndex",AdfDhtmlGeoMap.prototype.sx);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 A_};
A_h("AdfDhtmlGeoMap.prototype._getThemeEntry",AdfDhtmlGeoMap.prototype._getThemeEntry);function A_za(a,b){return!(a.minScale!=A_&&b<a.minScale)&&!(a.maxScale!=A_&&b>a.maxScale)?A_b:A_c}function A_Ba(a,b,c){var d=b.id;b.visible=c;var e=a.g.getThemeBasedFOI(d);if(e!=A_)e.setVisible(c),c&&A_gb(a,b,e);else{var f=a.Ch;for(i=0;i<f.length;i++)if(f[i].name==d){e=f[i];break}e!=A_&&c&&A_gb(a,b,e)}}
AdfDhtmlGeoMap.prototype.rx=function(a,b,c,d){for(var e=this._foiTheme[a];b<c&&b<e.length;b++)if(e[b].parent!=A_){if(e[b].Py){var f=document.getElementById(e[b].getId());if(f!=A_){var g=f.getElementsByTagName("img");g!=A_&&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))};A_h("AdfDhtmlGeoMap.prototype._setPointFOIVisible",AdfDhtmlGeoMap.prototype.rx);function A_Aa(a,b,c){var d=b.id;b.visible=c;b=a._foiTheme[d];b!=A_&&0<b.length&&b[0].isVisible!=c&&a.rx(d,0,500,c)}
AdfDhtmlGeoMap.MG=function(a,b,c,d,e){c.onload=A_;if(a!=A_&&b!=A_){var f=AdfPage.PAGE.findComponent(a);if(f!=A_){a=f._foiTheme[b];d==A_&&(d=0);for(e==A_&&(e=a?a.length:0);d<e;d++)RegExp(a[d].originalImages+"$").test(c.src)&&(a[d].setWidth(c.width),a[d].setHeight(c.height),a[d].setHTMLElement(A_db(a[d],c.width,c.height,A_c)),a[d]._set||(f.g.addFOI(a[d]),a[d]._set=A_b),a[d]._isGeocoded&&a[d].node!=A_&&a[d].setVisible(A_c))}}f.Zv()};A_h("AdfDhtmlGeoMap._imageCallback",AdfDhtmlGeoMap.MG);
AdfDhtmlGeoMap.prototype.DI=function(a,b,c,d,e){if(A_i.ph(this._themeInfoTable,a,"isImage")){var f=new Image;a="var f\x3darguments.callee;AdfDhtmlGeoMap._imageCallback('"+this.getClientId()+"', '"+a+"', f._image";d!=A_&&e!=A_&&(a+=", "+d.toString()+" , "+e.toString());a+=");";c!=A_&&(a+=c);c=new Function(a);c._image=f;f.onload=c;f.src=b}};A_h("AdfDhtmlGeoMap.prototype._updateImageWidthHeight",AdfDhtmlGeoMap.prototype.DI);
function A_db(a,b,c,d){var e=a._inlineStyle,f=a._inlineClass,g=a.originalImages;d&&(g=a.selectedImages);d=a._hoverHTML;var h=a._textStyle,l=a._textClass;b="background-image:url("+g+");background-repeat:no-repeat;width:"+b+"px;height:"+c+"px;";e!=A_&&(";"!=e.charAt(e.length-1)&&(e+=";"),b=e+b);e="\x3cdiv style\x3d'"+b+"'";f!=A_&&(e+=" class\x3d'"+f+"'");d!=A_&&(e=e+(' onmouseover\x3d"'+("this.style.backgroundImage\x3d'url("+d+")';")+'"')+(" onmouseout\x3d\"this.style.backgroundImage\x3d'url("+g+")';\""));
e+="\x3e";a.PH!=A_&&(e+="\x3ctable width\x3d'100%' height\x3d'100%'\x3e\x3ctr\x3e\x3ctd align\x3d'center'\x3e",e+="\x3cdiv",h!=A_&&(e+=" style\x3d'"+h+"'"),l!=A_&&(e+=" class\x3d'"+l+"'"),e+="\x3e"+a.PH+"\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");return e+="\x3c/div\x3e"}AdfDhtmlGeoMap.Am=function(a,b){document.getElementById(rowId).innerHTML=hoverHTML;b.FS(MVEvent.MOUSE_OVER,AdfDhtmlGeoMap.Am)};A_h("AdfDhtmlGeoMap._htmlPointMouseOverListener",AdfDhtmlGeoMap.Am);
AdfDhtmlGeoMap.pw=function(a,b){document.getElementById(rowId).innerHTML=b.ZG?selImageHTML:imageHTML;b.attachEventListener(MVEvent.MOUSE_OVER,AdfDhtmlGeoMap.Am)};A_h("AdfDhtmlGeoMap._htmlPointMouseOutListener",AdfDhtmlGeoMap.pw);
AdfDhtmlGeoMap.prototype.$E=function(a,b,c,d,e,f,g,h,l,m,n,p,q,v,u,w,r){var x=A_j(this).getAttribute("startSRID"),s=A_,z=!A_i.ph(this._themeInfoTable,m,"isImage"),A=A_i.ph(this._themeInfoTable,m,"hoverBehavior"),G=d;e==A_&&(e=d);z||(d="\x3cdiv\x3e\x3c/div\x3e");b==A_||c==A_?(s=MVFOI.createHTMLFOI(a,MVSdoGeometry.createPoint(0,0,x),d),s._isGeocoded=A_b):(s=MVFOI.createHTMLFOI(a,MVSdoGeometry.createPoint(b,c,x),d),s._isGeocoded=A_c);z?l!=A_&&(s.setWidth(-1),s.setHeight(-1),s.attachEventListener(MVEvent.MOUSE_OVER,
AdfDhtmlGeoMap.Am),s.attachEventListener(MVEvent.MOUSE_OUT,AdfDhtmlGeoMap.pw)):(s.setWidth(0),s.setHeight(0));s.attrnames=[f,"__adf_item_Label0"];s.attrs=p==A_&&g==A_?A_:[p,g];s.name=h;s.selectedImages=e;s.originalImages=G;s.isImage=!z;s._isSelected=A_c;s._themeID=m;s._category=n;s._hoverBehavior=A;s._originalPointX=b;s._originalPointY=c;s._hoverHTML=l;s._inlineStyle=q;s._inlineClass=v;s._textStyle=u;s._textClass=w;s._rowIndex=r;"Tooltip"==A?s.setInfoTip(h):"InfoWindow"==A&&(p!=A_&&g!=A_)&&s.setEventListener("mouse_over",
A_i.hg);s.setEventListener("mouse_click",A_i.Ri);s.setEventListener("mouse_right_click",A_i.Ri);this._foiTheme[m]==A_&&(this._foiTheme[m]=[]);this._foiTheme[m].push(s);z&&this.g.addFOI(s);return s};A_h("AdfDhtmlGeoMap.prototype._addPointFOI",AdfDhtmlGeoMap.prototype.$E);function A_fb(a,b){var c=a._getThemeEntry(b);return"ColorTheme"==c.type||("BarChartTheme"==c.type||"PieChartTheme"==c.type)&&"None"==c.leftClickBehavior&&"None"==c.rightClickBehavior?A_b:A_c}
function A_qa(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 A_}function A_eb(a){var b=a.indexOf("\x3cnsdp_xml\x3e"),c=a.lastIndexOf("\x3c/nsdp_xml\x3e");return a.substring(b,c+11)}
AdfDhtmlGeoMap.prototype.ZE=function(a,b,c,d){if(this.g.getThemeBasedFOI(a)==A_){var e=A_qa(this,a),f=A_eb(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(A_b);h.setEventListener("mouse_click",A_i.Ri);h.setEventListener("mouse_right_click",A_i.Ri);h.setMouseCursorStyle("pointer");A_fb(this,a)&&h.setMaxWholeImageLevel(this.$c.config.zoomLevels.length-1-2);if(f!=
A_&&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=A_;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=[],v=0;v<q;v++){var u="colorStyle"+v.toString();colorStyle=new MVStyleColor(u,c[v].toString(),"000000");l[v]=new MVNumericRangedBucket(parseFloat(a[v]),
parseFloat(g[v]),u,"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_j(this);g=a="ffff00";l=255;c.getAttribute("selectionStrokeColor")!=A_&&(a=c.getAttribute("selectionStrokeColor"));c.getAttribute("selectionFillColor")!=A_&&(g=c.getAttribute("selectionFillColor"));c.getAttribute("selectionOpaque")!=A_&&(l=parseInt(c.getAttribute("selectionOpaque")));m!=A_&&(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_j(this);q="ffff00";p.getAttribute("selectionFillColor")!=A_&&(q=p.getAttribute("selectionFillColor"));
v=[];for(p=0;p<g.length;p++)v[p]=new MVBarInfo("barStyle"+p.toString(),q);m!=A_&&(m.selectionStyle=new MVBarChartStyle("BARSTYLE",c,a,v),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_j(this);l="ffff00";g.getAttribute("selectionFillColor")!=A_&&(l=g.getAttribute("selectionFillColor"));
p=[];for(g=0;g<c.length;g++)p[g]=new MVPieSlice("selPieStyle"+g.toString(),l);m!=A_&&(m.selectionStyle=new MVPieChartStyle("PIESTYLE",e,p));c=a}if(c!=A_)for(e=0;e<c.length;e++)h.addStyle(c[e]);"centerOnly"==b?h.setBoundingTheme(A_b,A_b):"zoom"==b&&h.setBoundingTheme(A_b);h.setEventListener("after_refresh",AdfDhtmlGeoMap.zx);f!=A_&&h.setNSDP(n);h.enableImageCaching(A_c);this.Ch.push(h);d&&(A_gb(this,m,h),this.g.addThemeBasedFOI(h))}};A_h("AdfDhtmlGeoMap.prototype._addNSDPTheme",AdfDhtmlGeoMap.prototype.ZE);
function A_hb(a,b,c){if(isNaN(parseFloat(c))||0==c)return"MILES"==a.mr?b==A_i.Qb?"0 "+A_i.Fu:"0 "+A_i.nu:b==A_i.Qb?"0 "+A_i.Eu:"0 "+A_i.mu;if(b==A_i.zf||b==A_i.Ml){if("MILES"==a.mr){if(1609.344<=c)return msg=A_i.cd(Math.round(6.214E-4*c)),msg+" "+A_i.nu;msg=A_i.cd(Math.round(3.2808*c));return msg+" "+A_i.DD}if(1E3<c)return msg=A_i.cd(Math.round(c/1E3)),msg+" "+A_i.LD;msg=A_i.cd(Math.round(c));return msg+" "+A_i.mu}if(b==A_i.Qb){if("MILES"==a.mr){if(2589988<=c)return msg=A_i.cd(Math.round(c/2589988)),
msg+" "+A_i.Fu;if(4046.8564<=c)return msg=A_i.cd(Math.round(c/4046.8564)),msg+" "+A_i.dD;msg=A_i.cd(Math.round(10.7639*c));return msg+" "+A_i.xE}if(1E6<c)return msg=A_i.cd(Math.round(c/1E6)),msg+" "+A_i.Eu;msg=A_i.cd(Math.round(c));return msg+" "+A_i.yE}}
function A_l(a,b,c,d){var e=a.getClientId()+A_i.ea+"distanceArea",f=a.getClientId()+A_i.ea+"distanceAreaStart",g=a.getClientId()+A_i.ea+"distanceAreaEnd",h=document.getElementById(e);h==A_&&b&&(A_$a(a),h=document.getElementById(e));e=document.getElementById(f);g=document.getElementById(g);b?(c==A_i.zf||c==A_i.Ml?imgPath=A_j(a).getAttribute("DISTANCE_IMAGE_PATH"):c==A_i.Qb&&(imgPath=A_j(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+":"),b+="\x26nbsp;\x3cfont color\x3d'#FFFFFF'\x3e"+A_hb(a,c,d)+"\x3c/font\x3e\x26nbsp;\x26nbsp;",h!=A_&&(h.style.display="block",h.innerHTML=b.toString()),e!=A_&&g!=A_&&(e.style.display="block",g.style.display="block")):(h!=A_&&(h.style.display="none",h.style.borderWidth="0px",h.innerHTML=""),e!=A_&&g!=A_&&(e.style.display="none",g.style.display="none"));A_i.Up(a.getClientId())}
function A_Ha(a){a.Xm=A_;a.xa=A_;a.cb=A_;a.Jb=A_;a.Cb=A_;a.gb=A_;a.Vb=A_;a.qb=A_;a.Ch=A_;a.$c=A_;a.Cc=A_;a.yc=A_;a._themeInfoTable=A_;if(a._foiTheme!=A_)for(var b=0;b<a._foiTheme.length;b++)a._foiTheme[b]=A_;a._foiTheme=A_};