window["ID"]="10400031";window["VERSION"]="1.3";window["LANG"]="ja";window["MAP_URL"]="http://geo.cld.navitime.biz/mapimg/";window["COPYRIGHT_TEXT"]="地図 ©ZENRIN CO., LTD.";window["REQUEST_URL"]="http://dp.navitime.biz/v1/{sid}/mapscript/css";window["PALETTE_TYPE"]="SVC";var navitime=navitime||{};navitime.geo=navitime.geo||{};navitime.geo.parent=navitime;navitime.geo.namespace=function(a){a=a.split(".");var b=navitime.geo.parent;b===window[a[0]]&&(a=a.slice(1));for(var c=0,d=a.length;cb);navitime.geo.Util.CheckAlpha=function(){return a};return a}; navitime.geo.Util.transDatumJtoW=function(){return function(a){var b=a.lat/1E3*Math.PI/648E3,c=a.lng/1E3*Math.PI/648E3,d=6377397.155/Math.sqrt(1-0.006674372174974933*Math.sin(b)*Math.sin(b));a=(d+0)*Math.cos(b)*Math.cos(c)-147.54;var c=(d+0)*Math.cos(b)*Math.sin(c)- -507.26,b=(0.9933256278250251*d+0)*Math.sin(b)- -680.47,d=Math.sqrt(a*a+c*c),e=Math.atan(6378137*b/(6356752.31424518*d)),b=Math.atan2(b+42841.311513312336*Math.sin(e)*Math.sin(e)*Math.sin(e),d-42697.67270717874*Math.cos(e)*Math.cos(e)* Math.cos(e));a=Math.atan2(c,a);return new navitime.geo.LatLng(Math.round(1E3*b*(648E3/Math.PI)),Math.round(1E3*a*(648E3/Math.PI)))}}(); navitime.geo.Util.transDatumWtoJ=function(){return function(a){var b=a.lat/1E3*(Math.PI/648E3),c=a.lng/1E3*(Math.PI/648E3),d=6378137/Math.sqrt(1-0.006694379990141124*Math.sin(b)*Math.sin(b));a=(d+0)*Math.cos(b)*Math.cos(c)+147.54;var c=(d+0)*Math.cos(b)*Math.sin(c)-507.26,b=(0.9933056200098589*d+0)*Math.sin(b)-680.47,d=Math.sqrt(a*a+c*c),e=Math.atan(6377397.155*b/(6356078.963*d)),b=Math.atan2(b+42707.88489116032*Math.sin(e)*Math.sin(e)*Math.sin(e),d-42565.1221200963*Math.cos(e)*Math.cos(e)*Math.cos(e)); a=Math.atan2(c,a);return new navitime.geo.LatLng(Math.round(1E3*b*(648E3/Math.PI)),Math.round(1E3*a*(648E3/Math.PI)))}}(); navitime.geo.Util.calcAutomaticAdjustmentViewPort=function(a,b,c,d){if(!b)return!1;for(var e,f,g,h,k=0,l=b.length;km.lng)e=m.lng;if(!f||fm.lat)g=m.lat;if(!h||hMath.abs(d.lng-e)?f:e;h=Math.abs(d.lat-h)>Math.abs(d.lat-g)?h:g;g=2.6*navitime.geo.LatLng.getDistance(new navitime.geo.LatLng(0, d.lng),new navitime.geo.LatLng(0,e));h=2.6*navitime.geo.LatLng.getDistance(new navitime.geo.LatLng(d.lat,0),new navitime.geo.LatLng(h,0));c||(c=a._zoomMax);e=-1;for(f=a._displayBounds;ga&&(a="0"+a);return navitime.geo.Util.getYYYYMMDDHHMM()+a}; navitime.geo.Util.getYYYYMMDDHHMM=function(){var a=new Date,b=a.getYear(),c=a.getMonth()+1,d=a.getDate(),e=a.getHours(),a=a.getMinutes();2E3>b&&(b+=1900);10>c&&(c="0"+c);10>d&&(d="0"+d);10>e&&(e="0"+e);10>a&&(a="0"+a);return""+b+c+d+e+a};navitime.geo.Util.Function.bindAsEventListener=function(a,b){return function(c){return a.call(b,c||window.event)}}; navitime.geo.Util.Function.bind=function(a,b){var c=Array.prototype.slice.apply(arguments,[2]);return function(){var d=c.concat(Array.prototype.slice.apply(arguments,[0]));return a.apply(b,d)}};navitime.geo.Util.fixOnMouseOut=function(a,b){var c=null;b.toElement?c=b.toElement:b.relatedTarget&&(c=b.relatedTarget);var d;a:{d=c;if(null!=d)for(;d.parentNode;)if((d=d.parentNode)==a){d=!0;break a}d=!1}return d||a==c?!1:!0}; navitime.geo.Util.getRealImageSize=function(a){var b,c,d=a.width,e=a.height;if("undefined"!==typeof a.naturalWidth)d=a.naturalWidth,e=a.naturalHeight;else if("undefined"!==typeof a.runtimeStyle){var f=a.runtimeStyle;b=f.width;c=f.height;f.width="auto";f.height="auto";d=a.width;e=a.height;f.width=b;f.height=c}else b=a.width,c=a.height,a.removeAttribute("width"),a.removeAttribute("height"),d=a.width,e=a.height,a.width=b,a.height=c;return new navitime.geo.Size(d,e)}; navitime.geo.Util.changeDynamicArray=function(a,b,c){if(a instanceof Array){var d=Array.prototype.slice.apply(arguments,[3]);a.push=function(){var e=Array.prototype.push.apply(a,arguments);c.apply(b,d);return e};a.pop=function(){var e=Array.prototype.pop.apply(a,arguments);c.apply(b,d);return e};a.shift=function(){var e=Array.prototype.shift.apply(a,arguments);c.apply(b,d);return e};a.unshift=function(){var e=Array.prototype.unshift.apply(a,arguments);c.apply(b,d);return e};a.splice=function(){var e= Array.prototype.splice.apply(a,arguments);c.apply(b,d);return e}}};navitime.geo.Util._getSerial=function(){var a=0;return function(){return a++}}();String.prototype.trim||(String.prototype.trim=function(){for(var a=this.toString();" "==a.charAt(0);)a=a.substring(1,a.length);for(;" "==a.charAt(a.length-1);)a=a.substring(0,a.length-1);return a});navitime.geo.namespace("navitime.geo");navitime.geo.Browser={touchable:function(){var a=document.documentElement;return window.navigator&&window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints||"ontouchstart"in a?!0:!1}()};navitime.geo.namespace("navitime.geo.MeshUtil"); navitime.geo.MeshUtil.toMeshCode=function(a,b){var c=navitime.geo.MeshUtil._toScale(b),d=[[6,6],[3,3],[10,10],[5,5],[1,1]],e=[],f=[],g=[],h=[],k=a.lng,l=a.lat+324E6,m=k%36E5,p=l%24E5,q=l%3E5,r=k%45E4;e[1]=Math.floor(l/24E5);e[0]=Math.floor(k/36E5);360<=e[0]&&(e[0]-=360);var n;n=""+e[1];n+=e[0];1===c?(f[1]=Math.floor(p/(24E5/d[0][1]))+10,f[0]=Math.floor(m/(36E5/d[0][0]))+10,n+=f[1].toString(16),n+=f[0].toString(16)):(f[1]=Math.floor(p/3E5),f[0]=Math.floor(m/45E4),2===c?(g[1]=Math.floor(q/(3E5/d[1][1]))+ 10,g[0]=Math.floor(r/(45E4/d[1][0]))+10,n+=f[1],n+=f[0],n+=g[1].toString(16),n+=g[0].toString(16)):3===c?(g[1]=Math.floor(q/(3E5/d[2][1])),g[0]=Math.floor(r/(45E4/d[2][0])),n+=f[1],n+=f[0],n+=g[1],n+=g[0]):4===c&&(g[1]=Math.floor(q/(3E5/d[2][1])),g[0]=Math.floor(r/(45E4/d[2][0])),h[1]=Math.floor(l%3E4/(3E4/d[3][1])),h[0]=Math.floor(k%45E3/(45E3/d[3][0])),n+=f[1],n+=f[0],n+=g[1],n+=g[0],n+=h[1],n+=h[0]));return n}; navitime.geo.MeshUtil._toScale=function(a){switch(a){case 6:case 7:case 8:return 0;case 9:case 10:case 11:return 1;case 12:case 13:case 14:return 2;case 15:case 16:return 3;case 17:case 18:case 19:return 4;default:return 0}};navitime.geo.MeshUtil.getGap=function(a){a=navitime.geo.MeshUtil._toScale(a);var b={};0>=a?(b.y=24E5,b.x=36E5):1===a?(b.y=4E5,b.x=6E5):2===a?(b.y=1E5,b.x=15E4):3===a?(b.y=3E4,b.x=45E3):4<=a&&(b.y=6E3,b.x=9E3);return b};navitime.geo.namespace("navitime.geo.base"); navitime.geo.base.Class=function(){for(var a=function(){arguments&&this.initialize.apply(this,arguments)},b={},c,d=0,e=arguments.length;dparseFloat(g)?(k.filter="alpha(opacity\x3d"+100*g+")",k.opacity=g):1==parseFloat(g)&&(k.filter="",k.opacity=""));h&&!navitime.geo.Util.CheckAlpha()&&(k.display="inline-block",h.sizing||(h.sizing="scale"),k.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'"+ h.src+"', sizingMethod\x3d'"+h.sizing+"')",0<=parseFloat(k.opacity)&&1>parseFloat(k.opacity)&&(k.filter+=" alpha(opacity\x3d"+100*k.opacity+")"),a=a.childNodes[0])&&(a.style.filter="alpha(opacity\x3d0)")};navitime.geo.DOM.createImage=function(a,b,c,d,e,f,g){var h=document.createElement("img");d||(d="relative");navitime.geo.DOM.addElementOption(h,a,b,d,e,null,f);a=h.style;g||(a.display="none");h.galleryImg="no";c&&(h.src=c);return h}; navitime.geo.DOM.createAlphaImage=function(a,b,c,d,e,f,g){var h=navitime.geo.DOM.create("div");f=c||f?{sizing:f,src:c}:null;c=navitime.geo.DOM.createImage(null,b,c,"relative",e,null,!0);h.appendChild(c);navitime.geo.DOM.addElementOption(h,a,b,d,null,"hidden",g,f);return h}; navitime.geo.DOM.setCss=function(){if(document.all){var a=document.createStyleSheet();return function(b,c){a.addRule(b,"{"+c+"}")}}var b=document.createElement("style");b.setAttribute("type","text/css");document.getElementsByTagName("head").item(0).appendChild(b);var c=b.sheet;return function(a,b){c.insertRule(a+"{"+b+"}",c.cssRules.length)}}();navitime.geo.namespace("navitime.geo"); navitime.geo.LatLng=navitime.geo.base.Class({lng:0,lat:0,initialize:function(a,b){this.lng=navitime.geo.LatLng.transMillisec(b+"");this.lat=navitime.geo.LatLng.transMillisec(a+"")},add:function(a,b){return new navitime.geo.LatLng(this.lat+navitime.geo.LatLng.transMillisec(a+""),this.lng+navitime.geo.LatLng.transMillisec(b+""))},clone:function(){return new navitime.geo.LatLng(this.lat,this.lng)},equals:function(a){return a&&a.lng===this.lng&&a.lat===this.lat},getLon:function(){return this.lng},getLng:function(){return navitime.geo.LatLng.transMILLItoDEG(this.lng)+ ""},getLat:function(){return navitime.geo.LatLng.transMILLItoDEG(this.lat)+""}});navitime.geo.LatLng.getDistance=function(a,b){var c=navitime.geo.LatLng.getDifference(a,b);return Math.sqrt(Math.pow(c.x,2)+Math.pow(c.y,2))}; navitime.geo.LatLng.getDifference=function(a,b){var c=navitime.geo.LatLng.transMILLItoDEG(a.lat),d=navitime.geo.LatLng.transMILLItoDEG(a.lng),e=navitime.geo.LatLng.transMILLItoDEG(b.lat),f=navitime.geo.LatLng.transMILLItoDEG(b.lng),g=(e+c)/2*Math.PI/180,c=(e-c)*Math.PI/180,d=(f-d)*Math.PI/180,f=Math.sqrt(1-0.00669437999019758*Math.pow(Math.sin(g),2)),e=6335439.32729246/Math.pow(f,3);return{x:d*(6378137/f)*Math.cos(g),y:c*e}}; navitime.geo.LatLng.transMILLItoDMS=function(a){var b=null,c=null,c=a%1E3;a=parseInt(a/1E3);c="0"+c/10;b=c.substring(c.length-2);c=a%60;a=parseInt(a/60);c="0"+c;b=c.substring(c.length-2)+"."+b;c=a%60;a=parseInt(a/60);c="0"+c;return b=a+"."+c.substring(c.length-2)+"."+b};navitime.geo.LatLng.transMILLItoDEG=function(a){return Math.round(a/3.6)/1E6}; navitime.geo.LatLng.transMillisec=function(a){var b=null,c=1;a=a.trim();0==a.indexOf("+")&&(a=a.substring(1));0==a.indexOf("-")&&(a=a.substring(1),c=-1);if(-1!=a.indexOf(","))b=a.split(",");else if(-1!=a.indexOf("."))b=a.split(".");else return parseInt(a)*c;if(2==b.length)return Math.round(36E5*parseFloat(a));a=parseInt(b[0]);var d=parseInt(b[1]),e=parseInt(b[2]);if(4==b.length&&0=b.length?Math.round(36E5*parseFloat(a)):parseInt(a,10)};navitime.geo.namespace("navitime.geo");navitime.geo.Size=navitime.geo.base.Class({width:0,height:0,initialize:function(a,b){this.width=parseFloat(a);this.height=parseFloat(b)},clone:function(){return new navitime.geo.Size(this.width,this.height)}});navitime.geo.namespace("navitime.geo.base"); navitime.geo.Color=navitime.geo.base.Class({_color:null,initialize:function(a){a=a.toLowerCase();for(var b=navitime.geo.Color.table,c=0,d=b.length;cb.v?0:b.v;a=navitime.geo.Color.changeHSVToDecimal(b);this._color={decimal:a,hex:navitime.geo.Color.changeDecimalToHex(a)}},addBrightnessPercent:function(a){this.addBrightness(2.55*a)},equals:function(a){return this.getDecimal()===a.getDecimal()}}); navitime.geo.Color.changeHexToDecimal=function(a){if(!a)return null;-1!==a.indexOf("#")&&(a=parseInt(a.substring(1,3),16)+","+parseInt(a.substring(3,5),16)+","+parseInt(a.substring(5,8),16));return a};navitime.geo.Color.changeDecimalToHex=function(a){if(!a)return null;-1!==a.indexOf(",")&&(a=a.split(","),a="#"+("0"+parseInt(a[0]).toString(16)).slice(-2)+("0"+parseInt(a[1]).toString(16)).slice(-2)+("0"+parseInt(a[2]).toString(16)).slice(-2));return a}; navitime.geo.Color.changeDecimalToHSV=function(a){if(!a)return null;if(-1!==a.indexOf(",")){a=a.split(",");var b=a[0]-0,c=a[1]-0,d=a[2]-0;a=Math.max(b,c,d);var e=Math.min(b,c,d);a===e?c=b=0:(b=a===b?60*(c-d)/(a-e):a===c?60*(d-b)/(a-e)+120:60*(b-c)/(a-e)+240,c=255*(a-e)/a);return{h:0>b?b+360:359window.opera.version()&& (b=-b)):a.detail&&(b=-a.detail/3);0>b?this.callback("down",[a,b]):this.callback("up",[a,b])}});navitime.geo.namespace("navitime.geo.handler"); navitime.geo.handler.Keyboard=navitime.geo.base.Class(navitime.geo.handler.AbstractHandler,{KEY_EVENTS:["keydown","keyup","keypress"],_eventListener:null,initialize:function(a,b,c){navitime.geo.handler.AbstractHandler.prototype.initialize.apply(this,arguments);this._eventListener=navitime.geo.Util.Function.bindAsEventListener(this._handleKeyEvent,this)},destroy:function(){this.deactivate();this._eventListener=null;navitime.geo.handler.AbstractHandler.prototype.destroy.apply(this,arguments)},activate:function(){if(navitime.geo.handler.AbstractHandler.prototype.activate.apply(this, arguments)){for(var a=0,b=this.KEY_EVENTS.length;aa.time-this.handlers.drag._endXY.timeStamp? (b=this.handlers.drag._boobyXY.x-a.xy.x,c=this.handlers.drag._boobyXY.y-a.xy.y,d=a.time-this.handlers.drag._boobyXY.timeStamp):(b=this.handlers.drag._endXY.x-a.xy.x,c=this.handlers.drag._endXY.y-a.xy.y,d=a.time-this.handlers.drag._endXY.timeStamp);var e=0,f=0;200>d&&(d=0===d?1:d,b=0=b?-80:b,c=80<=c?80:-80>=c?-80:c,e=Math.ceil(0-Math.pow(10*Math.round(b/10),2)/-10),f=Math.ceil(0-Math.pow(10*Math.round(c/ 10),2)/-10),e*=0a.xy.y&&(this._sliderIcon.style.top=a.xy.y-navitime.geo.Util.pagePosition(this.div)[1]+"px",navitime.geo.event.BrowserEventController.stop(a,!0))},_sliderMouseUp:function(a){this._isCapture&&(this._sliderIcon.releaseCapture&&this._sliderIcon.releaseCapture(),this._documentEvents.destroy(),this._documentEvents=null, this._isCapture=!1);a.xy=a.xy[0]?a.xy[0]:a.xy;a.xy.y-=navitime.geo.Util.pagePosition(this._zoomBarIcon)[1];this._zoomBarAction(a)},_moveSliderPosition:function(){if(this._isInit){var a=Math.round(parseInt(this._zoomBarIcon.style.height)/(this.map._zoomMax-this.map._zoomMin+2)),a=(this.map._zoomMax-this.map.getZoom())*a+Math.round(a/2-parseInt(this._sliderIcon.style.height)/2);this._sliderIcon.style.top=a+parseInt(this._zoomBarIcon.style.top)+(this.map._zoomMax-this.map.getZoom())+"px"}},_onload:function(a){a.style.visibility= "hidden";var b=function(){window.setTimeout(navitime.geo.Util.Function.bind(function(){var b=navitime.geo.Util.getRealImageSize(a);this.bounds=new navitime.geo.BoundsInfo(0,b.width,0,b.height);navitime.geo.DOM.addElementOption(a,null,b);if(3===this._count){b=this._plusIcon.style;b.left=this.zoomStartX+"px";b.top=this.zoomStartY+"px";var d=this._zoomBarIcon.style;d.left=this.zoomStartX+parseInt(b.width)/2-parseInt(d.width)/2+"px";d.top=parseInt(b.top)+parseInt(b.height)-2+"px";var e=this._minusIcon.style; e.left=this.zoomStartX+"px";e.top=parseInt(b.top)+parseInt(b.width)+parseInt(d.height)+"px";this._sliderIcon.style.left=this.zoomStartX-4+"px";this._isInit=!0;this._moveSliderPosition();this._plusIcon.style.visibility="";this._minusIcon.style.visibility="";this._zoomBarIcon.style.visibility="";this._sliderIcon.style.visibility=""}else this._count++},this),50);navitime.geo.event.BrowserEventController.removeEvent(a,"load",navitime.geo.Util.Function.bind(b,this))};navitime.geo.event.BrowserEventController.addEvent(a, "load",navitime.geo.Util.Function.bind(b,this))}});navitime.geo.namespace("navitime.geo.control"); navitime.geo.control.MenuControl=navitime.geo.base.Class(navitime.geo.control.AbstractControl,{_menuList:null,_latlng:null,_style:null,initialize:function(a){navitime.geo.control.AbstractControl.prototype.initialize.apply(this,["MenuCtl"]);navitime.geo.base.CSS3Style&&navitime.geo.base.CSS3Style.USERSELECT&&(this.div.style[navitime.geo.base.CSS3Style.USERSELECT]="none");this.div.setAttribute("unselectable","on",0);this.div.onselectstart=function(){return!1};this.div.className+=" ntgeo-menu";this._style= this.div.style;this._style.visibility="hidden";this._menuList=[];a=a||{};a.map&&this.setMap(a.map)},_onAdd:function(){this.handlers.click=new navitime.geo.handler.Click(this,{rightclick:this.rightClick})},destroy:function(){if(this._menuList){for(var a=0,b=this._menuList.length;athis.map._displayBounds.getWidth()&&(b-=this.div.offsetWidth+4);a.xy.y+this.div.offsetHeight-this.map._displayBounds.top>this.map._displayBounds.getHeight()&&(c-=this.div.offsetHeight+4);return{top:c,left:b}},getLonLat:function(){return this._latlng},getLatLng:function(){return this._latlng}}); navitime.geo.control.MenuColumn=navitime.geo.base.Class({events:null,_colmDiv:null,initialize:function(a,b,c){this._colmDiv=navitime.geo.DOM.create("div","ntgeo-menuColm");a.nodeType?this._colmDiv.appendChild(a):this._colmDiv.innerHTML=a;this.events=new navitime.geo.event.InnerEventController(this,this._colmDiv,null,!1);this.events.register("click",b,c);this.events.register("mouseover",this,navitime.geo.Util.Function.bind(function(){this._colmDiv.className+=" ntgeo-menuColm-mouseover"},this));this.events.register("mouseout", this,navitime.geo.Util.Function.bind(function(){this._colmDiv.className=this._colmDiv.className.replace(" ntgeo-menuColm-mouseover","")},this))},destroy:function(){null!=this.events&&this.events.destroy();this._colmDiv.parentNode&&this._colmDiv.parentNode.removeChild(this._colmDiv);this._colmDiv=null}});navitime.geo.namespace("navitime.geo.control"); navitime.geo.control.KeyboardControl=navitime.geo.base.Class(navitime.geo.control.AbstractControl,{_keyUpDown:0,_keyRightLeft:0,_timerId:null,_isCapture:!0,_documentEvents:null,_centerMarker:null,MOVE_MAX_SPEED:40,AFTER_MOVE:50,initialize:function(){navitime.geo.control.AbstractControl.prototype.initialize.apply(this,["KeyboardCtl"]);this._timerId={}},destroy:function(){this._documentEvents&&(this._documentEvents.destroy(),this._documentEvents=null);this._centerMarker&&(this._centerMarker.destroy(), this._centerMarker=null);navitime.geo.control.AbstractControl.prototype.destroy.apply(this,arguments)},_onAdd:function(){this.map._keyBoardKey=this.id;this.handlers.keyboard=new navitime.geo.handler.Keyboard(this,{keydown:this.keydown,keyup:this.keyup});this.map.events.register("click",this,function(a){if(this._isCapture&&this.isActive){this._documentEvents&&(this._documentEvents.destroy(),this._documentEvents=null);this.handlers.keyboard.activate();var b=document.createElement("input");b.type="text"; b.style.visivility="hidden";b.style.position="absolute";var c=this.map._displayBounds.getWidth()-10,d=this.map._displayBounds.getHeight()-10;b.style.left=0a&&(a=c,b=d);c=this._getMeterText(a);return{length:Math.round(125*c/(2*a)),display:c+"\x26nbsp;"+b}},_getMeterText:function(a){if(1=this._map.getZoom()?4:15<=this._map.getZoom()&&16>=this._map.getZoom()?3:12<=this._map.getZoom()&&14>=this._map.getZoom()?2:9<=this._map.getZoom()&&11>=this._map.getZoom()?1:0},_getZoom:function(){if(256==this._map._grid.tileSize)switch(this._map.getZoom()){case 19:return 16.94;case 18:return 8.47;case 17:return 4.24;case 16:return 10.59;case 15:return 5.29;case 14:return 8.82;case 13:return 4.41;case 12:return 2.2;case 11:return 13.48;case 10:return 6.74; case 9:return 3.37;case 8:return 10.11;case 7:return 5.06;case 6:return 2.53}else if(512==this._map._grid.tileSize)switch(this._map.getZoom()){case 19:return 33.88;case 18:return 16.94;case 17:return 8.48;case 16:return 21.18;case 15:return 10.58;case 14:return 17.64;case 13:return 8.82;case 12:return 4.4;case 11:return 26.96;case 10:return 13.48;case 9:return 6.74;case 8:return 20.22;case 7:return 10.12;case 6:return 5.06}else switch(this._map.getZoom()){case 19:return 8.47;case 18:return 4.23;case 17:return 2.11; case 16:return 5.29;case 15:return 2.64;case 14:return 4.41;case 13:return 2.2;case 12:return 1.1;case 11:return 6.74;case 10:return 3.37;case 9:return 1.68;case 8:return 5.05;case 7:return 2.52;case 6:return 1.26}},_setAlpha:function(a,b){var c=a.style;c.MozOpacity=b/100;c.opacity=b/100;c.filter&&0d)this._shiftColumn(a,!0);else if(0>g)this._shiftColumn(a,!1);else if(e>d)this._shiftRow(a,!0);else if(0>e)this._shiftRow(a,!1);else break}},_shiftRow:function(a, b,c){var d=this.tileGrid[a],e=d[b?0:d.length-1],f=b?-Math.round(this.tileSize/this.ratio):Math.round(this.tileSize/this.ratio);a=c?this._cloneRow(e,a):b?d.pop():d.shift();c=b?-1:1;for(var g=0,h=e.length;ge)for(var l=d.shift(),m=null;m=l.pop();)m.destroy();else 0f)for(l=d.pop();m=l.pop();)m.destroy();else 0g)for(e=0,f=d.length;eh)for(e=0,f=d.length;eb;)for(var d=a.pop(),e=0,f=d.length;ec;)for(e=0,b=a.length;ef&&(h=k,f=g));if(f>b)this._simplifyDP(a,b,c,d,h),this._simplifyDP(a,b,c,h,e); else for(a=d+1;ag;g++){for(var h=d[g],k=[],e=0,f=a.length,l=f-1;eb.max.x&&(c|=2);a.yb.max.y&&(c|=8);return c},_getEdgeIntersection:function(a,b,c,d){var e=b.x-a.x;b=b.y-a.y;var f=d.min;d=d.max;if(c&8)return{x:Math.floor(a.x+e*(d.y-a.y)/b),y:d.y};if(c&4)return{x:Math.floor(a.x+e*(f.y-a.y)/b),y:f.y};if(c&2)return{x:d.x,y:Math.floor(a.y+ b*(d.x-a.x)/e)};if(c&1)return{x:f.x,y:Math.floor(a.y+b*(f.x-a.x)/e)}}};navitime.geo.namespace("navitime.geo.layer"); navitime.geo.layer.AbstractLayer=navitime.geo.base.Class({EVENT_TYPES:[],div:null,map:null,events:null,_isTileLayer:!1,initialize:function(){this.div=navitime.geo.DOM.create("div","ntgeo-layer");this.events=new navitime.geo.event.InnerEventController(this,null,this.EVENT_TYPES)},destroy:function(){this.map&&(this._isTileLayer&&this._gridNum&&this.map._grid.clearGrid(this._gridNum),this.map.removeLayer(this));this.div=this.map=null;this.events&&this.events.destroy();this.events=null},_onAdd:function(a){this.map= a.getMap()},setMap:function(a){if(a)return this.map=a.getMap(),this.map.addLayer(this),this.draw(),!0;this.map&&(this._isTileLayer&&this._gridNum&&this.map._grid.clearGrid(this._gridNum),this.map.removeLayer(this),this.map=null);return!1},getMap:function(){return this._map},draw:function(){},changeVisibility:function(a){this.div&&(this.div.style.visibility=a?"":"hidden")},isVisible:function(){return this.div&&"hidden"===this.div.style.visibility?!1:!0},displayAllSpecifyLatLngs:function(a,b,c){a=navitime.geo.Util.calcAutomaticAdjustmentViewPort(this.map, a,b,c);this.map.setCenter(a.latlng,a.zoom)||window.setTimeout(navitime.geo.Util.Function.bind(this.map.setCenter,this.map,a.latlng,a.zoom),250);return a},getDiv:function(){return this.div}});navitime.geo.namespace("navitime.geo.layer"); navitime.geo.layer.MarkerLayer=navitime.geo.base.Class(navitime.geo.layer.AbstractLayer,{_markers:null,initialize:function(){navitime.geo.layer.AbstractLayer.prototype.initialize.apply(this,arguments);this.div.style.zIndex="1000";this._markers=[]},destroy:function(){this.clearMarkers();this._markers=null;navitime.geo.layer.AbstractLayer.prototype.destroy.apply(this,arguments)},_onAdd:function(a){navitime.geo.layer.AbstractLayer.prototype._onAdd.apply(this,arguments)},setMap:function(a){a?(a.events.register("zoomend", this,this.draw),a.events.register("moveend",this,this.draw),a.events.register("resize",this,this.draw),navitime.geo.marker.Popup&&(navitime.geo.marker.Popup.prototype.CLOSE_ICON_URL=a._config.getFileRequestURL()+"/"+a._config.CLOSE_URL)):(this.map.events.unregister("zoomend",this,this.draw),this.map.events.unregister("moveend",this,this.draw),this.map.events.unregister("resize",this,this.draw));navitime.geo.layer.AbstractLayer.prototype.setMap.apply(this,arguments)},draw:function(){for(var a=0,b= this._markers.length;a=this._json.route.length)return!0;this.div||(this.div=this._renderer.createBaseDiv(),this.div.style.zIndex=this._zIndex,navitime.geo.base.CSS3Style&&navitime.geo.base.CSS3Style.USERSELECT&&(this.div.style[navitime.geo.base.CSS3Style.USERSELECT]="none"),this.div.setAttribute("unselectable", "on",0),this.div.onselectstart=function(){return!1},this.map._objectContainerDiv.appendChild(this.div),this._isDisplayAllRoute&&this.displayAllRoute());this.div.style.display="none";var a=this.map._grid._drawBounds,b=this.map.getViewDivPixel();this._drawBounds=new navitime.geo.BoundsInfo(a.left-a.getWidth()*this._buffer-b.left,a.right+a.getWidth()*this._buffer-b.left,a.top-a.getHeight()*this._buffer-b.top,a.bottom+a.getHeight()*this._buffer-b.top);this._drawBounds.prevLeft=0;this._drawBounds.prevTop= 0;for(var a=this._simplifiedRoutes[this.map._zoom]?this._createPixelPoints(this._calcPixelPoints(this._simplifiedRoutes[this.map._zoom].simplifiedLatlngPoints)):this._createSimplifiedPixelPoints(this._json.route,this._json.pos),b=this._json.pos,c=0,d=0,e=!0,f=0,g=b.length-1;ff&&e=-c&&d<=c&&b>=-e&&b<=e?(this.events.triggerEvent("panstart"),this._moving(d,b),!0):this.moveTo(a,this._zoom)},panBy:function(a,b){this._isPan=!0;var c=this._displayBounds.getWidth()*this._loadTimes,d=this._displayBounds.getHeight()*this._loadTimes;if(a>=-c&&a<=c&&b>=-d&&b<=d)return this.events.triggerEvent("panstart"), this._moving(a,b),!0;c=this.getViewDivPixel();c=this.getMovedLatLng(-a+c.left,-b+c.top);return this.moveTo(c,this._zoom)},_moveToPix:function(a,b){if(this._baseLayer.listener||this._resizeId)return!1;this._isPan=!0;this._requestAnimFrame(navitime.geo.Util.Function.bind(this._transform,this,a,b),!0);this._grid.moveALLTiles(this.getViewDivPixel());this.events.triggerEvent("pan");return!0},_setView:function(a,b){this._zoom!==b&&this._savePosition();this._latlng=a;this._zoom=b;this._grid.createAllTiles(); var c=this.getPixcelFromLatLng(a),d=this.getViewDivPixel(),e=c.left-Math.ceil(this._displayBounds.getCenterX())+d.left,c=c.top-Math.ceil(this._displayBounds.getCenterY())+d.top;this._transform(e,c);this._isPan=!1},_savePosition:function(){},zoomTo:function(a,b,c,d){if(this._baseLayer.listener||this._resizeId)return!1;a=this._checkZoomDelta(a);if(0===a)return!1;this.events.triggerEvent("zoomstart");d=!d||!0===d.animation;var e=this._zoom+a;if(this._isPan||0!==b||0!==c){var f=this.getViewDivPixel(); this._latlng=this._grid._getMovedLatLng(this._zoom,f.left-b,f.top-c);if(0!==b||0!==c)f=this._grid._calculateTileNumber(this._latlng,e),this._latlng=this._grid._getMovedLatLng(e,b,c,f)}d?this._zoomAnimation(a,b,c):this._noZoomAnimation(a);this._changeCopyright(e)},zoomToCenter:function(a,b,c,d){if(!this._baseLayer.listener&&!this._resizeId){a=this._checkZoomDelta(a);if(0===a)return null;this.events.triggerEvent("zoomstart");d=!d||!0===d.animation;var e=this._zoom+a,f=this.getViewDivPixel();if(this._isPan|| 0!==b||0!==c)this._latlng=this._grid._getMovedLatLng(this._zoom,f.left-b,f.top-c);d?this._zoomAnimation(a,0this._zoomMax&&this._zoom==this._zoomMax)return 0;a=bthis.MAX_RAIN_OFFSET_TIME}return!1},show:function(){this.isLoadEnd||(this.imageTag.className+=" ntgeo-tile-loaded",this.isLoadEnd=!0)}});navitime.geo.tile.Tile=navitime.geo.tile.WebkitTile;navitime.geo.namespace("navitime.geo.layer.tile"); navitime.geo.layer.tile.BasicTileLayer=navitime.geo.base.Class(navitime.geo.layer.AbstractLayer,{_isTileLayer:!0,_landmark:0,_poi:0,_hidden:null,_ad:0,_res:null,_bgDiv:null,_tileType:null,_mainGrid:null,_bgGrid:null,initialize:function(a){navitime.geo.layer.AbstractLayer.prototype.initialize.apply(this,arguments);this.div.className+=" ntgeo-tile-layer";this._bgDiv=navitime.geo.DOM.create("div","ntgeo-layer ntgeo-tile-layer");this.div.style.zIndex=2;this._bgDiv.style.zIndex=1;this.div.setAttribute("unselectable", "on",0);this.div.onselectstart=function(){return!1};this._bgDiv.setAttribute("unselectable","on",0);this._bgDiv.onselectstart=function(){return!1};if(a){var b=function(a){return!0===a||"true"===a||"1"===a||1===a};b(a.landmark)&&(this._landmark=1);b(a.poi)&&(this._poi=1);a.hidden&&(this._hidden=a.hidden);a.ad&&(this._ad=1)}},destroy:function(){this._bgDiv&&(this.map._layerContainerDiv.removeChild(this._bgDiv),this._bgDiv=null);navitime.geo.layer.AbstractLayer.prototype.destroy.apply(this,arguments)}, _onAdd:function(a){navitime.geo.layer.AbstractLayer.prototype._onAdd.apply(this,arguments);this.div.parentNode.appendChild(this._bgDiv)},setMap:function(a){navitime.geo.layer.AbstractLayer.prototype.setMap.apply(this,arguments)?this.div.parentNode.appendChild(this._bgDiv):this.div.parentNode.removeChild(this._bgDiv)},draw:function(){this.map._grid.createTargetTiles(this._gridNum)},createNewTile:function(a,b,c){var d="",e="",f=new navitime.geo.base.TileMapParameter;this._landmark&&f.addQueryParam("landmark-on", this._landmark);this._poi&&f.addQueryParam("poi-on",this._poi);this._ad&&f.addQueryParam("ad-on",this._ad);this._hidden&&f.addQueryParam("hidemapitems",this._hidden);this._tileType?"satellite"===this._tileType&&(d=this.map._config.URL_SATELLITE_TILE,e="v1/satellite",f.setProduct(null)):(d=this.map._config.getTileRequestURL(),e="tile");if("tile"===e){var g=this.map._config.LANG;g&&"ja"!==g&&f.addQueryParam("lang",g)}return new navitime.geo.tile.Tile(d,this.map._config.getFileRequestURL()+"/"+this.map._config.BLANK_URL, a,f,new navitime.geo.base.RequestPathCreator(b,c,e))},clearAllTiles:function(){this._restoreTileFront();this._removeBuffDiv();this._mainGrid=[];this._bgGrid=[]},_addNode:function(a){this.div.appendChild(a)},_switchingDiv:function(){this.map._grid.events.unregister("loadend",this,this._removeBuffDiv);this._timerId&&window.clearTimeout(this._timerId);var a=this.div;this.div=this._bgDiv;this._bgDiv=a;this.div.style.cssText="visibility: hidden";this._mainGrid=this._bgGrid||[];this._bgGrid=this.map._grid.tileGrid[0]; this.map._grid.tileGrid[0]=this._mainGrid;for(var a=this._bgGrid,b=a.length;b--;)for(var c=a[b],d=c.length;d--;){var e=c[d];e.isLoadEnd||(e.imageTag.src=this.map._config.getFileRequestURL()+"/"+this.map._config.BLANK_URL,e.imageTag.parentNode&&(e.imageTag.parentNode.removeChild(e.imageTag),e.events.triggerEvent("loadcancel"),e.isLoadEnd=!0))}this.map._grid.events.register("loadend",this,this._removeBuffDiv)},_restoreTileFront:function(){this.div.innerHTML="";this.div.style.visibility="";this.div.style.zIndex= 2;this._bgDiv.style.zIndex=1},_removeBuffDiv:function(){if(this.listener)return!1;this._timerId=window.setTimeout(navitime.geo.Util.Function.bind(function(){this._timerId=null;this._bgDiv.innerHTML="";this._bgDiv.style.cssText="visibility: hidden";this.map._grid.events.unregister("loadend",this,this._removeBuffDiv)},this),250)}});navitime.geo.layer.TileLayer=navitime.geo.layer.tile.BasicTileLayer;navitime.geo.namespace("navitime.geo.map"); navitime.geo.map.PrimitiveMap=navitime.geo.base.Class(navitime.geo.map.AbstractMap,{initialize:function(a,b,c,d){d=d||{};navitime.geo.map.AbstractMap.prototype.initialize.apply(this,[a,b,c,d]);a=new navitime.geo.control.MouseControl;b=new navitime.geo.control.KeyboardControl;a.setMap(this);d.wheelzoom||a.disableWheel();b.setMap(this);b.handlers.keyboard.deactivate();d&&d.disableZoomBar||(new navitime.geo.control.ZoomBarControl).setMap(this);navitime.geo.event.BrowserEventController.addEvent(window,"resize", navitime.geo.Util.Function.bind(this.changeSize,this,null))},_zoomAnimation:function(a,b,c){var d=this.getViewDivPixel(),d=this._grid._getMovedLatLng(this._zoom,d.left-b,d.top-c);this._grid._calculateDrawBounds(this._displayBounds,this._latlng,this._zoom+a);var e=0a.xy.length&&this.callback("touchstart",[a]);"a"!=a.target.tagName.toLowerCase()&& navitime.geo.event.BrowserEventController.stop(a)},touchmove:function(a){this._touches&&(a.prevTouches=this._copy(this._touches),a.prevXY=this._xy,this.callback("touchmove",[a]),navitime.geo.event.BrowserEventController.stop(a));this._touches=this._copy(a.touches);this._xy=a.xy},touchend:function(a){a.touches=this._copy(this._touches);a.xy=a.xy?a.xy:this._xy;2>a.touches.length&&(this.callback("touchend",[a]),navitime.geo.event.BrowserEventController.stop(a));this._xy=this._touches=null},gesturestart:function(a){a.touches= this._copy(this._touches);a.xy=this._xy;this.callback("gesturestart",[a]);navitime.geo.event.BrowserEventController.stop(a)},gesturechange:function(a){a.touches=this._copy(this._touches);a.xy=this._xy;if(!a.touches||2>a.touches.length)return!1;this.callback("gesturechange",[a]);navitime.geo.event.BrowserEventController.stop(a)},gestureend:function(a){a.touches=this._copy(this._touches);a.xy=this._xy;this.callback("gestureend",[a]);navitime.geo.event.BrowserEventController.stop(a)},_copy:function(a){if(!a)return null; for(var b=[],c=0,d=a.length;cMath.abs(this._keepTouch.x-a.xy[0].x)&&10>Math.abs(this._keepTouch.y-a.xy[0].y)&&(this._isMove=!1,this.map.zoomTo(1,Math.floor(a.xy[0].x-this.map._displayBounds.getCenterX()),Math.floor(a.xy[0].y-this.map._displayBounds.getCenterY()))):(this._isMove&&!this._isGesture&&(this.map._moveToPix(this._lastMoveX,this._lastMoveY),this._lastMoveY=this._lastMoveX=0,this.map.events.triggerEvent("panend")),this._keepTouch= {x:a.xy[0].x,y:a.xy[0].y},setTimeout(navitime.geo.Util.Function.bind(function(){this._keepTouch=null},this),300)))},callGestureStart:function(a){a=this.map._layerContainerDiv;-1===a.className.indexOf("ntgeo-pinch-gesture")&&(a.className+=" ntgeo-pinch-gesture",this.map._baseLayer._bgDiv.style.visibility="hidden")},callGestureChange:function(a){this._isGesture=!0;var b=this.map._baseLayer.div;this._setTransFormOrigin(b,-this.map._translateX+((a.xy[0].x<=a.xy[1].x?a.xy[0].x:a.xy[1].x)+(a.xy[0].xa.xy.length)return!1;var d=a.xy[0].y<=a.xy[1].y?a.xy[0].y:a.xy[1].y,e=a.xy[0].ya?0:a;this.tailDiv.style.right=this._calculateBaloonTailRightPosition(this._tailDirection)+"px";this.tailDiv.style.top=this._calculateBaloonTailTopPosition(this._tailDirection)+"px";a=this._map.getPixcelFromLatLng(this._options.position);this.moveTo(a.left,a.top);this.setVisible(this._options.visible)}},destroy:function(){this._close&& navitime.geo.event.BrowserEventController.removeEvent("click",this._click,this._clickListener);navitime.geo.overlay.AbstractInfoWindow.prototype.destroy.apply(this)}});navitime.geo.overlay.InfoWindow=navitime.geo.overlay.CSSInfoWindow;navitime.geo.namespace("navitime.geo.overlay"); navitime.geo.overlay.SnowPin=navitime.geo.base.Class({_img:null,_json:null,_map:null,_pins:null,_size:null,_url:null,initialize:function(a,b,c){this._map=a.getMap();this._json=b;this._map=a.getMap();this._url=this._map._config.getSnowRequestURL();c&&(this._url=c+"/"+this._map._config.SERVICE_ID+"/"+this._map._config.URL_FILE_SUFFIX+"/"+this._map._config.URL_SNOW_SUFFIX);this._calculateIconSize()},destroy:function(){this.setMap(null);this._size=this._pins=this._json=this._img=null},_calculateIconSize:function(){this._img= new Image;this._onloadListener=navitime.geo.Util.Function.bind(function(){this._size={width:this._img.width,height:this._img.height};this._zoomendListener=navitime.geo.Util.Function.bind(function(){this._draw()},this);navitime.geo.util.addListener(this._map,"zoomend",this._zoomendListener);this._zoomstartListener=navitime.geo.Util.Function.bind(function(){for(var a=0;aa?this._url+"/"+this._map._config.SNOW_1_URL: 3<=a&&5>a?this._url+"/"+this._map._config.SNOW_3_URL:5<=a&&20>a?this._url+"/"+this._map._config.SNOW_5_URL:20<=a&&50>a?this._url+"/"+this._map._config.SNOW_20_URL:50<=a&&100>a?this._url+"/"+this._map._config.SNOW_50_URL:100<=a&&200>a?this._url+"/"+this._map._config.SNOW_100_URL:this._url+"/"+this._map._config.SNOW_200_URL},_intersects:function(a,b){for(var c=a.length-1;0<=c;c--){var d=this._size.width/4,e=this._size.height/4,f=b.top-e,g=b.left+d,e=b.top+e,h=a[c];if(b.left-df.cover)){var g=new navitime.geo.LatLng(f.coord[1],f.coord[0]),h=this._map.getPixcelFromLatLng(g);-1===this._intersects(b,h)&&b.push({left:h.left-c,top:h.top-d,right:h.left+c,bottom:h.top+d,latLng:g,url:this._getSnowIconPath(f.cover)})}}return b},setMap:function(a){a? this._map!=a&&(this.setMap(null),this._map=a.getMap(),navitime.geo.util.addListener(this._map,"zoomend",this._zoomendListener),navitime.geo.util.addListener(this._map,"zoomstart",this._zoomstartListener),this._draw()):this._map&&(this._zoomstartListener(),this._map.events.unregister("zoomend",this._map,this._zoomendListener),this._map.events.unregister("zoomstart",this._map,this._zoomstartListener),this._map=null)}});navitime.geo.namespace("navitime.geo.marker"); navitime.geo.marker.CSSPopup=navitime.geo.base.Class({EVENT_TYPES:["setText","closeclick"],_div:null,_textDiv:null,latlng:null,events:null,_dispPos:null,_setTransForm:navitime.geo.base.CSS3Style.setTransForm,initialize:function(a,b,c){b=b?b:{};b.borderColor=b.borderColor?navitime.geo.Color.changeHex(b.borderColor):"#000000";b.backgroundColor=b.backgroundColor?navitime.geo.Color.changeHex(b.backgroundColor):"#ffffff";b.fontSize=b.fontSize?b.fontSize:"13px";b.text=b.text?b.text:"";this._div=navitime.geo.DOM.create("div", "ntgeo-popup ntgeo-popup-tail");this._div.style.borderColor=b.borderColor;this._div.style.backgroundColor=b.backgroundColor;navitime.geo.DOM.setCss(".ntgeo-popup-tail:before","border-color:"+b.borderColor+" transparent;");navitime.geo.DOM.setCss(".ntgeo-popup-tail:after","border-color: "+b.backgroundColor+" transparent;");this._dispPos={};this._dispPos.x=b.dispPos&&b.dispPos.x?b.dispPos.x:0;this._dispPos.y=b.dispPos&&b.dispPos.y?b.dispPos.y:0;this.latlng=a;this.events=new navitime.geo.event.InnerEventController(this, this._div,this.EVENT_TYPES,!1);this._textDiv=navitime.geo.DOM.create("div","ntgeo-popup-text");this._textDiv.style.fontSize=b.fontSize;this._textDiv.innerHTML=b.text;this._div.appendChild(this._textDiv);var d=navitime.geo.DOM.create("div","ntgeo-close",this._div);d.style.display="none";navitime.geo.event.BrowserEventController.addEvent(d,"click",navitime.geo.Util.Function.bind(function(a){this.display(a);this.events.triggerEvent("closeclick")},this,!1),this);navitime.geo.base.CSS3Style&&navitime.geo.base.CSS3Style.USERSELECT&& (d.style[navitime.geo.base.CSS3Style.USERSELECT]="none");this.events.register("mouseover",this,function(){this._div.style.zIndex="100";d.style.display=""});this.events.register("mouseout",this,function(){this._div.style.zIndex="";d.style.display="none"});this.events.register("click",this,navitime.geo.Util.falseFn);this.events.register("mousedown",this,navitime.geo.Util.falseFn);this.events.register("dblclick",this,navitime.geo.Util.falseFn)},destroy:function(){this.events.destroy();this.events=null; this._div.parentNode&&this._div.parentNode.removeChild(this._div);this._latlng=this._dispPos=this._div=null},moveTo:function(a,b){this._setTransForm(this._div,"translate("+(a-25+this._dispPos.x)+"px, "+(b-this._div.clientHeight-10+this._dispPos.y)+"px)")},display:function(a){this._div.style.visibility=a?"":"hidden"},isShow:function(){return""==this._div.style.visibility},_appendDiv:function(a){a.appendChild(this._div)},getLatLng:function(){return this.latlng.clone()},setLatLng:function(a){this.latlng= a},setText:function(a){this._textDiv.innerHTML=a;this.events.triggerEvent("setText")}});navitime.geo.marker.Popup=navitime.geo.marker.CSSPopup;navitime.geo.namespace("navitime.geo.graphics"); navitime.geo.graphics.Arrow=navitime.geo.base.Class(navitime.geo.graphics.GraphicUtil,{EVENT_TYPES:["changestate","add","remove"],events:null,_pix:null,_prevPix:null,_options:null,_arrow:null,_arrowHead:null,_straight:null,_circle:null,_arrowMiddlePix:{},_littleArrowHeadPix:null,_slidePix:null,_radius:0,_arrowOption:{strokecolor:"white",strokeweight:2,strokeopacity:1,strokelinecap:"butt",strokelinejoin:"butt"},initialize:function(a,b,c){this._pix=a||{x:0,y:0};this._prevPix=b||{x:0,y:0};this._options= c||{};this._options.slide=c.slide||0;this.events=new navitime.geo.event.InnerEventController(this,null,this.EVENT_TYPES);b=this._calcUnitVector(this._calcVector(a,b));b=this._calcArrowHeadPix(a,b);this._arrowMiddlePix=this._calcArrowMiddlePix(b);this._slidePix={x:a.x+this._options.slide,y:a.y+this._options.slide};this._radius=this._calcArrowRadius(this._arrowMiddlePix,this._slidePix);this._littleArrowHeadPix=this._calcLittleArrowHeadPix(a,b)},destroy:function(){this.events&&this.events.destroy(); this._slidePix=this._littleArrowHeadPix=this._arrowMiddlePix=this._circle=this._straight=this._arrowHead=this._arrow=this._options=null;this._radius=0},_draw:function(a){},_calcUnitVector:function(a){return{x:a.x/a.vectorLen,y:a.y/a.vectorLen}},_calcArrowHeadPix:function(a,b){return{lx:a.x-7*b.y-7*b.x,ly:a.y+7*b.x-7*b.y,rx:a.x+7*b.y-7*b.x,ry:a.y-7*b.x-7*b.y}},_calcArrowMiddlePix:function(a){return{x:Math.round((a.rx+a.lx)/2)+this._options.slide,y:Math.round((a.ry+a.ly)/2)+this._options.slide}},_calcArrowRadius:function(a, b){var c=Math.pow(a.x-b.x,2),d=Math.pow(a.y-b.y,2);return Math.round(Math.sqrt(c+d)+4)},_calcLittleArrowHeadPix:function(a,b){return{lx:Math.round((3*b.lx+a.x)/4)+this._options.slide,ly:Math.round((3*b.ly+a.y)/4)+this._options.slide,rx:Math.round((3*b.rx+a.x)/4)+this._options.slide,ry:Math.round((3*b.ry+a.y)/4)+this._options.slide}}});navitime.geo.namespace("navitime.geo.graphics"); navitime.geo.graphics.Circle=navitime.geo.base.Class({EVENT_TYPES:["changestate","add","remove"],events:null,_options:null,div:null,_radius:null,_center:null,DEG_TO_RAD:Math.PI/180,initialize:function(a){this._options=a||{};this._radius=[];this.events=new navitime.geo.event.InnerEventController(this,null,this.EVENT_TYPES)},destroy:function(){this.events&&this.events.destroy();this._center=this._radius=this.div=this._options=null},_draw:function(a){},updatePixelPaths:function(a){var b=a.getZoom(); if(!this._radius[b]){var c=new navitime.geo.LatLng(navitime.geo.LatLng.transMILLItoDEG(this._options.center.lat),navitime.geo.LatLng.transMILLItoDEG(this._options.center.lng)-this._getLngRadius());this._radius[b]=Math.max(Math.round(a.getPixcelFromLatLng(this._options.center).left-a.getPixcelFromLatLng(c).left),1)}this.radius=this._radius[b];this._center=a.getPixcelFromLatLng(this._options.center)},_getLngRadius:function(){var a=40075017*Math.cos(this.DEG_TO_RAD*navitime.geo.LatLng.transMILLItoDEG(this._options.center.lat)); return 360*(this._options.radius/a)},setOptions:function(a){this._options=a||{};this._radius=[];this.events.triggerEvent("changestate")},setCenter:function(a){a&&(this._radius=[],this._options.center=a,this.events.triggerEvent("changestate"))},getCenter:function(){return this._options.center},setRadius:function(a){a&&(this._radius=[],this._options.radius=a,this.events.triggerEvent("changestate"))},getRadius:function(){return this._options.radius},setVisible:function(a){this._visibility=a?"":"hidden"; this.div&&(this.div.style.visibility=this._visibility);this.events.triggerEvent("changestate")},getVisible:function(){return"hidden"===this._visibility?!1:!0},getZIndex:function(){return this._options.zindex},setZIndex:function(a){this._options.zindex=a;this.events.triggerEvent("changestate")},getMap:function(){return this._options.map}});navitime.geo.namespace("navitime.geo.graphics"); navitime.geo.graphics.Path=navitime.geo.base.Class(navitime.geo.graphics.GraphicUtil,{EVENT_TYPES:["changestate","add","remove"],events:null,_options:null,div:null,_paths:null,_arrowIndexes:null,_arrowPacks:null,_latLngPaths:null,_zoomArrowIndexes:null,initialize:function(a){this._options=a||{};this._options.slide=a.slide||0;this._options.path[0]instanceof Array||(this._options.path=[this._options.path]);this._latLngPaths=[];this._zoomArrowIndexes=[];this.events=new navitime.geo.event.InnerEventController(this, null,this.EVENT_TYPES);for(a=this._options.path.length;a--;)navitime.geo.Util.changeDynamicArray(this._options.path[a],this,function(){this._latLngPaths=[];this._zoomArrowIndexes=[];this.events.triggerEvent("changestate")})},destroy:function(){this.events&&this.events.destroy();this._arrowPacks&&this._destroyArrowPacks();this._arrowIndexes=this._paths=this.div=this._options=null},_destroyArrowPacks:function(){for(var a=this._arrowPacks.length;a--;)this._destroyArrowPack(this._arrowPacks.pop())},_destroyArrowPack:function(a){for(var b= a.length;b--;)a.pop().destroy()},_draw:function(a){},updatePixelPaths:function(a){var b=a.getZoom();this._paths=this._latLngPaths[b]?this._calcPixelPaths(this._latLngPaths[b],a):this._calcSimplifiedPixelPaths(b,a);this._options.arrow&&(this._removeArrowPacks(),this._zoomArrowIndexes[b]||(this._zoomArrowIndexes[b]=this._createArrowIndexes(a)),this._arrowIndexes=this._zoomArrowIndexes[b])},_calcPixelPaths:function(a,b){for(var c=[],d=a.length;d--;){var e=a[d];c[d]=[];for(var f=e.length;f--;){var g= b.getPixcelFromLatLng(e[f]);c[d].unshift({x:g.left,y:g.top})}}return c},_calcSimplifiedPixelPaths:function(a,b){for(var c=this._options.path,d=this._calcPixelPaths(c,b),e=[],f=[],g=d.length;g--;){var h=this.createSimplifiedIndex(d[g]);f[g]=this._simplify(c[g],h);e[g]=this._simplify(d[g],h)}this._latLngPaths[a]=f;return e},_simplify:function(a,b){for(var c=[],d=a.length;d--;)b[d]&&c.unshift(a[d]);return c},_createArrowIndexes:function(a){a=a._grid._drawBounds.clone().getHeight()/1/3;for(var b=0,c= [],d=0,e=this._paths.length;dc,k=eb?this._defaultCenterLine.zIndex:this._defaultShadowLine.zIndex),slide:b,arrow:c,strokedasharray:"auxiliary"===e.line_style?"2":null};b.path=a.path;return new navitime.geo.overlay.Polyline(b)},_coordsToLatLng:function(a,b,c){var d= parseFloat(a[c?0:1]);a=parseFloat(a[c?1:0]);b=this._conversion(d,a,b);return new navitime.geo.LatLng(b.lat,b.lng)},_coordsToLatLngs:function(a,b,c,d){for(var e=[],f=0,g=a.length;fb?this._defaultCenterLine.strokeWeight:this._defaultShadowLine.strokeWeight)}, _getStrokeOpacity:function(a,b,c){return c?c:a.opacity||(0>b?this._defaultCenterLine.strokeOpacity:this._defaultShadowLine.strokeOpacity)},_createRoute:function(a){for(var b=[],c=a.length,d=0;d