/* Copyright (C) 2009 Yahoo Japan Corporation. All Rights Reserved. */ function AlpsUtil(){if(_bi.type==1&&_bi.version==6){var _1=new Array(AlpsUtil.blankImg);var _2=new Array();for(var i=0;i<_1.length;i++){_2[i]=new Image();_2[i].src=_1[i];}try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}}AlpsUtil.blankImg="http://i.yimg.jp/images/map/api/blank.gif";AlpsUtil.getXMLHttp=function(){var _4;if(typeof ActiveXObject!="undefined"){try{_4=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){_4=new ActiveXObject("Microsoft.XMLHTTP");}}if(typeof XMLHttpRequest!="undefined"){_4=new XMLHttpRequest();}return _4;};AlpsUtil.getXMLDOM=function(_5){var _6=AlpsUtil.getXMLHttp();if(!_6){return;}_6.open("GET",_5,false);_6.send(null);if(_6.status==200||_6.status==304){return _6.responseXML;}};AlpsUtil.createXMLDOM=function(){var _7;if(typeof ActiveXObject!="undefined"){_7=new ActiveXObject("Microsoft.XMLDOM");}else{_7=document.implementation.createDocument("","",null);}if(_7.documentElement){_7.removeChild(_7.documentElement);}return _7;};AlpsUtil.getXMLDOMFromStr=function(_8){try{if(typeof ActiveXObject!="undefined"&&typeof GetObject!="undefined"){var _9=new ActiveXObject("Microsoft.XMLDOM");_9.loadXML(_8);return _9;}else{if(typeof DOMParser!="undefined"){return (new DOMParser()).parseFromString(_8,"text/xml");}else{return null;}}}catch(error){return null;}};AlpsUtil.getElementContent=function(e,_b){var n=e.getElementsByTagName(_b)[0];if(n){return AlpsUtil.getNodeContent(n);}};AlpsUtil.getNodeContent=function(n){var nl=n.childNodes;if(nl.length==1){return nl[0].nodeValue;}if(nl.length>1){return nl[1].nodeValue;}};AlpsUtil.getElementAttribute=function(e,_10,_11){var n=e.getElementsByTagName(_10)[0];if(n){return n.getAttribute(_11);}};AlpsUtil.getProperties=function(e){var a=new Object;var p=e.getElementsByTagName("property");for(var i=0;i=8){this.version=8;}else{this.version=7;}}else{this.version=6;}}}else{if(ua.indexOf("safari")!=-1){this.type=3;}else{if(ua.indexOf("mozilla")!=-1){this.type=2;if(ua.indexOf("firefox")!=-1){this.subType=1;this.version=1.5;if(ua.indexOf("firefox/1.0")!=-1){this.version=1;}}else{if(ua.indexOf("netscape")!=-1){this.subType=2;}else{if(ua.indexOf("seamonkey")!=-1){this.subType=4;}else{this.subType=3;this.version=1.8;if(ua.indexOf("rv:1.7")!=-1){this.version=1.7;}}}}}}}}if(ua.indexOf("x11;")!=-1){this.os=1;}else{if(ua.indexOf("macintosh")!=-1){this.os=2;}}}var _bi=new BrowserInfo();function AlpsEvent(){}function EventObj(_30,_31,_32){this.instance=_30;this.propertyName=_31;this.listenerFn=_32;}AlpsEvent.addEvent=function(_33,_34,_35){var _36=AlpsEvent.getPropertyName(_34);if(_33[_36]==null){_33[_36]=new Array;}_33[_36].push(_35);return new EventObj(_33,_34,_35);};AlpsEvent.removeEvent=function(_37){var _38=AlpsEvent.getPropertyName(_37.propertyName);var _39=_37.instance[_38];for(var idx=0;idx<_39.length;idx++){if(_39[idx]==_37.listenerFn){_39.splice(idx,1);return;}}};AlpsEvent.clearEvents=function(_3b,_3c){var _3d=AlpsEvent.getPropertyName(_3c);_3b[_3d]=null;};AlpsEvent.triggerEvent=function(_3e,_3f){var _40=AlpsEvent.getEventFireFlag(_3f);if(_3e[_40]){return;}_3e[_40]=1;var _41=AlpsEvent.getPropertyName(_3f);var _42=_3e[_41];if(_42&&_42.length>0){var arg=[];for(var i=2;i=0?1:-1;}else{this.sign=_5;}this.d=Math.abs(d);this.m=m;this.s=s;};Dms.prototype.setByDegree=function(_6){this.sign=_6>=0?1:-1;_6=Math.abs(_6);this.d=Math.floor(_6);var _7=(_6-this.d)*60;this.m=Math.floor(_7);this.s=(_7-this.m)*60;};Dms.prototype.setByDmsStr=function(_8){var _9=_8.split("/");if(_9.length==1){this.setByDegree(parseFloat(_9[0]));}else{if(_9.length==2){var d=parseFloat(_9[0]);var _b=new String(_9[0]);_b=_b.trimLeft();var _c=_b.charAt(0)=="-"?-1:1;d=Math.abs(d);d=Math.floor(d);var _d=parseFloat(_9[1]);var m=Math.floor(_d);var s=(_d-m)*60;this.set(d,m,s,_c);}else{if(_9.length==3){var d=parseFloat(_9[0]);var _b=new String(_9[0]);_b=_b.trimLeft();var _c=_b.charAt(0)=="-"?-1:1;d=Math.abs(d);d=Math.floor(d);var m=parseFloat(_9[1]);var s=parseFloat(_9[2]);this.set(d,Math.floor(m),s,_c);}}}};Dms.prototype.getDegree=function(){var _10=0;_10=this.d+this.m/60+this.s/60/60;_10*=this.sign;return _10;};Dms.prototype.toString=function(){var d=this.d;var m=this.m;var s=Math.round(this.s*1000)/1000;if(s==60){m+=1;s=0;if(m==60){if(d>=0){d+=1;}else{d-=1;}m=0;}}var str=d+"/"+m+"/"+s;if(this.sign==-1){str="-"+str;}return str;};function LLPoint(_15,_16){this.lat=0;this.lon=0;if(arguments.length==1&&typeof (arguments[0])=="string"){var sp=arguments[0].split(",");this.lat=(new Dms(sp[0])).getDegree();this.lon=(new Dms(sp[1])).getDegree();}else{if(typeof (_15)=="object"){this.lat=_15.getDegree();}else{if(typeof (_15)=="string"){this.lat=(new Dms(_15)).getDegree();}else{this.lat=_15;}}if(typeof (_16)=="object"){this.lon=_16.getDegree();}else{if(typeof (_16)=="string"){this.lon=(new Dms(_16)).getDegree();}else{this.lon=_16;}}}}LLPoint.prototype.set=function(_18,_19){this.lat=_18;this.lon=_19;};LLPoint.prototype.toString=function(){return (new Dms(this.lat)).toString()+","+(new Dms(this.lon)).toString();};LLPoint.prototype.distance=function(pos){var _1b=6370300;var x1=Math.cos(this.lon*Math.PI/180)*Math.cos(this.lat*Math.PI/180);var y1=Math.sin(this.lon*Math.PI/180)*Math.cos(this.lat*Math.PI/180);var z1=Math.sin(this.lat*Math.PI/180);var x2=Math.cos(pos.lon*Math.PI/180)*Math.cos(pos.lat*Math.PI/180);var y2=Math.sin(pos.lon*Math.PI/180)*Math.cos(pos.lat*Math.PI/180);var z2=Math.sin(pos.lat*Math.PI/180);var d=x1*x2+y1*y2+z1*z2;if(d<-1){d=-1;}if(d>1){d=1;}return _1b*Math.acos(d);};LLPoint.prototype.get1stMeshCode=function(){return Math.floor((this.lat+1e-11)*1.5)*100+Math.floor((this.lon+1e-11)-100);};LLPoint.prototype.getMeshCode=function(){var lat=this.lat+1e-11;var lon=this.lon+1e-11;var _25=Math.floor(lat*1.5);var _26=Math.floor(lon-100);var _27=Math.floor(lat*120-_25*80);var _28=Math.floor(lon*80-_26*80-8000);return _25*1000000+_26*10000+Math.floor(_27/10)*1000+Math.floor(_28/10)*100+(_27%10)*10+_28%10;};function ConvertRADtoDEGREE(_29){return _29*180/Math.PI;}function ConvertDEGREEtoRAD(_2a){return _2a*Math.PI/180;}function BesslWgs(_2b,_2c){var eps=1e-15;var pi=Math.PI;var ar=new Array(2);ar[0]=6377397.155;ar[1]=6378137;var f=new Array(2);f[0]=1/299.152813;f[1]=1/298.257223563;var e2=new Array(2);e2[0]=f[0]*(2-f[0]);e2[1]=f[1]*(2-f[1]);var dx=new Array(2);var dy=new Array(2);var dz=new Array(2);dx[0]=-146.43;dy[0]=507.89;dz[0]=681.46;dx[1]=146.43;dy[1]=-507.89;dz[1]=-681.46;var _in=_2b;var _36=1-_2b;var _37=ConvertDEGREEtoRAD(_2c.lat);var _38=ConvertDEGREEtoRAD(_2c.lon);var _39=0;var _3a=ar[_in]/Math.sqrt(1-e2[_in]*Math.sin(_37)*Math.sin(_37));var _3b=(_3a+_39)*Math.cos(_37)*Math.cos(_38);var _3c=(_3a+_39)*Math.cos(_37)*Math.sin(_38);var _3d=(_3a*(1-e2[_in])+_39)*Math.sin(_37);var x=_3b+dx[_in];var y=_3c+dy[_in];var z=_3d+dz[_in];var p=Math.sqrt(x*x+y*y);var mu0=z/p;var aa=Math.sqrt((1-e2[_36])*mu0*mu0+1);var aa3=aa*aa*aa;var ff=mu0-z/p-ar[_36]*e2[_36]*mu0/p/aa;var df=1-ar[_36]*e2[_36]/p/aa3;var mu1=mu0-ff/df;var aas;for(var i=0;(ff>eps||-eps>ff)&&i<10;i++){mu0=mu1;aa=Math.sqrt((1-e2[_36])*mu0*mu0+1);aa3=aa*aa*aa;aas=ar[_36]*e2[_36]/p;ff=mu0-z/p-aas*mu0/aa;df=1-aas/aa3;mu1=mu0-ff/df;}var _4a=Math.atan2(mu1,1);var _4b=Math.atan2(y,x);var _4c=ar[_36]/Math.sqrt(1-e2[_36]*Math.sin(_4a)*Math.sin(_4a));return new LLPoint(ConvertRADtoDEGREE(_4a),ConvertRADtoDEGREE(_4b));} function Point(_1,_2){this.x=_1;this.y=_2;}Point.prototype.set=function(_3,_4){this.x=_3;this.y=_4;};Point.prototype.rotate=function(_5,_6){var _7=_6*Math.PI/180;var _8=this.x-_5.x;var _9=this.y-_5.y;var _a=_8*Math.cos(_7)-_9*Math.sin(_7);var _b=_8*Math.sin(_7)+_9*Math.cos(_7);this.x=_5.x+_a;this.y=_5.y+_b;};Point.distance=function(_c,_d){var _e=_c.x-_d.x;var _f=_c.y-_d.y;return Math.sqrt(_e*_e+_f*_f);};Point.sqdist=function(_10,_11){var _12=_10.x-_11.x;var _13=_10.y-_11.y;return _12*_12+_13*_13;};Point.angle=function(_14,_15){var _16=_14.x-_15.x;var _17=_14.y-_15.y;return Math.atan2(_17,_16)*180/Math.PI;};Point.prototype.toString=function(){return "("+this.x+", "+this.y+")";};Point.prototype.equals=function(X){if(!X){return false;}return this.x==X.x&&this.y==X.y;};Point.prototype.approxEquals=function(X){if(!X){return false;}return approxCompare(this.x,X.x)&&approxCompare(this.y,X.y);};function Size(w,h){this.width=w;this.height=h;}Size.prototype.set=function(w,h){this.width=w;this.height=h;};Size.prototype.toString=function(){return "("+this.width+", "+this.height+")";};Size.prototype.equals=function(s){if(!s){return false;}return this.width==s.width&&this.height==s.height;};Size.prototype.approxEquals=function(s){if(!s){return false;}return approxCompare(this.width,s.width)&&approxCompare(this.height,s.height);};function approxCompare(rh,Ai){return Math.round(rh*1000000)==Math.round(Ai*1000000);} function SProjection(_1,_2,_3){this.m_projCode=_1;this.origin=new LLPoint(_2.lat,_2.lon);this.factor=_3;}SProjection.prototype.release=function(){_objrelease(this);};function EllipsoID(_4){this.form=_4;if(_4==0){this.a=6370300;this.b=6370300;this.e2=0;}else{this.a=6377397.155;this.b=6356078.96325;this.e2=(this.a*this.a-this.b*this.b)/(this.a*this.a);}}function MercatorConversion(_5,_6){this.proj=new SProjection(1,_5,1);this.ellipsoid=new EllipsoID(_6);}MercatorConversion.prototype.QPI=Math.atan(1);MercatorConversion.prototype.EPS=2.220446049250313e-16;MercatorConversion.prototype.MAX=Number.MAX_VALUE;MercatorConversion.prototype.set=function(_7,_8){this.proj=new SProjection(1,_7,1);this.ellipsoid=new EllipsoID(_8);};MercatorConversion.prototype.getLLPoint=function(_9){var x=_9.x;var y=_9.y;var _c=this.proj.origin.lat*Math.PI/180;var _d=this.proj.origin.lon*Math.PI/180;var _e=0;var _f=0;var e,_11,_12,Xm,XM,Y,_16;var a=this.ellipsoid.a;var b=this.ellipsoid.b;var e2=this.ellipsoid.e2;e=Math.sqrt(e2);_11=e*Math.sin(_c);_12=a*Math.cos(_c)/Math.sqrt(1-e2*Math.sin(_c)*Math.sin(_c));Xm=-_12*(4*this.QPI+_d);XM=_12*(4*this.QPI-_d);Y=this.MAX;if(-YMath.PI){_e-=(2*Math.PI);}else{if(_e<-Math.PI){_e+=(2*Math.PI);}}var lat=_f*180/Math.PI;var lon=_e*180/Math.PI;return new LLPoint(lat,lon);};MercatorConversion.prototype.getMeterPoint=function(_1d){var lat=_1d.lat;var lon=_1d.lon;var _20=lat*Math.PI/180;var _21=lon*Math.PI/180;var _22=this.proj.origin.lat*Math.PI/180;var _23=this.proj.origin.lon*Math.PI/180;var a=this.ellipsoid.a;var b=this.ellipsoid.b;var e2=this.ellipsoid.e2;var _27,_28;var xx=0,yy=0;if((-2*this.QPI+this.EPS<_20)&&(_20<2*this.QPI-this.EPS)){var e=Math.sqrt(e2);_28=e*Math.sin(_22);_27=a*Math.cos(_22)/Math.sqrt(1-e2*Math.sin(_22)*Math.sin(_22));xx=_27*(_21-_23);yy=_27*(Math.log(Math.tan(this.QPI+_20/2)/Math.tan(this.QPI+_22/2))+e/2*(Math.log((1-e*Math.sin(_20))/(1-_28))-Math.log((1+e*Math.sin(_20))/(1+_28))));}return new Point(xx,yy);};MercatorConversion.prototype.release=function(){_objrelease(this);};function UTMConversion(_2c,_2d){this.proj=new SProjection(0,_2c,_2d);}UTMConversion.prototype.A=6377397.155;UTMConversion.prototype.E=0.006674372231315;UTMConversion.prototype.meridian=function(_2e,_2f){var Ba,Bb,Bc,Bd,Be;Ba=1.005037306049*(_2f-_2e);Bb=0.0050478492403*(Math.sin(2*_2f)-Math.sin(2*_2e))/2;Bc=0.0000105637868*(Math.sin(4*_2f)-Math.sin(4*_2e))/4;Bd=2.063332e-8*(Math.sin(6*_2f)-Math.sin(6*_2e))/6;Be=3.8853e-11*(Math.sin(8*_2f)-Math.sin(8*_2e))/8;return this.A*(1-this.E)*(Ba-Bb+Bc-Bd+Be);};UTMConversion.prototype.getLLPoint=function(_35){var x=_35.y;var y=_35.x;var _38=this.proj.origin.lat*Math.PI/180;var _39=this.proj.origin.lon*Math.PI/180;var _3a=this.proj.factor;var ra0=0;var ab=1;var ph0=Math.PI*0.2;var m=x/_3a+this.meridian(ra0,_38);y=y/_3a;var mot=1/(this.A*(1-this.E));var si;var n=0;while(ab>1e-14){var s=this.meridian(ra0,ph0);si=Math.sin(ph0);var ph1=ph0+(m-s)*Math.pow(1-this.E*si*si,1.5)*mot;ab=ph1-ph0;ph0=ph1;if(ab<0){ab=-ab;}if(++n>100){break;}}var co=Math.cos(ph0);var cr=Math.sqrt(1-this.E*si*si);var ni=cr/this.A;var ri=cr*cr*cr*mot;var _48=(co*co)*this.E/(1-this.E);var t=Math.tan(ph0);var t2=t*t;var t4=t2*t2;var y1=y*ni;var y2=y1*y1;var y4=y2*y2;var f1=-0.08333333333333333*y2*(5+3*t2+_48-9*t2*_48);var f2=0.002777777777777777*y4*(61+90*t2+45*t4);var _51=ph0-0.5*y*y1*ri*t*(1+f1+f2);f1=-0.1666666666666666*y2*(1+2*t2+_48);f2=0.008333333333333333*y4*(5+28*t2+24*t4);var _52=_39+y1/co*(1+f1+f2);if(_52>Math.PI){_52-=(2*Math.PI);}else{if(_52<-Math.PI){_52+=(2*Math.PI);}}return new LLPoint(_51*180/Math.PI,_52*180/Math.PI);};UTMConversion.prototype.getMeterPoint=function(_53){var _54=_53.lat*Math.PI/180;var _55=_53.lon*Math.PI/180;var _56=this.proj.origin.lat*Math.PI/180;var _57=this.proj.origin.lon*Math.PI/180;var _58=this.proj.factor;_55-=_57;var s=Math.sin(_54);var c=Math.cos(_54);var c2=c*c;var c4=c2*c2;var t=Math.tan(_54);var t2=t*t;var t4=t2*t2;var h2=this.E*c2/(1-this.E);var h4=h2*h2;var N=this.A/Math.sqrt(1-this.E*s*s);var _63=_55*_55;var _64=_63*c2;var _65=_64*_64;var B=this.meridian(_56,_54);var x1=_64*(5-t2+9*h2+4*h4)/24;var x2=_65*(61-58*t2+t4+270*h2-330*h2*t2)/720;var y1=_64*(1-t2+h2)/6;var y2=_65*(5-18*t2+t4+14*h2-58*h2*t2)/120;var xx=_58*(B+N*s*c*_63*(0.5+x1+x2));var yy=_58*N*c*_55*(1+y1+y2);return new Point(yy,xx);};UTMConversion.prototype.release=function(){_objrelease(this);};function MeterMMConversion(_6d,_6e){this.scale=_6d;this.angle=_6e;}MeterMMConversion.prototype.getMMPoint=function(_6f){var _70=Math.cos(-this.angle);var _71=Math.sin(-this.angle);var x=(_6f.x*_70-_6f.y*_71)*1000/this.scale;var y=(_6f.x*_71+_6f.y*_70)*1000/this.scale;return new Point(x,y);};MeterMMConversion.prototype.getMeterPoint=function(_74){var _75=Math.cos(this.angle);var _76=Math.sin(this.angle);var x=(_74.x*_75-_74.y*_76)*this.scale/1000;var y=(_74.x*_76+_74.y*_75)*this.scale/1000;return new Point(x,y);};var MAXLEVEL=18;var RAD_PER_DEG=Math.PI/180;var M_PER_DEGREE=111111;var EARTH_CIRCUM_M=M_PER_DEGREE*360;function sinh(x){var ret=Math.exp(x);ret=(ret-1/ret)/2;return ret;}function YUSMercConversion(_7b){this.magnify=1;this.init(_7b);this.circum_px=1<<(26-this.level_);this.defscale=399999600000/this.circum_px;this.meters_per_pixel_=EARTH_CIRCUM_M/this.circum_px;this.x_per_lon_=this.circum_px/360;}YUSMercConversion.prototype.init=function(_7c){if(_7c<1){this.level_=1;}else{if(_7c>MAXLEVEL){this.level_=MAXLEVEL;}else{this.level_=_7c;}}};YUSMercConversion.prototype.pixel_height=function(){return this.circum_px;};YUSMercConversion.prototype.ll_to_pxy=function(_7d){var _7e=Math.abs(_7d.lat);var _7f=_7d.lon;if(_7f>180){_7f-=360;}_7f+=180;var _80=new Point(0,0);if(_7e>=90){return _80;}if(_7f>360){_7f-=360;}if(_7f<0){_7f+=360;}_7e*=RAD_PER_DEG;_80.x=_7f*this.x_per_lon_;var _81=Math.log(Math.tan(_7e)+1/Math.cos(_7e))/Math.PI;_80.y=_81*this.pixel_height()/2;if(_7d.lat<0){_80.y=-_80.y;}_80.x*=this.magnify;_80.y*=this.magnify;return _80;};YUSMercConversion.prototype.pxy_to_ll=function(_82){var _83=new LLPoint(0,0);var _84=new Point(_82.x/this.magnify,_82.y/this.magnify);var _85=_84.x/this.x_per_lon_;var _86=(_84.y/(this.pixel_height()/2))*Math.PI;_86=Math.atan(sinh(_86))/RAD_PER_DEG;if(_85<0){_85+=360;}if(_85>360){_85-=360;}_83.lon=_85-180;if(_86<=-90||_86>=90){return _83;}_83.lat=_86;return _83;};function CoordinatesConversion(){this.m_projCode=0;this.m_UTMConv=new UTMConversion(new LLPoint(0,0),0);this.m_MercatorConv=new MercatorConversion(new LLPoint(0,0),0);this.m_MeterMMConv=new MeterMMConversion(25000,0);this.m_YUSMercConv=new YUSMercConversion(1);this.m_center=new LLPoint(0,0);this.m_windowWidth=0;this.m_windowHeight=0;}CoordinatesConversion.prototype.getProjOrigin=function(){if(this.m_projCode==0){return this.m_UTMConv.proj.origin;}else{if(this.m_projCode==1){return this.m_MercatorConv.proj.origin;}else{if(this.m_projCode==2){return new LLPoint(0,-180);}}}};CoordinatesConversion.prototype.setProjConv=function(_87,_88,_89){this.m_projCode=_87;if(_87==0){this.m_UTMConv=new UTMConversion(new LLPoint(_88.lat,_88.lon),_89);}else{if(_87==1){this.m_MercatorConv=new MercatorConversion(new LLPoint(_88.lat,_88.lon),_89);}else{if(_87==2){this.m_YUSMercConv=new YUSMercConversion(_89);}}}};CoordinatesConversion.prototype.setScale=function(_8a){if(this.m_projCode==2){this.m_YUSMercConv.magnify=this.m_YUSMercConv.defscale/_8a;}else{this.m_MeterMMConv.scale=_8a;}};CoordinatesConversion.prototype.setAngle=function(_8b){this.m_MeterMMConv.angle=_8b*Math.PI/180;};CoordinatesConversion.prototype.getScale=function(){return this.m_MeterMMConv.scale;};CoordinatesConversion.prototype.getAngle=function(){return this.m_MeterMMConv.angle*180/Math.PI;};CoordinatesConversion.prototype.setCenter=function(_8c){if(Math.abs(_8c.lon)>360){_8c.lon%=360;}if(_8c.lon<-180){_8c.lon+=360;}else{if(_8c.lon>180){_8c.lon-=360;}}if(_8c.lat<-90||_8c.lat>90){_8c.lat%=90;}this.m_center=new LLPoint(_8c.lat,_8c.lon);};CoordinatesConversion.prototype.setWindowSize=function(_8d,_8e){this.m_windowWidth=_8d;this.m_windowHeight=_8e;};CoordinatesConversion.prototype.LL2Meter=function(_8f){if(this.m_projCode==0){return this.m_UTMConv.getMeterPoint(_8f);}else{return this.m_MercatorConv.getMeterPoint(_8f);}};CoordinatesConversion.prototype.Meter2LL=function(_90){if(this.m_projCode==0){return this.m_UTMConv.getLLPoint(_90);}else{return this.m_MercatorConv.getLLPoint(_90);}};CoordinatesConversion.prototype.MM2Log=function(_91){var _92=this.m_MeterMMConv.getMMPoint(this.LL2Meter(this.m_center));var _93=this.m_windowWidth/2-_92.x*10+_91.x*10;var _94=-this.m_windowHeight/2-_92.y*10+_91.y*10;return new Point(_93,-_94);};CoordinatesConversion.prototype.Log2MM=function(_95){var _96=this.m_MeterMMConv.getMMPoint(this.LL2Meter(this.m_center));var mmX=_96.x-this.m_windowWidth/2/10+_95.x/10;var mmY=_96.y+this.m_windowHeight/2/10-_95.y/10;return new Point(mmX,mmY);};CoordinatesConversion.prototype.LL2MM=function(_99){return this.m_MeterMMConv.getMMPoint(this.LL2Meter(_99));};CoordinatesConversion.prototype.MM2LL=function(_9a){return this.Meter2LL(this.m_MeterMMConv.getMeterPoint(_9a));};CoordinatesConversion.prototype.LL2Log=function(_9b){if(this.m_projCode!=2){return this.MM2Log(this.m_MeterMMConv.getMMPoint(this.LL2Meter(_9b)));}else{var _9c=this.m_YUSMercConv.ll_to_pxy(_9b);var _9d=this.m_YUSMercConv.ll_to_pxy(this.m_center);var _9e=new Point(0,0);_9e.x=this.m_windowWidth/2-_9d.x+_9c.x;_9e.y=this.m_windowHeight/2+_9d.y-_9c.y;return _9e;}};CoordinatesConversion.prototype.Meter2Log=function(_9f){return this.MM2Log(this.m_MeterMMConv.getMMPoint(_9f));};CoordinatesConversion.prototype.Log2LL=function(_a0){if(this.m_projCode!=2){return this.Meter2LL(this.m_MeterMMConv.getMeterPoint(this.Log2MM(_a0)));}else{var _a1=new Point(0,0);var _a2=this.m_YUSMercConv.ll_to_pxy(this.m_center);_a1.x=_a2.x-this.m_windowWidth/2+_a0.x;_a1.y=_a2.y+this.m_windowHeight/2-_a0.y;return this.m_YUSMercConv.pxy_to_ll(_a1);}};CoordinatesConversion.prototype.Log2Meter=function(_a3){return this.m_MeterMMConv.getMeterPoint(this.Log2MM(_a3));};CoordinatesConversion.prototype.release=function(){_objrelease(this);}; var _delaytime=300;function getObjPos(g,_2){var _3=new Point(0,0);while(g&&g!=_2){_3.x+=g.offsetLeft;_3.y+=g.offsetTop;g=g.offsetParent;}return _3;}function getObjPos2(_4){var _5=new Point(0,0);while(_4){_5.x+=_4.offsetLeft;_5.y+=_4.offsetTop;_4=_4.offsetParent;}return _5;}function getRelativePos(e,_7,_8){if(!_8){_8=new Point(0,0);}if(typeof e.pageX!="undefined"){var Kd=getObjPos2(_7);_8.x=e.pageX-Kd.x;_8.y=e.pageY-Kd.y;}else{if(typeof e.offsetX!="undefined"){var _a=e.target||e.srcElement;var xg=getObjPos(_a,_7);_8.x=e.offsetX+xg.x;_8.y=e.offsetY+xg.y;}}return _8;}function KeyCodesArray(_c){if(_c){for(var i=_c.length-1;i>=0;--i){this.add(_c[i]);}}}KeyCodesArray.prototype.add=function(_e){if(!this.contains(_e)){this["key"+_e]=1;}};KeyCodesArray.prototype.remove=function(_f){if(this.exist(_f)){delete this["key"+_f];}};KeyCodesArray.prototype.contains=function(_10){return this["key"+_10]==1;};KeyCodesArray.prototype.exist=function(_11){return this["key"+_11]==1||this["key"+_11]==2;};KeyCodesArray.prototype.sleep=function(){for(var _12 in this){if(typeof this[_12]!="function"){this[_12]=2;}}};KeyCodesArray.prototype.wakeup=function(){for(var _13 in this){if(typeof this[_13]!="function"){this[_13]=1;}}};function Nothing(){return false;}function CancelBubble(e){if(_bi.type==1){window.event.cancelBubble=true;window.event.returnValue=false;}else{e.cancelBubble=true;if(e.preventDefault){e.preventDefault();}if(e.stopPropagation){e.stopPropagation();}}}function setMouseCursor(obj,_16){try{obj.style.cursor=_16;}catch(p){if(_16=="pointer"){setMouseCursor(obj,"hand");}}}function loadLatLonFromDOMNode(n){var _18=n.getAttribute("unit");var _19=AlpsUtil.getNodeContent(n);var _1a=_19.split(",");var lat=_1a[0];var lon=_1a[1];if(_18=="dms"){return new LLPoint(lat,lon);}else{if(_18=="degree"){return new LLPoint(parseFloat(lat),parseFloat(lon));}else{if(_18=="msec"){return new LLPoint(parseInt(lat)/3600000,parseInt(lon)/3600000);}}}}var _datumConverting=false;function datumConvert(_1d,_1e,_1f,_20,_21){var _22=_1d;if(_1e==_1f){if(_21){_21(_22);}return _22;}else{if(typeof (_dc)!="undefined"&&_dc.server&&!_datumConverting&&_dc.getExistsMesh(_22)){if(_1e=="wgs84"){_datumConverting=true;_dc.getRevParam(_1d,function(dB,dL){_datumConverting=false;if(dB!=undefined&&dL!=undefined){_22=new LLPoint(_1d.lat-dB,_1d.lon-dL);if(_21){_21(_22);}}else{_22=BesslWgs(1,_1d);if(_21){_21(_22);}}},!_20);return _22;}else{if(_1e=="tokyo97"){_datumConverting=true;_dc.getParam(_1d,function(dB,dL){_datumConverting=false;if(dB!=undefined&&dL!=undefined){_22=new LLPoint(_1d.lat+dB,_1d.lon+dL);if(_21){_21(_22);}}else{_22=BesslWgs(0,_1d);if(_21){_21(_22);}}},!_20);return _22;}}}else{if(_1f=="wgs84"||_1f=="tokyo97"){if(_1e=="wgs84"){_22=BesslWgs(1,_1d);if(_21){_21(_22);}return _22;}else{if(_1e=="tokyo97"){_22=BesslWgs(0,_1d);if(_21){_21(_22);}return _22;}}}}}if(_21){_21(_22);}return _22;}function ImageMaker(){}ImageMaker.createImg=function(_27,_28,_29,_2a,_2b){var img=document.createElement("IMG");if(_27&&_27.length>0){img.src=_27;}if(_2a){img.width=_2a;}if(_2b){img.height=_2b;}img.style.position="absolute";img.style.top="0px";img.style.left="0px";if(_29){img.style.zIndex=_29;}if(_bi.type==1){img.unselectable="on";img.onselectstart=Nothing;img.galleryImg="no";}else{img.style.MozUserSelect="none";}img.oncontextmenu=Nothing;img.style.border="0px";img.style.padding="0px";img.style.margin="0px";if(_28){img.style.visibility=_28;}_AlphaImageLoader(img,_2a,_2b);return img;};function SpecType(){this.id="";this.name="";}SpecType.prototype.toString=function(){var str="SpecType:";str+="id: "+this.id+"\t"+"name: "+this.name;return str;};function SpecItem(){this.id="";this.name="";}SpecItem.prototype.toString=function(){var str="SpecItem:";str+="id: "+this.id+"\t"+"name: "+this.name;return str;};function ProjInfo(n2){if(n2.nodeName=="projection"){this.loadXML(n2);}else{this.name=arguments[0];this.code=arguments[1];this.origin=new LLPoint(arguments[2],arguments[3]);this.subInfo=arguments[4];this.org1stMeshCode=0;this.id=0;}}ProjInfo.prototype.loadXML=function(n2){this.name=n2.getAttribute("name");var _31=n2.getAttribute("type");this.code=0;if(_31=="UTM"){this.code=0;}else{if(_31=="Mercator"){this.code=1;}else{if(_31=="YMercator"){this.code=2;}}}var nl3=n2.childNodes;for(var i=0;i=this.mapserverCollect.length){this.currentMapserverIdx=0;}var _3d=this.mapserverCollect[this.currentMapserverIdx++];if(_3d.vendor==_3b){return _3d;}_3c+=1;if(_3c>=this.mapserverCollect.length){break;}}};MapLayer.prototype.toString=function(){var str="MapLayer:\n";str+="scale: "+this.scale+"\n";return str;};MapLayer.prototype.loadXML=function(n1){this.operation=true;if(n1.getAttribute("operation")=="no"){this.operation=false;}var nl2=n1.childNodes;for(var i=0;i=2){var _4f=Number.MAX_VALUE;for(var i=0;i=2){for(var i=0;i=2){for(var i=0;i=this.mapserverCollect.length){this.currentMapserverIdx=0;}var _6d=this.mapserverCollect[this.currentMapserverIdx++];if(_6d.vendor==_6c){return _6d;}}};MapPackage.prototype.toString=function(){var str="MapPackage: "+this.id+"\n";for(var i=0;i=_81){_80=_81-1;}}return this.layerCollect[_80].scale;};MapPackage.prototype.getLayerId=function(_82,_83){var _84=this.layerCollect.length;if(_82<=0){return 0;}if(_82>=this.getLayerScale(_84-1)){return _84-1;}var _85=0;var _86=this.getLayerScale(_84-1);for(var i=0;i<_84;++i){var _88=this.getLayerScale(i)/_82;if(_83&&_83==1&&_88<1){continue;}if(_83&&_83==2&&_88>1){continue;}if(_88<1){_88=1/_88;}if(_88==1){_86=_88;_85=i;break;}if(_88<_86){_86=_88;_85=i;}}return _85;};MapPackage.prototype.release=function(){_objrelease(this);};function Tile(_89){this.tileCollect=_89;this.id=null;this.centerLatLon=null;this.enable=false;this.img=ImageMaker.createImg("","inherit",0,this.tileCollect.gazoSize.width,this.tileCollect.gazoSize.height);this.initialized=false;this.isImgLoaded=false;}Tile.prototype.onImgLoad=function(){if(!this.id){return;}this.isImgLoaded=true;AlpsEvent.triggerEvent(this.tileCollect.mapView.mapCtrl,"tileLoad",this);};Tile.prototype.setTileURL=function(){var _8a;var _8b=this.tileCollect.getCurrentPackage();var _8c=this.tileCollect.gazoSize;var _8d=this.tileCollect.layerId;var _8e=this.tileCollect.projId;var _8f=this.tileCollect.angle;var _90=_8b.layerCollect[_8d];var _91=_90.projInfo[_8e];var _92=_90.getNextMapserver(this.tileCollect.vendor);if(_92.length==0){_92=_8b.getNextMapserver(this.tileCollect.vendor);}if(_92.type==0){}else{if(_92.type==3){var _93=this.centerLatLon;var _94="no part=0&la=0";var _95="scale="+_8b.getLayerScale(_8d);var _96="width="+_8c.width;var _97="height="+_8c.height;var _98="nl="+_93.lat;var _99="el="+_93.lon;_8a=_92.url+"?"+_94+"&"+_95+"&"+_96+"&"+_97+"&"+_98+"&"+_99;}else{if(_92.type==1){var _93=this.centerLatLon;var _95="scale="+_8b.getLayerScale(_8d);var _9a="width="+_8c.width+"&height="+_8c.height;var _9b="c="+_93.lat+","+_93.lon;var _94="copyright=no&scalebar=no";_8a=_92.url+"/"+_92.format+"?"+_95+"&"+_9a+"&"+_9b+"&"+_94;if(_92.sourceType==2){_8a+="&";var _9c=this.tileCollect.mapView.mapCtrl.vectorOpe;if(!_9c.visibleVecHeimen){_8a+="heimen=no&";}if(!_9c.visibleVecTyuki){_8a+="tyuki=no&";}if(!_9c.visibleVecRaster){_8a+="raster=no&";}if(_9c.specHide.length){_8a+="spechide=";_8a+=_9c.specHide.join(",");_8a+="&";}_8a+="spectype=";if(_9c.vecSpecType!="normal"){_8a+=_9c.vecSpecType;}else{_8a+="normal";}if(_8f!=0){_8a+="&angle=";_8a+=_8f;}}}else{if(_92.type==2){var _9d=0;if(_90.projInfo.length>=2){_9d=_91.org1stMeshCode;}var _9e=this.id.x;var _9f=this.id.y;if(_91.maxTileX!=undefined){while(_9e>_91.maxTileX){_9e=_9e-_91.maxTileX-1;}}if(_91.minTileX!=undefined){while(_9e<_91.minTileX){_9e=_9e+_91.maxTileX+1;}}_8a=_92.url+"/"+_8b.getLayerScale(_8d)+"/"+_9d+"/"+Math.floor(_9e/100)+"_"+Math.floor(_9f/100)+"/"+_9e+"_"+_9f+"."+_92.format;if(_92.sourceType==2){_8a+="?";var _9c=this.tileCollect.mapView.mapCtrl.vectorOpe;if(!_9c.visibleVecHeimen){_8a+="heimen=no&";}if(!_9c.visibleVecTyuki){_8a+="tyuki=no&";}if(!_9c.visibleVecRaster){_8a+="raster=no&";}if(_9c.specHide.length){_8a+="spechide=";_8a+=_9c.specHide.join(",");_8a+="&";}_8a+="spectype=";if(_9c.vecSpecType!="normal"){_8a+=_9c.vecSpecType;}else{_8a+="normal";}if(_8f!=0){_8a+="&angle=";_8a+=_8f;}}}else{if(_92.type==4){var _a0=_90.projInfo_inc;var _9e=this.id.x;var _9f=this.id.y;if(_a0.maxTileX!=undefined){while(_9e>_a0.maxTileX){_9e=_9e-_a0.maxTileX-1;}}if(_a0.minTileX!=undefined){while(_9e<_a0.minTileX){_9e=_9e+_a0.maxTileX+1;}}var _a1=_a0.level;var _94="v=4.1";if(_8b.id=="aero"){_94="v=1.3&t=a&s=256";}_a1=19-_a1;_8a=_92.url+"?"+_94+"&x="+_9e+"&y="+_9f+"&z="+_a1+"&r=1";}}}}}if(this.img.src!=_8a){this.isImgLoaded=false;if(this.initialized){if(this.tileCollect.mapView.mapCtrl.vacantTilePath){this.img.src=this.tileCollect.mapView.mapCtrl.vacantTilePath;}else{this.img.src="vacantTile.gif";}}else{this.initialized=true;}this.img.src=_8a;}};function ProAtlasSheet(_a2,_a3,_a4){this.mapView=_a2;this.bUpper=_a4;this.packageId="map";this.layerId=null;this.projId=null;this.vendor=1;this.scale=0;this.magnify=1;this.angle=0;this.gazoSize=new Size(256,256);this.tileSize=new Size(this.gazoSize.width,this.gazoSize.height);this.div=document.createElement("div");this.div.style.position="absolute";this.div.style.top="0px";this.div.style.left="0px";_a3.appendChild(this.div);this.tileArray=new Array();this.tileXCount=0;this.tileYCount=0;this.tileCount=0;}ProAtlasSheet.prototype.getCurrentPackage=function(){return this.mapView.getMapPackage(this.packageId);};ProAtlasSheet.prototype.getTileById=function(id){for(var i=0;i=9)){this.div.style.opacity=val;}else{if(val<0.5){this.setVisible(false);}else{this.setVisible(true);}}}}};ProAtlasSheet.prototype.ResetOpacity=function(){if(_bi.type==1){for(var i=0;i0){for(var i=0;i<_bf;++i){var _c1=new Tile(this);this.div.appendChild(_c1.img);this.tileArray.push(_c1);}}else{if(_bf<0){for(var i=0;i<-_bf;++i){var _c1=this.tileArray.pop();this.div.removeChild(_c1.img);AlpsEvent.triggerEvent(this.mapView.mapCtrl,"tileImgRemoved",_c1);}}}this.tileXCount=_bc;this.tileYCount=_bd;this.tileCount=_be;}var _c2,_c3;_c2=Math.round(_bb.width);_c3=Math.round(_bb.height);for(var i=0;i=_d0.layerCollect.length){_c6=this.layerId;}var _d1=_d0.layerCollect[_c6];var _d2;var _cf;if(this.vendor==1){if(_ca){if(this.mapView.mapCtrl.layerCodeList){_d2=_d1.getEnableProjInfo(this.mapView.mapCtrl.layerCodeList[_d0.id],this.projId);}if(!_d2){_d2=_d1.getNearestProjInfo(_c4);}this.projId=_d2.id;}else{_d2=_d1.getProjInfoById(this.projId);}if(_d2.code==2){_cf=_d2.scale/_c7;}else{_cf=_d1.scale/_c7;}}else{_d2=_d1.projInfo_inc;_cf=_d2.scale/_c7;}if(this.mapView.mapCtrl.getMapserverSrcType()!=2){_c8=0;}var _d3=false;var _d4=datumConvert(_c4,_cc,_d2.datum,_d3);this.mapView.setCenterAndScale(_d2,_d4,_cf,_c8);if(_ce||this.layerId!=_c6||this.angle!=_c8||_cd){this.resetAllTiles();}if(this.layerId!=_c6){this.layerId=_c6;}if(this.magnify!=_c7||_cd){this.magnify=_c7;this.setTileCount(this.mapView.conv.m_windowWidth,this.mapView.conv.m_windowHeight,_c9);}if(this.angle!=_c8){this.angle=_c8;}if(this.scale!=_cf){this.scale=_cf;}this.configureAllTiles(_c9);if(_bi.type==1){var _d5=this.mapView.mapContainer.offsetWidth;var _d6=this.mapView.mapContainer.offsetHeight;}if(_cd){AlpsEvent.triggerEvent(this.mapView.mapCtrl,"vendorChanged");}};ProAtlasSheet.prototype.setAllTilesFlag=function(_d7){for(var i=0;i0.5){_e4=_e2.x-(_e8-1);_e6=_e2.x+_e8;}else{_e4=_e2.x-_e8;_e6=_e2.x+(_e8-1);}}if(this.tileYCount%2!=0){var _e8=Math.floor(this.tileYCount/2);_e5=_e2.y-_e8;_e7=_e2.y+_e8;}else{var _e8=Math.floor(this.tileYCount/2);if(_e1/this.tileSize.height-_e2.y>0.5){_e5=_e2.y-(_e8-1);_e7=_e2.y+_e8;}else{_e5=_e2.y-_e8;_e7=_e2.y+(_e8-1);}}for(var i=0;i0.5){_100=_fe.x-(temp-1);_102=_fe.x+temp;}else{_100=_fe.x-temp;_102=_fe.x+(temp-1);}}if(this.tileYCount%2!=0){var temp=Math.floor(this.tileYCount/2);_101=_fe.y-temp;_103=_fe.y+temp;}else{var temp=Math.floor(this.tileYCount/2);if(_fd/this.tileSize.height-_fe.y>0.5){_101=_fe.y-(temp-1);_103=_fe.y+temp;}else{_101=_fe.y-temp;_103=_fe.y+(temp-1);}}for(var i=0;i10){this.frontSheet.setOpacity(1);this.frontSheet.ResetOpacity();this.backSheet.ResetOpacity();if(_bi.type==4){this.backSheet.setVisible(false);this.backSheet.resetAllTiles();}this.fadeinTimerId=0;if(type=="package"){AlpsEvent.triggerEvent(this.mapCtrl,"packageChanged");if(this.frontSheet.angle!=this.backSheet.angle){AlpsEvent.triggerEvent(this.mapCtrl,"angleChanged");}if(this.frontSheet.scale!=this.backSheet.scale){AlpsEvent.triggerEvent(this.mapCtrl,"layerChanged");}}else{if(type=="angle"){AlpsEvent.triggerEvent(this.mapCtrl,"angleChanged");}else{if(type=="layer"){AlpsEvent.triggerEvent(this.mapCtrl,"layerChanged");}else{if(type=="mapmove"){AlpsEvent.triggerEvent(this.mapCtrl,"premapMoved");}else{if(type=="vendor"){AlpsEvent.triggerEvent(this.mapCtrl,"vendorChanged");}}}}}}else{this.frontSheet.setOpacity(val/10);var _140=val+3.5;var func="this.timerFadein("+_140+",'"+type+"')";this.fadeinTimerId=_setTimeout(this,this.timerFadein,this.fadeinElapseTime,_140,type);}};ProAtlasMapView.prototype.isFadeinFlipping=function(){return this.fadeinTimerId!=0;};ProAtlasMapView.prototype.stopFadeinFlipping=function(){if(this.fadeinTimerId){clearTimeout(this.fadeinTimerId);this.fadeinTimerId=0;this.frontSheet.setOpacity(1);this.frontSheet.ResetOpacity();this.backSheet.ResetOpacity();if(_bi.type==4){this.backSheet.setVisible(false);this.backSheet.resetAllTiles();}}};ProAtlasMapView.prototype.setCenterAndScale=function(_142,_143,_144,_145){var org;var info;if(_142.code!=2){org=new LLPoint(_142.origin.lat,_142.origin.lon);info=_142.subInfo;}else{info=_142.level;}this.conv.setProjConv(_142.code,org,info);this.conv.setScale(_144);this.conv.setAngle(_145);this.conv.setCenter(_143);};ProAtlasMapView.prototype.getNextPackageId=function(id){for(var i=0;i=0){_154=_14e.layerId;}else{if(_14e.scale){_154=this.getLayerId(_14e.scale,0,true);}}this.moveAndLayerTo(_14e.pos,_154,false);}else{this.defaultTo();}this.onResizeEnd();_14b.style.display=_14f;}ProAtlasMapCtrl.prototype.addWheelEvent=function(){if(_bi.type==2){AlpsEvent.addBuiltInEvent(window.document,"DOMMouseScroll",this.mouseWheelHandler);}else{if(_bi.type==4){AlpsEvent.addBuiltInEvent(this.mapView.mapContainer,"mousewheel",this.mouseWheelHandler);}else{AlpsEvent.addBuiltInEvent(window.document,"mousewheel",this.mouseWheelHandler);}}};ProAtlasMapCtrl.prototype.removeWheelEvent=function(){if(_bi.type==2){AlpsEvent.removeBuiltInEvent(window.document,"DOMMouseScroll",this.mouseWheelHandler);}else{if(_bi.type==4){AlpsEvent.removeBuiltInEvent(this.mapView.mapContainer,"mousewheel",this.mouseWheelHandler);}else{AlpsEvent.removeBuiltInEvent(window.document,"mousewheel",this.mouseWheelHandler);}}};ProAtlasMapCtrl.prototype.toString=function(){var str="ProAtlasMapCtrl\n";str+=this.mapView.toString();return str;};ProAtlasMapCtrl.prototype.loadMap=function(_156,_157){if(typeof (_156)=="object"){var _158=new MapPackage(_156);this.mapView.addMapPackage(_158);}else{if(typeof (_156)=="string"){this.loadXML(_156,_157);}}};ProAtlasMapCtrl.prototype.loadXML=function(_159,_15a){var doc=null;if(_15a!=null&&_15a=="string"){doc=AlpsUtil.getXMLDOMFromStr(_159);}else{doc=AlpsUtil.getXMLDOM(_159);}if(!doc){return;}var n=doc.getElementsByTagName("proatlasmap")[0];if(!n){return;}var nl0=n.childNodes;for(var i=0;i0&&log.y>0&&log.x0||Math.abs(_179)>0){this.isMouseDragged=true;if(this.scrollType==0&&this.enableDragScroll){this.dragScroll(_178,_179);}this.mouseX=e.screenX;this.mouseY=e.screenY;}return false;};ProAtlasMapCtrl.prototype.onMouseUp=function(e){if(this.mapView.mapContainer.releaseCapture){this.mapView.mapContainer.releaseCapture();}this.mapView.grabCursor();var _17b=this.mapView.mapContainer;var log=getRelativePos(e,_17b);if(log.x>0&&log.y>0&&log.x=30){this.autoScrollCount=0;AlpsEvent.triggerEvent(this,"premapMoved",true);}else{this.autoScrollCount+=1;}this.autoScrollTimerId=_setTimeout(this,this.autoScroll,10);};ProAtlasMapCtrl.prototype.dragScroll=function(_183,_184){var _185=new Point(this.mapView.conv.m_windowWidth/2-_183,this.mapView.conv.m_windowHeight/2-_184);var _186=this.mapView.conv.Log2LL(_185);this.moveTo(_186,null,true,false,true);};ProAtlasMapCtrl.prototype.onWindowMouseOut=function(e){if(!e.relatedTarget&&this.isMouseDown){this.onMouseUp(e);}};ProAtlasMapCtrl.prototype.onMouseOver=function(e){var _189=this.mapView.mapContainer;var log=getRelativePos(e,_189);if(log.x>=0&&log.y>=0&&log.x<=this.mapWidth&&log.y<=this.mapHeight){if(!this.mouseIsOnTheMap){this.mouseIsOnTheMap=true;var _18b=this.log2LatLon(log);AlpsEvent.triggerEvent(this,"mouseOver",_18b);}}};ProAtlasMapCtrl.prototype.onMouseOut=function(e){var _18d=this.mapView.mapContainer;var log=getRelativePos(e,_18d);if(log.x<=0||log.y<=0||log.x>=this.mapWidth||log.y>=this.mapHeight){if(this.mouseIsOnTheMap){this.mouseIsOnTheMap=false;var _18f=this.log2LatLon(log);AlpsEvent.triggerEvent(this,"mouseOut",_18f);}}};ProAtlasMapCtrl.prototype.onKeyDown=function(e){if(!this.enableKeyboardOperation){return true;}e=(e?e:window.event);switch(e.keyCode){case 33:if(this.enableLayerOperation){var _191=this.mapView.frontSheet.layerId+1;if(this.IsEnableLayer(this.mapView.frontSheet.packageId,_191)){this.layerTo(_191,null,true);}CancelBubble(e);return false;}else{return true;}case 34:if(this.enableLayerOperation){var _191=this.mapView.frontSheet.layerId-1;if(this.IsEnableLayer(this.mapView.frontSheet.packageId,_191)){this.layerTo(_191,null,true);}CancelBubble(e);return false;}else{return true;}case 36:if(this.enableMagnifyOperation){var _192=1;if(this.arrowKeys.contains(16)){if(this.mapView.frontSheet.magnify>1){_192=1;}else{_192=_minMagnify;}}else{_192=this.mapView.frontSheet.magnify/1.2;}this.magnifyTo(_192,true);CancelBubble(e);return false;}else{return true;}case 35:if(this.enableMagnifyOperation){var _192=1;if(this.arrowKeys.contains(16)){if(this.mapView.frontSheet.magnify<1){_192=1;}else{_192=_maxMagnify;}}else{_192=this.mapView.frontSheet.magnify*1.2;}this.magnifyTo(_192,true);CancelBubble(e);return false;}else{return true;}case 45:if(this.enableSmoothLayerOperation){var _191=this.mapView.frontSheet.layerId+1;if(this.IsEnableLayer(this.mapView.frontSheet.packageId,_191)){this.smoothLayerTo(_191,true);}CancelBubble(e);return false;}else{return true;}case 46:if(this.enableSmoothLayerOperation){var _191=this.mapView.frontSheet.layerId-1;if(this.IsEnableLayer(this.mapView.frontSheet.packageId,_191)){this.smoothLayerTo(_191,true);}CancelBubble(e);return false;}else{return true;}case 82:if(this.enableAngleOperation){var _193=this.getCurrentAngle()+5;if(this.arrowKeys.contains(16)){this.smoothAngleTo(_193);}else{this.angleTo(_193,true);}CancelBubble(e);return false;}else{return true;}case 76:if(this.enableAngleOperation){var _193=this.getCurrentAngle()-5;if(this.arrowKeys.contains(16)){this.smoothAngleTo(_193);}else{this.angleTo(_193,true);}CancelBubble(e);return false;}else{return true;}case 32:if(this.enablePackageOperation){var _194=this.mapView.getNextPackageId(this.getCurrentPackageId());this.smoothPackageTo(_194);CancelBubble(e);return false;}else{return true;}case 37:case 38:case 39:case 40:this.arrowKeys.add(e.keyCode);this.startFlightScroll();CancelBubble(e);return false;case 16:this.arrowKeys.add(e.keyCode);CancelBubble(e);return false;case 18:if(_bi.type==2&&_bi.subType==1){CancelBubble(e);return false;}return true;}return true;};ProAtlasMapCtrl.prototype.onKeyUp=function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:case 16:this.arrowKeys.remove(e.keyCode);CancelBubble(e);return false;}return true;};ProAtlasMapCtrl.prototype.smoothZoom=function(_196){var _197=_196;if(!this.isSmoothZoomEnd){var _198=this.mapView.frontSheet.magnify;var _199=_198*this.stepMagnify;if(_199<0.01){_199=0.01;this.isSmoothZoomEnd=true;}else{if(_199>100){_199=100;this.isSmoothZoomEnd=true;}else{if((this.stepMagnify>1&&_199>this.targetMagnify)||(this.stepMagnify<1&&_199this.mapView.conv.m_windowWidth||_1b8.y<0||_1b8.y>this.mapView.conv.m_windowHeight)){this.moveTo(this.targetLatLon,null,_1b5,false,true);}else{if((Math.abs(_1b7.x-_1b8.x)<2&&Math.abs(_1b7.y-_1b8.y)<2)||this.cntrngCount>30){this.moveTo(this.targetLatLon,null,_1b5,false,true);}else{if(this.cntrngCount<3){this.cntrngCount+=1;var _1b9=new Point((_1b7.x*4+_1b8.x)/5,(_1b7.y*4+_1b8.y)/5);var _1ba=this.mapView.conv.Log2LL(_1b9);this.moveTo(_1ba,null,_1b5,true,true);this.cntrngTimerId=_setTimeout(this,this.smoothCentering,this.cntrngElapseTime,_1b5,_1b6);}else{this.cntrngCount+=1;var _1b9=new Point((_1b7.x+_1b8.x)/2,(_1b7.y+_1b8.y)/2);var _1ba=this.mapView.conv.Log2LL(_1b9);this.moveTo(_1ba,null,_1b5,true,true);this.cntrngTimerId=_setTimeout(this,this.smoothCentering,this.cntrngElapseTime,_1b5,_1b6);}}}};ProAtlasMapCtrl.prototype.stopSmoothCentering=function(_1bb){if(this.cntrngTimerId!=0){clearTimeout(this.cntrngTimerId);this.cntrngTimerId=0;if(_1bb==null){_1bb=false;}AlpsEvent.triggerEvent(this,"premapMoved",_1bb);return true;}else{return false;}};ProAtlasMapCtrl.prototype.startFlightScroll=function(){if(this.flightScrollTimerId==0){this.flightScrollCount=0;this.flightScrollTimerId=_setTimeout(this,this.flightScroll,5);}};ProAtlasMapCtrl.prototype.stopFlightScroll=function(_1bc){if(this.flightScrollTimerId!=0){clearTimeout(this.flightScrollTimerId);this.flightScrollTimerId=0;this.velocityX=0;this.velocityY=0;if(_1bc==null){_1bc=false;}AlpsEvent.triggerEvent(this,"premapMoved",_1bc);return true;}else{return false;}};ProAtlasMapCtrl.prototype.flightScroll=function(){var _1bd=0;var _1be=0;var _1bf=this.accelerationOfJetEngine;if(this.arrowKeys.contains(16)){_1bf*=3;}if(this.arrowKeys.contains(37)){_1bd-=_1bf;}if(this.arrowKeys.contains(39)){_1bd+=_1bf;}if(this.arrowKeys.contains(38)){_1be-=_1bf;}if(this.arrowKeys.contains(40)){_1be+=_1bf;}this.flightScrollCore(_1bd,_1be,this.flightScrollElapseTime/1000);if(this.velocityX!=0||this.velocityY!=0){if(this.flightScrollCount>=50){this.flightScrollCount=0;AlpsEvent.triggerEvent(this,"premapMoved",true);}else{this.flightScrollCount+=1;}this.flightScrollTimerId=_setTimeout(this,this.flightScroll,this.flightScrollElapseTime);}else{this.flightScrollTimerId=0;AlpsEvent.triggerEvent(this,"premapMoved",true);}};ProAtlasMapCtrl.prototype.flightScrollCore=function(_1c0,_1c1,_1c2){var _1c3=-this.coefficientOfAirResistance*this.velocityX;var _1c4=-this.coefficientOfAirResistance*this.velocityY;var _1c5=this.objectMass*_1c0+_1c3;var _1c6=this.objectMass*_1c1+_1c4;var aX=_1c5/this.objectMass;var aY=_1c6/this.objectMass;var _1c9=this.velocityX*_1c2+0.5*aX*_1c2*_1c2;var _1ca=this.velocityY*_1c2+0.5*aY*_1c2*_1c2;if(Math.abs(_1c9)<2&&Math.abs(_1ca)<2){this.velocityX=0;this.velocityY=0;}else{this.velocityX=_1c9/_1c2;this.velocityY=_1ca/_1c2;if(_1c9!=0||_1ca!=0){var _1cb=new Point(this.mapView.conv.m_windowWidth/2+_1c9,this.mapView.conv.m_windowHeight/2+_1ca);var _1cc=this.mapView.conv.Log2LL(_1cb);this.moveTo(_1cc,true,true,false,true);}}};ProAtlasMapCtrl.prototype.mapMoving=function(){if(this.mapView.backSheet.getVisible()){this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();}if(this.premapMovedTimerId){window.clearTimeout(this.premapMovedTimerId);this.premapMovedTimerId=0;}};ProAtlasMapCtrl.prototype.premapMoved=function(_1cd){if(this.getDatumTimerId){window.clearTimeout(this.getDatumTimerId);this.getDatumTimerId=0;}if(typeof (_dc)=="undefined"||!_dc.server){AlpsEvent.triggerEvent(this,"mapMoved",_1cd);}else{this.getDatumTimerId=_setTimeout(this,this.timer_updateDatumInfo,_delaytime,_1cd);}if(this.premapMovedTimerId){window.clearTimeout(this.premapMovedTimerId);this.premapMovedTimerId=0;}this.premapMovedTimerId=_setTimeout(this,this.timer_updateLayerScaleList,_delaytime);};ProAtlasMapCtrl.prototype.timer_updateDatumInfo=function(_1ce){if(typeof (_dc)=="undefined"||!_dc.server){AlpsEvent.triggerEvent(this,"mapMoved",_1ce);return;}var _1cf=this.getCurrentMapDatum();var _1d0=this;if(!_dc.getExistsMesh(this.mapView.conv.m_center)){AlpsEvent.triggerEvent(_1d0,"mapMoved",_1ce);}else{var _1d1=function(dB,dL){AlpsEvent.triggerEvent(_1d0,"mapMoved",_1ce);};if(_1cf=="wgs84"){_dc.getRevParam(this.mapView.conv.m_center,_1d1);}else{if(_1cf=="tokyo97"){_dc.getParam(this.mapView.conv.m_center,_1d1);}else{AlpsEvent.triggerEvent(_1d0,"mapMoved",_1ce);}}}};ProAtlasMapCtrl.prototype.timer_updateLayerScaleList=function(){if(this.yahooMapLayer){this.updateLayerScaleList();}else{for(var i=0;i=0;--i){var s=_249[i];var diff=s/_24a;if(diff<1){diff=1/diff;}if(diff<_24c){_24c=diff;_24b=i;}}return _24b;};ProAtlasMapCtrl.prototype.getCurrentMapDatum=function(){var _250="tokyo97";var _251=this.mapView.frontSheet.vendor;var _252=this.getCurrentLayerId(true);if(_252==null){return null;}var _253=this.mapView.frontSheet.getCurrentPackage().layerCollect[_252];if(_251==1){var proj=_253.getProjInfoById(this.mapView.frontSheet.projId);if(proj&&proj.datum!=undefined){_250=proj.datum;}}else{if(_251==2){var proj=_253.projInfo_inc;if(proj&&proj.datum!=undefined){_250=proj.datum;}}}return _250;};ProAtlasMapCtrl.prototype.getTargetVendor=function(_255,_256){var _257=this.mapView.frontSheet.vendor;var _258=this.mapView.getMapPackage(_255);var _259=_258?_258.layerCollect[_256]:null;if(_257==1&&_259){var _25a=this.IsEnableLayer(_255,_256);var _25b=_259.IsExistVendor("inc");var _25c=this.IsEnableLayer(_255,this.getLayerId(_keyLayerScale,0,true));if(!_259.IsExistVendor("alps")||(!_25a&&_25b&&!_25c)){_257=2;}}else{if(_257==2&&_259){if(_259.IsExistVendor("alps")&&(this.IsEnableLayer(_255,_256)||this.IsEnableLayer(_255,this.getLayerId(_keyLayerScale,0,true)))){_257=1;}}}return _257;};ProAtlasMapCtrl.prototype.moveTo=function(_25d,_25e,_25f,_260,_261){var _262=this.datum;if(_261){_262=this.getCurrentMapDatum();}var _263=this.checkScrollRange(_25d);if(_260==null){_260=false;}if(!_260){this.stopSmoothCentering(_25f);}if(_25e==null){_25e=false;}if(!_25e){this.stopFlightScroll(_25f);}var _264=this.mapView.frontSheet.packageId;var _265=this.mapView.frontSheet.layerId;var _266=this.mapView.frontSheet.magnify;var _267=this.mapView.frontSheet.angle;var _268=true;var _269=false;this.mapView.frontSheet.setCenterAndScale(_263,_264,_265,_266,_267,_268,_269,this.mapView.frontSheet.vendor,_262);AlpsEvent.triggerEvent(this,"mapMoving");if(!this.isMouseDown&&!_260&&this.velocityX==0&&this.velocityY==0){if(_25f==null){_25f=false;}AlpsEvent.triggerEvent(this,"premapMoved",_25f);}};ProAtlasMapCtrl.prototype.checkScrollRange=function(_26a){var _26b=this.mapView.frontSheet.getCurrentPackage().layerCollect[this.getCurrentLayerId(true)];var _26c=_26b.getProjInfoById(this.mapView.frontSheet.projId);var _26d=new LLPoint(_26a.lat,_26a.lon);if(!_26b.scrollrange.enable){return _26d;}if(_26c){var conv=new CoordinatesConversion();if(_26c.code!=2){conv.setProjConv(_26c.code,new LLPoint(_26c.origin.lat,_26c.origin.lon),_26c.subInfo);}else{conv.setProjConv(_26c.code,null,_26c.subInfo);}conv.setScale(this.getCurrentScale()/this.getCurrentMagnify());conv.setAngle(0);conv.setCenter(this.mapView.conv.m_center);var _26f=conv.LL2Meter(_26d);var _270=false;if(_26b.scrollrange.bottomleftLatLon){var _271=conv.LL2Meter(_26b.scrollrange.bottomleftLatLon);if(_26f.x<_271.x){_270=true;_26f.x=_271.x;}if(_26f.y<_271.y){_270=true;_26f.y=_271.y;}}if(_26b.scrollrange.toprightLatLon){var _272=conv.LL2Meter(_26b.scrollrange.toprightLatLon);if(_272.x<_26f.x){_270=true;_26f.x=_272.x;}if(_272.y<_26f.y){_270=true;_26f.y=_272.y;}}if(_270){_26d=conv.Meter2LL(_26f);}}if(_26b.scrollrange.top){if(_26b.scrollrange.top<_26d.lat){_26d.lat=_26b.scrollrange.top;}}if(_26b.scrollrange.bottom){if(_26b.scrollrange.bottom>_26d.lat){_26d.lat=_26b.scrollrange.bottom;}}if(_26b.scrollrange.left){if(_26b.scrollrange.left>_26d.lon){_26d.lon=_26b.scrollrange.left;}}if(_26b.scrollrange.right){if(_26b.scrollrange.right<_26d.lon){_26d.lon=_26b.scrollrange.right;}}return _26d;};ProAtlasMapCtrl.prototype.smoothMoveTo=function(_273,_274){var _275=this.getCurrentMapDatum();var _276=this;var _277=true;datumConvert(_273,this.datum,_275,_277,function(_278){_276.stopSmoothCentering();_276.stopFlightScroll();_276.startSmoothCentering(_278,false,_274);});};ProAtlasMapCtrl.prototype.emergeMoveTo=function(_279){var _27a=this.getCurrentMapDatum();var _27b=this.checkScrollRange(_279);var _27c=false;this.stopSmoothCentering(_27c);this.stopFlightScroll(_27c);if(this.mapView.isFadeinFlipping()){this.mapView.stopFadeinFlipping();}this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _27d=this.mapView.frontSheet.packageId;var _27e=this.mapView.frontSheet.layerId;var _27f=this.mapView.frontSheet.magnify;var _280=this.mapView.frontSheet.angle;var _281=true;var _282=true;this.mapView.backSheet.setCenterAndScale(_27b,_27d,_27e,_27f,_280,_281,_282,this.mapView.frontSheet.vendor,_27a);this.mapView.fadeinFlipSheet("mapmove");};ProAtlasMapCtrl.prototype.packageTo=function(_283){if(this.zoomTimerId!=0){return;}this.stopSmoothCentering();this.stopFlightScroll();var _284=this.mapView.getMapPackage(_283);var _285=null;var _286=0;if(this.mapView.frontSheet.layerId!=null){_286=this.mapView.getMapPackage(this.mapView.frontSheet.packageId).getLayerScale(this.mapView.frontSheet.layerId);}if(_286!=0){_285=this.mapView.getMapPackage(_283).getLayerId(_286,0,true);}var _287=this.getTargetVendor(_283,_285);var _288=this.getCurrentMapDatum();this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _289=this.mapView.conv.m_center;var _28a=this.mapView.frontSheet.magnify;var _28b=this.mapView.frontSheet.angle;var _28c=true;var _28d=true;this.mapView.backSheet.setCenterAndScale(_289,_283,_285,_28a,_28b,_28c,_28d,_287,_288);this.mapView.flipSheet();AlpsEvent.triggerEvent(this,"packageChanged");if(this.mapView.frontSheet.angle!=this.mapView.backSheet.angle){AlpsEvent.triggerEvent(this,"angleChanged");}if(this.mapView.frontSheet.scale!=this.mapView.backSheet.scale){AlpsEvent.triggerEvent(this,"layerChanged");}};ProAtlasMapCtrl.prototype.smoothPackageTo=function(_28e){if(_bi.type==4&&_bi.version<9){this.packageTo(_28e);return;}if(this.mapView.fadeinTimerId!=0){return;}if(this.zoomTimerId!=0){return;}if(_28e==this.mapView.frontSheet.packageId){return;}this.stopSmoothCentering();this.stopFlightScroll();AlpsEvent.triggerEvent(this,"smoothPackageChanging",this.mapView.frontSheet.packageId,_28e);var _28f=this.mapView.getMapPackage(_28e);var _290=null;var _291=0;if(this.mapView.frontSheet.layerId!=null){_291=this.mapView.getMapPackage(this.mapView.frontSheet.packageId).getLayerScale(this.mapView.frontSheet.layerId);}if(_291!=0){_290=this.mapView.getMapPackage(_28e).getLayerId(_291,0,true);}var _292=this.getTargetVendor(_28e,_290);var _293=this.getCurrentMapDatum();this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _294=this.mapView.conv.m_center;var _295=this.mapView.frontSheet.magnify;var _296=this.mapView.frontSheet.angle;var _297=true;var _298=true;this.mapView.backSheet.setCenterAndScale(_294,_28e,_290,_295,_296,_297,_298,_292,_293);this.mapView.fadeinFlipSheet("package");};ProAtlasMapCtrl.prototype.layerTo=function(_299,_29a,_29b){if(this.zoomTimerId!=0){return;}_29a=this.mapView.frontSheet;var _29c=_29a.getCurrentPackage();if(_29b){if(0<=_299&&_299<_29c.layerCollect.length){if(!_29c.layerCollect[_299].operation){return;}}}_299=this.toInsideLayerId(_299,!_29b);if(_299<0){_299=0;}else{if(_29a.getCurrentPackage().layerCollect.length<=_299){_299=_29a.getCurrentPackage().layerCollect.length-1;}}this.stopSmoothCentering(_29b);this.stopFlightScroll(_29b);var _29d=this.getTargetVendor(this.getCurrentPackageId(),_299);var _29e=this.getCurrentMapDatum();this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _29f=_29a.packageId;var _2a0=this.mapView.conv.m_center;var _2a1=_29a.magnify;var _2a2=_29a.angle;var _2a3=true;var _2a4=true;this.mapView.frontSheet.setCenterAndScale(_2a0,_29f,_299,_2a1,_2a2,_2a3,_2a4,_29d,_29e);AlpsEvent.triggerEvent(this,"layerChanged");};ProAtlasMapCtrl.prototype.smoothLayerTo=function(_2a5,_2a6){if(this.zoomTimerId!=0){return;}if(this.mapView.isFadeinFlipping()){this.mapView.stopFadeinFlipping();}_2a5=this.toInsideLayerId(_2a5,!_2a6);var _2a7=this.mapView.frontSheet.getCurrentPackage();if(_2a7!=null&&_2a5<0){_2a5=0;}else{if(_2a7!=null&&_2a7.layerCollect.length<=_2a5){_2a5=_2a7.layerCollect.length-1;}}if(_2a5==this.mapView.frontSheet.layerId){return;}if(_2a6){if(!_2a7.layerCollect[_2a5].operation){return;}}this.stopSmoothCentering(_2a6);this.stopFlightScroll(_2a6);var _2a8=this.toOutsideLayerId(this.mapView.frontSheet.layerId,true);var _2a9=this.toOutsideLayerId(_2a5,true);AlpsEvent.triggerEvent(this,"smoothLayerChanging",_2a8,_2a9);var _2aa=this.getCurrentMapDatum();var _2ab=this.getTargetVendor(this.getCurrentPackageId(),_2a5);this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();this.mapView.backSheet.magnify=1;var _2ac=true;this.mapView.backSheet.setTileCount(this.mapView.conv.m_windowWidth,this.mapView.conv.m_windowHeight,_2ac);var _2ad=this.mapView.frontSheet.packageId;var _2ae=this.mapView.conv.m_center;var _2af=this.mapView.frontSheet.angle;var _2b0=true;this.mapView.backSheet.setCenterAndScale(_2ae,_2ad,_2a5,this.mapView.backSheet.magnify,_2af,_2ac,_2b0,_2ab,_2aa);var _2b1;if(this.mapView.frontSheet.vendor==2){_2b1=_2a7.layerCollect[this.getCurrentLayerId(true)].projInfo_inc.scale;}else{_2b1=_2a7.getLayerScale(this.mapView.frontSheet.layerId);}var _2b2;if(_2ab==2){var _2b3=_2a7?_2a7.layerCollect[_2a5]:null;_2b2=_2b3?_2b3.projInfo_inc.scale:this.getCurrentScale();}else{_2b2=_2a7.getLayerScale(_2a5);}this.targetMagnify=_2b1/_2b2;if(!this.enableZoomendFadeinEfct||(_bi.type==2&&_bi.subType==1&&_bi.version<1.5)||(_bi.type==2&&_bi.subType==3&&_bi.version<1.8)||(_bi.type==2&&_bi.subType==2)||(_bi.type==4&&_bi.version<9)){this.stepMagnify=Math.pow(this.targetMagnify,0.1);}else{this.stepMagnify=Math.pow(this.targetMagnify,0.1);}this.isSmoothZoomEnd=false;this.smoothZoom(new LLPoint(_2ae.lat,_2ae.lon));};ProAtlasMapCtrl.prototype.moveAndLayerTo=function(_2b4,_2b5,_2b6){if(this.zoomTimerId!=0){return;}this.stopSmoothCentering();this.stopFlightScroll();var _2b7=this.datum;if(_2b6){_2b7=this.getCurrentMapDatum();}_2b5=this.toInsideLayerId(_2b5,!_2b6);var _2b8=this.mapView.frontSheet.getCurrentPackage();if(_2b8!=null&&_2b5<0){_2b5=0;}else{if(_2b8!=null&&_2b8.layerCollect.length<=_2b5){_2b5=_2b8.layerCollect.length-1;}}var _2b9=this.getTargetVendor(this.getCurrentPackageId(),_2b5);this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _2ba=this.mapView.frontSheet.packageId;var _2bb=this.mapView.frontSheet.magnify;var _2bc=this.mapView.frontSheet.angle;var _2bd=true;var _2be=true;this.mapView.backSheet.setCenterAndScale(_2b4,_2ba,_2b5,_2bb,_2bc,_2bd,_2be,_2b9,_2b7);this.mapView.flipSheet();AlpsEvent.triggerEvent(this,"mapMoving");AlpsEvent.triggerEvent(this,"premapMoved",false);AlpsEvent.triggerEvent(this,"layerChanged");};ProAtlasMapCtrl.prototype.magnifyTo=function(_2bf,_2c0,_2c1){if(this.zoomTimerId!=0){return;}if(this.mapView.isFadeinFlipping()){this.mapView.stopFadeinFlipping();}if(_2c1==undefined){_2c1=true;}if(_2c1){if(_2bf<_minMagnify){_2bf=_minMagnify;}if(_2bf>_maxMagnify){_2bf=_maxMagnify;}}else{if(_2bf<0.01){_2bf=0.01;}if(_2bf>100){_2bf=100;}}if(this.getCurrentMagnify()==_2bf){return;}this.stopSmoothCentering(_2c0);this.stopFlightScroll(_2c0);this.mapView.backSheet.setVisible(false);var _2c2=this.mapView.conv.m_center;var _2c3=this.mapView.frontSheet.packageId;var _2c4=this.mapView.frontSheet.layerId;var _2c5=this.mapView.frontSheet.angle;var _2c6=false;this.mapView.frontSheet.setCenterAndScale(_2c2,_2c3,_2c4,_2bf,_2c5,_2c1,_2c6);AlpsEvent.triggerEvent(this,"magnifyChanged");};ProAtlasMapCtrl.prototype.defaultTo=function(){var _2c7=this.mapView.getMapPackage(this.defPackageId).getLayerId(this.defScale,0,false);this.magnifyTo(1);this.packageTo(this.defPackageId);this.moveAndLayerTo(this.defPos,_2c7,false);};ProAtlasMapCtrl.prototype.latLon2Log=function(_2c8){var inLL=this.toInside(_2c8,true);var _2ca=this.mapView.conv.LL2Log(inLL);if(this.getCurrentScale()>=6103510){if(_2ca.x<0){var _2cb=this.mapView.conv.LL2Log(new LLPoint(_2c8.lat,180));var _2cc=this.mapView.conv.LL2Log(new LLPoint(_2c8.lat,-180));var newX=_2cb.x+(_2ca.x-_2cc.x);var _2ce=this.mapWidth/2;if(newX-_2ce<_2ce-_2ca.x){_2ca.x=newX;}}else{if(_2ca.x>this.mapWidth){var _2cb=this.mapView.conv.LL2Log(new LLPoint(_2c8.lat,180));var _2cc=this.mapView.conv.LL2Log(new LLPoint(_2c8.lat,-180));var newX=_2cc.x-(_2cb.x-_2ca.x);var _2ce=this.mapWidth/2;if(_2ce-newX<_2ca.x-_2ce){_2ca.x=newX;}}}}return _2ca;};ProAtlasMapCtrl.prototype.log2LatLon=function(_2cf){var _2d0=this.mapView.conv.Log2LL(_2cf);return this.toOutside(_2d0,true);};ProAtlasMapCtrl.prototype.setEnableDragScroll=function(_2d1){this.enableDragScroll=_2d1;};ProAtlasMapCtrl.prototype.getEnableDragScroll=function(){return this.enableDragScroll;};ProAtlasMapCtrl.prototype.setEnableDbClickCentering=function(_2d2){this.enableDbClickCentering=_2d2;};ProAtlasMapCtrl.prototype.getEnableDbClickCentering=function(){return this.enableDbClickCentering;};ProAtlasMapCtrl.prototype.setEnableSingleClickCentering=function(_2d3){this.enableSingleClickCentering=_2d3;};ProAtlasMapCtrl.prototype.getEnableSingleClickCentering=function(){return this.enableSingleClickCentering;};ProAtlasMapCtrl.prototype.setEnableKeyboardOperation=function(_2d4){this.enableKeyboardOperation=_2d4;if(!_2d4){this.arrowKeys.sleep();}else{this.arrowKeys.wakeup();this.startFlightScroll();}};ProAtlasMapCtrl.prototype.getEnableKeyboardOperation=function(){return this.enableKeyboardOperation;};ProAtlasMapCtrl.prototype.setEnableMagnifyOperation=function(_2d5){this.enableMagnifyOperation=_2d5;};ProAtlasMapCtrl.prototype.getEnableMagnifyOperation=function(){return this.enableMagnifyOperation;};ProAtlasMapCtrl.prototype.setEnableLayerOperation=function(_2d6){this.enableLayerOperation=_2d6;};ProAtlasMapCtrl.prototype.getEnableLayerOperation=function(){return this.enableLayerOperation;};ProAtlasMapCtrl.prototype.setEnableSmoothLayerOperation=function(_2d7){this.enableSmoothLayerOperation=_2d7;};ProAtlasMapCtrl.prototype.getEnableSmoothLayerOperation=function(){return this.enableSmoothLayerOperation;};ProAtlasMapCtrl.prototype.setEnableAngleOperation=function(_2d8){this.enableAngleOperation=_2d8;};ProAtlasMapCtrl.prototype.getEnableAngleOperation=function(){return this.enableAngleOperation;};ProAtlasMapCtrl.prototype.setEnableSmoothScroll=function(_2d9){this.enableSmoothScroll=_2d9;};ProAtlasMapCtrl.prototype.getEnableSmoothScroll=function(){return this.enableSmoothScroll;};ProAtlasMapCtrl.prototype.setEnableWheelOperation=function(_2da){this.enableWheelOperation=_2da;if(this.enableWheelOperation){this.addWheelEvent();}else{this.removeWheelEvent();}};ProAtlasMapCtrl.prototype.getEnableWheelOperation=function(){return this.enableWheelOperation;};ProAtlasMapCtrl.prototype.setEnableReverseWheelOperation=function(_2db){this.enableReverseWheelOperation=_2db;};ProAtlasMapCtrl.prototype.getEnableReverseWheelOperation=function(){return this.enableReverseWheelOperation;};ProAtlasMapCtrl.prototype.setEnableZoomendFadeinEfct=function(_2dc){this.enableZoomendFadeinEfct=_2dc;};ProAtlasMapCtrl.prototype.getEnableZoomendFadeinEfct=function(){return this.enableZoomendFadeinEfct;};ProAtlasMapCtrl.prototype.setEnablePackageOperation=function(_2dd){this.enablePackageOperation=_2dd;};ProAtlasMapCtrl.prototype.getEnablePackageOperation=function(){return this.enablePackageOperation;};ProAtlasMapCtrl.prototype.setVisibleCenterMark=function(_2de){this.mapView.setVisibleCenterMark(_2de);};ProAtlasMapCtrl.prototype.getVisibleCenterMark=function(){return this.mapView.getVisibleCenterMark();};ProAtlasMapCtrl.prototype.setVisibleCopyright=function(_2df){this.mapView.setVisibleCopyright(_2df);};ProAtlasMapCtrl.prototype.getVisibleCopyright=function(){this.mapView.getVisibleCopyright();};ProAtlasMapCtrl.prototype.setEnableAutoLayerChange=function(_2e0){this.enableAutoLayerChange=_2e0;};ProAtlasMapCtrl.prototype.getEnableAutoLayerChange=function(){return this.enableAutoLayerChange;};ProAtlasMapCtrl.prototype.setDatum=function(_2e1){this.datum=_2e1;};ProAtlasMapCtrl.prototype.getDatum=function(){return this.datum;};ProAtlasMapCtrl.prototype.getCenterLatLon=function(){return this.toOutside(this.mapView.conv.m_center,true);};ProAtlasMapCtrl.prototype.getCurrentPackageId=function(){return this.mapView.frontSheet.packageId;};ProAtlasMapCtrl.prototype.getPackageList=function(){var _2e2=new Array;for(var i=0;i=360){_34e-=360;}else{if(_34e<0){_34e+=360;}}if(this.getCurrentAngle()==_34e){return;}this.stopSmoothCentering(_34f);this.stopFlightScroll(_34f);var _350=this.mapView.conv.m_center;var _351=this.mapView.frontSheet.packageId;var _352=this.mapView.frontSheet.layerId;var _353=this.mapView.frontSheet.magnify;var _354=true;var _355=false;this.mapView.backSheet.setCenterAndScale(_350,_351,_352,_353,_34e,_354,_355);this.mapView.flipSheet();AlpsEvent.triggerEvent(this,"angleChanged");};ProAtlasMapCtrl.prototype.getCurrentAngle=function(){return this.mapView.frontSheet.angle;};ProAtlasMapCtrl.prototype.smoothAngleTo=function(_356){if(this.getMapserverSrcType()!=2){return;}if(_bi.type!=1&&_bi.type!=2&&_bi.type!=3){this.angleTo(_356);return;}if(this.mapView.fadeinTimerId!=0){return;}if(this.zoomTimerId!=0){return;}if(_356>=360){_356-=360;}else{if(_356<0){_356+=360;}}if(_356==this.getCurrentAngle()){return;}this.stopSmoothCentering();this.stopFlightScroll();AlpsEvent.triggerEvent(this,"smoothAngleChanging",this.getCurrentAngle(),_356);var _357=this.mapView.conv.m_center;var _358=this.getCurrentPackageId();var _359=this.getCurrentLayerId(true);var _35a=this.mapView.frontSheet.magnify;var _35b=true;var _35c=true;this.mapView.backSheet.setCenterAndScale(_357,_358,_359,_35a,_356,_35b,_35c);this.mapView.fadeinFlipSheet("angle");};ProAtlasMapCtrl.prototype.getMapserverSrcType=function(){if(this.mapView.ExistMapPackage(this.getCurrentPackageId())){var _35d=this.mapView.frontSheet.getCurrentPackage().getNextMapserver(this.mapView.frontSheet.vendor);return _35d.sourceType;}else{return 1;}};ProAtlasMapCtrl.prototype.setVisible=function(_35e){this.mapView.frontSheet.setVisible(_35e);};ProAtlasMapCtrl.prototype.vendorTo=function(_35f){if(_35f==this.mapView.frontSheet.vendor){return;}this.stopSmoothCentering();this.stopFlightScroll();var _360="tokyo97";var _361=this.mapView.frontSheet.getCurrentPackage().layerCollect[this.getCurrentLayerId(true)];var _362=this.mapView.frontSheet.vendor;if(_362==1){var proj=_361.getProjInfoById(this.mapView.frontSheet.projId);_360=proj.datum;}else{if(_362==2){var proj=_361.projInfo_inc;_360=proj.datum;}}this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _364=this.mapView.conv.m_center;var _365=this.mapView.frontSheet.packageId;var _366=this.mapView.frontSheet.layerId;var _367=this.mapView.frontSheet.magnify;var _368=this.mapView.frontSheet.angle;var _369=true;var _36a=true;this.mapView.backSheet.setCenterAndScale(_364,_365,_366,_367,_368,_369,_36a,_35f,_360);this.mapView.flipSheet();AlpsEvent.triggerEvent(this,"vendorChanged");};ProAtlasMapCtrl.prototype.smoothVendorTo=function(_36b){if(_bi.type==4&&_bi.version<9){this.vendorTo(_36c);return;}if(this.mapView.fadeinTimerId!=0){this.mapView.stopFadeinFlipping();}if(_36b==this.mapView.frontSheet.vendor){return;}this.stopSmoothCentering();this.stopFlightScroll();var _36d="tokyo97";var _36e=this.mapView.frontSheet.getCurrentPackage().layerCollect[this.getCurrentLayerId(true)];var _36f=this.mapView.frontSheet.vendor;if(_36f==1){var proj=_36e.getProjInfoById(this.mapView.frontSheet.projId);_36d=proj.datum;}else{if(_36f==2){var proj=_36e.projInfo_inc;_36d=proj.datum;}}AlpsEvent.triggerEvent(this,"smoothVendorChanging",this.mapView.frontSheet.vendor,_36b);this.mapView.backSheet.setVisible(false);this.mapView.backSheet.resetAllTiles();var _371=this.mapView.conv.m_center;var _36c=this.mapView.frontSheet.packageId;var _372=this.mapView.frontSheet.layerId;var _373=this.mapView.frontSheet.magnify;var _374=this.mapView.frontSheet.angle;var _375=true;var _376=true;this.mapView.backSheet.setCenterAndScale(_371,_36c,_372,_373,_374,_375,_376,_36b,_36d);this.mapView.fadeinFlipSheet("vendor");};ProAtlasMapCtrl.prototype.getCurrentZoomLevel=function(){var _377=this.mapView.frontSheet.getCurrentPackage().layerCollect[this.getCurrentLayerId(true)];return _377.projInfo_inc!=undefined?_377.projInfo_inc.level:0;};ProAtlasMapCtrl.prototype.getCenterTileId=function(){var _378=this.mapView.conv.LL2Log(this.mapView.conv.getProjOrigin());var _379=_378.x*-1;var _37a=_378.y*-1;_37a*=-1;var _37b=_379+this.mapView.conv.m_windowWidth;var _37c=_37a-this.mapView.conv.m_windowHeight;var _37d=(_379+_37b)/2;var _37e=(_37c+_37a)/2;var _37f=new Point(Math.floor(_37d/this.mapView.frontSheet.tileSize.width),Math.floor(_37e/this.mapView.frontSheet.tileSize.height));return _37f;};ProAtlasMapCtrl.prototype.getYahooCopyright=function(){var _380=this.getCurrentPackageId();var _381=this.getCurrentScale();var _382=this.layerCodeList[_380];this.yahooCopyright="";for(var i=0;i<_382.length;++i){var _384=_382[i];if(_384.scale==_381){this.yahooCopyright=_384.copyright;break;}}return this.yahooCopyright;};ProAtlasMapCtrl.prototype.release=function(){if(_bi.type!=1){return;}_objrelease(this.vectorOpe,true);_objrelease(this.layerScaleList,true);_objrelease(this.layerCodeList,true);_objrelease(this);}; function Mapsvr(){}Mapsvr.POI=1;Mapsvr.LINE=2;Mapsvr.AREA=3;Mapsvr.CIRCLE=4;function MapsvrBase(){this.construct.apply(this,arguments);}MapsvrBase.prototype.construct=function(id,_2,_3,_4,_5){this.id=id;this.name=_2;this.pos=_3;this.cat=_4;this.popup=_5;this.status=0;};function MapsvrPOI(){this.construct.apply(this,arguments);}MapsvrPOI.prototype=new MapsvrBase();MapsvrPOI.prototype.construct=function(id,_7,_8,_9,_a,_b){MapsvrBase.prototype.construct.call(this,id,_7,_8,_9,_a);this.type=Mapsvr.POI;this.property=_b||new Object();};MapsvrPOI.prototype.constructor=MapsvrPOI;MapsvrPOI.prototype.release=function(){_objrelease(this.property,true);_objrelease(this);};function MapsvrLine(){this.construct.apply(this,arguments);}MapsvrLine.prototype=new MapsvrBase();MapsvrLine.prototype.construct=function(id,_d,_e,_f,_10,_11){MapsvrBase.prototype.construct.call(this,id,_d,_e,_f,_10);this.type=Mapsvr.LINE;this.points=_11||new Array();};MapsvrLine.prototype.constructor=MapsvrLine;MapsvrLine.prototype.release=function(){_objrelease(this);};function MapsvrArea(){this.construct.apply(this,arguments);}MapsvrArea.prototype=new MapsvrBase();MapsvrArea.prototype.construct=function(id,_13,pos,cat,_16,_17){MapsvrBase.prototype.construct.call(this,id,_13,pos,cat,_16);this.type=Mapsvr.AREA;this.points=_17||new Array();};MapsvrArea.prototype.constructor=MapsvrArea;MapsvrArea.prototype.release=function(){_objrelease(this);};function MapsvrCircle(id,_19,pos,_1b,cat){this.type=Mapsvr.CIRCLE;this.id=id;this.name=_19;this.pos=pos;this.radius=_1b;this.cat=cat;this.status=0;}MapsvrCircle.prototype.release=function(){_objrelease(this);};function MapsvrCollection(){this.construct();}MapsvrCollection.prototype.construct=function(){this._list=[];this._map={};};MapsvrCollection.prototype.destruct=function(){_objrelease(this._map,true);_objrelease(this);};MapsvrCollection.prototype.clear=function(){this._list=null;this._list=[];this._map=null;this._map={};};MapsvrCollection.prototype.add=function(_1d){var _1e=this._list;var map=this._map;var _20=_1d.id;if(!map[_20]){_1e.push(_1d);map[_20]=_1d;return _1e.length-1;}for(var i=0,len=_1e.length;inw.x&&p.y>nw.y)&&(p.xne.y)&&(p.x>sw.x&&p.y0||this.remove_source_stack.length>0){if(this.contentsServer){this.findContents(true);}else{this.findContents();}return;}if(_92.type!==Mapsvr.POI){this.POIContents.remove(_92.id);this.vectorContents.add(_92);this.dispShape();}else{this.closePopup(true);if(_94){var doc=this.POIContents.getDoc(_92.id);if(doc){this.canvas.removeChild(doc);}doc=null;}if(this.category._indexOf(_92.cat)>=0){this.POIContents.add(_92);this.createIcon(_92.id);}if(!this.is_icon_hidden){AlpsEvent.triggerEvent(this,"POIListChanged");}}this.add_source_stack._clear();this.remove_source_stack._clear();if(this.isAutoSearch&&this.contentsServer){}};MapsvrCtrl.prototype.removeContents=function(id,_98){if(this.source.has(id)){var _99=this.source.get(id);var i=this.source.remove(id);}else{return;}if(_98){if(i!==-1){this.remove_source_stack.push(_99.id);}return;}else{if(!this.canvas){this.initCanvas();}}if(this.add_source_stack.length>0||this.remove_source_stack.length>0){if(this.contentsServer){this.findContents(true);}else{this.findContents();}return;}var doc=null;this.closePopup(true);if(_99.type==Mapsvr.POI){doc=this.POIContents.getDoc(id);this.POIContents.remove(id);this.POIContents.removeDoc(id);this.POIContents.removeIconImage(id);this.POIContents.removeLabel(id);if(!this.is_icon_hidden){AlpsEvent.triggerEvent(this,"POIListChanged");}}else{this.vectorContents.remove(id);}if(doc){this.canvas.removeChild(doc);}if(_99.type!=Mapsvr.POI){this.dispShape();}this.add_source_stack._clear();this.remove_source_stack._clear();doc=null;};MapsvrCtrl.prototype.clearContents=function(){this.source.clear();if(this.contentsServer){this.findContents(true);}else{this.findContents();}};MapsvrCtrl.prototype.addQueryParameter=function(_9c,_9d,_9e){this.removeQueryParameter(_9c);this.queryParameter.push({name:_9c,value:_9d,type:_9e});};MapsvrCtrl.prototype.removeQueryParameter=function(_9f){for(var i=0;ithis.threshold;};MapsvrCtrl.prototype.releaseContents=function(){this.POIContents.clear();this.vectorContents.clear();};MapsvrCtrl.prototype.findContents=function(_b8){if(this.draggable){this.currentDragId=null;this.dragPos=null;}if(this.use_stack===false){this.releaseContents();}this.resultProperty=new Object();if(!this.category.length){this.pourContents();this.showContents();if(!this.hasNoContents()&&!this.is_icon_hidden){AlpsEvent.triggerEvent(this,"POIListChanged");}return;}if(!_b8){this.pourContents();this.showContents();if(!this.hasNoContents()&&!this.is_icon_hidden){AlpsEvent.triggerEvent(this,"POIListChanged");}return;}if(!this.map){return;}var pos=new Array();pos.push(this.map.log2LatLon(new Point(0,0)));pos.push(this.map.log2LatLon(new Point(this.width,0)));pos.push(this.map.log2LatLon(new Point(this.width,this.height)));pos.push(this.map.log2LatLon(new Point(0,this.height)));var bl=pos[3],tr=pos[1];for(var i=0;itr.lat){tr.lat=pos[i].lat;}if(pos[i].lon>tr.lon){tr.lon=pos[i].lon;}}var ms=this;var _be=AlpsUtil.getXMLHttp();if(!_be){return;}_be.open("POST",this.contentsServer,true);_be.onreadystatechange=function(){if(_be.readyState==4&&_be.status==200){if(ms.use_stack===false){ms.releaseContents();}ms.resultProperty=new Object();var ver=parseFloat(_be.responseXML.documentElement.getAttribute("version")||"1.0");if(ver<2){var _c0=_be.responseXML.getElementsByTagName("poi");for(var i=0;i<_c0.length;i++){var _c2=AlpsUtil.getProperties(_c0[i]);_c2["identifier_uri"]=AlpsUtil.getElementAttribute(_c0[i],"identifier","uri");var id=_c2["iconid"];var _c4=AlpsUtil.getElementAttribute(_c0[i],"title","name");var cat=AlpsUtil.getElementAttribute(_c0[i],"category","xml:id");if(!cat){cat=AlpsUtil.getElementAttribute(_c0[i],"category","id");}if(!cat){cat=AlpsUtil.getElementAttribute(_c0[i],"category","type");}var _c6=_c0[i].getElementsByTagName("place")[0];var pos=AlpsUtil.getElementAttribute(_c6,"variation","placeID");var _c8=AlpsUtil.getElementContent(_c0[i],"popup");ms.POIContents.add(new MapsvrPOI(id,_c4,new LLPoint(pos),cat,_c8,_c2));}}else{var _c0=_be.responseXML.getElementsByTagName("poiarray");for(var i=0;i<_c0.length;i++){var _c2=AlpsUtil.getProperties(_c0[i]);var pos=_c2["DMS"];var cat=AlpsUtil.getElementAttribute(_c0[i],"category","xml:id");if(!cat){cat=AlpsUtil.getElementAttribute(_c0[i],"category","id");}var poi=_c0[i].getElementsByTagName("poi");var ids=new Array();var _cb=new Array();for(var j=0;j=0){if(_da.type===Mapsvr.POI){this.POIContents.add(_da);this.add_poi_stack.push(id);}else{this.vectorContents.add(_da);}}}}else{var _db;for(var i=0,len=this.source.count();i=0){if(_db.type===Mapsvr.POI){this.POIContents.add(_db);}else{this.vectorContents.add(_db);}}}}}};MapsvrCtrl.prototype.showContents=function(){if(this.use_stack===true){this.closePopup(true);if(this.hasNoContents()){this.add_source_stack._clear();this.add_poi_stack._clear();this.remove_source_stack._clear();this.remove_poi_stack._clear();this.use_stack=false;this.removeCanvas();return;}if(!this.canvas){this.initCanvas();}for(var i=0,len=this.remove_poi_stack.length;i0)?(cnt.radius*10000/this.map.getCurrentScale()):(-cnt.radius);if(!this.isValidCircle(p,r)){continue;}ag.drawCircle(p,r,_105);}else{if(cnt.type==Mapsvr.AREA){var ss=new Array();var org=this.map.latLon2Log(this.map.getProjOrigin());for(var j=0;j0)?(cnt.radius*10000/this.map.getCurrentScale()):(-cnt.radius);if(!this.isValidCircle(p,r)){continue;}if(_11e!=_11a){ret.push("s"+_11e);_11a=_11e;}var b=this.makeDword(Math.floor(p.x))+this.makeDword(Math.floor(p.y))+this.makeDword(Math.floor(r));ret.push("c"+b);}else{if(cnt.type==Mapsvr.AREA){var ss=new Array();var org=this.map.latLon2Log(this.map.getProjOrigin());for(var j=0;j0&&this.isSamePixel(ss[j-1],ss[j])){continue;}s+=this.makeDword(Math.floor(ss[j].x))+this.makeDword(Math.floor(ss[j].y));}var num=s.length/8;if(num<2){continue;}if(_11e!=_11a){ret.push("s"+_11e);_11a=_11e;}_119+=num;ret.push("a"+s);}else{if(cnt.type==Mapsvr.LINE){var s="";var ss=new Array();var pp=null;var pb=null;var org=this.map.latLon2Log(this.map.getProjOrigin());for(var j=0;j600){_129=0;var c=Math.ceil(_119/600);for(var i=0;i=_130)&&(_137>=mtop);};MapsvrCtrl.prototype.isValidArea=function(_138){if(!_138.length){return false;}var _139=20;var _13a=-_139;var _13b=this.width+_139;var mtop=-_139;var _13d=this.height+_139;var left=null;var _13f=null;var top=null;var _141=null;for(var i=0;i<_138.length;i++){var p=_138[i];if(left==null||p.x_13f){_13f=p.x;}if(top==null||p.y_141){_141=p.y;}}return (left<=_13b)&&(top<=_13d)&&(_13f>=_13a)&&(_141>=mtop);};MapsvrCtrl.prototype.isValidCircle=function(p,r){if(!r){return false;}var _146=20;var _147=-_146;var _148=this.width+_146;var mtop=-_146;var _14a=this.height+_146;var left=p.x-r;var _14c=p.x+r;var top=p.y-r;var _14e=p.y+r;return (left<=_148)&&(top<=_14a)&&(_14c>=_147)&&(_14e>=mtop);};MapsvrCtrl.prototype.makeDword=function(val){var ret="";for(var i=0;i<4;i++){var c=(val>>((3-i)*8))&255;if(val<0&&i==0){c=c|128;}ret+=String.fromCharCode(c);}return ret;};MapsvrCtrl.prototype.pointsConvert=function(c){if(!c){for(var i=0,len=this.source.count();i=_18b){_190=_18b;}else{if(!xp&&_190<=_189){_190=_189;}}if(xp&&_191>=_18c){_191=_18c;}else{if(!xp&&_191<=_18a){_191=_18a;}}var _192=_186.iconImage[s];var _193=_186.expandImage[s]||_192;var _194=_186.iconDiff[s]||new Point(0,0);var _195=_186.expandDiff[s]||new Point(0,0);var d=new Point(0,0);var fw=1,fh=1;var dx=Math.ceil((_195.x-_194.x)/8);var dy=Math.ceil((_195.y-_194.y)/8);if(_190<(_18b+_189)/2){_18f.src=_192;d=_194;fw=_190/_189;}else{if(_190==(_18b+_189)/2){if(xp){_18f.src=_193;d=_195;fw=_190/_18b;}else{_18f.src=_192;d=_194;fw=_190/_189;}}else{_18f.src=_193;d=_195;fw=_190/_18b;}}if(_191<(_18c+_18a)/2){_18f.src=_192;d=_194;fh=_191/_18a;}else{if(_191==(_18c+_18a)/2){if(xp){_18f.src=_193;d=_195;fh=_191/_18c;}else{_18f.src=_192;d=_194;fh=_191/_18a;}}else{_18f.src=_193;d=_195;fh=_191/_18c;}}if(_18f.width!=_190||_18f.height!=_191){_18f.width=_190;_18f.height=_191;var _19b=this.map.latLon2Log(poi.pos);var cp=this.canvasPixel||new Point(0,0);var _19d=_18f.style;var _19e=(_bi.type===1&&_bi.version<=6&&_18f.src.match(/\.(png)$/i));var _19f=(_bi.type===1&&_19d.filter.match(/sizingMethod='image'/));if(xp){_19d.left=parseFloat(_19d.left)-(dw/2)+dx+"px";_19d.top=parseFloat(_19d.top)-(dh/2)+dy+"px";if(_19e&&_19f){var _1a0=_19d.filter;_19d.filter=_1a0.replace(/sizingMethod='image'/,"sizingMethod='scale'");}}else{_19d.left=parseFloat(_19d.left)+(dw/2)-dx+"px";_19d.top=parseFloat(_19d.top)+(dh/2)-dy+"px";if(_19e&&_19f){var _1a0=_19d.filter;_19d.filter=_1a0.replace(/sizingMethod='image'/,"sizingMethod='scale'");}}}if(typeof ImageMaker.createImgNoAlpha=="undefined"){_AlphaImageLoader(_18f,_18f.width,_18f.height);}if((xp&&_190<_18b)||(!xp&&_190>_189)||(xp&&_191<_18c)||(!xp&&_191>_18a)){var t=window.setTimeout(_func(this,"gidle",id,xp),5);this.POIContents.addIconTimer(id,t);}else{if(xp&&this.popup){this.showPopup(id);}else{if(this.fixPopup){this.showPopup(this.currentPopupId);}}}};MapsvrCtrl.prototype.hidePopup=function(){window.clearTimeout(this.ptimer);var a=[this.popupId,this.popupId+"_topleft",this.popupId+"_topright",this.popupId+"_bottomleft",this.popupId+"_bottomright"];var e=false;for(var i=0;i";document.body.appendChild(p);}p.style.position="absolute";var _1ae=this.map.getContainer();if(_1ae.style.zIndex){p.style.zIndex=_1ae.style.zIndex+1;}else{p.style.zIndex=1;}var ms=this;var pm=document.getElementById(p.id+"_message");if(pm){if(c.popup){pm.innerHTML=c.popup;}else{if(this.popupServer){var _1b1=AlpsUtil.getXMLHttp();if(_1b1){_1b1.open("POST",this.popupServer,true);_1b1.onreadystatechange=function(){if(_1b1.readyState==4&&_1b1.status==200){c.popup=_1b1.responseText;if(c.popup){ms.showPopup(ms.currentPopupId);}}};var doc=AlpsUtil.createXMLDOM();var _1b3=doc.createElement("query");doc.appendChild(_1b3);var ids=c.id.split(/,/);for(var j=0;j>2);ret+=b64.charAt((c1&3)<<4);break;}var c2=str.charCodeAt(i++);if(i==len){ret+=b64.charAt(c1>>2);ret+=b64.charAt(((c1&3)<<4)|((c2&240)>>4));ret+=b64.charAt((c2&15)<<2);break;}var c3=str.charCodeAt(i++);ret+=b64.charAt(c1>>2);ret+=b64.charAt(((c1&3)<<4)|((c2&240)>>4));ret+=b64.charAt(((c2&15)<<2)|((c3&192)>>6));ret+=b64.charAt(c3&63);}return ret;};MapsvrCtrl.prototype.rearrange=function(str){var ret="";for(var i=0;i<4;i++){for(var j=0;j<2;j++){for(var k=0;k_1ce){_1d4=_1ce;}var cnt=0;for(var i=1;i<_1d4;i++){if(str.charCodeAt(_1d3)==str.charCodeAt(_1d3+i)){cnt=i+1;}else{break;}}if(cnt<3){_1d2+=str.charAt(_1d3++);if(_1d2.length>=(_1cf-1)){ret+=String.fromCharCode(_1d2.length+_1cd)+_1d2;_1d2="";}}else{if(_1d2){ret+=String.fromCharCode(_1d2.length+_1cd)+_1d2;_1d2="";}ret+=String.fromCharCode(cnt-3)+str.charAt(_1d3);_1d3+=cnt;}}if(_1d2){ret+=String.fromCharCode(_1d2.length+_1cd)+_1d2;}return ret;};MapsvrCtrl.prototype.mapMoving=function(){if(this.ctimer){window.clearTimeout(this.ctimer);}this.hidePopup();this.moveContents();this.showPopup(null);};MapsvrCtrl.prototype.mapMoved=function(){if(this.ctimer){window.clearTimeout(this.ctimer);}if(this.isAutoSearch&&this.contentsServer&&!this.overThreshold()){if(_delaytime>0){this.ctimer=window.setTimeout(_func(this,"findContents",true),_delaytime);}else{this.findContents(true);}}else{if(_delaytime>0){this.ctimer=window.setTimeout(_func(this,"moveContentsRedrawShape"),_delaytime);}else{this.moveContentsRedrawShape();}}};MapsvrCtrl.prototype.layerChanged=function(){this.pointsConvert();if(this.ctimer){window.clearTimeout(this.ctimer);}if(_delaytime>0){this.ctimer=window.setTimeout(_func(this,"moveContentsLayerChanged"),_delaytime);}else{this.moveContentsLayerChanged();}};MapsvrCtrl.prototype.smoothLayerChanging=function(){if(this.ctimer){window.clearTimeout(this.ctimer);}this.closePopup(true);if(!this.POIContents.isEmpty()||!this.source.isEmpty()){if(!this.is_layer_change&&this.canvas.style.display=="block"){this.is_layer_change=true;this.canvas.style.display="none";if(this.graphics&&!this.vectorContents.isEmpty()){this.graphics.style.display="none";}}}};MapsvrCtrl.prototype.magnifyChanged=function(){this.pointsConvert();if(this.ctimer){window.clearTimeout(this.ctimer);}var _1d7=(this.contentsServer&&!this.overThreshold())?true:false;if(_delaytime>0){this.ctimer=window.setTimeout(_func(this,"findContents",_1d7),_delaytime);}else{this.findContents(_1d7);}};MapsvrCtrl.prototype.angleChanged=function(){this.pointsConvert();if(this.ctimer){window.clearTimeout(this.ctimer);}if(_delaytime>0){this.ctimer=window.setTimeout(_func(this,"findContents"),_delaytime);}else{this.findContents();}};MapsvrCtrl.prototype.smoothAngleChanging=function(){if(this.ctimer){window.clearTimeout(this.ctimer);}if(!this.hasNoContents()){this.releaseContents();this.showContents();}};MapsvrCtrl.prototype.packageChanged=function(){this.pointsConvert();};MapsvrCtrl.prototype.onResize=function(){this.width=this.map.getContainer().offsetWidth;this.height=this.map.getContainer().offsetHeight;if(this.canvas){this.moveContents();this.resizeCanvas();this.POIContents.forEach(this.adjustIconLabel,this);if(!this.vectorContents.isEmpty()){this.dispShape();}}if(this.contentsServer&&!this.overThreshold()){this.findContents(true);}else{if(!this.hasNoContents()&&!this.is_icon_hidden){AlpsEvent.triggerEvent(this,"POIListChanged");}}};MapsvrCtrl.prototype.onMouseMove=function(p){if(!this.draggable||!this.currentDragId||!this.dragPos){return;}var pos=this.map.latLon2Log(p);var c=this.POIContents.get(this.currentDragId);if(!c){return;}var p=this.map.latLon2Log(c.pos);p.x+=pos.x-this.dragPos.x;p.y+=pos.y-this.dragPos.y;var llp=this.map.log2LatLon(p);c.pos=llp;var _1dc=this.source.get(c.id);if(_1dc){_1dc.pos=llp;}this.dragPos=pos;this.adjustIconLabel(c);AlpsEvent.triggerEvent(this,"iconMoving",c.id);};function getObjPos3(obj){var p=new Point(0,0);if(obj.parentNode===null||obj.style.display=="none"){return p;}var _1df=null;if(obj.getBoundingClientRect){var box=obj.getBoundingClientRect();var _1e1=Math.max(document.documentElement.scrollTop,document.body.scrollTop);var _1e2=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);return new Point(box.left+_1e2,box.top+_1e1);}else{if(document.getBoxObjectFor){var box=document.getBoxObjectFor(obj);p=new Point(box.x,box.y);}else{p=new Point(obj.offsetLeft,obj.offsetTop);_1df=obj.offsetParent;if(_1df!=obj){while(_1df){p.x+=_1df.offsetLeft;p.y+=_1df.offsetTop;_1df=_1df.offsetParent;}}}}if(obj.parentNode){_1df=obj.parentNode;}else{_1df=null;}while(_1df&&_1df.tagName!="BODY"&&_1df.tagName!="HTML"){p.x-=_1df.scrollLeft;p.y-=_1df.scrollTop;if(_1df.parentNode){_1df=_1df.parentNode;}else{_1df=null;}}return p;}function _func(obj,name){var _1e5=new Array();for(var i=2;i260){for(var i in _3a){if(i==_39||i=="length"){continue;}delete _3a[i];_3a.length--;break;}}this.doCurrent();}};DatumConv.prototype.doCurrent=function(){var _3c=this.current;if(_3c){var _3d=_3c[1];var m=this.cache[_3d];if(_3c[3]){clearTimeout(_3c[3]);}setTimeout(function(){document.body.removeChild(document.getElementById(_3c[0]));},0);this.current=null;}var _3f=this.waitlist;if(_3f.length){_setTimeout(this,this.popqueue,0);}if(_3c&&_3c[2]){if(m){_3c[2](m.c,m.n,m.e,m.ne);}else{_3c[2]();}}};DatumConv.prototype.getExistsMesh=function(p){var mc=p.getMeshCode();var l=0;var r=this._datum_exists_mesh.length;var m=0;var val=parseInt(mc/10000);var _46=false;while(l<=r){m=parseInt((l+r)/2);if(this._datum_exists_mesh[m]==val){return true;}else{if(this._datum_exists_mesh[m]11?false:true;if(_3){this._BlowLayerScales=[26000000,3000000,500000,70000,10000];}else{this._BlowLayerScales=[200000000,26000000,3000000,500000,70000,10000];}this.layerScales=new Array();var _4=this.mapCtrl.getLayerCount();for(var i=0;i<_4;++i){this.layerScales.push(this.mapCtrl.getLayerScale(i));}var _6=document.createElement("div");_6.style.top=this._margin+"px";_6.style.left=this._margin+"px";_6.style.position="absolute";var _7=document.createElement("div");_6.appendChild(_7);_7.style.position="absolute";_7.style.borderColor="orange";_7.style.borderStyle="none";_7.style.borderWidth="1px";_7.style.cursor="pointer";var _8=document.createElement("div");_7.appendChild(_8);_8.title=this._WideTooltip;_8.style.top="0px";this.setDivStyle(_8,this.minus_w,this.minus_h);AlpsEvent.bindBuiltInEvent(_8,"click",this,this.onWideClick);AlpsEvent.addBuiltInEvent(_8,"mousedown",function(e){CancelBubble(e);return false;});AlpsEvent.addBuiltInEvent(_8,"dblclick",function(e){CancelBubble(e);return false;});_8.appendChild(this.getSliderImg(this.minus_l,this.minus_t));var _b=document.createElement("div");_7.appendChild(_b);_b.style.position="absolute";_b.style.borderStyle="none";_b.style.borderWidth="1px";_b.style.cursor="pointer";_b.style.top=this.minus_h+"px";AlpsEvent.bindBuiltInEvent(_b,"click",this,this.onBgClick2);AlpsEvent.addBuiltInEvent(_b,"mousedown",function(e){CancelBubble(e);return false;});AlpsEvent.addBuiltInEvent(_b,"dblclick",function(e){CancelBubble(e);return false;});for(var i=this.layerCount-1;i>=0;--i){var _e=document.createElement("div");_b.appendChild(_e);_e.style.top=(i*this.mem_h)+"px";_e.title="";this.setDivStyle(_e,this.mem_w,this.mem_h);var _f=this.layerCount-i;if(_f>9){_f=9;}var _10=this.mem_l;for(var j=0;j=0&&_3a<=this.layerScales.length-1){this.layerto(this.checkScaleID(_3a));}};Slider_H.prototype.checkScaleID=function(_3b){if(!this.mapCtrl){return;}var s;if(!this.controlNoMap){s=new Array();for(var i=0;i=0){var _3f=this.mapCtrl.getLayerScale(_3b);var _40=0;for(var i=0;iMath.abs(_3f-s[i])){_40=s[i];}}if(s[i]==_3f){_3e=true;break;}}}return _3e?_3b:this.mapCtrl.getLayerId(_40);};Slider_H.prototype.layerto=function(_41){this.mapCtrl.smoothLayerTo(_41);};Slider_H.prototype.setGripPos=function(_42){if(!this.gripdiv){return;}if(_42>=this.layerScales.length){this.gripdiv.style.visibility="hidden";}else{this.gripdiv.style.visibility="visible";}this.gripdiv.style.top=this.getYByLayerId(_42)+"px";};Slider_H.prototype.getYByLayerId=function(_43){return this.minus_h+(this.layerScales.length-1-_43)*this.mem_h+this.grip_offsetY;};Slider_H.prototype.getLayerIdByY=function(_44){return Math.round(this.getLayerIdByY2(_44));};Slider_H.prototype.getLayerIdByY2=function(_45){return (this.minus_h-_45)/this.mem_h+(this.layerScales.length-1);};Slider_H.prototype.onGripMouseDown=function(e){if(!this.gripMouseDown){this.gripDragged=false;this.gripMouseDownY=e.screenY;this.gripPosY=parseInt(this.gripdiv.style.top);if(this.gripdiv.setCapture){this.gripdiv.setCapture();}this.gripMouseDown=true;CancelBubble(e);}return false;};Slider_H.prototype.onGripMouseMove=function(e){if(this.gripMouseDown){var _48=e.screenY-this.gripMouseDownY;var _49=this.gripPosY+_48;if(_49this.minus_h+(this.layerScales.length-1)*this.mem_h){_49=this.minus_h+(this.layerScales.length-1)*this.mem_h;}this.gripdiv.style.top=_49+"px";this.gripDragged=true;var _4a=this.getMagnifyBySliderPos(this.gripPosY,_49);var _4b=false;var _4c=false;this.mapCtrl.magnifyTo(_4a,_4b,_4c);CancelBubble(e);}return false;};Slider_H.prototype.getMagnifyBySliderPos=function(_4d,_4e){var _4f=this.getLayerIdByY(_4d);var _50=this.getLayerIdByY2(_4e);var _51=_50-Math.floor(_50);_50=Math.floor(_50);var _52=0;if(_50>=this.layerScales.length-1){_52=this.layerScales[_50];}else{_52=this.layerScales[_50]*(1-_51)+this.layerScales[_50+1]*_51;}var _53=this.layerScales[_4f]/_52;return _53;};Slider_H.prototype.onGripMouseUp=function(e){if(document.releaseCapture){document.releaseCapture();}if(this.gripMouseDown){if(this.gripDragged){var _55=parseInt(this.gripdiv.style.top);var _56=this.getLayerIdByY(_55);var _57=this.checkScaleID(_56);if(_57!=this.mapCtrl.getCurrentLayerId()){this.setLayer(_57);}else{this.mapCtrl.magnifyTo(1);this.setGripPos(this.mapCtrl.getCurrentLayerId());}}this.gripMouseDown=false;CancelBubble(e);}return false;};Slider_H.prototype.onWindowMouseOut=function(e){if(!e.relatedTarget&&this.gripMouseDown){this.onGripMouseUp(e);}return false;};Slider_H.prototype.smoothLayerChanging=function(_59,_5a){this.setGripPos(_5a);};Slider_H.prototype.layerChanged=function(){if(!this.gripMouseDown){var _5b=this.mapCtrl.getCurrentLayerId();this.setGripPos(_5b);}};Slider_H.prototype.layerListChanged=function(_5c){if(this.mapCtrl.getCurrentPackageId()!=_5c){return;}};Slider_H.prototype.getNearestSliderTop=function(_5d){var _5e=10000;var _5f=0;for(var i=0;i11?false:true;if(_3){this._BlowLayerScales=[26000000,3000000,500000,70000,10000];}else{this._BlowLayerScales=[200000000,26000000,3000000,500000,70000,10000];}this.layerScales=new Array();var _4=this.mapCtrl.getLayerCount();for(var i=0;i<_4;++i){this.layerScales.push(this.mapCtrl.getLayerScale(i));}var _6=document.createElement("div");_6.style.top=this._margin+"px";_6.style.left=this._margin+"px";_6.style.position="absolute";var _7=document.createElement("div");_6.appendChild(_7);_7.style.position="absolute";_7.style.borderColor="orange";_7.style.borderStyle="none";_7.style.borderWidth="1px";_7.style.cursor="pointer";var _8=document.createElement("div");_7.appendChild(_8);_8.title=this._WideTooltip;_8.style.left="0px";this.setDivStyle(_8,this.minus_w,this.minus_h);AlpsEvent.bindBuiltInEvent(_8,"click",this,this.onWideClick);AlpsEvent.addBuiltInEvent(_8,"mousedown",function(e){CancelBubble(e);return false;});AlpsEvent.addBuiltInEvent(_8,"dblclick",function(e){CancelBubble(e);return false;});_8.appendChild(this.getSliderImg(this.minus_l,this.minus_t));var _b=document.createElement("div");_7.appendChild(_b);_b.style.position="absolute";_b.style.borderStyle="none";_b.style.borderWidth="1px";_b.style.cursor="pointer";_b.style.left=this.minus_w+"px";AlpsEvent.bindBuiltInEvent(_b,"click",this,this.onBgClick2);AlpsEvent.addBuiltInEvent(_b,"mousedown",function(e){CancelBubble(e);return false;});AlpsEvent.addBuiltInEvent(_b,"dblclick",function(e){CancelBubble(e);return false;});for(var i=this.layerCount-1;i>=0;--i){var _e=document.createElement("div");_b.appendChild(_e);_e.style.left=(i*this.mem_w)+"px";_e.title="";this.setDivStyle(_e,this.mem_w,this.mem_h);var _f=this.layerCount-i;if(_f>9){_f=9;}var top=this.mem_t;for(var j=0;j=0&&_39<=this.layerScales.length-1){this.layerto(this.checkScaleID(_39));}};Slider_W.prototype.checkScaleID=function(_3a){if(!this.mapCtrl){return;}var s;if(!this.controlNoMap){s=new Array();var _3c=this.mapCtrl.getLayerCount();for(var i=0;i<_3c;++i){s.push(this.mapCtrl.getLayerScale(i));}}else{s=this.mapCtrl.getLayerScaleList();}var _3e=false;if(_3a>=0){var _3f=this.mapCtrl.getLayerScale(_3a);var _40=0;for(var i=0;iMath.abs(_3f-s[i])){_40=s[i];}}if(s[i]==_3f){_3e=true;break;}}}return _3e?_3a:this.mapCtrl.getLayerId(_40);};Slider_W.prototype.layerto=function(_41){this.mapCtrl.smoothLayerTo(_41);};Slider_W.prototype.setGripPos=function(_42){if(!this.gripdiv){return;}if(_42>=this.layerScales.length){this.gripdiv.style.visibility="hidden";}else{this.gripdiv.style.visibility="visible";}this.gripdiv.style.left=this.getXByLayerId(_42)+"px";};Slider_W.prototype.getXByLayerId=function(_43){return this.minus_w+(this.layerScales.length-1-_43)*this.mem_w+this.grip_offsetX;};Slider_W.prototype.getLayerIdByX=function(_44){return Math.round(this.getLayerIdByX2(_44));};Slider_W.prototype.getLayerIdByX2=function(_45){return (this.minus_w-_45)/this.mem_w+(this.layerScales.length-1);};Slider_W.prototype.onGripMouseDown=function(e){if(!this.gripMouseDown){this.gripDragged=false;this.gripMouseDownX=e.screenX;this.gripPosX=parseInt(this.gripdiv.style.left);if(this.gripdiv.setCapture){this.gripdiv.setCapture();}this.gripMouseDown=true;CancelBubble(e);}return false;};Slider_W.prototype.onGripMouseMove=function(e){if(this.gripMouseDown){var _48=e.screenX-this.gripMouseDownX;var _49=this.gripPosX+_48;if(_49this.minus_w+(this.layerScales.length-1)*this.mem_w){_49=this.minus_w+(this.layerScales.length-1)*this.mem_w;}this.gripdiv.style.left=_49+"px";this.gripDragged=true;var _4a=this.getMagnifyBySliderPos(this.gripPosX,_49);var _4b=false;var _4c=false;this.mapCtrl.magnifyTo(_4a,_4b,_4c);CancelBubble(e);}return false;};Slider_W.prototype.getMagnifyBySliderPos=function(_4d,_4e){var _4f=this.getLayerIdByX(_4d);var _50=this.getLayerIdByX2(_4e);var _51=_50-Math.floor(_50);_50=Math.floor(_50);var _52=0;if(_50>=this.layerScales.length-1){_52=this.layerScales[_50];}else{_52=this.layerScales[_50]*(1-_51)+this.layerScales[_50+1]*_51;}var _53=this.layerScales[_4f]/_52;return _53;};Slider_W.prototype.onGripMouseUp=function(e){if(document.releaseCapture){document.releaseCapture();}if(this.gripMouseDown){if(this.gripDragged){var _55=parseInt(this.gripdiv.style.left);var _56=this.getLayerIdByX(_55);var _57=this.checkScaleID(_56);if(_57!=this.mapCtrl.getCurrentLayerId()){this.setLayer(_57);}else{this.mapCtrl.magnifyTo(1);this.setGripPos(this.mapCtrl.getCurrentLayerId());}}this.gripMouseDown=false;CancelBubble(e);}return false;};Slider_W.prototype.onWindowMouseOut=function(e){if(!e.relatedTarget&&this.gripMouseDown){this.onGripMouseUp(e);}return false;};Slider_W.prototype.smoothLayerChanging=function(_59,_5a){this.setGripPos(_5a);};Slider_W.prototype.layerChanged=function(){if(!this.gripMouseDown){var _5b=this.mapCtrl.getCurrentLayerId();this.setGripPos(_5b);}};Slider_W.prototype.layerListChanged=function(_5c){if(this.mapCtrl.getCurrentPackageId()!=_5c){return;}};Slider_W.prototype.getNearestSliderLeft=function(_5d){var _5e=10000;var _5f=0;for(var i=0;i1){p=new LLPoint(_c[0],_c[1]);}}else{if(_8["geo:Point"]){p=new LLPoint(_8["geo:Point"]["geo:lat"],_8["geo:Point"]["geo:long"]);}}if(!p){continue;}var _d=p;var _e=this.catId;var _f=this.createRssPopup(_8);var p=new MapsvrPOI(id,_a,_d,_e,_f);this.ms.addContents(p,true);}}else{var _8=_6;var id=_8.guid;var _a=_8.title;var p=null;if(_8["georss:point"]){var _c=_8["georss:point"].split(" ");if(_c.length>1){p=new LLPoint(_c[0],_c[1]);}}else{if(_8["geo:Point"]){p=new LLPoint(_8["geo:Point"]["geo:lat"],_8["geo:Point"]["geo:long"]);}}if(p){var _d=p;var _e=this.catId;var _f=this.createRssPopup(_8);var p=new MapsvrPOI(id,_a,_d,_e,_f);this.ms.addContents(p,true);}}this.ms.findContents();}}};YGeoRSS.prototype.addWaiwai=function(){var _10=this.waiwaiData.Item;if(_10){for(var i=0;i<_10.length;i++){var Poi=_10[i];var id=Poi.PoiId;var _14=Poi.Name;var pos=new LLPoint(Poi.Lat,Poi.Lon);var cat=Poi.WaiwaiDetailData.IconId;var _17=this.createWaiwaiPopup(Poi);var p=new MapsvrPOI(id,_14,pos,cat,_17);this.ms.addContents(p,true);}this.ms.findContents();}};YGeoRSS.prototype.createRssPopup=function(_19){var _1a="";_1a+="";if(_19.link){if(_19.title){_1a+="";}else{_1a+="";}}else{if(_19.title){_1a+="";}}if(_19.description){_1a+="";}_1a+="";_1a+="
"+_19.title+"
"+_19.link+"
"+_19.title+"
"+_19.description+"


";if(_19.author){_1a+="author: "+_19.author+"
";}if(_19.category){_1a+="category: "+_19.category+"
";}if(_19.comments){_1a+="comments: "+_19.comments+"
";}if(_19.enclosureUrl){_1a+="enclosure: "+_19.enclosureUrl+"
";}if(_19.sourceUrl){if(_19.source){_1a+="source: "+_19.source+"
";}else{_1a+="source: "+_19.sourceUrl+"
";}}else{if(_19.source){_1a+="source: "+_19.source+"
";}}if(_19.pubDate){_1a+="pubDate: "+_19.pubDate+"";}_1a+="
";return _1a;};YGeoRSS.prototype.createWaiwaiPopup=function(poi){var dd=poi.DetailData;var wd=poi.WaiwaiDetailData;var _1e="";_1e+="
";_1e+="
";_1e+="";_1e+="
";if(dd.ImageUrl){_1e+="";}else{_1e+="";}_1e+="
";var con=wd.Contents;if(wd.Contents.length>160){con=con.substring(0,160)+"...";}var _20=con.match(/(.*
){5}/);if(_20){con=_20[0]+"...";}_1e+="
"+con+"
";_1e+="
";_1e+="
";_1e+=" "+this.strCommentCount+"("+wd.CommentCount+")";if(wd.Url){_1e+=" "+this.strSite+"";}_1e+="
";_1e+="[ "+this.strMap+" "+this.strZoom+" | "+this.strInit+" ]
";_1e+="
";_1e+="
"+wd.Createdate+"
";_1e+="
";_1e+="
";_1e+="
";return _1e;};YGeoRSS.prototype.zoom=function(_21){var poi=this.ms.getContents(_21);this.m.moveTo(poi.pos);this.m.layerTo(0);};YGeoRSS.prototype.home=function(_23){this.m.moveTo(this.initPos);this.m.layerTo(this.initLayerId);};YGeoRSS.prototype.addWaiwaiPopup=function(){var id="_waiwai_popup";var _25="";if(!document.getElementById(id)){var _26=document.createElement("div");var pos="top:cright";var dx=210;_26.id=id;_26.setAttribute("pos",pos);_26.setAttribute("dx",dx);_26.style.zIndex=0;_26.style.display="none";_26.style.position="absolute";_26.innerHTML=_25;document.body.appendChild(_26);}this.ms.popupId=id;};YGeoRSS.prototype.clearRss=function(){this.rssData=null;};YGeoRSS.prototype.clearWaiwai=function(){this.waiwaiData=null;};YGeoRSS.prototype.setWaiwaiMid=function(mid){this.waiwaiOption["mid"]=mid;};YGeoRSS.prototype.setWaiwaiLimit=function(c){this.waiwaiOption["n"]=c;};YGeoRSS.prototype.setWaiwaiSort=function(s){this.waiwaiOption["sort"]=s;};YGeoRSS.prototype.setWaiwaiOption=function(s){for(var key in s){this.waiwaiOption[key]=s[key];}};YGeoRSS.prototype.getWaiwaiOption=function(){return this.waiwaiOption;};YGeoRSS.prototype.loadXML=function(u){var url="http://map.yahooapis.jp/MapsService/georss2json"+"?callback=_ygrcb.invoke"+"&url="+encodeURIComponent(u);this.url=url;var _30=this;_ygrcb.send(this.url,function(_31){if(_31){_30.removeContents();_30.rssData=_31;_30.addContents();AlpsEvent.triggerEvent(_30,"yGeoRSSLoaded",_31);}else{}});};YGeoRSS.prototype.loadWaiwai=function(){var url="http://map.yahooapis.jp/MapsService/WaiwaiService/V1/searchSpots.php"+"?callback=_ygrcb.invoke"+"&output=json";var op=new Object();if(this.waiwaiOption["sort"]=="distance"||this.waiwaiOption["sort"]==undefined||this.waiwaiOption["sort"]==""){var cp=this.m.getCenterLatLon();var bl=this.m.log2LatLon(new Point(0,0));var _36=cp.distance(bl)/1000;op["lat"]=cp.lat;op["lon"]=cp.lon;op["dist"]=_36;}for(var key in this.waiwaiOption){if(key!="output"){op[key]=this.waiwaiOption[key];}}for(var key in op){if(op[key]!=""){url+="&"+key+"="+op[key];}}this.url=url;var _38=this;_ygrcb.send(this.url,function(_39){if(_39){_38.removeWaiwai();_38.waiwaiData=_39;_38.addWaiwai();AlpsEvent.triggerEvent(_38,"yGeoRSSLoaded",_39);}else{}});};YGeoRSS.prototype.setCategory=function(id){this.catId=id;};YGeoRSS.prototype.setWaiwaiCategories=function(id){this.waiwaiCatId=id;};YGeoRSS.prototype.removeContents=function(){if(!this.rssData||!this.rssData.rss){return;}var r=this.rssData.rss;if(!r["@attributes"]){return;}if(r["@attributes"].version=="2.0"){var _3d=r.channel.item;if(_3d){if(_IsArray(_3d)){var num=_3d.length;for(var i=0;i=0){this.ms.category.splice(_48,1);}this.ms.findContents();};YGeoRSS.prototype.hideWaiwaiIcon=function(){for(var i=0;i=0){this.ms.category.splice(_4b,1);}}this.ms.findContents();};YGeoRSS.prototype.getData=function(){return this.rssData;};YGeoRSS.prototype.getWaiwaiData=function(){return this.waiwaiData;};YGeoRSS.waiwai=null;function YGeoRSSCallback(){this.cb=new Array();this.timeout=12500;}YGeoRSSCallback.prototype.send=function(url,_4d){var cb=new Object();cb.id="ID"+(new Date().getTime().toString(16))+Math.floor(Math.random()*10000);cb.callback=_4d;var scr=document.createElement("script");scr.id=cb.id;scr.src=url;scr.type="text/javascript";this.cb.push(cb);document.body.appendChild(scr);};YGeoRSSCallback.prototype.invoke=function(){var _50=this.cb[0].callback;if(!_50){return;}var _51=new Array();for(var i=0;i=1){_10.push("L "+p[i].x+","+p[i].y);}else{_10.push("M "+p[i].x+","+p[i].y);}}pl.setAttribute("d",_10.join(" "));pl.setAttribute("fill","none");pl.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");pl.setAttribute("stroke-opacity",this.strokeOpacity);pl.setAttribute("stroke-width",w);pl.setAttribute("stroke-linecap","round");pl.setAttribute("stroke-linejoin","round");this.svg.appendChild(pl);break;default:break;}};AlpsGraphics.prototype.drawArea=function(p,w){if(!this.type){return;}switch(this.type){case AlpsGraphics.RENDERING.VML:var _18=document.createElement("v:polyline");if(!w||!this.strokeOpacity){_18.stroked=false;}if(!this.fillOpacity){_18.filled=false;}var _19=new Array();for(var i=0;i=1){_19.push("L "+p[i].x+","+p[i].y);}else{_19.push("M "+p[i].x+","+p[i].y);}if(i==(_1f-1)){_19.push(" z");}}pl.setAttribute("d",_19.join(" "));pl.setAttribute("fill","none");pl.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");pl.setAttribute("stroke-opacity",this.strokeOpacity);pl.setAttribute("stroke-width",w);pl.setAttribute("stroke-linecap","round");pl.setAttribute("stroke-linejoin","round");pl.setAttribute("fill","rgb("+this.fillColor.join(",")+")");pl.setAttribute("fill-opacity",this.fillOpacity);pl.style.overflow="hidden";this.svg.appendChild(pl);break;default:break;}};AlpsGraphics.prototype.drawCircle=function(p,r,w){if(!this.type){return;}switch(this.type){case AlpsGraphics.RENDERING.VML:var _23=document.createElement("v:oval");if(!w||!this.strokeOpacity){_23.stroked=false;}if(!this.fillOpacity){_23.filled=false;}_23.style.position="absolute";_23.style.left=(p.x-r)+"px";_23.style.top=(p.y-r)+"px";_23.style.width=(r*2)+"px";_23.style.height=(r*2)+"px";this.container.appendChild(_23);var _24=document.createElement("v:fill");_24.color="rgb("+this.fillColor.join(",")+")";_24.opacity=this.fillOpacity;_23.appendChild(_24);var _25=document.createElement("v:stroke");_25.weight=w+"px";_25.color="rgb("+this.strokeColor.join(",")+")";_25.opacity=this.strokeOpacity;_25.endcap="round";_25.joinstyle="round";_23.appendChild(_25);break;case AlpsGraphics.RENDERING.CANVAS:var ctx=this.canvas.getContext("2d");ctx.strokeStyle="rgba("+this.strokeColor.join(",")+","+this.strokeOpacity+")";ctx.fillStyle="rgba("+this.fillColor.join(",")+","+this.fillOpacity+")";ctx.lineWidth=w;ctx.lineCap="round";ctx.lineJoin="round";if(this.fillOpacity){ctx.beginPath();ctx.moveTo(p.x+r,p.y);ctx.arc(p.x,p.y,r,0,Math.PI*2,true);ctx.fill();}if(w&&this.strokeOpacity){ctx.beginPath();ctx.moveTo(p.x+r,p.y);ctx.arc(p.x,p.y,r,0,Math.PI*2,true);ctx.stroke();}break;case AlpsGraphics.RENDERING.SVG:var c=document.createElementNS(this.svg_xmlns,"circle");c.setAttribute("cx",p.x);c.setAttribute("cy",p.y);c.setAttribute("r",r);c.setAttribute("fill","none");c.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");c.setAttribute("stroke-opacity",this.strokeOpacity);c.setAttribute("stroke-width",w);c.setAttribute("stroke-linecap","round");c.setAttribute("stroke-linejoin","round");c.setAttribute("fill","rgb("+this.fillColor.join(",")+")");c.setAttribute("fill-opacity",this.fillOpacity);this.svg.appendChild(c);break;}};if(!AlpsGraphics.RENDERING){AlpsGraphics.RENDERING={};}AlpsGraphics.RENDERING.VML=1;AlpsGraphics.RENDERING.CANVAS=2;AlpsGraphics.RENDERING.SVG=3; function VectorDrawing(_1,_2){this.map=_1;this.ms=_2;this.vectorPopupOrigin="";this.vectorMin=-1500;this.vectorMax=1500;this.bVectorClickPopup=true;this.bVectorPopupOpen=false;this.isMouseDragged=false;var _3=new Point((this.map.mapWidth/2),(this.map.mapHeight/2));this.scrollOffset=new Point((this.vectorMin+_3.x),(this.vectorMin+_3.y));this.vectorContainer=document.createElement("div");this.vectorContainer.id="_vector_graphics";if(_bi){if(_bi.type==2||_bi.type==4){var s=document.createElement("style");if(s){s.innerHTML="@media print{div#_vector_graphics{display:none;}}";var _5=document.getElementsByTagName("head");if(_5){if(_5.length>0){_5[0].appendChild(s);}else{var h=document.createElement("head");if(h){h.appendChild(s);document.appendChild(h);}}}}}}var _7=this.vectorContainer.style;_7.position="absolute";_7.top=(this.vectorMin+_3.y)+"px";_7.left=(this.vectorMin+_3.x)+"px";_7.textAlign="justify";_7.width=(this.vectorMax*2)+"px";_7.height=(this.vectorMax*2)+"px";if(!this.ms.canvas){this.ms.initCanvas();}this.ms.canvas.insertBefore(this.vectorContainer,this.ms.canvas.firstChild);this.vectorGraphics=new AlpsGraphics(this.vectorContainer);this.vectorData=new Array();if(this.vectorGraphics.type===AlpsGraphics.RENDERING.SVG){var _8=this.vectorGraphics.svg;_8.style.position="";_8.style.top=this.vectorMin+"px";_8.style.left=this.vectorMin+"px";}}VectorDrawing.prototype.drawPolyline=function(_9){var p=new Array();var _b=_9["latlon"].length;for(var i=0;i<_b;i++){p[i]=this.map.latLon2Log(_9["latlon"][i]);p[i].x-=this.scrollOffset.x;p[i].y-=this.scrollOffset.y;}var _d=new Point((this.vectorMax*2),(this.vectorMax*2));var _e=new Point(0,0);p=this.getClippingPointOnFixedCanvas(p,"polyline",_d,_e);if(p.length==0){return false;}this.vectorGraphics.setStrokeColor(_9["strokeColor"]);this.vectorGraphics.setStrokeOpacity(_9["strokeOpacity"]);this.vectorGraphics.drawLine(p,_9["strokeWidth"],_9["popup"]);};VectorDrawing.prototype.drawPolygon=function(_f){var p=new Array();var len=_f["latlon"].length;for(var i=0;i_1b:case this.scrollOffset.x<_1c:case this.scrollOffset.y>_1d:case this.scrollOffset.y<_1e:return true;break;default:return false;break;}};VectorDrawing.prototype.get2LinePointIntersection=function(p1,p2,p3,p4){var p=new Point(0,0);var a=p2.y-p1.y;var b=p1.x-p2.x;var u=(p2.y-p1.y)*p1.x-(p2.x-p1.x)*p1.y;var c=p4.y-p3.y;var d=p3.x-p4.x;var v=(p4.y-p3.y)*p3.x-(p4.x-p3.x)*p3.y;if(p3.equals(p4)){return new Point(p3.x,p3.y);}p.x=(d*u-b*v)/(a*d-b*c);p.y=(a*v-c*u)/(a*d-b*c);return p;};VectorDrawing.prototype.isIntersection=function(p1,p2,p3,p4){if(p1.x>=p2.x){if((p1.xp3.x&&p2.x>p4.x)){return false;}}else{if((p2.xp3.x&&p1.x>p4.x)){return false;}}if(p1.y>=p2.y){if((p1.yp3.y&p2.y>p4.y)){return false;}}else{if((p2.yp3.y&&p1.y>p4.y)){return false;}}if(((p1.x-p2.x)*(p3.y-p1.y)+(p1.y-p2.y)*(p1.x-p3.x))*((p1.x-p2.x)*(p4.y-p1.y)+(p1.y-p2.y)*(p1.x-p4.x))>0){return false;}if(((p3.x-p4.x)*(p1.y-p3.y)+(p3.y-p4.y)*(p3.x-p1.x))*((p3.x-p4.x)*(p2.y-p3.y)+(p3.y-p4.y)*(p3.x-p2.x))>0){return false;}return true;};VectorDrawing.prototype.isPointInPolygon=function(p,_2f){var _30=_2f.length;if(_30<1){return false;}if(_30==1){return p.x==_2f[0].x&&p.y==_2f[0].y;}for(var i=0,j=_30-1;i<_30;j=i++){if(_2f[i].y==_2f[j].y&&p.y==_2f[i].y&&((_2f[i].x<=p.x&&p.x<=_2f[j].x)||(_2f[j].x<=p.x&&p.x<=_2f[i].x))){return true;}else{if(_2f[i].y!=_2f[j].y&&((_2f[i].y<=p.y&&p.y<=_2f[j].y)||(_2f[j].y<=p.y&&p.y<=_2f[i].y))&&p.x==(_2f[j].x-_2f[i].x)*(p.y-_2f[i].y)/(_2f[j].y-_2f[i].y)+_2f[i].x){return true;}}}var _33=false;var yy=p.y+0.5;for(var i=0,j=_30-1;i<_30;j=i++){if(((_2f[i].y<=p.y&&p.y<_2f[j].y)||(_2f[j].y<=p.y&&p.y<_2f[i].y))&&p.x<(_2f[j].x-_2f[i].x)*(yy-_2f[i].y)/(_2f[j].y-_2f[i].y)+_2f[i].x){_33=!_33;}}return _33;};VectorDrawing.prototype.getClippingPoint=function(p,_36){var _37=false;var _38=false;var _39=p.length;for(var i=0;i<_39;i++){if(_37!=false){if(p[i].x>_37.x){_37.x=p[i].x;}if(p[i].y>_37.y){_37.y=p[i].y;}}else{_37=new Point(p[i].x,p[i].y);}if(_38!=false){if((p[i].x+0)<(_38.x+0)){_38.x=p[i].x;}if(p[i].y<_38.y){_38.y=p[i].y;}}else{_38=new Point(p[i].x,p[i].y);}}var _3b=new Array();var p3=new Point(_38.x,this.vectorMin);var p4=new Point(_37.x,this.vectorMin);_39=p.length;for(var i=0;i<_39;i++){var p1=new Point(p[i].x,p[i].y);var p2;if(!(i==_39-1)){p2=new Point(p[i+1].x,p[i+1].y);}else{p2=new Point(p[0].x,p[0].y);}if(p1.y>=this.vectorMin){_3b.push(p1);}if(i==_39-1&&_36=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_3b.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}var _40=new Array();p3=new Point(_38.x,this.vectorMax);p4=new Point(_37.x,this.vectorMax);_39=_3b.length;for(var i=0;i<_39;i++){var p1=new Point(_3b[i].x,_3b[i].y);var p2;if(!(i==_39-1)){p2=new Point(_3b[i+1].x,_3b[i+1].y);}else{p2=new Point(_3b[0].x,_3b[0].y);}if(p1.y<=this.vectorMax){_40.push(p1);}if(i==_39-1&&_36=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_40.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}_3b=new Array();p3=new Point(this.vectorMin,_38.y);p4=new Point(this.vectorMin,_37.y);var _39=_40.length;for(var i=0;i<_39;i++){var p1=new Point(_40[i].x,_40[i].y);var p2;if(!(i==_39-1)){p2=new Point(_40[i+1].x,_40[i+1].y);}else{p2=new Point(_40[0].x,_40[0].y);}if(p1.x>=this.vectorMin){_3b.push(p1);}if(i==_39-1&&_36=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_3b.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}_40=new Array();p3=new Point(this.vectorMax,_38.y);p4=new Point(this.vectorMax,_37.y);_39=_3b.length;for(var i=0;i<_39;i++){var p1=new Point(_3b[i].x,_3b[i].y);var p2;if(!(i==_39-1)){p2=new Point(_3b[i+1].x,_3b[i+1].y);}else{p2=new Point(_3b[0].x,_3b[0].y);}if(p1.x<=this.vectorMax){_40.push(p1);}if(i==_39-1&&_36=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_40.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}return _40;};VectorDrawing.prototype.getClippingPointOnFixedCanvas=function(p,_42,_43,_44){var _45=p.length;if(_45===0){return new Array();}var _46=p[0];var _47=new Point(_46.x,_46.y);var _48=new Point(_46.x,_46.y);for(var i=1;i<_45;i++){_46=p[i];if(_46.x>_47.x){_47.x=_46.x;}if(_46.y>_47.y){_47.y=_46.y;}if((_46.x+0)<(_48.x+0)){_48.x=_46.x;}if(_46.y<_48.y){_48.y=_46.y;}}var _4a=new Array();var p3=new Point(_48.x,_44.y);var p4=new Point(_47.x,_44.y);_45=p.length;for(var i=0;i<_45;i++){var p1=p[i];var p2;if(!(i==_45-1)){p2=p[i+1];}else{p2=p[0];}if(p1.y>=_44.y){_4a.push(p1);}if(i==_45-1&&_42=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_4a.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}var _4f=new Array();p3=new Point(_48.x,_43.y);p4=new Point(_47.x,_43.y);_45=_4a.length;for(var i=0;i<_45;i++){var p1=_4a[i];var p2;if(!(i==_45-1)){p2=_4a[i+1];}else{p2=_4a[0];}if(p1.y<=_43.y){_4f.push(p1);}if(i==_45-1&&_42=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_4f.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}_4a=new Array();p3=new Point(_44.x,_48.y);p4=new Point(_44.y,_47.y);var _45=_4f.length;for(var i=0;i<_45;i++){var p1=_4f[i];var p2;if(!(i==_45-1)){p2=_4f[i+1];}else{p2=_4f[0];}if(p1.x>=_44.x){_4a.push(p1);}if(i==_45-1&&_42=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_4a.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}_4f=new Array();p3=new Point(_43.x,_48.y);p4=new Point(_43.x,_47.y);_45=_4a.length;for(var i=0;i<_45;i++){var p1=_4a[i];var p2;if(!(i==_45-1)){p2=_4a[i+1];}else{p2=_4a[0];}if(p1.x<=_43.x){_4f.push(p1);}if(i==_45-1&&_42=="polyline"){break;}if(this.isIntersection(p1,p2,p3,p4)){_4f.push(this.get2LinePointIntersection(p1,p2,p3,p4));}}return _4f;};VectorDrawing.prototype.xIntersectionPoint=function(p_s,p_e,x0){var x1,y1,x2,y2,y0,m;x1=p_s.x;y1=p_s.y;x2=p_e.x;y2=p_e.y;if(x1==x2){y0=x2;}m=((y2-y1)<<12)/(x2-x1);y0=y1+((m*(x0-x1))>>12);return new Point(x0,y0);};VectorDrawing.prototype.yIntersectionPoint=function(p_s,p_e,y0){var x1,y1,x2,y2,x0,m;x1=p_s.x;y1=p_s.y;x2=p_e.x;y2=p_e.y;if(y1==y2){x0=y2;}m=((x2-x1)<<12)/(y2-y1);x0=x1+((m*(y0-y1))>>12);return new Point(x0,y0);};VectorDrawing.prototype.getPointLineDistance=function(p,lp1,lp2){var dx=(lp2.x-lp1.x);var dy=(lp2.y-lp1.y);var a=Math.pow(dx,2)+Math.pow(dy,2);var b=dx*(lp1.x-p.x)+dy*(lp1.y-p.y);var t=-b/a;if(t<0){t=0;}if(t>1){t=1;}tx=lp1.x+dx*t;ty=lp1.y+dy*t;return Math.sqrt(Math.pow((p.x-tx),2)+Math.pow((p.y-ty),2));};VectorDrawing.prototype.addVectorPopupEvent=function(id,_6b,_6c){var _6d=this.vectorGraphics.type;if(_6d===AlpsGraphics.RENDERING.VML){var pl=this.vectorGraphics.container.getElementsByTagName("polyline");if(pl.length>=1){var lc=pl[pl.length-1];if(lc){if(this.bVectorClickPopup){lc.onclick=_6c(id,_6b);}else{lc.onmouseover=_6c(id,_6b);}}}}else{if(_6d===AlpsGraphics.RENDERING.SVG){var pl=this.vectorGraphics.container.getElementsByTagNameNS(this.vectorGraphics.svg_xmlns,"path");if(pl.length>=1){var lc=pl[pl.length-1];if(lc){if(this.bVectorClickPopup){lc.onclick=_6c(id,_6b);}else{lc.onmouseover=_6c(id,_6b);}}}}}}; var _jsapiVersion="V2";var _imageServer="http://i.yimg.jp/images/map/flashapi/";var _newImageServer="http://i.yimg.jp/images/map/api/";var _yahoomap="";var _yahoopoi=" ";var _buf_yahoomap;var _delaytime=0;var _scalebar;var _defaultPos="35.39.26.180,139.43.56.868";var _defaultLayer=3;var _defaultMode="map";if(_jsapiVersion=="V2"){_defaultMode="worldmap";}var _defaultCategory="L1";var _jsapiurl=document.getElementsByTagName("script");_jsapiurl=_jsapiurl[_jsapiurl.length-1].src;var _address_yahoomap;function _initButton(e){var _2=function(e){CancelBubble(e);};e.onmouseover=_2;e.onmouseout=_2;e.onmousedown=_2;e.onmouseup=_2;e.onclick=_2;e.ondblclick=_2;e.style.cursor="pointer";}function YahooMapsCtrl(e,_5,_6,_7,_8,_9,_a){if(!e){return;}if(typeof (e)=="string"){e=document.getElementById(e);}if(!e){return;}if(_a){YMapMode.GUIDEMAP=_a;}this.defaultPos=new YLLPoint(_5||_defaultPos).toLLPoint();this.defaultLayer=_6||_defaultLayer;if(_jsapiVersion=="V2"&&_7=="map"){_7="worldmap";}this.defaultMode=_7||_defaultMode;this.defaultDatum=YDatumType.TOKYO97;if(_jsapiVersion=="multi"){if(_8==YDatumType.TOKYO97||_8==YDatumType.WGS84){this.defaultDatum=_8;}_yahoomap="map35/10/1.869,136/53/4.81025000http://layer.map.yahoo.co.jp/ymlhttp://img.map.yahoo.co.jp/datumhttp://t.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl250036/0/0,137/0/0sphere-2500036/0/0,137/0/0sphere-11000036/0/0,137/0/0sphere02000036/0/0,137/0/0sphere1http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl2500036/0/0,137/0/0bessele2http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl4000036/0/0,137/0/0bessele3http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl7000036/0/0,137/0/0bessele413000036/0/0,137/0/0bessele5http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl25000036/0/0,137/0/0sphere6http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl50000036/0/0,137/0/0sphere7http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl100000036/0/0,137/0/0sphere8160000036/0/0,137/0/0sphere8305175599610351084/59/55-84/59/5710101220701984/59/55-84/59/5711112441403884/59/55-84/59/571212http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl4882807684/59/55-84/59/571313http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl9765615284/59/55-84/59/571414http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl19531230584/59/55-84/59/571515http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl39062460984/59/55-84/59/571616http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl78124921984/59/55-84/59/571717http://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl156249843884/59/55-84/59/571818http://t.map.yahoo.co.jp/i/maps/ahttp://maps.yimg.com/ae/ximg250036/0/0,137/0/0sphere-2http://t.map.yahoo.co.jp/i/maps/ahttp://maps.yimg.com/ae/ximg500036/0/0,137/0/0sphere-1http://t.map.yahoo.co.jp/i/maps/ahttp://maps.yimg.com/ae/ximg1000036/0/0,137/0/0sphere02000036/0/0,137/0/0sphere12500036/0/0,137/0/0bessele24000036/0/0,137/0/0bessele37000036/0/0,137/0/0bessele413000036/0/0,137/0/0sphere525000036/0/0,137/0/0sphere650000036/0/0,137/0/0sphere7100000036/0/0,137/0/0sphere8160000036/0/0,137/0/0sphere830517559610351084/59/55-84/59/57101220701984/59/55-84/59/57112441403884/59/55-84/59/57124882807684/59/55-84/59/57139765615284/59/55-84/59/571419531230584/59/55-84/59/571539062460984/59/55-84/59/571678124921984/59/55-84/59/5717156249843884/59/55-84/59/5718http://t.map.yahoo.co.jp/i/maps/b1125036/0/0,137/0/0sphere250036/0/0,137/0/0sphere500036/0/0,137/0/0sphere";}else{if(_jsapiVersion=="V2"){if(_8==YDatumType.TOKYO97||_8==YDatumType.WGS84){this.defaultDatum=_8;}_yahoomap="worldmap35/10/1.869,136/53/4.81025000http://layer.map.yahoo.co.jp/yml_v2http://img.map.yahoo.co.jp/datumhttp://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tlhttp://t.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl500036/0/0,137/0/0sphere0http://t.map.yahoo.co.jp/i/maps/mhttp://maps.yimg.com/hx/tl1000036/0/0,137/0/0sphere12500036/0/0,137/0/0bessele27000036/0/0,137/0/0bessele425000036/0/0,137/0/0sphere650000036/0/0,137/0/0sphere7100000036/0/0,137/0/0sphere8300000036/0/0,137/0/0sphere9610351084/59/55-84/59/5710104882807684/59/55-84/59/57131339062460984/59/55-84/59/571616http://t.map.yahoo.co.jp/i/maps/ahttp://maps.yimg.com/ae/ximg5000http://t.map.yahoo.co.jp/i/maps/ahttp://maps.yimg.com/ae/ximg36/0/0,137/0/0sphere0http://t.map.yahoo.co.jp/i/maps/ahttp://maps.yimg.com/ae/ximg1000036/0/0,137/0/0sphere12500036/0/0,137/0/0bessele27000036/0/0,137/0/0bessele425000036/0/0,137/0/0sphere650000036/0/0,137/0/0sphere7100000036/0/0,137/0/0sphere8300000036/0/0,137/0/0sphere9610351089/9/14-89/0/0104882807689/9/14-89/0/01339062460989/9/14-89/0/016";}else{_yahoomap="map126600000,492750000500000http://map.yahooapis.jp/ymap/YahooMapLayerhttp://img.map.yahoo.co.jp/datumhttp://tile01.map.yahoo.co.jp/i/maps/mhttp://tile02.map.yahoo.co.jp/i/maps/mhttp://tile03.map.yahoo.co.jp/i/maps/m500036/0/0,137/0/0sphere1000036/0/0,137/0/0sphere2500036/0/0,137/0/0bessele7000036/0/0,137/0/0bessele25000036/0/0,137/0/0sphere50000036/0/0,137/0/0sphere100000036/0/0,137/0/0sphere300000036/0/0,137/0/0sphere500000036/0/0,137/0/0bessele2600000036/0/0,137/0/0besselehttp://tile01.map.yahoo.co.jp/i/maps/ahttp://tile02.map.yahoo.co.jp/i/maps/ahttp://tile03.map.yahoo.co.jp/i/maps/a500036/0/0,137/0/0sphere1000036/0/0,137/0/0sphere2500036/0/0,137/0/0bessele7000036/0/0,137/0/0bessele25000036/0/0,137/0/0bessele50000036/0/0,137/0/0bessele100000036/0/0,137/0/0bessele300000036/0/0,137/0/0bessele500000036/0/0,137/0/0bessele2600000036/0/0,137/0/0bessele";}}var _b="";_b={"pos":this.defaultPos,"layerId":this.defaultLayer-1,"packageId":this.defaultMode,"datum":this.defaultDatum,"version":"v2"};if(_9){this.map=new ProAtlasMapCtrl(e,_9,"url",_b);}else{this.map=new ProAtlasMapCtrl(e,_yahoomap,"string",_b);}this.map.setVisibleCopyright(false);this.map.setEnableKeyboardOperation(false);this.map.setEnableZoomendFadeinEfct(true);this.map.setEnableAutoLayerChange(true);AlpsEvent.addEvent(this.map,"packageChanged",_func(this,"packageChanged"));this.ms=new MapsvrCtrl(this.map,_yahoopoi,"string",{label:true});this.ms.setEnableSearchOptimize(false);this.ms.setEnableLabel(true);AlpsEvent.addEvent(this.map,"mapMoved",_func(this,"mapMoved"));AlpsEvent.addEvent(this.map,"layerChanged",_func(this,"layerChanged"));AlpsEvent.addEvent(this.ms,"POIListChanged",_func(this,"poiListChanged"));AlpsEvent.addEvent(this.ms,"iconMoving",_func(this,"iconMoving"));AlpsEvent.addEvent(this.ms,"openPopup",_func(this,"onOpenPopup"));AlpsEvent.addEvent(this.ms,"closePopup",_func(this,"onClosePopup"));this.popupID=null;this.ms.showAllCategories();this.ui_src="http://i.yimg.jp/images/map/api/ui_jsapi2.png";this.ui_w=128;this.ui_h=186;var _c=document.createElement("div");_c.style.position="relative";_c.style.textAlign="left";_c.style.left="0px";_c.style.top="0px";_c.style.width="100%";_c.style.height="auto";_c.style.zIndex=1;_c.style.margin="0px";_c.style.padding="2px 1px 0px 1px";_c.style.border="0px";_c.oncontextmenu=Nothing;e.appendChild(_c);this.home=document.createElement("div");_initButton(this.home);_c.appendChild(this.home);this.home.className="homebutton";this.home.id="homebutton";this.home.title=decodeURIComponent("%E5%88%9D%E6%9C%9F%E4%BD%8D%E7%BD%AE%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%99%E3%82%8B");this.home.onclick=_func(this,"homeTo");this.setDivStyle(this.home,25,24);this.home.style.marginRight="5px";this.home.appendChild(this.getSliderImg(-75,-72));var _d=(this.getVisibleCentermark()==true?"%E4%B8%AD%E5%BF%83%E7%82%B9%E3%82%92%E9%9D%9E%E8%A1%A8%E7%A4%BA%E3%81%AB%E3%81%99%E3%82%8B":"%E4%B8%AD%E5%BF%83%E7%82%B9%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B");this.centerbutton=document.createElement("div");_initButton(this.centerbutton);_c.appendChild(this.centerbutton);this.centerbutton.style.display="none";this.centerbutton.className="centermarkbutton";this.centerbutton.id="centermarkbutton";this.centerbutton.title=decodeURIComponent(_d);this.centerbutton.onclick=_func(this,"centerMark");this.setDivStyle(this.centerbutton,25,24);this.centerbutton.style.margin="0px 1px";this.centerbutton_img=this.getSliderImg(0,-72);this.centerbutton.appendChild(this.centerbutton_img);this.b1button=document.createElement("div");_initButton(this.b1button);this.b1button.className="b1button";this.b1button.id="b1button";this.b1button.style.display="none";this.b1button.title=decodeURIComponent("%E3%82%AC%E3%82%A4%E3%83%89%E3%83%9E%E3%83%83%E3%83%97%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B");this.b1button.onclick=_func(this,"changeB1");this.setDivStyle(this.b1button,64,24);this.b1button.style.margin="0px 1px";this.b1button_img=this.getSliderImg(0,-162);this.b1button.appendChild(this.b1button_img);_c.appendChild(this.b1button);this.photobutton=document.createElement("div");_initButton(this.photobutton);this.photobutton.className="photobutton";this.photobutton.id="photobutton";this.photobutton.title=decodeURIComponent("%E8%88%AA%E7%A9%BA%E5%86%99%E7%9C%9F%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B");this.photobutton.onclick=_func(this,"changeAero");this.setDivStyle(this.photobutton,64,24);this.photobutton.style.margin="0px 1px";this.photobutton_img=this.getSliderImg(0,-24);this.photobutton.appendChild(this.photobutton_img);_c.appendChild(this.photobutton);this.mapbutton=document.createElement("div");_initButton(this.mapbutton);this.mapbutton.className="mapbutton";this.mapbutton.id="mapbutton";this.mapbutton.title=decodeURIComponent("%E5%9C%B0%E5%9B%B3%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B");this.mapbutton.onclick=_func(this,"changeMap");this.setDivStyle(this.mapbutton,64,24);this.mapbutton.style.margin="0px 1px";this.mapbutton_img=this.getSliderImg(0,0);this.mapbutton.appendChild(this.mapbutton_img);_c.appendChild(this.mapbutton);this.guidebutton=document.createElement("div");_initButton(this.guidebutton);this.guidebutton.className="guidebutton";this.guidebutton.id="guidebutton";this.guidebutton.style.display="none";this.guidebutton.title=decodeURIComponent("%E3%82%AC%E3%82%A4%E3%83%89%E3%83%9E%E3%83%83%E3%83%97%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B");this.guidebutton.onclick=_func(this,"changeGuide");this.setDivStyle(this.guidebutton,64,24);this.guidebutton.style.margin="0px 1px";this.guidebutton_img=this.getSliderImg(0,-48);this.guidebutton.appendChild(this.guidebutton_img);_c.appendChild(this.guidebutton);this.zoomer=document.createElement("div");this.zoomer.id="zoomer";_c.appendChild(this.zoomer);var _e=document.createElement("div");_initButton(_e);_e.className="sliderbar";_e.title=decodeURIComponent("%E6%8B%A1%E5%A4%A7");_e.onclick=_func(this,"zoomIn");this.setDivStyle(_e,22,22,true);_e.style.margin="0px 1px";_e.appendChild(this.getSliderImg(0,-96));this.zoomer.appendChild(_e);var _f=document.createElement("div");_initButton(_f);_f.className="sliderbar";_f.title=decodeURIComponent("%E7%B8%AE%E5%B0%8F");_f.onclick=_func(this,"zoomOut");this.setDivStyle(_f,22,22,true);_f.style.margin="0px 1px";_f.appendChild(this.getSliderImg(-22,-96));this.zoomer.appendChild(_f);if(_jsapiVersion=="V2"||_jsapiVersion=="multi"){this.slider=new Slider(this.map,_newImageServer,1);this.slider.setControlNoMap(false);if(this.map.getCurrentPackageId()==YMapMode.GUIDEMAP||this.map.getCurrentPackageId()==YMapMode.B1MAP){this.slider.setEnableBlow(false);}}else{this.slider=new Slider(this.map,_imageServer+"slider");this.slider.setControlNoMap(false);if(this.map.getCurrentPackageId()==YMapMode.GUIDEMAP||this.map.getCurrentPackageId()==YMapMode.B1MAP){this.slider.setEnableBlow(false);}}this.setSliderStyle(this.slider);if(_jsapiVersion=="V2"||_jsapiVersion=="multi"){this.cr=new YahooCopyright(this.map,true);}else{this.cr=document.createElement("div");this.cr.style.zIndex=1;this.cr.style.left="3px";this.cr.style.bottom="3px";this.cr.style.position="absolute";this.cr.style.fontSize="12px";this.cr.style.fontFamily="Arial, Helvetica, sans-serif";this.cr.style.fontWeight="bold";if(_bi.type==1){this.cr.unselectable="on";this.cr.onselectstart=Nothing;}else{this.cr.style.MozUserSelect="none";}this.cr.oncontextmenu=Nothing;setMouseCursor(this.cr,"default");e.appendChild(this.cr);AlpsEvent.addEvent(this.map,"layerChanged",_func(this,"showCopyright"));AlpsEvent.addEvent(this.map,"packageChanged",_func(this,"showCopyright"));this.showCopyright();}var _10=document.createElement("div");_10.style.zIndex=1;_10.style.right="0px";_10.style.bottom="0px";_10.style.position="absolute";_10.oncontextmenu=Nothing;e.appendChild(_10);var _11=ImageMaker.createImg("http://i.yimg.jp/images/maps/logo/yahoologo.gif");_initButton(_11);_11.className="yahoologo";_11.style.position="static";_11.style.cssFloat="right";_11.style.styleFloat="right";_11.style.margin="1px";_11.onclick=function(){window.open("http://rd.yahoo.co.jp/maps/map_api/*http://map.yahoo.co.jp/","YahooMap");};_10.appendChild(_11);if(_jsapiVersion=="V2"||_jsapiVersion=="multi"){this.scalebar=new YahooScalebar(this.map);this.scalebar.dom.align="right";this.scalebar.dom.style.bottom="5px";var _12=_11.currentStyle||document.defaultView.getComputedStyle(_11,"");if(_12){if(_12.display!="none"){this.scalebar.dom.style.right="80px";}}}else{_scalebar=["1500","3000","8000","21000","75000","150000","300000","900000","japanwide","japan"];this.scalebar=ImageMaker.createImg();this.scalebar.style.position="static";this.scalebar.style.cssFloat="right";this.scalebar.style.styleFloat="right";this.scalebar.style.margin="1px";_10.appendChild(this.scalebar);AlpsEvent.addEvent(this.map,"layerChanged",_func(this,"showScalebar"));this.showScalebar();}this.vec=new VectorDrawing(this.map,this.ms);this.vectorContainer=this.vec.vectorContainer;this.vectorData=this.vec.vectorData;this.vectorGraphics=this.vec.vectorGraphics;this.setEnableVectorClickPopup(false);AlpsEvent.addEvent(this.map,"mapMoved",_func(this,"vectorMoved","mapMoved"));AlpsEvent.addEvent(this.map,"mapMoving",_func(this,"vectorMoving","mapMoving"));AlpsEvent.addEvent(this.map,"layerChanged",_func(this,"vectorRefresh","layerChanged"));AlpsEvent.addEvent(this.map,"smoothLayerChanging",_func(this,"vectorClear","smoothLayerChanging"));AlpsEvent.addEvent(this.map,"layerChanged",_func(this,"vectorLayerChanged","layerChanged"));AlpsEvent.addEvent(this.map,"resize",_func(this,"vectorResize","resize"));this.appId=this.getUrlOption("appid");this.jsapiAccessLog("load");AlpsEvent.addEvent(this.map,"mapMoved",_func(this,"jsapiAccessLog","mapMoved"));AlpsEvent.addEvent(this.map,"layerChanged",_func(this,"jsapiAccessLog","layerChanged"));if(_a){this.prevLayerCount=null;AlpsEvent.bindEvent(this.map,"layerListChanged",this,this.iLayerListChanged);this.enableGuidemapAutoPackageChange=true;}AlpsEvent.bindEvent(this.map,"layerListChanged",this,this.ugLayerListChanged);this.prevB1LayerCount=null;this.enableUgAutoPackageChange=false;this.enableUgButton=false;this.prevLayerId="map";_address_yahoomap=this;this.rss=null;this.packageChanged();this.setVisibleSliderbar(true);this.setVisibleCentermark(true);this.visibleUIController=true;this.visibleSlider=true;this.visibleUgButton=false;this.visibleGuideButton=false;}YahooMapsCtrl.prototype.getSliderImg=function(l,t){var _15=document.createElement("img");_15.style.border="0px none";_15.style.margin="0px";_15.style.padding="0px";_15.style.position="relative";_15.style.left=l+"px";_15.style.top=t+"px";_15.style.width=this.ui_w+"px";_15.style.height=this.ui_h+"px";_15.style.filter="";_15.src=this.ui_src;if(_bi.type==1){_15.unselectable="on";_15.onselectstart=Nothing;_15.galleryImg="no";}else{_15.style.MozUserSelect="none";}_15.oncontextmenu=Nothing;_AlphaImageLoader(_15,this.ui_w,this.ui_h);return _15;};YahooMapsCtrl.prototype.setDivStyle=function(div,w,h,_19){div.style.overflow="hidden";div.style.width=w+"px";div.style.height=h+"px";div.style.position="relative";if(_19){div.style.cssFloat="left";div.style.styleFloat="left";}else{div.style.cssFloat="right";div.style.styleFloat="right";}};YahooMapsCtrl.prototype.homeTo=function(e){this.map.packageTo(this.defaultMode);this.map.moveAndLayerTo(this.defaultPos,this.defaultLayer-1);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.zoomIn=function(e){var l=this.map.getCurrentLayerId()-1;this.map.smoothLayerTo(l,true);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.zoomOut=function(e){var l=this.map.getCurrentLayerId()+1;this.map.smoothLayerTo(l,true);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.changeMode=function(_1f){if(_jsapiVersion=="V2"&&_1f=="map"){_1f="worldmap";}this.map.smoothPackageTo(_1f);};YahooMapsCtrl.prototype.moveTo=function(pos){this.map.moveTo(new YLLPoint(pos).toLLPoint());};YahooMapsCtrl.prototype.smoothMoveTo=function(pos){this.map.smoothMoveTo(new YLLPoint(pos).toLLPoint());};YahooMapsCtrl.prototype.moveAndLayerTo=function(pos,_23){this.map.moveAndLayerTo(new YLLPoint(pos).toLLPoint(),_23-1);};YahooMapsCtrl.prototype.layerTo=function(_24){this.map.smoothLayerTo(_24-1);};YahooMapsCtrl.prototype.setLayer=function(_25){this.map.layerTo(_25-1);};YahooMapsCtrl.prototype.magnifyTo=function(_26){this.map.magnifyTo(_26);};YahooMapsCtrl.prototype.getCurrentMagnify=function(){return this.map.getCurrentMagnify();};YahooMapsCtrl.prototype.addCategory=function(id,img,_29,_2a){var c=new MapsvrCategory(id,id,img);if(_29){if(_29.name){c.name=_29.name;}c.iconSize[0]={width:_29.width,height:_29.height};c.iconDiff[0]=new Point(0,0);if(_29.dx){c.iconDiff[0].x=_29.dx;}if(_29.dy){c.iconDiff[0].y=_29.dy;}}if(_2a){c.expandImage[0]=img;c.expandSize[0]={width:_2a.width,height:_2a.height};c.expandDiff[0]=new Point(0,0);if(_2a.dx){c.expandDiff[0].x=_2a.dx;}if(_2a.dy){c.expandDiff[0].y=_2a.dy;}}else{}this.ms.addCategory(c);this.ms.showAllCategories();this.vectorRefresh();};YahooMapsCtrl.prototype.removeCategory=function(id){this.ms.removeCategory(id);this.ms.showAllCategories();this.vectorRefresh();};YahooMapsCtrl.prototype.addIcon=function(id,pos,_2f,cat,_31){this.ms.addContents(new MapsvrPOI(id,_31,new YLLPoint(pos).toLLPoint(),cat||_defaultCategory,_2f));};YahooMapsCtrl.prototype.addIcons=function(ary){var _33=ary.length;for(var i=0;i<_33;i++){var p=ary[i];this.ms.addContents(new MapsvrPOI(p.id,p.label,new YLLPoint(p.pos).toLLPoint(),p.type||_defaultCategory,p.popup),true);}if(_33>0){this.ms.showAllCategories(true);this.vectorRefresh();}};YahooMapsCtrl.prototype.getIcon=function(id){var c=this.ms.getContents(id);if(!c){return;}return {id:c.id,pos:new YLLPoint(c.pos),popup:c.popup,type:c.cat,label:c.name};};YahooMapsCtrl.prototype.getIcons=function(){var cl=this.ms.getContentsList();if(!cl){return;}var ary=new Array();for(var i=0;ip.x){_ac=p.x;}}if(_abp.y){_ad=p.y;}}_a6=this.map.log2LatLon(new Point(_ac+(_aa-_ac)/2,_ad+(_ab-_ad)/2));}}else{if(this.vectorData[i]["kind"]=="polygon"){var _aa,_ab,_ac,_ad;var _a7=this.vectorData[i]["latlon"].length;if(!_a7){return false;}for(var j=0;j<_a7;j++){var p=this.map.latLon2Log(this.vectorData[i]["latlon"][j]);if(j!=0){if(_aap.x){_ac=p.x;}}if(_abp.y){_ad=p.y;}}}else{_aa=p.x;_ab=p.y;_ac=p.x;_ad=p.y;}}_a6=this.map.log2LatLon(new Point(_ac+(_aa-_ac)/2,_ad+(_ab-_ad)/2));}}if(!_a6){return;}_vectorPopupClose();this.vec.bVectorPopupOpen=id;this.vec.vectorPopupOrigin=new Array();this.vec.vectorPopupOrigin[0]=_a6;this.map.moveTo(_a6);this.setVectorPopup(this.vectorData[i]["popup"]);break;}}}};YahooMapsCtrl.prototype.closeVectorPopup=function(){_vectorPopupClose();};if(_jsapiVersion=="V2"||_jsapiVersion=="multi"){YahooMapsCtrl.prototype.getDatum=function(){return this.map.getDatum();};}YahooMapsCtrl.prototype.changeMap=function(e){var _b0=YMapMode.MAP;if(_jsapiVersion=="V2"){_b0="worldmap";}this.changeMode(_b0);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.changeAero=function(e){this.changeMode(YMapMode.AERO);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.changeB1=function(e){this.changeMode(YMapMode.B1MAP);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.changeGuide=function(e){this.changeMode(YMapMode.GUIDEMAP);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.centerMark=function(e){var i=this.getVisibleCentermark();this.setVisibleCentermark(!i);if(e){CancelBubble(e);}};YahooMapsCtrl.prototype.showCopyright=function(id){if(this.map.getCurrentPackageId()=="aero"){this.cr.style.color="white";var _b7=this.map.getCurrentScale();if(_b7==5000||_b7==10000){this.cr.innerHTML="(C)KOKUSAI KOGYO CO.,LTD,Degital Earth Technology,Pasco";}else{if(_b7==25000||_b7==70000){this.cr.innerHTML="(C) Digital Earth Technology, Geoscience Co., Ltd.&RESTEC";}else{this.cr.innerHTML="(C) Geoscience Co., Ltd";}}}else{this.cr.innerHTML="";}};YahooMapsCtrl.prototype.showScalebar=function(){this.scalebar.src=_imageServer+"scalebars/scale_"+_scalebar[this.map.getCurrentLayerId()]+"_a.gif";};YahooMapsCtrl.prototype.packageChanged=function(){var id=this.map.getCurrentPackageId();var _b9=YMapMode.MAP;if(_jsapiVersion=="V2"){_b9="worldmap";}this.mapbutton_img.style.left=(id==_b9?0:-64)+"px";this.photobutton_img.style.left=(id==YMapMode.AERO?0:-64)+"px";this.b1button_img.style.left=(id==YMapMode.B1MAP?0:-64)+"px";this.guidebutton_img.style.left=(id==YMapMode.GUIDEMAP?0:-64)+"px";if(id==YMapMode.GUIDEMAP||id==YMapMode.B1MAP){this.slider.setEnableBlow(false);}else{this.slider.setEnableBlow(true);}if(id!=YMapMode.GUIDEMAP&&id!=YMapMode.B1MAP){this.prevLayerId=id;}};YahooMapsCtrl.prototype.setSliderStyle=function(_ba){var s=_ba.getContainer();var n=s.childNodes;for(var i=0;inw.x&&p.y>nw.y)&&(p.xne.y)&&(p.x>sw.x&&p.y0){window.setTimeout(_func(this.vec,"setScrollOffset"),_delaytime);window.setTimeout(_func(this,"vectorRefresh"),_delaytime);}else{this.vec.setScrollOffset();this.vectorRefresh();}};YahooMapsCtrl.prototype.vectorRefresh=function(flg){if(flg!=true){if(this.ms.canvas==null){this.ms.initCanvas();}if(this.ms.canvas.firstChild){if(this.ms.canvas.firstChild.id!=this.vectorContainer.id){this.ms.canvas.insertBefore(this.vectorContainer,this.ms.canvas.firstChild);}}else{this.ms.canvas.insertBefore(this.vectorContainer,this.ms.canvas.firstChild);}this.setVectorContainerOrigin();}this.vectorGraphics.clear();var len=this.vectorData.length;for(var i=0;i0&&this.vec.isNeedToRefresh()){this.ms.smoothLayerChanging();this.ms.layerChanged();this.vectorLayerChanged();}this.setVectorPopup();};YahooMapsCtrl.prototype.vectorResize=function(){if(this.vectorContainer){this.vec.setScrollOffset();this.vectorRefresh();}if(this.popupID){this.ms.closePopup(true);this.openPopupOnMapContainer(this.popupID);}};YahooMapsCtrl.prototype.setVectorContainerOrigin=function(){this.vec.setVectorContainerOrigin();};YahooMapsCtrl.prototype.get2LinePointIntersection=function(p1,p2,p3,p4){return this.vec.get2LinePointIntersection(p1,p2,p3,p4);};YahooMapsCtrl.prototype.isIntersection=function(p1,p2,p3,p4){return this.vec.isIntersection(p1,p2,p3,p4);};YahooMapsCtrl.prototype.isPointInPolygon=function(p,_e8){return this.vec.isPointInPolygon(p,_e8);};YahooMapsCtrl.prototype.getClippingPoint=function(p,_ea){return this.vec.getClippingPoint(p,_ea);};YahooMapsCtrl.prototype.getPointLineDistance=function(p,lp1,lp2){return this.vec.getPointLineDistance(p,lp1,lp2);};YahooMapsCtrl.prototype.vectorPopupEvent=function(id,_ef){var vec=_address_yahoomap;var _f1=vec.map.getContainer();return function(evt){if(!_ef){return;}if(vec.vec.isMouseDragged){return;}CancelBubble(evt);if(!vec.vec.bVectorClickPopup&&vec.vec.bVectorPopupOpen&&(vec.vec.bVectorPopupOpen==id)){return false;}var p=_getMousePosition(evt,_f1);vec.vec.bVectorPopupOpen=id;vec.vec.vectorPopupOrigin=new Array();vec.vec.vectorPopupOrigin[0]=vec.map.log2LatLon(p);vec.setVectorPopup(_ef);};};YahooMapsCtrl.prototype.vectorPopupEvent_Canvas=function(){var map=this;var _f5=this.map.getContainer();return function(e){if(map.vec.isMouseDragged){return;}if(map.vectorData){var len=map.vectorData.length;if(len>=1){var ref=false;var mp=_getMousePosition(e,_f5);for(var i=len-1;i>=0;i--){if(map.vectorData[i]["kind"]=="polyline"){var p=new Array();var _fc=map.vectorData[i]["strokeWidth"]/2;var _fd=map.vectorData[i]["latlon"].length;for(var j=0;j<_fd;j++){if(j!=0){p[1]=map.map.latLon2Log(map.vectorData[i]["latlon"][j]);var _ff=map.vec.getPointLineDistance(mp,p[0],p[1]);if(_ff>=0&&_ff<=_fc){ref=true;break;}p[0]=p[1];}else{p[0]=map.map.latLon2Log(map.vectorData[i]["latlon"][j]);}}if(ref){break;}}else{if(map.vectorData[i]["kind"]=="polygon"){var p=new Array();var _fd=map.vectorData[i]["latlon"].length;for(var j=0;j<_fd;j++){p[j]=map.map.latLon2Log(map.vectorData[i]["latlon"][j]);}if(map.vec.isPointInPolygon(mp,p)){ref=true;break;}}}if(ref){break;}}if(ref){if(!map.vectorData[i]["popup"]){return;}if(!map.vec.bVectorClickPopup&&map.vec.bVectorPopupOpen&&(map.vec.bVectorPopupOpen==map.vectorData[i]["id"])){return false;}CancelBubble(e);map.vec.bVectorPopupOpen=map.vectorData[i]["id"];map.vec.vectorPopupOrigin=new Array();map.vec.vectorPopupOrigin[0]=map.map.log2LatLon(mp);map.setVectorPopup(map.vectorData[i]["popup"]);return;}else{if(!map.vec.bVectorClickPopup){_vectorPopupClose();}}}}};};YahooMapsCtrl.prototype.setVectorPopup=function(_100){if(!this.vec.bVectorPopupOpen){return;}var _101=_getVectorPopupElement();var div1=_101[0];var div2=_101[1];var div3=_101[2];var div4=_101[3];if(div1&&div2&&div3&&div4){var ref=0;var _107=this.map.getContainer();var _108=_getElementePosition(_107);if(_100){_setVectorPopupHtml(div3,_100);_setVectorPopupHtml(div4,_100);_setVectorPopupHtml(div1,_100);_setVectorPopupHtml(div2,_100);this.vecCanvasOffset=this.vec.getScrollOffset();}if(this.vec.vectorPopupOrigin[0]){var _109=72;var p1=this.map.latLon2Log(this.vec.vectorPopupOrigin[0]);p1.x+=_108.x;p1.y+=_108.y;var _10b=_107.offsetWidth+_108.x;var _10c=_10b/2;var _10d=_107.offsetHeight+_108.y;var _10e=_10d/2;if((p1.x>=0+_108.x&&p1.x<=_10c)&&(p1.y>=0+_108.y&&p1.y<=_10e/2)){div4.style.display="none";div1.style.display="none";div2.style.display="none";var s=_getHtmlSize(div3.innerHTML);div3.style.left=p1.x-_109+"px";div3.style.top=p1.y+"px";div3.style.display="block";}else{if((p1.x>=_10c&&p1.x<=_10b)&&(p1.y>=0+_108.y&&p1.y<=_10e/2)){div3.style.display="none";div1.style.display="none";div2.style.display="none";var s=_getHtmlSize(div4.innerHTML);div4.style.left=p1.x-(s.width-_109)+"px";div4.style.top=p1.y+"px";div4.style.display="block";}else{if((p1.x>=0+_108.x&&p1.x<=_10c)&&(p1.y>=_10e/2&&p1.y<=_10d)){div3.style.display="none";div4.style.display="none";div2.style.display="none";var s=_getHtmlSize(div1.innerHTML);div1.style.left=p1.x-_109+"px";div1.style.top=p1.y-s.height+"px";div1.style.display="block";}else{if((p1.x>=_10c&&p1.x<=_10b)&&(p1.y>=_10e/2&&p1.y<=_10d)){div3.style.display="none";div4.style.display="none";div1.style.display="none";var s=_getHtmlSize(div2.innerHTML);div2.style.left=p1.x-(s.width-_109)+"px";div2.style.top=p1.y-s.height+"px";div2.style.display="block";}else{div3.style.display="none";div4.style.display="none";div1.style.display="none";div2.style.display="none";}}}}p1.x-=_107.offsetLeft;p1.y-=_107.offsetTop;}}};YahooMapsCtrl.prototype.resizeMap=function(){var _110;var _111;if(arguments.length===1&&typeof arguments[0]=="object"){var size=arguments[0];_110=size.width;_111=size.height;}else{if(arguments.length===2){_110=arguments[0];_111=arguments[1];}}this.map.setSize(_110,_111);};YahooMapsCtrl.prototype.getIconElement=function(id){return this.ms.getIconElement(id);};YahooMapsCtrl.prototype.latLon2Log=function(pos){var p;if(typeof (pos)=="object"){p=pos.toLLPoint();}else{if(typeof (pos)=="string"){p=new LLPoint(pos.split(",")[0],pos.split(",")[1]);}}return this.map.latLon2Log(p);};YahooMapsCtrl.prototype.setVisibleUIController=function(_116){this.visibleUIController=_116;this.map.setVisibleCenterMark(_116);var _117=(_116===true)?"block":"none";this.centerbutton.style.display=_117;if(this.visibleSlider){this.slider.getContainer().style.display=_117;}else{this.zoomer.style.display=_117;}this.scalebar.dom.style.display=_117;this.home.style.display=_117;this.mapbutton.style.display=_117;this.photobutton.style.display=_117;if(YMapMode.GUIDEMAP&&this.visibleGuideButton){this.guidebutton.style.display=_117;}if(this.enableUgButton&&this.visibleUgButton){this.b1button.style.display=_117;}};YahooMapsCtrl.prototype.setVisibleModeButton=function(_118){var _119=(_118===true)?"block":"none";this.mapbutton.style.display=_119;this.photobutton.style.display=_119;if(YMapMode.GUIDEMAP&&this.visibleGuideButton){this.guidebutton.style.display=_119;}if(this.enableUgButton&&this.visibleUgButton){this.b1button.style.display=_119;}};YahooMapsCtrl.prototype.getVisibleModeButton=function(){return (this.mapbutton.style.display=="block"&&this.photobutton.style.display=="block")?true:false;};YahooMapsCtrl.prototype.setVisibleHomeButton=function(_11a){this.home.style.display=(_11a==true?"block":"none");};YahooMapsCtrl.prototype.getVisibleHomeButton=function(){return document.getElementById("homebutton").style.display=="block"?true:false;};YahooMapsCtrl.prototype.smoothLayerTo=function(_11b){this.map.smoothLayerTo(_11b-1);};function YLLPoint(){this.lat=0;this.lon=0;if(arguments.length==1){this.parse(arguments[0]);}else{if(arguments.length>1){this.lat=this.toDegree(arguments[0]);this.lon=this.toDegree(arguments[1]);}}}YLLPoint.prototype.parse=function(s){if(typeof (s)=="object"){this.lat=s.lat;this.lon=s.lon;}else{if(typeof (s)=="string"){a=s.split(/,/);if(a.length>=2){this.lat=this.toDegree(a[0]);this.lon=this.toDegree(a[1]);}}}};YLLPoint.prototype.toDegree=function(s){if(typeof (s)!="string"){return parseFloat(s);}if(s.indexOf("/")>=0){return new Dms(s).getDegree();}var p=s.split(".");if(p.length==3){return new Dms(p[0]+"/"+p[1]+"/"+p[2]).getDegree();}if(p.length==4){return new Dms(p[0]+"/"+p[1]+"/"+p[2]+"."+p[3]).getDegree();}return parseFloat(s);};YLLPoint.prototype.toLLPoint=function(){return new LLPoint(this.lat,this.lon);};YLLPoint.prototype.toString=function(){return (new Dms(this.lat)).toString().replace(/\//g,".")+","+(new Dms(this.lon)).toString().replace(/\//g,".");};YLLPoint.prototype.distance=function(pos){var p1,p2;p1=this.toLLPoint();if(typeof (pos)=="string"){p2=new LLPoint(pos.split(",")[0],pos.split(",")[1]);}else{if(typeof (pos)=="object"){p2=pos.toLLPoint();}}return p1.distance(p2);};YLLPoint.prototype.getMeshCode=LLPoint.prototype.getMeshCode;function YMapMode(){}YMapMode.MAP="map";YMapMode.AERO="aero";YMapMode.B1MAP="b1";YMapMode.GUIDEMAP="";function YEventType(){}YEventType.MAP_CLICK="click";YEventType.MAP_MOVING="mapMoving";YEventType.MAP_MOVED="mapMoved";YEventType.LAYER_CHANGED="layerChanged";YEventType.MODE_CHANGED="packageChanged";YEventType.MOUSE_OVER="mouseOver";YEventType.MOUSE_OUT="mouseOut";YEventType.MOUSE_MOVE="mouseMove";YEventType.ICON_CLICK="iconClick";YEventType.ICON_DBLCLICK="iconDblClick";YEventType.ICON_MOUSEDOWN="iconMouseDown";YEventType.ICON_MOUSEUP="iconMouseUp";YEventType.ICON_MOUSEOVER="iconMouseOver";YEventType.ICON_MOUSEOUT="iconMouseOut";YEventType.POPUP_OPEN="openPopup";YEventType.POPUP_CLOSE="closePopup";function YDatumType(){}YDatumType.TOKYO97="tokyo97";YDatumType.WGS84="wgs84";var _popupHTML=new Object();_popupHTML["topright"]="
";_popupHTML["topleft"]="
";_popupHTML["bottomright"]="
";_popupHTML["bottomleft"]="
";function _addPopup(){var a=["topright","topleft","bottomright","bottomleft"];for(var i=0;i ";_vecterPopupHTML["topleft"]="
";_vecterPopupHTML["bottomright"]="
";_vecterPopupHTML["bottomleft"]="
";function _vectorPopupAddPopup(){var a=["topright","topleft","bottomright","bottomleft"];var id="_vector_popup";for(var i=0;i