AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlGeoMapPeer",!1);AdfPage.PAGE.getLookAndFeel().registerPeerConstructor("oracle.dss.adf.geoMap.GeoMap","AdfDhtmlGeoMapPeer");
function MapAJAXConnection(a,b){var c;c=window.XMLHttpRequest?new XMLHttpRequest:window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):void 0;c.onreadystatechange=function(){if(4==c.readyState)if(200==c.status)b&&b(c.responseXML,c.responseText);else{var d=[];d.push(a);d=AdfDhtmlGeoMapPeer._messageFormat(AdfDhtmlGeoMapPeer._ERROR_MSG_26017,d);AdfDhtmlGeoMapPeer._showErrorMessage(d);AdfPage.PAGE.__perfTimings(!1,!1,!1,"MapViewer Connection Failed")}};this.doGet=function(){try{c.open("GET",a,!0),
c.send(null)}catch(b){var e=[];e.push(a);e=AdfDhtmlGeoMapPeer._messageFormat(AdfDhtmlGeoMapPeer._ERROR_MSG_26017,e);AdfDhtmlGeoMapPeer._showErrorMessage(e)}};this.doPost=function(b){c.open("POST",a,!0);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.send(b)}}AdfDhtmlGeoMapPeer.NAMING_SEPARATOR=":";
AdfDhtmlGeoMapPeer._formatMessage=function(a){var b=a.toString(),c=b.indexOf("."),d=0;-1!=c&&(d=b.length-(c+1));for(var b=Math.abs(a),b=b.toFixed(d),c=1,e=0;e<AdfDhtmlGeoMapPeer.GROUP_SIZE;e++)c*=10;for(var d="",f=c;f<b&&!(f*c>=b);)f*=c;for(;1<f&&b>=f;){e=Math.floor(b/f);b-=e*f;if(0<e){var g=e.toString();if(0<d.length)for(var h=AdfDhtmlGeoMapPeer.GROUP_SIZE-g.length,e=0;e<h;e++)g="0"+g;d=d+g+AdfDhtmlGeoMapPeer.GROUP_SEPARATOR}f/=c}if(0<b){g=Math.floor(b).toString();if(0<d.length){h=AdfDhtmlGeoMapPeer.GROUP_SIZE-
g.length;for(e=0;e<h;e++)g="0"+g}d+=g}0!=b-Math.floor(b)&&(b=b.toString(),c=b.indexOf(".")+1,d+=AdfDhtmlGeoMapPeer.DECIMAL_SEPARATOR+b.substr(c));0>a&&(d="-"+d);return d};AdfDhtmlGeoMapPeer._showErrorMessage=function(a){AdfPage.PAGE.clearAllMessages();AdfPage.PAGE.addMessage(null,new AdfFacesMessage(AdfFacesMessage.TYPE_ERROR,"Error",a));AdfPage.PAGE.showMessages()};
AdfDhtmlGeoMapPeer._messageFormat=function(a,b){var c=a;if(0==b)return c;for(var d=0;d<b.length;d++)c=c.replace("{"+d.toString()+"}",b[0]);return c};AdfDhtmlGeoMapPeer._updateLegendValue=function(a){var b=a.getSource();if(null!=b.getProperty("themeIds")){var b=b.getProperty("themeIds").split(" "),c=parseInt(a.getNewValue());a=parseInt(a.getOldValue());c=b[c];b=document.getElementById(b[a]);a=document.getElementById(c);null!=a&&(a.style.display="block");null!=b&&(b.style.display="none")}};
AdfDhtmlGeoMapPeer._parseThemeStyleResponse=function(a,b,c,d){var e=c.getElementsByTagName("theme_style");c=null;a.onerror=null;for(var f=0;f<e.length;f++)if("true"==e[f].getAttribute("render")){c=e[f].getAttribute("name");break}null!=c&&(b=d+"?xml_request\x3d"+('\x3cmap_request datasource \x3d "'+b+'" format\x3d"PNG_STREAM"\x3e'),b+='\x3clegend profile\x3d"MEDIUM" position\x3d"SOUTH_EAST"\x3e',b+="\x3ccolumn\x3e",b+='\x3centry style\x3d"'+c+'" tab\x3d"1" /\x3e',b+="\x3c/column\x3e",b+="\x3c/legend\x3e",
b+="\x3c/map_request\x3e",a.src=b)};
AdfDhtmlGeoMapPeer._getThemeLegendImage=function(a,b,c,d,e,f){d='\x3c?xml version\x3d"1.0" standalone\x3d"yes"?\x3e\x3cnon_map_request\x3e'+('\x3clist_theme_styles data_source\x3d"'+c+'" theme\x3d"'+d+'"/\x3e');d+="\x3c/non_map_request\x3e";d=encodeURI(d);e+="/omserver";b=AdfPage.PAGE.findComponent(b)._getStyleElement().getAttribute("proxyPath");(new MapAJAXConnection(b,function(b,d){AdfDhtmlGeoMapPeer._parseThemeStyleResponse(a,c,b,e)})).doPost("rtarget\x3d"+e+"\x26xml_request\x3d"+d)};
AdfDhtmlGeoMapPeer._convertThemeToArray=function(a,b){var c=[];if(null!=a.getFOIData())for(i=0;i<a.getFOIData().length;i++)c[a.getFOIData()[i].id]=a.getFOIData()[i];var d=[];d.selectionMode="Select";if(null!=b.getFOIData())for(i=0;i<b.getFOIData().length;i++){var e=c[b.getFOIData()[i].id];null!=b.getFOIData()[i].name&&(null!=e?AdfDhtmlGeoMapPeer._addFOIPropertyToArray(d,e):(d.push(b.getFOIData()[i].name),d.push("")))}return d};
AdfDhtmlGeoMapPeer._selectThemeRefresh=function(){var a=AdfPage.PAGE.findComponent(this.parent._mvMapViewId),b=a.getTheme(a.getActiveTheme()),b=AdfDhtmlGeoMapPeer._convertThemeToArray(b,this);a._initMapTool();b=new AdfMapSelectEvent(a,b);b.setPartial(!0);a.queueEvent(b);this.setEventListener("after_refresh",null)};
AdfDhtmlGeoMapPeer._getFOIFromTheme=function(a,b,c){for(var d=null,e=0;e<a._themeBasedFOIs.length;e++)if(a._themeBasedFOIs[e].getLayerName()==b){d=a._themeBasedFOIs[e];break}a=d.getFOIData();for(e=0;e<a.length;e++)if(a[e].id==c)return a[e];return null};AdfDhtmlGeoMapPeer._fixHexString=function(a){return 1==a.length?"0"+a:a};
AdfDhtmlGeoMapPeer._getBorderColor=function(a){var b=Math.floor(0.6*parseInt(a.substr(1,2),16)),c=Math.floor(0.6*parseInt(a.substr(3,2),16));a=Math.floor(0.6*parseInt(a.substr(5,2),16));return"#"+AdfDhtmlGeoMapPeer._fixHexString(b.toString(16))+AdfDhtmlGeoMapPeer._fixHexString(c.toString(16))+AdfDhtmlGeoMapPeer._fixHexString(a.toString(16))};
AdfDhtmlGeoMapPeer._isInfoWindowEvent=function(a){if(null!=a.relatedTarget){a=a.relatedTarget;for(var b=!1;null!=a;){if(null!=a.id&&"string"==typeof a&&0<=a.id.indexOf("mvinfodiv")){b=!0;break}a=a.parentNode}if(b)return!0}return!1};
AdfDhtmlGeoMapPeer._attachHandler=function(a,b,c){AdfDhtmlGeoMapPeer._isInfoWindowEvent(c)||("mouseover"==c.type&&AdfDhtmlGeoMapPeer._showInfoWindow(b.getGeometry(),b,c),b.setEventListener("mouse_over",AdfDhtmlGeoMapPeer._showInfoWindow),b.setEventListener("mouse_out",null))};
AdfDhtmlGeoMapPeer._showInfoWindow=function(a,b,c,d,e,f){null==d&&(d=AdfPage.PAGE.findComponent(b.parent._mvMapViewId));d.getMVMapView().removeInfoWindow();var g=null,h=null;if(null!=b._themeID)g=b._themeID,h=b.getId(),h=h.substring(g.length+1);else{var g=f,l=b.attrnames;if(null!=l)for(i=0;i<l.length;i++)if("__adf_rowId"==l[i]){h=b.attrs[i];break}}if("hand"==d.getMapTool())if(AdfDhtmlGeoMapPeer._findThemeInfo(d._themeInfoTable,g,"hasCallback")&&null==e)b=new AdfMapInfoWindowEvent(d,h,g,b.getId()),
b.setPartial(!0),d.queueEvent(b);else{e="\x3ctable cellspacing\x3d'0' cellpadding\x3d'0' class\x3d'"+d._getStyleElement().getAttribute("infoWindowTableClass")+"'";AdfAgent.getAgent().getPlatform()==AdfAgent.IE_PLATFORM&&(e+=" style\x3d'word-break:break-all'");e+"\x3e";var l=b.attrnames,m=b.attrs;if(null!=m){null!=c&&("mouseover"==c.type&&null!=b._themeID)&&b.setEventListener("mouse_over",AdfDhtmlGeoMapPeer._attachHandler);var n=[],p=[];f=b.name;if(null!=l)for(i=0;i<l.length;i++)"__adf_Location"!=
l[i]&&"__adf_rowId"!=l[i]&&"__adf_location_label"!=l[i]&&0!=l[i].indexOf("__adf_item_Label")?0==l[i].indexOf("__adf_empty_Label")?n.push("\x26nbsp;"):n.push(l[i]):0==l[i].indexOf("__adf_item_Label")?p.push(m[i]):0==l[i].indexOf("__adf_location_label")&&(f=m[i]);var q=null,r=null;null==h?(q=l,r=m):(q=n,r=p);l=d._getThemeDefinitionElement(g);g=null;m=l.getAttribute("themeType");h=AdfPage.PAGE.getLocaleContext().isRightToLeft();if(null!=m&&("BarChartTheme"==m||"PieChartTheme"==m))n=l.getAttribute("shortLabel"),
null!=n&&(e=e+("\x3ctr\x3e\x3ctd colspan\x3d3\x3e\x3cb\x3e"+n+"\x3c/b\x3e\x3c/td\x3e\x3c/tr\x3e")+"\x3ctr\x3e\x3ctd colspan\x3d3 height\x3d'5'\x3e\x3c/td\x3e\x3c/tr\x3e"),"BarChartTheme"==m?g=l.getAttribute("barColors").split(";"):"PieChartTheme"==m&&(g=l.getAttribute("sliceColor").split(";"));for(i=0;i<q.length;i++){l=q[i];if("undefined"==typeof l||null==l)l="\x26nbsp;";0<i&&(e+="\x3ctr\x3e\x3ctd colspan\x3d'3' height\x3d'5'\x3e\x3c/td\x3e\x3c/tr\x3e");e+="\x3ctr\x3e";null!=g&&(borderColor=AdfDhtmlGeoMapPeer._getBorderColor(g[i]),
m="margin-right:",h&&(m="margin-left:"),e+="\x3ctd style\x3d'width:12px'\x3e\x3cdiv style\x3d'width:10px;height:10px;"+m+"3px;background-color:"+g[i]+";border:1px solid "+borderColor+"'\x3e\x26nbsp;\x3c/div\x3e\x3c/td\x3e");m="padding-left:";h&&(m="padding-right:");e+="\x3ctd nowrap\x3e\x3cspan style\x3d'color:#534741;'\x3e"+l+"\x3c/span\x3e\x3c/td\x3e\x3ctd\x3e\x3cspan style\x3d'"+m+"8px'\x3e"+r[i]+"\x3c/span\x3e\x3c/td\x3e\x3c/tr\x3e"}e+="\x3c/table\x3e";null!=c&&("mouseover"==c.type&&null!=b._themeID)&&
(a=b.getGeometry(),b.setEventListener("mouse_out",AdfDhtmlGeoMapPeer._attachHandler));b="\x3cdiv class\x3d'"+d._getStyleElement().getAttribute("infoWindowTitleClass")+"'";AdfAgent.getAgent().getPlatform()==AdfAgent.IE_PLATFORM&&(b+=" style\x3d'text-wrap:none'");d.getMVMapView().displayInfoWindow(a,e,null,null,null,b+("\x3e"+f+"\x3c/div\x3e"))}}};AdfDhtmlGeoMapPeer._getThemeInfoIndex=function(a,b){for(var c=0;c<a.length;c++)if(a[c].id==b)return c;return-1};
AdfDhtmlGeoMapPeer._findThemeInfo=function(a,b,c){for(var d=0;d<a.length;d++)if(a[d].id==b&&null!=a[d][c])return!0;return!1};AdfDhtmlGeoMapPeer._getThemeInfoValue=function(a,b,c){for(var d=0;d<a.length;d++)if(a[d].id==b&&null!=a[d][c])return a[d][c];return null};
AdfDhtmlGeoMapPeer._addFOIPropertyToArray=function(a,b){if(null!=b._themeID)themeId=b._themeID,h=b.id,h=h.substring(themeId.length+1),a.push(b.name),a.push(h),a.push(b.getGeometry().getPointX()),a.push(b.getGeometry().getPointY()),a.push(b._category),a.push(b.attrnames[0]),null==b.attrs?(a.push(""),a.push("")):(a.push(b.attrs[0]),a.push(b.attrs[1]));else{var c=b.attrnames,d=b.attrs,e=[],f=[],g=[],h=null,l=null,m=null;if(null!=c)for(j=0;j<c.length;j++)"__adf_Location"!=c[j]&&"__adf_rowId"!=c[j]&&"__adf_location_label"!=
c[j]&&0!=c[j].indexOf("__adf_item_Label")?(e.push(c[j]),null==d||null==d[j]?g.push(""):g.push(d[j])):0==c[j].indexOf("__adf_item_Label")?f.push(d[j]):"__adf_rowId"==c[j]?h=d[j]:"__adf_Location"==c[j]?l=null==d||null==d[j]?"":d[j]:"__adf_location_label"==c[j]&&(m=null==d||null==d[j]?"":d[j]);if(null!=h){a.push(l);a.push(h);a.push(m);a.push(e.length);for(j=0;j<e.length;j++)a.push(e[j]),a.push(g[j]),a.push(f[j])}else if(a.push(b.name),a.push(b.id),null==c)a.push("0");else{a.push(c.length);for(j=0;j<
c.length;j++)a.push(c[j]),null==d||null==d[j]?a.push(""):a.push(d[j])}}};
AdfDhtmlGeoMapPeer._FOIClick=function(a,b,c){var d=AdfPage.PAGE.findComponent(this.parent._mvMapViewId),e=d.getMapTool(),f=null,f="undefined"==typeof this.getLayerName?this._themeID:this.getLayerName(),g=null;"hand"==e?g="click":"pointSelection"==e&&(g="selection");var h=e=null,l="left";c.pageX?(0==c.button?l="left":2==c.button&&(l="right"),e=c.pageX,h=c.pageY):(1==c.button?l="left":0==c.button&&(l="right"),e=c.clientX,h=c.clientY);d.getPeer()._clickFOI(b,a,g,f,e,h,c,l)};
AdfDhtmlGeoMapPeer.prototype._clickFOI=function(a,b,c,d,e,f,g,h){var l=this.getComponent(),m=l.getClientId();l.getMVMapView().removeInfoWindow();"click"==c?(l._currentFOI=a,l._currentFOITheme=d,"left"==h?(c=AdfDhtmlGeoMapPeer._getThemeInfoValue(l._themeInfoTable,d,"leftClickBehavior"),m=m+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"myPopup",m=AdfPage.PAGE.findComponent(m),null!=m&&m.hide(),"FireEvent"==c?(g=[],AdfDhtmlGeoMapPeer._addFOIPropertyToArray(g,a),a=new AdfMapClickActionEvent(l,g,d,a.id,"left",
e,f,b),a.setPartial(!0),l.queueEvent(a)):"LaunchPopup"==c?(l=[],l[AdfDhtmlCommonUtils.MOUSEPOSITION]={x:e,y:f},m.show(l)):"LaunchInfoWindow"==c&&AdfDhtmlGeoMapPeer._showInfoWindow(b,a,g,l,null,d)):"right"==h&&(g=AdfDhtmlGeoMapPeer._getThemeInfoValue(l._themeInfoTable,d,"rightClickBehavior"),m=m+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"rtPopup",m=AdfPage.PAGE.findComponent(m),null!=m&&m.hide(),"FireEvent"==g?(g=[],AdfDhtmlGeoMapPeer._addFOIPropertyToArray(g,a),a=new AdfMapClickActionEvent(l,g,d,a.id,"right",
e,f,b),a.setPartial(!0),l.queueEvent(a)):"LaunchPopup"==g&&(l=[],l[AdfDhtmlCommonUtils.MOUSEPOSITION]={x:e,y:f},m.show(l)))):"selection"==c&&(l._currentFOI=a,e=null,null!=l.getActiveTheme()&&(null!=l._selectTheme&&null==l._selectTheme.getFilteringGeom()&&(f=l._selectTheme.getFOIData(),null!=f&&0<f.length&&(e=f[0])),l.getActiveTheme()==d&&(l._clearSelection(),null!=e&&null!=a&&e.name==a.name||l._toolFinishCallback(a))))};
AdfDhtmlGeoMapPeer._handleMouseMove=function(a){var b=a;b||(b=window.event);var c=this.id;if(null!=c){var d=AdfPage.PAGE.findComponent(c);if(!(null==d||null==d.getMVMapView()))if(a=document.getElementById(c+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"latitude"),c=document.getElementById(c+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"longitude"),!(null==a||null==c))if(!("none"==a.style.display||"none"==c.style.display)){var e=new Date;if(!(null!=a._curMinute&&null!=a._curSecond&&null!=a._curMilliSeconds)||!(a._curMinute==
e.getMinutes()&&a._curSecond==e.getSeconds()&&200>e.getMilliseconds()-a._curMilliSeconds)){var f=d.getMVMapView().srid,g=MVUtil.getMouseLocation(d.getMVMapView(),b);g.srid=f;54004==f&&(a._curMinute=e.getMinutes(),a._curSecond=e.getSeconds(),a._curMilliSeconds=e.getMilliseconds(),g=d.getMVMapView().transformGeom(g,8307));var b=g.getPointX(),e=g.getPointY(),g=AdfDhtmlGeoMapPeer._X+":",h=AdfDhtmlGeoMapPeer._Y+":";if(8307==f||54004==f)g=AdfDhtmlGeoMapPeer._LONGITUDE+":",h=AdfDhtmlGeoMapPeer._LATITUDE+
":";d=d._getStyleElement().getAttribute("INFO_IMAGE_PATH");a.innerHTML="\x3cimg src\x3d'"+d+"' align\x3d'top' style\x3d'margin-top:1px;margin-right:4px;vertical-align:text-top'/\x3e"+h+"\x26nbsp;\x3cfont color\x3d'#FFFFFF'\x3e"+AdfDhtmlGeoMapPeer._formatMessage(e.toFixed(4))+"\x3c/font\x3e\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;";c.innerHTML=g+"\x26nbsp;\x3cfont color\x3d'#FFFFFF'\x3e"+AdfDhtmlGeoMapPeer._formatMessage(b.toFixed(4))+"\x3c/font\x3e\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;"}}}};
AdfDhtmlGeoMapPeer._generateErrorMessage=function(a,b,c){b="Unable to find a match for row ("+c+") for Theme '"+b+"':\n";a=a.childNodes[0];for(c=0;c<a.attributes.length;c++)0!=c&&(b+=", "),b+=a.attributes[c].nodeName+"\x3d"+a.attributes[c].nodeValue;return b+"\n"};
AdfDhtmlGeoMapPeer._getDomParser=function(){"undefined"==typeof DOMParser&&(DOMParser=function(){},DOMParser.prototype.parseFromString=function(a,b){if("undefined"!=typeof ActiveXObject){var c=new ActiveXObject("MSXML.DomDocument");c.loadXML(a);return c}if("undefined"!=typeof XMLHttpRequest)return c=new XMLHttpRequest,c.open("GET","data:"+(b||"application/xml")+";charset\x3dutf-8,"+encodeURIComponent(a),!1),c.overrideMimeType&&c.overrideMimeType(b),c.send(null),c.responseXML});return new DOMParser};
AdfDhtmlGeoMapPeer._getXMLHttpRequest=function(){req=!1;if(window.XMLHttpRequest&&!window.ActiveXObject)try{req=new XMLHttpRequest}catch(a){req=!1}else if(window.ActiveXObject)try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){req=!1}return req};
AdfDhtmlGeoMapPeer._parseGeocodeResponse=function(a,b,c,d,e,f,g){f=AdfDhtmlGeoMapPeer._getDomParser().parseFromString(f,"text/xml").getElementsByTagName("input_address");if(null==a)c=[],c.push(g),c=AdfDhtmlGeoMapPeer._messageFormat(AdfDhtmlGeoMapPeer._ERROR_MSG_26018,c),AdfDhtmlGeoMapPeer._showErrorMessage(c);else{g=AdfPage.PAGE.findComponent(b);var h=null,l=b=null,m=null,n=null,p=null;if(null!=g&&null!=g._foiTheme[c]){a=a.getElementsByTagName("geocode");for(var q=0;q<a.length;q++){var r=g._foiTheme[c][q],
v=a[q].getElementsByTagName("match");if(null==v||1>v.length)null==n?(n=AdfDhtmlGeoMapPeer._generateErrorMessage(f[q],c,q),p=q.toString()):(n+="\n"+AdfDhtmlGeoMapPeer._generateErrorMessage(f[q],c,q),p+=";"+q.toString()),r.parent=null;else{var u=v[0].getAttribute("match_code");if("exact"==e&&"1"!=u)null==n?(n=AdfDhtmlGeoMapPeer._generateErrorMessage(f[q],c,q),p=q.toString()):(n+="\n"+AdfDhtmlGeoMapPeer._generateErrorMessage(f[q],c,q),p+=";"+q.toString()),r.parent=null;else{u=parseFloat(v[0].getAttribute("latitude"));
if(null==b||b>u)b=u;if(null==m||m<u)m=u;v=parseFloat(v[0].getAttribute("longitude"));if(null==h||b>v)h=v;if(null==l||m<v)l=v;v=MVSdoGeometry.createPoint(v,u,8307);r.updateGeometry(v);null!=r.node&&r.setVisible(!0);r.reDraw()}}}}null!=n&&(e=new AdfGeocodeEvent(g,c,p),e.setPartial(!0),g.queueEvent(e),AdfLogger.LOGGER.logError(g,AdfLogger.SEVERE,n));for(q=0;q<g._themeInfoTable.length;q++)g._themeInfoTable[q].id==c&&(g._themeInfoTable[q].loaded=!0);"none"!=d&&(null!=h&&null!=b&&null!=l&&null!=m)&&("zoom"==
d?g.getMVMapView().zoomToRectangle(MVSdoGeometry.createRectangle(h,b,l,m,8307)):"centerOnly"==d&&(c=(h+l)/2,d=(b+m)/2,g.getMVMapView().setCenter(MVSdoGeometry.createPoint(c,d,8307))))}};
AdfDhtmlGeoMapPeer._adjustInfoWindowWidth=function(a,b){var c=a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"longitude",d=a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"latitude",e=a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"latlong",f=a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"longlatEnd",g=a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"longlatConnector",h=a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"distanceAreaStart",l=document.getElementById(a+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"distanceArea"),c=document.getElementById(c),d=document.getElementById(d),
e=document.getElementById(e),f=document.getElementById(f),g=document.getElementById(g),h=document.getElementById(h),m;null!=b?m=b:(m=document.getElementById(AdfRichUIPeer.CreateSubId(a,"actualMap")),m=parseInt(m.style.width));m-=50;var n=Math.ceil(m/3);null!=l&&null!=e&&(0<l.innerHTML.length&&"none"!=e.style.display?100>=n?(c.style.width=n.toString()+"px",d.style.width=n.toString()+"px",e.style.width=(2*n).toString()+"px",l.style.width=n.toString()+"px"):(c.style.width=AdfDhtmlGeoMapPeer._longWidth.toString()+
"px",d.style.width=AdfDhtmlGeoMapPeer._latWidth.toString()+"px",e.style.width=null,l.style.width=null,f.style.display="none",g.style.display="block",h.style.display="none"):0<l.innerHTML.length?(l.style.width=null,h.style.display="block"):"none"!=e.style.display&&(n=Math.ceil(m/2),100>=n?(c.style.width=n.toString()+"px",d.style.width=n.toString()+"px",e.style.width=m.toString()+"px"):(c.style.width=AdfDhtmlGeoMapPeer._longWidth.toString()+"px",d.style.width=AdfDhtmlGeoMapPeer._latWidth.toString()+
"px",e.style.width=null,f.style.display="block",g.style.display="none")),"none"==e.style.display&&(f.style.display="none",g.style.display="none"),0==l.innerHTML.length&&(l.style.width="0px",g.style.display="none",h.style.display="none"))};
AdfDhtmlGeoMap._selectMapType=function(a){var b=a.id.split(AdfRichUIPeer.createSubId("",""));a=b[0];var b=b[1],c=document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapStyle")),d=document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapSwitch")),e=document.getElementById(AdfRichUIPeer.CreateSubId(a,"satelliteMapSwitch")),f=document.getElementById(AdfRichUIPeer.CreateSubId(a,"hybridMapSwitch")),g=c.getAttribute("mapControlStyleClass"),c=c.getAttribute("mapControlStyleClassNotSelect");a=AdfPage.PAGE.findComponent(a);
"mapSwitch"==b?(a._baseMap.setVisible(!0),null!=a._satelliteMap&&a._satelliteMap.setVisible(!1),null!=a._hybridMap&&a._hybridMap.setVisible(!1),null!=d&&(d.className=g),null!=e&&(e.className=c),null!=f&&(f.className=c)):"satelliteMapSwitch"==b?(a._baseMap.setVisible(!1),null!=a._satelliteMap&&a._satelliteMap.setVisible(!0),null!=a._hybridMap&&a._hybridMap.setVisible(!1),null!=d&&(d.className=c),null!=e&&(e.className=g),null!=f&&(f.className=c)):"hybridMapSwitch"==b&&(a._baseMap.setVisible(!1),null!=
a._satelliteMap&&a._satelliteMap.setVisible(!0),null!=a._hybridMap&&a._hybridMap.setVisible(!0),null!=d&&(d.className=c),null!=e&&(e.className=c),null!=f&&(f.className=g))};AdfDhtmlGeoMapPeer.prototype._getDataSourceName=function(){var a=this.getDomElement().id;return document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapStyle")).getAttribute("baseMapName").split(".")[0]};AdfDhtmlGeoMapPeer.prototype._doubleClick=function(a){"hand"==AdfPage.PAGE.findComponent(this._mvMapViewId).getMapTool()&&this.zoomIn(this.getMouseLocation())};
AdfDhtmlGeoMapPeer.prototype._MapClick=function(a){var b=this._mvMapViewId,c=AdfPage.PAGE.findComponent(b);if("zoomIn"==c.getMapTool())this.zoomIn(this.getMouseLocation());else if("zoomOut"==c.getMapTool())0<this.getZoomLevel()&&this.zoomOut(this.getMouseLocation());else if("pointSelection"==c.getMapTool()){if(null==c.getActiveTheme())return;null!=c.getMVMapView().getThemeBasedFOI(c.getActiveTheme())&&(c._clearSelection(),c._toolFinish())}else"hand"==c.getMapTool()&&AdfAgent.getAgent().getPlatform();
AdfAgent.getAgent().getPlatform()!=AdfAgent.IE_PLATFORM||document.createEvent?(c=document.createEvent("MouseEvents"),c.initMouseEvent("mousedown",!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget),document.getElementById(b).dispatchEvent(c)):document.getElementById(b).fireEvent("onmousedown")};
AdfDhtmlGeoMapPeer.prototype._MapRTCancel=function(){var a=AdfPage.PAGE.findComponent(this._mvMapViewId);if("ruler"==a.getMapTool())a._displayDistanceArea(!1,AdfDhtmlGeoMapPeer._DISTANCE,0),a._measureTool.clear(),a._measureTool.init();else if("area"==a.getMapTool()){a._displayDistanceArea(!1,AdfDhtmlGeoMapPeer._AREA,0);a._areaTool.clear();var b=this.getFOI("__adf_areaTool_Polygon");null!=b&&this.removeFOI(b);a._areaTool.init()}};
AdfDhtmlGeoMapPeer.prototype._recenterListener=function(){var a=AdfPage.PAGE.findComponent(this._mvMapViewId),b=a._getStyleElement().getAttribute("startSRID"),c=this.getCenter();c.srid!=b&&(c=this.transformGeom(this.getCenter(),b));var b=c.getPointX().toString(),d=c.getPointY().toString(),c=c.srid.toString();a.setProperty("centerX",b);a.setProperty("centerY",d);a.setProperty("centerSrid",c);c=new AdfMapRecenterEvent(a,b,d,c);c.setPartial(!0);a.queueEvent(c)};
AdfDhtmlGeoMapPeer.prototype._beforeZoomListener=function(a,b){for(var c=AdfPage.PAGE.findComponent(this._mvMapViewId),d=0;d<c._themeInfoTable.length;d++){var e=c._themeInfoTable[d],f=c._isThemeVisibleinZoomLevel(e,a),g=c._isThemeVisibleinZoomLevel(e,b);e.id==c.getActiveTheme()&&!g&&c._clearSelection();f!=g&&!(null!=e.toolbarVisible&&!1==e.toolbarVisible&&g)&&("PointTheme"==e.type?(!g||e.loaded)&&c._setPointThemeVisible(e,g):(!g||e.loaded)&&c._setNSDPThemeVisible(e,g))}};
AdfDhtmlGeoMapPeer.prototype._zoomListener=function(a,b){var c=AdfPage.PAGE.findComponent(this._mvMapViewId);c.setProperty("currentZoom",b.toString());for(var d=!1,e=0;e<c._themeInfoTable.length;e++){var f=c._themeInfoTable[e];if(!f.loaded){var g=c._isThemeVisibleinZoomLevel(f,a),f=c._isThemeVisibleinZoomLevel(f,b);if(g!=f){d=!0;break}}}d&&c.getMVMapView().setLoadingIconVisible(!0);d=new AdfMapScaleChangeEvent(c,a.toString(),b.toString());d.setPartial(!0);c.queueEvent(d)};
AdfDhtmlGeoMapPeer.prototype._simulateMouseOnFOI=function(a,b){if(a&&null!=a.id){var c=document.getElementById(a.id);if(null!=c&&null!=c.firstChild&&null!=c.firstChild.firstChild)if("mouseout"==b&&null!=c.firstChild.firstChild.onmouseout)c.firstChild.firstChild.onmouseout();else if("mouseover"==b&&null!=c.firstChild.firstChild.onmouseover)c.firstChild.firstChild.onmouseover()}};
AdfDhtmlGeoMapPeer.prototype.HandleComponentKeyDown=function(a){var b=a.getNativeEvent(),c=b.keyCode,d=this.getComponent(),e=d.getClientId(),f=[];f[0]=AdfRichUIPeer.CreateSubId(e,"mapSwitch");f[1]=AdfRichUIPeer.CreateSubId(e,"satelliteMapSwitch");f[2]=AdfRichUIPeer.CreateSubId(e,"hybridMapSwitch");e=d._focusThemeId;null==e&&(null!=d._themeInfoTable&&0<d._themeInfoTable.length)&&(e=d._themeInfoTable[0].id,d._focusThemeId=e,d._focusFOIIndex=0);var g=null,h=-1;null!=e&&(g=d._getFOIArray(e),h=AdfDhtmlGeoMapPeer._getThemeInfoIndex(d._themeInfoTable,
e));var l=d._focusFOIIndex;l||(l=0);var m=AdfAgent.AGENT.isSelectionToggle(b);if(c==AdfKeyStroke.ARROWLEFT_KEY&&m&&null!=g)this._simulateMouseOnFOI(g[l],"mouseout"),l--,0>l&&(l=g.length-1),this._simulateMouseOnFOI(g[l],"mouseover");else if(c==AdfKeyStroke.ARROWRIGHT_KEY&&m&&null!=g)this._simulateMouseOnFOI(g[l],"mouseout"),l++,l>=g.length&&(l=0),this._simulateMouseOnFOI(g[l],"mouseover");else if(221==c)a=h-1,0>a&&(a=d._themeInfoTable.length-1),0<=a&&d._themeInfoTable[a]&&(e=d._themeInfoTable[a].id,
l=0);else if(219==c)a=h+1,a>=d._themeInfoTable.length&&(a=0),0<=a&&d._themeInfoTable[a]&&(e=d._themeInfoTable[a].id,l=0);else if(c==AdfKeyStroke.ENTER_KEY)if(null!=d._focusMapIndex){c=document.getElementById(f[d._focusMapIndex]);if(null!=c)c.onmousedown();a.stopBubbling();a.cancel();b.stopPropagation()}else null!=g&&null!=e&&(a=g[l],f=MVSdoGeometry.createPoint(a.x,a.y,d.getMVMapView().srid),this._clickFOI(a,f,"click",e,a.x,a.y,null,"left"));else if(c==AdfKeyStroke.SPACE_KEY&&m&&null!=g&&null!=e)a=
g[l],f=MVSdoGeometry.createPoint(a.x,a.y,d.getMVMapView().srid),this._clickFOI(a,f,"selection",e,a.x,a.y,null,"left");else if(c==AdfKeyStroke.TAB_KEY){c=null;g=0;if(null==d._focusMapIndex)c=document.getElementById(f[0]);else{g=d._focusMapIndex;h=document.getElementById(f[g]);if(null!=h)h.onblur();if(b.shiftKey){g--;for(b=g;0<=b&&null==c;b--)c=document.getElementById(f[b]),g=b}else{g++;for(b=g;3>b&&null==c;b++)c=document.getElementById(f[b]),g=b}}null!=c?(d._focusMapIndex=g,c.onfocus(),a.stopBubbling(),
a.cancel()):d._focusMapIndex=null}else c==AdfKeyStroke.ESC_KEY?d.getMVMapView().removeInfoWindow():79==c&&null!=d._overviewMap&&(d._overviewMap.isCollapsed()?d._overviewMap.minimizedIcon.parentNode.click():d._overviewMap.collapse());d._focusThemeId=e;d._focusFOIIndex=l};
AdfDhtmlGeoMapPeer.InitSubclass=function(){AdfObject.ensureClassInitialization(AdfDhtmlGeoMapPeer);AdfRichUIPeer.addSuppressedPPRAttributes(this,"centerX");AdfRichUIPeer.addSuppressedPPRAttributes(this,"centerY");AdfRichUIPeer.addSuppressedPPRAttributes(this,"currentZoom");AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE)};AdfDhtmlGeoMapPeer.prototype.needsResizeNotify=function(a){return!0};
AdfDhtmlGeoMapPeer.prototype._createMapViewCallback=function(a,b){var c=this.getClientId(),d=document.getElementById(AdfRichUIPeer.CreateSubId(c,"mapStyle"));if(null!=b&&0<b.length){AdfPage.PAGE.__perfTimings(!1,!1,!1,"MapViewer Connection OK");var e=document.getElementById(AdfRichUIPeer.CreateSubId(c,"Data")),f=this.getPeer();AdfPage.PAGE.__perfTimings(!1,!1,!1,"Before GeoMap Render: "+c);f._initMapView(e,d);c=this._mapTool;this._mapTool="";this.setMapTool(c)}else c=d.getAttribute("mapServerURL"),
d=[],d.push(c),c=AdfDhtmlGeoMapPeer._messageFormat(AdfDhtmlGeoMapPeer._ERROR_MSG_26017,d),AdfDhtmlGeoMapPeer._showErrorMessage(c),AdfPage.PAGE.__perfTimings(!1,!1,!1,"MapViewer Connection Failed")};
AdfDhtmlGeoMapPeer.prototype._checkConnectionAndRunMapViewer=function(){var a=this._component.getClientId(),b=document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapStyle"));b.getAttribute("contextPath");a=b.getAttribute("proxyPath");b=b.getAttribute("mapServerURL");if(null!=b){var b="rtarget\x3d"+b+"/omserver\x26getv\x3dt",c=this._component.createCallback(this._createMapViewCallback),a=new MapAJAXConnection(a,c);AdfPage.PAGE.__perfTimings(!1,!1,!1,"Sending MapViewer Ajax request ...");a.doPost(b)}};
AdfDhtmlGeoMapPeer.prototype.ResizeNotify=function(a,b,c,d){a=this._component.getClientId();null!=c&&null!=d&&(b=document.getElementById(AdfRichUIPeer.CreateSubId(a,"actualMap")),null!=b&&(b.style.width=c.toString()+"px",b.style.height=d.toString()+"px",null!=this._component._mapview&&AdfDhtmlGeoMapPeer._adjustInfoWindowWidth(a)));null==this._component._mapview&&(c=AdfPage.PAGE.isStreamingRequestPending(a),this._component._isPending=c,this._isAda||this._checkConnectionAndRunMapViewer())};
AdfDhtmlGeoMapPeer.prototype.DomReplaceNotify=function(a){var b=this._component.getClientId();if(a.id==AdfRichUIPeer.CreateSubId(b,"Data")){var c=document.getElementById(AdfRichUIPeer.CreateSubId(b,"Data")),d=document.getElementById(AdfRichUIPeer.CreateSubId(b,"mapStyle"));this._component.setProperty("centerX",d.getAttribute("centerX"));this._component.setProperty("centerY",d.getAttribute("centerY"));this._component.setProperty("currentZoom",d.getAttribute("currentZoom"));this._component.setProperty("centerSrid",
d.getAttribute("srid"));if(null!=this._component._overviewContainerId){var e=document.getElementById(this._component._overviewContainerId),f=0;null!=e&&(f=parseInt(e.style.height));20>=f?d.setAttribute("overviewMapHideInit","true"):d.removeAttribute("overviewMapHideInit")}null!=this._component._navigatorDecoration&&(this._component.getMVMapView().removeMapDecoration(this._navigatorDecoration),this._component._navigatorDecoration=null);e=AdfPage.PAGE.isStreamingRequestPending(b);this._component._isPending=
e;this._component._isPPR=!0;AdfPage.PAGE.__perfTimings(!1,!1,!1,"Before GeoMap Render: "+b);this._initMapView(c,d);b=this._component._mapTool;this._component._mapTool="";this._component.setMapTool(b);this._component._refreshZoombar()}else a.id==AdfRichUIPeer.CreateSubId(b,"hiddenLegend")&&(a.style.display="none");return a};
AdfDhtmlGeoMapPeer.prototype._initResource=function(){var a=AdfRichUIPeer.CreateSubId(this._component.getClientId(),"resource"),a=document.getElementById(a);null!=a&&(AdfDhtmlGeoMapPeer._LATITUDE=a.getAttribute("LATITUDE"),AdfDhtmlGeoMapPeer._LONGITUDE=a.getAttribute("LONGITUDE"),AdfDhtmlGeoMapPeer._X=a.getAttribute("X"),AdfDhtmlGeoMapPeer._Y=a.getAttribute("Y"),AdfDhtmlGeoMapPeer._DISTANCE=a.getAttribute("DISTANCE"),AdfDhtmlGeoMapPeer._AREA=a.getAttribute("AREA"),AdfDhtmlGeoMapPeer._RADIUS=a.getAttribute("RADIUS"),
AdfDhtmlGeoMapPeer._MILES=a.getAttribute("MILES"),AdfDhtmlGeoMapPeer._METERS=a.getAttribute("METERS"),AdfDhtmlGeoMapPeer._KILOMETERS=a.getAttribute("KILOMETERS"),AdfDhtmlGeoMapPeer._FEET=a.getAttribute("FEET"),AdfDhtmlGeoMapPeer._SQUARE_KILOMETERS=a.getAttribute("SQUARE_KILOMETERS"),AdfDhtmlGeoMapPeer._SQUARE_FEET=a.getAttribute("SQUARE_FEET"),AdfDhtmlGeoMapPeer._ACRES=a.getAttribute("ACRES"),AdfDhtmlGeoMapPeer._SQUARE_MILES=a.getAttribute("SQUARE_MILES"),AdfDhtmlGeoMapPeer._SQUARE_METERS=a.getAttribute("SQUARE_METERS"),
AdfDhtmlGeoMapPeer._MAP_VIEW=a.getAttribute("MAP_VIEW"),AdfDhtmlGeoMapPeer._SATELLITE_VIEW=a.getAttribute("SATELLITE_VIEW"),AdfDhtmlGeoMapPeer._MIXED_VIEW=a.getAttribute("MIXED_VIEW"),MVMessages.panNWInfoTip=a.getAttribute("MVMessages_panNWInfoTip"),MVMessages.panNInfoTip=a.getAttribute("MVMessages_panNInfoTip"),MVMessages.panNEInfoTip=a.getAttribute("MVMessages_panNEInfoTip"),MVMessages.panSWInfoTip=a.getAttribute("MVMessages_panSWInfoTip"),MVMessages.panSInfoTip=a.getAttribute("MVMessages_panSInfoTip"),
MVMessages.panSEInfoTip=a.getAttribute("MVMessages_panSEInfoTip"),MVMessages.panWInfoTip=a.getAttribute("MVMessages_panWInfoTip"),MVMessages.panCenterInfoTip=a.getAttribute("MVMessages_panCenterInfoTip"),MVMessages.panEInfoTip=a.getAttribute("MVMessages_panEInfoTip"),MVMessages.sliderBarInfoTip=a.getAttribute("MVMessages_sliderBarInfoTip"),MVMessages.sliderInfoTip=a.getAttribute("MVMessages_sliderInfoTip"),MVMessages.zoomInInfoTip=a.getAttribute("MVMessages_zoomInInfoTip"),MVMessages.zoomOutInfoTip=
a.getAttribute("MVMessages_zoomOutInfoTip"),AdfDhtmlGeoMapPeer.GROUP_SIZE=a.getAttribute("GROUP_SIZE"),AdfDhtmlGeoMapPeer.GROUP_SEPARATOR=a.getAttribute("GROUP_SEPARATOR"),AdfDhtmlGeoMapPeer.DECIMAL_SEPARATOR=a.getAttribute("DECIMAL_SEPARATOR"),AdfDhtmlGeoMapPeer._ERROR_MSG_26017=a.getAttribute("ERROR_MSG_26017"),AdfDhtmlGeoMapPeer._ERROR_MSG_26018=a.getAttribute("ERROR_MSG_26018"))};
AdfDhtmlGeoMapPeer.prototype.InitDomElement=function(a,b){AdfDhtmlGeoMapPeer.superclass.InitDomElement.call(this,a,b);this._component=a;this._domElement=b;this._component._mapTool="hand";this._component._overviewContainerId=null;this._component._isPPR=!1;this._initResource();this._isAda=void 0!=AdfAgent.AGENT.getAttribute(b,"_ada")};AdfDhtmlGeoMapPeer.prototype._getInitSrid=function(){var a=this._domElement.getAttribute("id"),a=document.getElementById(AdfRichUIPeer.CreateSubId(a,"mapStyle"));return parseInt(a.getAttribute("startSRID"))};
AdfDhtmlGeoMapPeer._splitCSS=function(a){a=a.split(";");for(var b={},c=0;c<a.length;c++){var d=a[c].split(":");if(null!=d&&2<=d.length){var e=d[0].replace("-","");b[e]=d[1]}}return b};AdfDhtmlGeoMapPeer.prototype._reloadNavigator=function(){var a=this._component._navigatorDecoration;null!=a&&(a.getContainerDiv().onmousemove=null,this._initResource(),this._component._mapview.removeMapDecoration(a),this._component._navigatorDecoration=null);this._component._refreshZoombar()};
AdfDhtmlGeoMapPeer.prototype._initMapView=function(a,b){MVMapView.enableXMLHTTP(!0);var c=this._component.getClientId();this._component._selectFOI=[];this._component._selectTheme=null;this._component._activeTheme=null;this._component._rectangleTool=null;this._component._circleTool=null;this._component._redlineTool=null;this._component._measureTool=null;this._component._areaTool=null;this._component._themeBasedFOIs=[];this._component._baseMap=null;this._component._satelliteMap=null;this._component._hybridMap=
null;this._component._themeInfoTable=[];this._component._foiTheme=[];if(null!=a&&null!=b){var d=b.getAttribute("mapServerURL");b.getAttribute("contextPath");var e=b.getAttribute("proxyPath"),f=e.indexOf("://");0<=f&&(e=e.substring(f+3),f=e.indexOf("/"),e=0<=f?e.substring(f):"/");this._component._mapview&&(this._component._mapview.removeAllFOIs(),this._component._mapview.destroy(),this._component._mapview=null);MVMapView.setProxyPath(e);MVMapView.enableCodingHints(!1);this._component._mapview=new MVMapView(document.getElementById(AdfRichUIPeer.CreateSubId(c,
"actualMap")),d);var d=b.getAttribute("CLOSE_IMAGE_PATH"),g=b.getAttribute("WINHEADER_IMAGE_PATH"),e=b.getAttribute("infoWindowConeStyle"),f=b.getAttribute("infoWindowBodyStyle"),g="background-image:url('"+g+"');"+b.getAttribute("infoWindowTitleBarStyle");this._component._mapview.setDefaultInfoWindowStyle("MVInfoWindowStyle1",{closeButtonImageURL:d,titleBarStyle:g,bodyStyle:f,coneStyle:e});this._component._mapview.removeAllFOIs();this._component._mapview._mvMapViewId=c;b.getAttribute("mapGeocodeServerURL");
var d=b.getAttribute("baseMapName"),e=b.getAttribute("satelliteMap"),f=b.getAttribute("hybridMap"),h=this,g=b.getAttribute("mapControlStyleClass"),l=b.getAttribute("mapControlStyleClassNotSelect"),m=b.getAttribute("mapControlStyleClassOver");this._component._baseMap=new MVBaseMap(d);this._component._baseMap.setVisible(!0);this._component._mapview.addMapTileLayer(this._component._baseMap,function(){var a=parseFloat(h._component.getProperty("centerX")),d=parseFloat(h._component.getProperty("centerY")),
e=parseInt(h._component.getProperty("currentZoom")),f=parseInt(h._component.getProperty("centerSrid")),g=parseFloat(b.getAttribute("startX")),l=parseFloat(b.getAttribute("startY")),m=parseInt(b.getAttribute("startZoom")),y=parseInt(b.getAttribute("startSRID")),g=MVSdoGeometry.createPoint(g,l,y);null==b.getAttribute("autoZoomTheme")||!h._component._isPPR?(h._component._mapview.setCenter(g),h._component._mapview.setZoomLevel(m)):(a=MVSdoGeometry.createPoint(a,d,f),h._component._mapview.setCenter(a),
h._component._mapview.setZoomLevel(e));h._component._mapview.setMouseWheelZoomEnabled(!0);h._component._mapview.setHomeMap(g,m);h._component._mapview.addEventListener("mouse_click",h._MapClick);h._component._mapview.addEventListener("mouse_double_click",h._doubleClick);h._component._mapview.addEventListener("mouse_right_click",h._MapRTCancel);h._component._mapview.addEventListener("before_zoom_level_change",h._beforeZoomListener);h._component._mapview.addEventListener("zoom_level_change",h._zoomListener);
h._component._mapview.addEventListener("recenter",h._recenterListener);h._component._unit=b.getAttribute("unit");h._component._mapview.display();e=function(a){h._reloadNavigator()};null!=b.getAttribute("navigatorPosition")&&(h._component._refreshZoombar(),h._component._navigatorDecoration.getContainerDiv()&&(h._component._navigatorDecoration.getContainerDiv().onmousemove=e));if(null!=b.getAttribute("hasTheme")){if(AdfPage.PAGE.isStreamingDisabled()||!h._component._isPending)h._component._mapview.setLoadingIconVisible(!0),
h._loadTheme(h._component,!0);h._component._isPending=null}if(null==b.getAttribute("overviewMapHidden")){a=200;null!=b.getAttribute("overviewMapWidth")&&(a=parseInt(b.getAttribute("overviewMapWidth")));d=150;null!=b.getAttribute("overviewMapHeight")&&(d=parseInt(b.getAttribute("overviewMapHeight")));e=3;null!=b.getAttribute("overviewMapDiff")&&(e=parseInt(b.getAttribute("overviewMapDiff")));m=null!=b.getAttribute("overviewMapHideInit");ovcontainer=new MVMapDecoration(null,null,null,a,d);h._component._getContextPath();
a=h._component._getStyleElement().getAttribute("HANDCUR");AdfAgent.getAgent().getPlatform()==AdfAgent.IE_PLATFORM?ovcontainer.setMouseCursorStyle(a):(cursorStyles=[],cursorStyles.push("url('"+a+"')"),cursorStyles.push("default"),ovcontainer.setMouseCursorStyle(cursorStyles));var a=b.getAttribute("overview-window-header-icon"),d=b.getAttribute("overview-window-header-active-icon"),f=b.getAttribute("overview-window-header-hover-icon"),g=b.getAttribute("overview-window-maximize-icon"),l=b.getAttribute("overview-window-maximize-active-icon"),
y=b.getAttribute("overview-window-maximize-hover-icon"),t=b.getAttribute("overview-window-minimize-icon"),A=b.getAttribute("overview-window-minimize-active-icon"),D=b.getAttribute("overview-window-minimize-hover-icon");ovcontainer.setCollapsible(!0,m,{titleBgImg:a,titleBgImgMO:f,titleBgImgMD:d,minBtnImg:g,minBtnImgMO:y,minBtnImgMD:l,resBtnImg:t,resBtnImgMO:D,resBtnImgMD:A});h._component._mapview.addMapDecoration(ovcontainer);h._component._overviewMap=ovcontainer;e=new MVOverviewMap(ovcontainer.getContainerDiv(),
e);m=b.getAttribute("overviewMapAreaStyle");m=AdfDhtmlGeoMapPeer._splitCSS(m);e.setRectangleStyle(m.border,m.backgroundcolor);h._component._overviewContainerId=ovcontainer.getContainerDiv().id;ovcontainer.getContainerDiv().className=b.getAttribute("overviewMapBodyClass");h._component._mapview.addOverviewMap(e)}e=document.getElementById(AdfRichUIPeer.CreateSubId(c,"actualMap"));mapWidth=parseInt(e.style.width);null!=b.getAttribute("isShowScaleBar")&&(e=null,e=8307!=h._component._mapview.srid?new MVScaleBar(!0):
new MVScaleBar,m=b.getAttribute("scaleBarBarStyle"),a=b.getAttribute("scaleBarTextStyle"),e.setStyle({barStyle:m,barHeight:1,textStyle:a}),e=new MVMapDecoration(e,0,1),e.setEventListener("mouse_over",new Function('this.getContainerDiv().title\x3d""')),e.enableEventPropagation(!0),e.setOffset(5,-54),h._component._mapview.addMapDecoration(e));e=b.getAttribute("copyrightStyleClass");m=b.getAttribute("copyrightText");e=new MVMapDecoration("\x3ctable width\x3d'0' border\x3d'0' cellspacing\x3d'0' cellpadding\x3d'0'\x3e\x3ctr\x3e\x3ctd nowrap class\x3d'"+
e+"'\x3e\x3cdiv id\x3d'"+c+AdfDhtmlGeoMapPeer.NAMING_SEPARATOR+"copyrightText'\x3e"+m+"\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",0,1,0,0);e.enableEventPropagation(!0);e.setOffset(5,-12);h._component._mapview.addMapDecoration(e);null==h._component._themeIsInit&&null!=h._component._initThemeFunction&&h._component._initThemeFunction();h._component._callbackIsCalled=!0;AdfPage.PAGE.__perfTimings(!0,!1,!1,"After GeoMap Render: "+c)});null!=e&&(this._component._satelliteMap=new MVBaseMap(e),this._component._satelliteMap.setVisible(!1),
this._component._mapview.addMapTileLayer(this._component._satelliteMap));null!=f&&(this._component._hybridMap=new MVBaseMap(f),this._component._hybridMap.setTransparent(!0),this._component._mapview.addMapTileLayer(this._component._hybridMap));this._addMapControl(this._component,g,l,m)}};
AdfDhtmlGeoMapPeer.prototype._getMapControlDiv=function(a,b,c,d,e,f){return"\x3cdiv id\x3d'"+a+"' class\x3d'"+b+"' onmousedown\x3d'AdfDhtmlGeoMap._selectMapType(this)' onmouseover\x3d\"if(this.className!\x3d'"+c+"') this.className\x3d'"+e+"'\"  onmouseout\x3d\"if(this.className!\x3d'"+c+"')this.className\x3d'"+d+"'\" onfocus\x3d\"if(this.className!\x3d'"+c+"') this.className\x3d'"+e+"'\"  onblur\x3d\"if(this.className!\x3d'"+c+"')this.className\x3d'"+d+"'\"\x3e"+f+"\x3c/div\x3e"};
AdfDhtmlGeoMapPeer.prototype._addMapControl=function(a,b,c,d){var e="\x3ctable\x3e\x3ctr\x3e\x3ctd nowrap\x3e"+this._getMapControlDiv(AdfRichUIPeer.CreateSubId(a.getClientId(),"mapSwitch"),b,b,c,d,AdfDhtmlGeoMapPeer._MAP_VIEW)+"\x3c/td\x3e";if(null!=a._satelliteMap||null!=a._hybridMap)null!=a._satelliteMap&&(e+="\x3ctd nowrap\x3e"+this._getMapControlDiv(AdfRichUIPeer.CreateSubId(a.getClientId(),"satelliteMapSwitch"),c,b,c,d,AdfDhtmlGeoMapPeer._SATELLITE_VIEW)+"\x3c/td\x3e"),null!=a._hybridMap&&(e+=
"\x3ctd nowrap\x3e"+this._getMapControlDiv(AdfRichUIPeer.CreateSubId(a.getClientId(),"hybridMapSwitch"),c,b,c,d,AdfDhtmlGeoMapPeer._MIXED_VIEW)+"\x3c/td\x3e"),b=new MVMapDecoration(e+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",1,0,100,20),b.setOffset(-200,5),a.getMVMapView().addMapDecoration(b)};AdfDhtmlGeoMapPeer.prototype._loadTheme=function(a,b){var c=new AdfMapThemeLoadEvent(a,b);c.setPartial(!0);a.queueEvent(c)};
AdfDhtmlGeoMapPeer.prototype._getGeocodeRequest=function(a){var b=a.getAttribute("geocodeType"),c='\x3c?xml version\x3d"1.0" standalone\x3d"yes"?\x3e\x3cgeocode_request vendor\x3d"elocation"\x3e\x3caddress_list\x3e\x3cinput_location id\x3d"1"\x3e\x3cinput_address match_mode\x3d"relax_street_type"\x3e';"1"==b?(c+="\x3cus_form1 ",a.getAttribute("name")&&(c+='name\x3d"'+a.getAttribute("name")+'" '),a.getAttribute("intersecting")&&(c+='intersecting_street\x3d"'+a.getAttribute("intersecting")+'" '),a.getAttribute("street")&&
(c+='street\x3d"'+a.getAttribute("street")+'" '),a.getAttribute("lastline")&&(c+='lastline\x3d"'+a.getAttribute("lastline")+'" ')):"2"==b?(c+="\x3cus_form2 ",a.getAttribute("name")&&(c+='name\x3d"'+a.getAttribute("name")+'" '),a.getAttribute("intersecting")&&(c+='intersecting_street\x3d"'+a.getAttribute("intersecting")+'" '),a.getAttribute("street")&&(c+='street\x3d"'+a.getAttribute("street")+'" '),a.getAttribute("city")&&(c+='city\x3d"'+a.getAttribute("city")+'" '),a.getAttribute("state")&&(c+='state\x3d"'+
a.getAttribute("state")+'" '),a.getAttribute("zipcode")&&(c+='zip_code\x3d"'+a.getAttribute("zipcode")+'" ')):"3"==b?(c+="\x3cgen_form ",a.getAttribute("name")&&(c+='name\x3d"'+a.getAttribute("name")+'" '),a.getAttribute("intersecting")&&(c+='intersecting_street\x3d"'+a.getAttribute("intersecting")+'" '),a.getAttribute("street")&&(c+='street\x3d"'+a.getAttribute("street")+'" '),a.getAttribute("subArea")&&(c+='sub_area\x3d"'+a.getAttribute("subArea")+'" '),a.getAttribute("city")&&(c+='city\x3d"'+a.getAttribute("city")+
'" '),a.getAttribute("region")&&(c+='region\x3d"'+a.getAttribute("region")+'" '),a.getAttribute("country")&&(c+='country\x3d"'+a.getAttribute("country")+'" '),a.getAttribute("postalCode")&&(c+='postal_code\x3d"'+a.getAttribute("postalCode")+'" '),a.getAttribute("postalCodeAddOn")&&(c+='postal_addon_code\x3d"'+a.getAttribute("postalCodeAddOn")+'" ')):"4"==b?(c+="\x3cgdf_form ",a.getAttribute("name")&&(c+='name\x3d"'+a.getAttribute("name")+'" '),a.getAttribute("intersecting")&&(c+='intersecting_street\x3d"'+
a.getAttribute("intersecting")+'" '),a.getAttribute("street")&&(c+='street\x3d"'+a.getAttribute("street")+'" '),a.getAttribute("builtupArea")&&(c+='builtup_area\x3d"'+a.getAttribute("builtupArea")+'" '),a.getAttribute("order8Area")&&(c+='order8_area\x3d"'+a.getAttribute("order8Area")+'" '),a.getAttribute("order2Area")&&(c+='order2_area\x3d"'+a.getAttribute("order2Area")+'" '),a.getAttribute("orderArea")&&(c+='order1_area\x3d"'+a.getAttribute("orderArea")+'" '),a.getAttribute("country")&&(c+='country\x3d"'+
a.getAttribute("country")+'" '),a.getAttribute("postalCode")&&(c+='postal_code\x3d"'+a.getAttribute("postalCode")+'" '),a.getAttribute("postalCodeAddOn")&&(c+='postal_addon_code\x3d"'+a.getAttribute("postalCodeAddOn")+'" ')):"5"==b&&(c+="\x3cunformatted ",a.getAttribute("name")&&(c+='name\x3d"'+a.getAttribute("name")+'" '),a.getAttribute("country")&&(c+='country\x3d"'+a.getAttribute("country")+'" '),a.getAttribute("unformattedLine")&&(c+='address_line\x3d"'+a.getAttribute("unformattedLine")+'" '));
return c+"/\x3e\x3c/input_address\x3e\x3c/input_location\x3e\x3c/address_list\x3e\x3c/geocode_request\x3e"};
AdfDhtmlGeoMapPeer.prototype.ProcessPushData=function(a,b){var c=eval(a),d=c.t_id;AdfLogger.LOGGER.fine("ProcessPushData. Theme id \x3d ",d);if(null==this._component.getTheme(d))return!1;var e=c.a_eff;null==e&&(e=this._getDefaultAnimationEffect());var f=c.a_time;null==f&&(f=this._getDefaultAnimationTime());for(var c=c.c_l,g=0;g<c.length;g++){var h=c[g];switch(h.type){case "update":this._processPointThemeUpdate(d,h,e,f);break;case "remove":this._processPointThemeRemove(d,h,e,f);break;case "insert":this._processPointThemeInsert(d,
h,e,f)}}return!0};AdfDhtmlGeoMapPeer.prototype._processPointThemeUpdate=function(a,b,c,d){AdfLogger.LOGGER.fine("_processPointThemeUpdate. Message \x3d"+b);a=this._component._mapview.getFOI(b.p_id);if(null==a)return!1;b=b.c_data;if(null==b)return!1;this._updatePointFOI(a,b.label,b["long"],b.lat,b.pt_data_value,b.pt_fmted_data_value,b.pt_data_value_column_name,b.pt_data_value_column_label,b.pt_image,b.pt_sel_image,b.pt_hover_image,c,d);return!0};AdfDhtmlGeoMapPeer.prototype._getPointLongitude=function(a){return a._originalPointX};
AdfDhtmlGeoMapPeer.prototype._getPointLatitude=function(a){return a._originalPointY};AdfDhtmlGeoMapPeer.prototype._processPointThemeRemove=function(a,b,c,d){AdfLogger.LOGGER.fine("_processThemeRemove. Message \x3d"+b);return this._processPointFOIRemove(a,b.p_id,c,d)};
AdfDhtmlGeoMapPeer.prototype._processPointFOIRemove=function(a,b,c,d){if(null==this._component._mapview.getFOI(b))return!1;a="AdfDhtmlGeoMapPeer.removePointFOICallback('"+this._component.getClientId()+"', '"+a+"', '"+b+"')";this._animatePointFOIRemove(b,c,d,a);return!0};
AdfDhtmlGeoMapPeer.removePointFOICallback=function(a,b,c){var d=null;null!=a&&(d=AdfPage.PAGE.findComponent(a));if(null==d||"undefined"==d)return!1;a=d._mapview.getFOI(c);if(null==a)return!1;b=d._foiTheme[b];for(var e=-1,f=0;f<b.length;f++)if(b[f].id==a.id){e=f;break}if(-1==e)return!1;b.splice(e,1);d._mapview.removeFOI(c)};
AdfDhtmlGeoMapPeer.prototype._animatePointFOIRemove=function(a,b,c,d){"a_eff_blink"==b?AdfDhtmlGeoMap._animate(a,"blink",d):"a_eff_blink_n_fade"==b?AdfDhtmlGeoMap._animate(a,"blink_and_fade_out",d):"a_eff_fade"==b&&AdfDhtmlGeoMap._animate(a,"fade_out",d)};AdfDhtmlGeoMapPeer.prototype._getPointIndex=function(a,b){for(var c=0;c<a.length;c++)if(a[c].id==b.id)return c;return-1};
AdfDhtmlGeoMapPeer.prototype._processPointThemeInsert=function(a,b,c,d){AdfLogger.LOGGER.fine("_processPointThemeInsert. Message \x3d"+b);var e=b.p_id,f=b.c_data;if(null==f)return!1;var g=f.label;b=f.pt_image;f=this._createPointFOI(a,e,g,f["long"],f.lat,f.pt_data_value,f.pt_fmted_data_value,f.pt_data_value_column_name,f.pt_data_value_column_label,b,f.pt_sel_image,f.pt_hover_image,f.cat,g);if(!this._isThemeVisible(a))return f.setVisible(!1),this._addAdsPointFOI(f,a),!0;this._component._updateImageWidthHeight(a,
b,"AdfDhtmlGeoMapPeer._animatePointFOIInsert('"+e+"', '"+c+"', "+d.toString()+");");return!0};AdfDhtmlGeoMapPeer.prototype._isThemeVisible=function(a){return this._component._foiTheme[a][0].isVisible()};AdfDhtmlGeoMapPeer._animatePointFOIInsert=function(a,b){"a_eff_blink"==b?AdfDhtmlGeoMap._animate(a,"blink"):"a_eff_blink_n_fade"==b?AdfDhtmlGeoMap._animate(a,"fade_in_and_blink"):"a_eff_fade"==b&&AdfDhtmlGeoMap._animate(a,"fade_in")};
AdfDhtmlGeoMapPeer.prototype._addAdsPointFOI=function(a,b){this._component._mapview.addFOI(a);this._component._foiTheme[b].push(a)};
AdfDhtmlGeoMapPeer.prototype._updatePointFOI=function(a,b,c,d,e,f,g,h,l,m,n,p,q){if(null==a)return!1;g=!1;null!=b&&b!=a.name&&(a.name=b);null!=h&&h!=a.attrnames[0]&&(a.attrnames=[h,"__adf_item_Label0"]);null!=e&&null!=f&&(a.attrs=[e,f]);null!=l&&l!=a.originalImages&&(a.originalImages=l,g=!0);null!=m&&m!=a.selectedImages&&(a.selectedImages=m);null!=n&&n!=a.hoverImage&&(a._hoverHTML=n);g&&(b=function(){var a=arguments.callee,b=AdfPage.PAGE.findComponent(a._mapId)._createFOIImageHTML(a._foi,a._image.width,
a._image.height);a._foi.setHTMLElement(b);a._foi.setWidth(a._image.width);a._foi.setHeight(a._image.height);a._foi.reDraw();a._image=null;a._foi=null;a._mapId=null},e=new Image,f=this._component.getClientId(),b._image=e,b._foi=a,b._mapId=f,e.onload=b,e.src=l);if(!this._pointLocationMoved(a,c,d))return this._animatePointFOIUpdate(a.id,p),!0;if(this._movePointFOI(a,c,d,q))return!0};
AdfDhtmlGeoMapPeer.prototype._animatePointFOIUpdate=function(a,b){"a_eff_blink"==b?AdfDhtmlGeoMap._animate(a,"blink"):"a_eff_blink_n_fade"==b?AdfDhtmlGeoMap._animate(a,"blink"):"a_eff_fade"==b&&AdfDhtmlGeoMap._animate(a,"fade_out_and_fade_in")};AdfDhtmlGeoMapPeer.prototype._getDefaultAnimationTime=function(){return 500};AdfDhtmlGeoMapPeer.prototype._getDefaultAnimationEffect=function(){return"a_eff_blink"};
AdfDhtmlGeoMapPeer.prototype._pointLocationMoved=function(a,b,c){return null==b&&null==c?!1:this._getPointLongitude(a)!=b||this._getPointLatitude(a)!=c?!0:!1};AdfDhtmlGeoMapPeer.prototype._movePointFOI=function(a,b,c,d){if(null==c&&null==b)return!0;null==c&&(c=this._getPointLatitude(a));null==b&&(b=this._getPointLongitude(a));a.animateToNewLocation(MVSdoGeometry.createPoint(b,c,this._getInitSrid()),d);return!0};
AdfDhtmlGeoMapPeer.prototype._createPointFOI=function(a,b,c,d,e,f,g,h,l,m,n,p,q,r){return this._component._addPointFOI(b,d,e,m,n,l,g,r,p,a,q,f)};AdfDhtmlGeoMapPeer.prototype.ComponentRemoved=function(a){this._component._mapview&&(this._component._mapview.removeAllFOIs(),this._component._mapview.destroy(),this._component._mapview=null);AdfDhtmlGeoMapPeer.superclass.ComponentRemoved.call(this,a)};