/* * Yahoo! Open Local Platform JavaScript API * http://www.yahoo.co.jp * * Copyright (c) 2013 Yahoo! Japan * */ (function(__YOLP_VERSION, __YOLP_HOST) { var JSON;if(!JSON){JSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf(); };}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a]; return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null"; case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i)[^>]*$|#([\w\-]*)$)/,rnotwhite=/\S/,trimLeft=/^\s+/,trimRight=/\s+$/,rdigit=/\d/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,rvalidchars=/^[\],:{}\s]*$/,rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rwebkit=/(webkit)[ \/]([\w.]+)/,ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/,rmsie=/(msie) ([\w.]+)/,rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/,rdashAlpha=/-([a-z])/ig,fcamelCase=function(all,letter){return letter.toUpperCase(); },userAgent=navigator.userAgent,browserMatch,readyList,DOMContentLoaded,toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,trim=String.prototype.trim,indexOf=Array.prototype.indexOf,class2type={};jQuery.fn=jQuery.prototype={constructor:jQuery,init:function(selector,context,rootjQuery){var match,elem,ret,doc;if(!selector){return this; }if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}if(selector==="body"&&!context&&document.body){this.context=document;this[0]=document.body;this.selector=selector;this.length=1;return this;}if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){match=[null,selector,null];}else{match=quickExpr.exec(selector); }if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];jQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=jQuery.buildFragment([match[1]],[doc]); selector=(ret.cacheable?jQuery.clone(ret.fragment):ret.fragment).childNodes;}return jQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootjQuery.find(selector);}this.length=1;this[0]=elem;}this.context=document;this.selector=selector;return this;}}else{if(!context||context.jquery){return(context||rootjQuery).find(selector); }else{return this.constructor(context).find(selector);}}}else{if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);}}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}return jQuery.makeArray(selector,this);},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this[this.length+num]:this[num]); },pushStack:function(elems,name,selector){var ret=this.constructor();if(jQuery.isArray(elems)){push.apply(ret,elems);}else{jQuery.merge(ret,elems);}ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")";}}return ret;},each:function(callback,args){return jQuery.each(this,callback,args); },ready:function(fn){jQuery.bindReady();readyList.done(fn);return this;},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem); }));},end:function(){return this.prevObject||this.constructor(null);},push:push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}; }if(length===i){target=this;--i;}for(;i0){return;}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.trigger){jQuery(document).trigger("ready").unbind("ready");}}},bindReady:function(){if(readyList){return;}readyList=jQuery._Deferred();if(document.readyState==="complete"){return setTimeout(jQuery.ready,1);}if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false); window.addEventListener("load",jQuery.ready,false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){}if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}}},isFunction:function(obj){return jQuery.type(obj)==="function";},isArray:Array.isArray||function(obj){return jQuery.type(obj)==="array"; },isWindow:function(obj){return obj&&typeof obj==="object"&&"setInterval" in obj;},isNaN:function(obj){return obj==null||!rdigit.test(obj)||isNaN(obj);},type:function(obj){return obj==null?String(obj):class2type[toString.call(obj)]||"object";},isPlainObject:function(obj){if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false;}if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false; }var key;for(key in obj){}return key===undefined||hasOwn.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;}return true;},error:function(msg){throw msg;},parseJSON:function(data){if(typeof data!=="string"||!data){return null;}data=jQuery.trim(data);if(window.JSON&&window.JSON.parse){return window.JSON.parse(data);}if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))){return(new Function("return "+data))(); }jQuery.error("Invalid JSON: "+data);},parseXML:function(data,xml,tmp){if(window.DOMParser){tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml");}else{xml=new ActiveXObject("Microsoft.XMLDOM");xml.async="false";xml.loadXML(data);}tmp=xml.documentElement;if(!tmp||!tmp.nodeName||tmp.nodeName==="parsererror"){jQuery.error("Invalid XML: "+data);}return xml;},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){(window.execScript||function(data){window["eval"].call(window,data); })(data);}},camelCase:function(string){return string.replace(rdashAlpha,fcamelCase);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||jQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break; }}}else{for(;i0&&elems[0]&&elems[length-1])||length===0||jQuery.isArray(elems));if(isArray){for(;i1?sliceDeferred.call(arguments,0):value; if(!(--count)){deferred.resolveWith(deferred,sliceDeferred.call(args,0));}};}if(length>1){for(;i";support.shrinkWrapBlocks=(div.offsetWidth!==2);}div.innerHTML="
t
";tds=div.getElementsByTagName("td"); isSupported=(tds[0].offsetHeight===0);tds[0].style.display="";tds[1].style.display="none";support.reliableHiddenOffsets=isSupported&&(tds[0].offsetHeight===0);div.innerHTML="";if(document.defaultView&&document.defaultView.getComputedStyle){marginDiv=document.createElement("div");marginDiv.style.width="0";marginDiv.style.marginRight="0";div.appendChild(marginDiv);support.reliableMarginRight=(parseInt((document.defaultView.getComputedStyle(marginDiv,null)||{marginRight:0}).marginRight,10)||0)===0; }testElement.innerHTML="";testElementParent.removeChild(testElement);if(div.attachEvent){for(i in {submit:1,change:1,focusin:1}){eventName="on"+i;isSupported=(eventName in div);if(!isSupported){div.setAttribute(eventName,"return;");isSupported=(typeof div[eventName]==="function");}support[i+"Bubbles"]=isSupported;}}testElement=fragment=select=opt=body=marginDiv=div=input=null;return support;})();jQuery.boxModel=jQuery.support.boxModel; var rbrace=/^(?:\{.*\}|\[.*\])$/,rmultiDash=/([a-z])([A-Z])/g;jQuery.extend({cache:{},uuid:0,expando:"jQuery"+(jQuery.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(elem){elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando];return !!elem&&!isEmptyDataObject(elem);},data:function(elem,name,data,pvt){if(!jQuery.acceptData(elem)){return; }var internalKey=jQuery.expando,getByName=typeof name==="string",thisCache,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:elem[jQuery.expando]&&jQuery.expando;if((!id||(pvt&&id&&!cache[id][internalKey]))&&getByName&&data===undefined){return;}if(!id){if(isNode){elem[jQuery.expando]=id=++jQuery.uuid;}else{id=jQuery.expando;}}if(!cache[id]){cache[id]={};if(!isNode){cache[id].toJSON=jQuery.noop; }}if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id][internalKey]=jQuery.extend(cache[id][internalKey],name);}else{cache[id]=jQuery.extend(cache[id],name);}}thisCache=cache[id];if(pvt){if(!thisCache[internalKey]){thisCache[internalKey]={};}thisCache=thisCache[internalKey];}if(data!==undefined){thisCache[jQuery.camelCase(name)]=data;}if(name==="events"&&!thisCache[name]){return thisCache[internalKey]&&thisCache[internalKey].events; }return getByName?thisCache[jQuery.camelCase(name)]||thisCache[name]:thisCache;},removeData:function(elem,name,pvt){if(!jQuery.acceptData(elem)){return;}var internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(!cache[id]){return;}if(name){var thisCache=pvt?cache[id][internalKey]:cache[id];if(thisCache){delete thisCache[name]; if(!isEmptyDataObject(thisCache)){return;}}}if(pvt){delete cache[id][internalKey];if(!isEmptyDataObject(cache[id])){return;}}var internalCache=cache[id][internalKey];if(jQuery.support.deleteExpando||cache!=window){delete cache[id];}else{cache[id]=null;}if(internalCache){cache[id]={};if(!isNode){cache[id].toJSON=jQuery.noop;}cache[id][internalKey]=internalCache;}else{if(isNode){if(jQuery.support.deleteExpando){delete elem[jQuery.expando]; }else{if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}else{elem[jQuery.expando]=null;}}}}},_data:function(elem,name,data){return jQuery.data(elem,name,data,true);},acceptData:function(elem){if(elem.nodeName){var match=jQuery.noData[elem.nodeName.toLowerCase()];if(match){return !(match===true||elem.getAttribute("classid")!==match);}}return true;}});jQuery.fn.extend({data:function(key,value){var data=null; if(typeof key==="undefined"){if(this.length){data=jQuery.data(this[0]);if(this[0].nodeType===1){var attr=this[0].attributes,name;for(var i=0,l=attr.length;i-1){return true;}}return false;},val:function(value){var hooks,ret,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.nodeName.toLowerCase()]||jQuery.valHooks[elem.type];if(hooks&&"get" in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret; }ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret;}return undefined;}var isFunction=jQuery.isFunction(value);return this.each(function(i){var self=jQuery(this),val;if(this.nodeType!==1){return;}if(isFunction){val=value.call(this,i,self.val());}else{val=value;}if(val==null){val="";}else{if(typeof val==="number"){val+="";}else{if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""; });}}}hooks=jQuery.valHooks[this.nodeName.toLowerCase()]||jQuery.valHooks[this.type];if(!hooks||!("set" in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return !val||val.specified?elem.value:elem.text;}},select:{get:function(elem){var value,index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one"; if(index<0){return null;}for(var i=one?index:0,max=one?index+1:options.length;i=0;});if(!values.length){elem.selectedIndex=-1;}return values;}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attrFix:{tabindex:"tabIndex"},attr:function(elem,name,value,pass){var nType=elem.nodeType; if(!elem||nType===3||nType===8||nType===2){return undefined;}if(pass&&name in jQuery.attrFn){return jQuery(elem)[name](value);}if(!("getAttribute" in elem)){return jQuery.prop(elem,name,value);}var ret,hooks,notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.attrFix[name]||name;hooks=jQuery.attrHooks[name];if(!hooks){if(rboolean.test(name)){hooks=boolHook;}else{if(formHook&&name!=="className"&&(jQuery.nodeName(elem,"form")||rinvalidChar.test(name))){hooks=formHook; }}}}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return undefined;}else{if(hooks&&"set" in hooks&¬xml&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{elem.setAttribute(name,""+value);return value;}}}else{if(hooks&&"get" in hooks&¬xml&&(ret=hooks.get(elem,name))!==null){return ret;}else{ret=elem.getAttribute(name);return ret===null?undefined:ret;}}},removeAttr:function(elem,name){var propName; if(elem.nodeType===1){name=jQuery.attrFix[name]||name;if(jQuery.support.getSetAttribute){elem.removeAttribute(name);}else{jQuery.attr(elem,name,"");elem.removeAttributeNode(elem.getAttributeNode(name));}if(rboolean.test(name)&&(propName=jQuery.propFix[name]||name) in elem){elem[propName]=false;}}},attrHooks:{type:{set:function(elem,value){if(rtype.test(elem.nodeName)&&elem.parentNode){jQuery.error("type property can't be changed"); }else{if(!jQuery.support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}return value;}}}},tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined; }},value:{get:function(elem,name){if(formHook&&jQuery.nodeName(elem,"button")){return formHook.get(elem,name);}return name in elem?elem.value:null;},set:function(elem,value,name){if(formHook&&jQuery.nodeName(elem,"button")){return formHook.set(elem,value,name);}elem.value=value;}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(elem,name,value){var nType=elem.nodeType; if(!elem||nType===3||nType===8||nType===2){return undefined;}var ret,hooks,notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];}if(value!==undefined){if(hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{return(elem[name]=value);}}else{if(hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==undefined){return ret; }else{return elem[name];}}},propHooks:{}});boolHook={get:function(elem,name){return jQuery.prop(elem,name)?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){jQuery.removeAttr(elem,name);}else{propName=jQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}elem.setAttribute(name,name.toLowerCase());}return name;}};if(!jQuery.support.getSetAttribute){jQuery.attrFix=jQuery.propFix; formHook=jQuery.attrHooks.name=jQuery.attrHooks.title=jQuery.valHooks.button={get:function(elem,name){var ret;ret=elem.getAttributeNode(name);return ret&&ret.nodeValue!==""?ret.nodeValue:undefined;},set:function(elem,value,name){var ret=elem.getAttributeNode(name);if(ret){ret.nodeValue=value;return value;}}};jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{set:function(elem,value){if(value===""){elem.setAttribute(name,"auto"); return value;}}});});}if(!jQuery.support.hrefNormalized){jQuery.each(["href","src","width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{get:function(elem){var ret=elem.getAttribute(name,2);return ret===null?undefined:ret;}});});}if(!jQuery.support.style){jQuery.attrHooks.style={get:function(elem){return elem.style.cssText.toLowerCase()||undefined;},set:function(elem,value){return(elem.style.cssText=""+value); }};}if(!jQuery.support.optSelected){jQuery.propHooks.selected=jQuery.extend(jQuery.propHooks.selected,{get:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}});}if(!jQuery.support.checkOn){jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={get:function(elem){return elem.getAttribute("value")===null?"on":elem.value; }};});}jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]=jQuery.extend(jQuery.valHooks[this],{set:function(elem,value){if(jQuery.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0);}}});});var rnamespaces=/\.(.*)$/,rformElems=/^(?:textarea|input|select)$/i,rperiod=/\./g,rspaces=/ /g,rescape=/[^\w\s.|`]/g,fcleanup=function(nm){return nm.replace(rescape,"\\$&"); };jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType===3||elem.nodeType===8){return;}if(handler===false){handler=returnFalse;}else{if(!handler){return;}}var handleObjIn,handleObj;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;}if(!handler.guid){handler.guid=jQuery.guid++;}var elemData=jQuery._data(elem);if(!elemData){return;}var events=elemData.events,eventHandle=elemData.handle; if(!events){elemData.events=events={};}if(!eventHandle){elemData.handle=eventHandle=function(e){return typeof jQuery!=="undefined"&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.handle.apply(eventHandle.elem,arguments):undefined;};}eventHandle.elem=elem;types=types.split(" ");var type,i=0,namespaces;while((type=types[i++])){handleObj=handleObjIn?jQuery.extend({},handleObjIn):{handler:handler,data:data}; if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();handleObj.namespace=namespaces.slice(0).sort().join(".");}else{namespaces=[];handleObj.namespace="";}handleObj.type=type;if(!handleObj.guid){handleObj.guid=handler.guid;}var handlers=events[type],special=jQuery.event.special[type]||{};if(!handlers){handlers=events[type]=[];if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false); }else{if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}handlers.push(handleObj);jQuery.event.global[type]=true;}elem=null;},global:{},remove:function(elem,types,handler,pos){if(elem.nodeType===3||elem.nodeType===8){return;}if(handler===false){handler=returnFalse;}var ret,type,fn,j,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,elemData=jQuery.hasData(elem)&&jQuery._data(elem),events=elemData&&elemData.events; if(!elemData||!events){return;}if(types&&types.type){handler=types.handler;types=types.type;}if(!types||typeof types==="string"&&types.charAt(0)==="."){types=types||"";for(type in events){jQuery.event.remove(elem,type+types);}return;}types=types.split(" ");while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")<0;namespaces=[];if(!all){namespaces=type.split(".");type=namespaces.shift(); namespace=new RegExp("(^|\\.)"+jQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)");}eventType=events[type];if(!eventType){continue;}if(!handler){for(j=0;j=0){type=type.slice(0,-1); exclusive=true;}if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}if((!elem||jQuery.event.customEvent[type])&&!jQuery.event.global[type]){return;}event=typeof event==="object"?event[jQuery.expando]?event:new jQuery.Event(type,event):new jQuery.Event(type);event.type=type;event.exclusive=exclusive;event.namespace=namespaces.join(".");event.namespace_re=new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.)?")+"(\\.|$)"); if(onlyHandlers||!elem){event.preventDefault();event.stopPropagation();}if(!elem){jQuery.each(jQuery.cache,function(){var internalKey=jQuery.expando,internalCache=this[internalKey];if(internalCache&&internalCache.events&&internalCache.events[type]){jQuery.event.trigger(event,data,internalCache.handle.elem);}});return;}if(elem.nodeType===3||elem.nodeType===8){return;}event.result=undefined;event.target=elem; data=data!=null?jQuery.makeArray(data):[];data.unshift(event);var cur=elem,ontype=type.indexOf(":")<0?"on"+type:"";do{var handle=jQuery._data(cur,"handle");event.currentTarget=cur;if(handle){handle.apply(cur,data);}if(ontype&&jQuery.acceptData(cur)&&cur[ontype]&&cur[ontype].apply(cur,data)===false){event.result=false;event.preventDefault();}cur=cur.parentNode||cur.ownerDocument||cur===event.target.ownerDocument&&window; }while(cur&&!event.isPropagationStopped());if(!event.isDefaultPrevented()){var old,special=jQuery.event.special[type]||{};if((!special._default||special._default.call(elem.ownerDocument,event)===false)&&!(type==="click"&&jQuery.nodeName(elem,"a"))&&jQuery.acceptData(elem)){try{if(ontype&&elem[type]){old=elem[ontype];if(old){elem[ontype]=null;}jQuery.event.triggered=type;elem[type]();}}catch(ieError){}if(old){elem[ontype]=old; }jQuery.event.triggered=undefined;}}return event.result;},handle:function(event){event=jQuery.event.fix(event||window.event);var handlers=((jQuery._data(this,"events")||{})[event.type]||[]).slice(0),run_all=!event.exclusive&&!event.namespace,args=Array.prototype.slice.call(arguments,0);args[0]=event;event.currentTarget=this;for(var j=0,l=handlers.length;j-1?jQuery.map(elem.options,function(elem){return elem.selected;}).join("-"):"";}else{if(jQuery.nodeName(elem,"select")){val=elem.selectedIndex;}}}return val;},testChange=function testChange(e){var elem=e.target,data,val;if(!rformElems.test(elem.nodeName)||elem.readOnly){return;}data=jQuery._data(elem,"_change_data"); val=getVal(elem);if(e.type!=="focusout"||elem.type!=="radio"){jQuery._data(elem,"_change_data",val);}if(data===undefined||val===data){return;}if(data!=null||val){e.type="change";e.liveFired=undefined;jQuery.event.trigger(e,arguments[1],elem);}};jQuery.event.special.change={filters:{focusout:testChange,beforedeactivate:testChange,click:function(e){var elem=e.target,type=jQuery.nodeName(elem,"input")?elem.type:""; if(type==="radio"||type==="checkbox"||jQuery.nodeName(elem,"select")){testChange.call(this,e);}},keydown:function(e){var elem=e.target,type=jQuery.nodeName(elem,"input")?elem.type:"";if((e.keyCode===13&&!jQuery.nodeName(elem,"textarea"))||(e.keyCode===32&&(type==="checkbox"||type==="radio"))||type==="select-multiple"){testChange.call(this,e);}},beforeactivate:function(e){var elem=e.target;jQuery._data(elem,"_change_data",getVal(elem)); }},setup:function(data,namespaces){if(this.type==="file"){return false;}for(var type in changeFilters){jQuery.event.add(this,type+".specialChange",changeFilters[type]);}return rformElems.test(this.nodeName);},teardown:function(namespaces){jQuery.event.remove(this,".specialChange");return rformElems.test(this.nodeName);}};changeFilters=jQuery.event.special.change.filters;changeFilters.focus=changeFilters.beforeactivate; }function trigger(type,elem,args){var event=jQuery.extend({},args[0]);event.type=type;event.originalEvent={};event.liveFired=undefined;jQuery.event.handle.call(elem,event);if(event.isDefaultPrevented()){args[0].preventDefault();}}if(!jQuery.support.focusinBubbles){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var attaches=0;jQuery.event.special[fix]={setup:function(){if(attaches++===0){document.addEventListener(orig,handler,true); }},teardown:function(){if(--attaches===0){document.removeEventListener(orig,handler,true);}}};function handler(donor){var e=jQuery.event.fix(donor);e.type=fix;e.originalEvent={};jQuery.event.trigger(e,null,e.target);if(e.isDefaultPrevented()){donor.preventDefault();}}});}jQuery.each(["bind","one"],function(i,name){jQuery.fn[name]=function(type,data,fn){var handler;if(typeof type==="object"){for(var key in type){this[name](key,data,type[key],fn); }return this;}if(arguments.length===2||data===false){fn=data;data=undefined;}if(name==="one"){handler=function(event){jQuery(this).unbind(event,handler);return fn.apply(this,arguments);};handler.guid=fn.guid||jQuery.guid++;}else{handler=fn;}if(type==="unload"&&name!=="one"){this.one(type,data,fn);}else{for(var i=0,l=this.length;imaxLevel){break; }event.currentTarget=match.elem;event.data=match.handleObj.data;event.handleObj=match.handleObj;ret=match.handleObj.origHandler.apply(match.elem,arguments);if(ret===false||event.isPropagationStopped()){maxLevel=match.level;if(ret===false){stop=false;}if(event.isImmediatePropagationStopped()){break;}}}return stop;}function liveConvert(type,selector){return(type&&type!=="*"?type+".":"")+selector.replace(rperiod,"`").replace(rspaces,"&"); }jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){if(fn==null){fn=data;data=null;}return arguments.length>0?this.bind(name,data,fn):this.trigger(name);};if(jQuery.attrFn){jQuery.attrFn[name]=true; }}); /* * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true,rBackslash=/\\/g,rNonWord=/\W/; [0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;var origContext=context;if(context.nodeType!==1&&context.nodeType!==9){return[];}if(!selector||typeof selector!=="string"){return results;}var m,set,checkSet,extra,ret,cur,pop,i,prune=true,contextXML=Sizzle.isXML(context),parts=[],soFar=selector;do{chunker.exec(""); m=chunker.exec(soFar);if(m){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}}while(m);if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}set=posProcess(selector,set); }}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}if(context){ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML); set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}while(parts.length){cur=parts.pop();pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}if(pop==null){pop=context;}Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}if(!checkSet){checkSet=set;}if(!checkSet){Sizzle.error(cur||selector);}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet); }else{if(context&&context.nodeType===1){for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&Sizzle.contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}}else{makeArray(checkSet,results);}if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results); }return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i0; };Sizzle.find=function(expr,context,isXML){var set;if(!expr){return[];}for(var i=0,l=Expr.order.length;i":function(checkSet,part){var elem,isPartStr=typeof part==="string",i=0,l=checkSet.length;if(isPartStr&&!rNonWord.test(part)){part=part.toLowerCase();for(;i=0)){if(!inplace){result.push(elem);}}else{if(inplace){curLoop[i]=false;}}}}return false;},ID:function(match){return match[1].replace(rBackslash,"");},TAG:function(match,curLoop){return match[1].replace(rBackslash,"").toLowerCase();},CHILD:function(match){if(match[1]==="nth"){if(!match[2]){Sizzle.error(match[0]); }match[2]=match[2].replace(/^\+|\s*/g,"");var test=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}else{if(match[2]){Sizzle.error(match[0]);}}match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1]=match[1].replace(rBackslash,""); if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}match[4]=(match[4]||match[5]||"").replace(rBackslash,"");if(match[2]==="~="){match[4]=" "+match[4]+" ";}return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not); if(!inplace){result.push.apply(result,ret);}return false;}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}}return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true; },selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;}return elem.selected===true;},parent:function(elem){return !!elem.firstChild;},empty:function(elem){return !elem.firstChild;},has:function(elem,i,match){return !!Sizzle(match[3],elem).length;},header:function(elem){return(/h\d/i).test(elem.nodeName);},text:function(elem){var attr=elem.getAttribute("type"),type=elem.type;return elem.nodeName.toLowerCase()==="input"&&"text"===type&&(attr===type||attr===null); },radio:function(elem){return elem.nodeName.toLowerCase()==="input"&&"radio"===elem.type;},checkbox:function(elem){return elem.nodeName.toLowerCase()==="input"&&"checkbox"===elem.type;},file:function(elem){return elem.nodeName.toLowerCase()==="input"&&"file"===elem.type;},password:function(elem){return elem.nodeName.toLowerCase()==="input"&&"password"===elem.type;},submit:function(elem){var name=elem.nodeName.toLowerCase(); return(name==="input"||name==="button")&&"submit"===elem.type;},image:function(elem){return elem.nodeName.toLowerCase()==="input"&&"image"===elem.type;},reset:function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&"reset"===elem.type;},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&"button"===elem.type||name==="button";},input:function(elem){return(/input|select|textarea|button/i).test(elem.nodeName); },focus:function(elem){return elem===elem.ownerDocument.activeElement;}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return imatch[3]-0;},nth:function(elem,i,match){return match[3]-0===i; },eq:function(elem,i,match){return match[3]-0===i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else{if(name==="contains"){return(elem.textContent||elem.innerText||Sizzle.getText([elem])||"").indexOf(match[3])>=0;}else{if(name==="not"){var not=match[3];for(var j=0,l=not.length;j=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match; },TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4]; return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name]; if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS,fescape=function(all,num){return"\\"+(num-0+1);};for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,fescape));}var makeArray=function(array,results){array=Array.prototype.slice.call(array,0); if(results){results.push.apply(results,array);return results;}return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var i=0,ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var l=array.length;i";root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]; }};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]); if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}results=tmp;}return results;};}div.innerHTML="";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div"),id="__sizzle__"; div.innerHTML="

";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&!Sizzle.isXML(context)){var match=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query);if(match&&(context.nodeType===1||context.nodeType===9)){if(match[1]){return makeArray(context.getElementsByTagName(query),extra); }else{if(match[2]&&Expr.find.CLASS&&context.getElementsByClassName){return makeArray(context.getElementsByClassName(match[2]),extra);}}}if(context.nodeType===9){if(query==="body"&&context.body){return makeArray([context.body],extra);}else{if(match&&match[3]){var elem=context.getElementById(match[3]);if(elem&&elem.parentNode){if(elem.id===match[3]){return makeArray([elem],extra);}}else{return makeArray([],extra); }}}try{return makeArray(context.querySelectorAll(query),extra);}catch(qsaError){}}else{if(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){var oldContext=context,old=context.getAttribute("id"),nid=old||id,hasParent=context.parentNode,relativeHierarchySelector=/^\s*[+~]/.test(query);if(!old){context.setAttribute("id",nid);}else{nid=nid.replace(/'/g,"\\$&");}if(relativeHierarchySelector&&hasParent){context=context.parentNode; }try{if(!relativeHierarchySelector||hasParent){return makeArray(context.querySelectorAll("[id='"+nid+"'] "+query),extra);}}catch(pseudoError){}finally{if(!old){oldContext.removeAttribute("id");}}}}}return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}div=null;})();}(function(){var html=document.documentElement,matches=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector; if(matches){var disconnectedMatch=!matches.call(document.createElement("div"),"div"),pseudoWorks=false;try{matches.call(document.documentElement,"[test!='']:sizzle");}catch(pseudoError){pseudoWorks=true;}Sizzle.matchesSelector=function(node,expr){expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!Sizzle.isXML(node)){try{if(pseudoWorks||!Expr.match.PSEUDO.test(expr)&&!/!=/.test(expr)){var ret=matches.call(node,expr); if(ret||!disconnectedMatch||node.document&&node.document.nodeType!==11){return ret;}}}catch(e){}}return Sizzle(expr,null,null,[node]).length>0;};}})();(function(){var div=document.createElement("div");div.innerHTML="
";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return;}div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return; }Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i0){match=elem;break;}}}elem=elem[dir];}checkSet[i]=match;}}}if(document.documentElement.contains){Sizzle.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true);};}else{if(document.documentElement.compareDocumentPosition){Sizzle.contains=function(a,b){return !!(a.compareDocumentPosition(b)&16); };}else{Sizzle.contains=function(){return false;};}}Sizzle.isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context){var match,tmpSet=[],later="",root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,""); }selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i0){for(n=length;n0:this.filter(selector).length>0);},closest:function(selectors,context){var ret=[],i,l,cur=this[0];if(jQuery.isArray(selectors)){var match,selector,matches={},level=1;if(cur&&selectors.length){for(i=0,l=selectors.length;i-1:jQuery(cur).is(match)){ret.push({selector:selector,elem:cur,level:level});}}cur=cur.parentNode;level++;}}return ret;}var pos=POS.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;for(i=0,l=this.length;i-1:jQuery.find.matchesSelector(cur,selectors)){ret.push(cur); break;}else{cur=cur.parentNode;if(!cur||!cur.ownerDocument||cur===context||cur.nodeType===11){break;}}}}ret=ret.length>1?jQuery.unique(ret):ret;return this.pushStack(ret,"closest",selectors);},index:function(elem){if(!elem||typeof elem==="string"){return jQuery.inArray(this[0],elem?jQuery(elem):this.parent().children());}return jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?jQuery(selector,context):jQuery.makeArray(selector&&selector.nodeType?[selector]:selector),all=jQuery.merge(this.get(),set); return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return !node||!node.parentNode||node.parentNode.nodeType===11;}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jQuery.dir(elem,"parentNode"); },parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until); },prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until),args=slice.call(arguments); if(!runtil.test(name)){selector=until;}if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);}ret=this.length>1&&!guaranteedUnique[name]?jQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();}return this.pushStack(ret,name,args.join(","));};});jQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")"; }return elems.length===1?jQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:jQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(; cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}}return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}return r;}});function winnow(elements,qualifier,keep){qualifier=qualifier||0;if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep;});}else{if(qualifier.nodeType){return jQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep; });}else{if(typeof qualifier==="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return jQuery.filter(qualifier,filtered,!keep);}else{qualifier=jQuery.filter(qualifier,filtered);}}}}return jQuery.grep(elements,function(elem,i){return(jQuery.inArray(elem,qualifier)>=0)===keep;});}var rinlinejQuery=/ jQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,rtagName=/<([\w:]+)/,rtbody=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]}; wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!jQuery.support.htmlSerialize){wrapMap._default=[1,"div
","
"];}jQuery.fn.extend({text:function(text){if(jQuery.isFunction(text)){return this.each(function(i){var self=jQuery(this);self.text(text.call(this,i,self.text()));});}if(typeof text!=="object"&&text!==undefined){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text)); }return jQuery.text(this);},wrapAll:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});}if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;}return elem;}).append(this); }return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes); }}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this); });}else{if(arguments.length){var set=jQuery(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else{if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jQuery(arguments[0]).toArray()); return set;}}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||jQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));jQuery.cleanData([elem]);}if(elem.parentNode){elem.parentNode.removeChild(elem);}}}return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*")); }while(elem.firstChild){elem.removeChild(elem.firstChild);}}return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){if(value===undefined){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(rinlinejQuery,""):null; }else{if(typeof value==="string"&&!rnocache.test(value)&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1>");try{for(var i=0,l=this.length;i1&&i0?this.clone(true):this).get();jQuery(insert[i])[original](elems);ret=ret.concat(elems);}return this.pushStack(ret,name,insert.selector);}};});function getAll(elem){if("getElementsByTagName" in elem){return elem.getElementsByTagName("*"); }else{if("querySelectorAll" in elem){return elem.querySelectorAll("*");}else{return[];}}}function fixDefaultChecked(elem){if(elem.type==="checkbox"||elem.type==="radio"){elem.defaultChecked=elem.checked;}}function findInputs(elem){if(jQuery.nodeName(elem,"input")){fixDefaultChecked(elem);}else{if("getElementsByTagName" in elem){jQuery.grep(elem.getElementsByTagName("input"),fixDefaultChecked);}}}jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var clone=elem.cloneNode(true),srcElements,destElements,i; if((!jQuery.support.noCloneEvent||!jQuery.support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){cloneFixAttributes(elem,clone);srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){cloneFixAttributes(srcElements[i],destElements[i]);}}if(dataAndEvents){cloneCopyEvent(elem,clone);if(deepDataAndEvents){srcElements=getAll(elem);destElements=getAll(clone); for(i=0;srcElements[i];++i){cloneCopyEvent(srcElements[i],destElements[i]);}}}srcElements=destElements=null;return clone;},clean:function(elems,context,fragment,scripts){var checkScriptType;context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}var ret=[],j;for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+=""; }if(!elem){continue;}if(typeof elem==="string"){if(!rhtml.test(elem)){elem=context.createTextNode(elem);}else{elem=elem.replace(rxhtmlTag,"<$1>");var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div");div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;}if(!jQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]===""&&!hasBody?div.childNodes:[]; for(j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);}elem=div.childNodes;}}var len;if(!jQuery.support.appendChecked){if(elem[0]&&typeof(len=elem.length)==="number"){for(j=0; j=0){return value+"px";}}else{return value;}}};});if(!jQuery.support.opacity){jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":computed?"1":"";},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle;style.zoom=1;var opacity=jQuery.isNaN(value)?"":"alpha(opacity="+value*100+")",filter=currentStyle&¤tStyle.filter||style.filter||""; style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity;}};}jQuery(function(){if(!jQuery.support.reliableMarginRight){jQuery.cssHooks.marginRight={get:function(elem,computed){var ret;jQuery.swap(elem,{display:"inline-block"},function(){if(computed){ret=curCSS(elem,"margin-right","marginRight");}else{ret=elem.style.marginRight;}});return ret;}};}});if(document.defaultView&&document.defaultView.getComputedStyle){getComputedStyle=function(elem,name){var ret,defaultView,computedStyle; name=name.replace(rupper,"-$1").toLowerCase();if(!(defaultView=elem.ownerDocument.defaultView)){return undefined;}if((computedStyle=defaultView.getComputedStyle(elem,null))){ret=computedStyle.getPropertyValue(name);if(ret===""&&!jQuery.contains(elem.ownerDocument.documentElement,elem)){ret=jQuery.style(elem,name);}}return ret;};}if(document.documentElement.currentStyle){currentStyle=function(elem,name){var left,ret=elem.currentStyle&&elem.currentStyle[name],rsLeft=elem.runtimeStyle&&elem.runtimeStyle[name],style=elem.style; if(!rnumpx.test(ret)&&rnum.test(ret)){left=style.left;if(rsLeft){elem.runtimeStyle.left=elem.currentStyle.left;}style.left=name==="fontSize"?"1em":(ret||0);ret=style.pixelLeft+"px";style.left=left;if(rsLeft){elem.runtimeStyle.left=rsLeft;}}return ret===""?"auto":ret;};}curCSS=getComputedStyle||currentStyle;function getWH(elem,name,extra){var val=name==="width"?elem.offsetWidth:elem.offsetHeight,which=name==="width"?cssWidth:cssHeight; if(val>0){if(extra!=="border"){jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.css(elem,"padding"+this))||0;}if(extra==="margin"){val+=parseFloat(jQuery.css(elem,extra+this))||0;}else{val-=parseFloat(jQuery.css(elem,"border"+this+"Width"))||0;}});}return val+"px";}val=curCSS(elem,name,name);if(val<0||val==null){val=elem.style[name]||0;}val=parseFloat(val)||0;if(extra){jQuery.each(which,function(){val+=parseFloat(jQuery.css(elem,"padding"+this))||0; if(extra!=="padding"){val+=parseFloat(jQuery.css(elem,"border"+this+"Width"))||0;}if(extra==="margin"){val+=parseFloat(jQuery.css(elem,extra+this))||0;}});}return val+"px";}if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight;return(width===0&&height===0)||(!jQuery.support.reliableHiddenOffsets&&(elem.style.display||jQuery.css(elem,"display"))==="none"); };jQuery.expr.filters.visible=function(elem){return !jQuery.expr.filters.hidden(elem);};}var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rhash=/#.*$/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rinput=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rlocalProtocol=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rquery=/\?/,rscript=/)<[^<]*)*<\/script>/gi,rselectTextarea=/^(?:select|textarea)/i,rspacesAjax=/\s+/,rts=/([?&])_=[^&]*/,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,_load=jQuery.fn.load,prefilters={},transports={},ajaxLocation,ajaxLocParts; try{ajaxLocation=location.href;}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}if(jQuery.isFunction(func)){var dataTypes=dataTypeExpression.toLowerCase().split(rspacesAjax),i=0,length=dataTypes.length,dataType,list,placeBefore; for(;i=0){var selector=url.slice(off,url.length);url=url.slice(0,off); }var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=undefined;}else{if(typeof params==="object"){params=jQuery.param(params,jQuery.ajaxSettings.traditional);type="POST";}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(jqXHR,status,responseText){responseText=jqXHR.responseText;if(jqXHR.isResolved()){jqXHR.done(function(r){responseText=r; });self.html(selector?jQuery("
").append(responseText.replace(rscript,"")).find(selector):responseText);}if(callback){self.each(callback,[responseText,status,jqXHR]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type)); }).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}):{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback; callback=data;data=undefined;}return jQuery.ajax({type:method,url:url,data:data,success:callback,dataType:type});};});jQuery.extend({getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},ajaxSetup:function(target,settings){if(!settings){settings=target;target=jQuery.extend(true,jQuery.ajaxSettings,settings); }else{jQuery.extend(true,target,jQuery.ajaxSettings,settings);}for(var field in {context:1,url:1}){if(field in settings){target[field]=settings[field];}else{if(field in jQuery.ajaxSettings){target[field]=jQuery.ajaxSettings[field];}}}return target;},ajaxSettings:{url:ajaxLocation,isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML}},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url; url=undefined;}options=options||{};var s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=callbackContext!==s&&(callbackContext.nodeType||callbackContext instanceof jQuery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery._Deferred(),statusCode=s.statusCode||{},ifModifiedKey,requestHeaders={},requestHeadersNames={},responseHeadersString,responseHeaders,transport,timeoutTimer,parts,state=0,fireGlobals,i,jqXHR={readyState:0,setRequestHeader:function(name,value){if(!state){var lname=name.toLowerCase(); name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value;}return this;},getAllResponseHeaders:function(){return state===2?responseHeadersString:null;},getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}}match=responseHeaders[key.toLowerCase()]; }return match===undefined?null:match;},overrideMimeType:function(type){if(!state){s.mimeType=type;}return this;},abort:function(statusText){statusText=statusText||"abort";if(transport){transport.abort(statusText);}done(0,statusText);return this;}};function done(status,statusText,responses,headers){if(state===2){return;}state=2;if(timeoutTimer){clearTimeout(timeoutTimer);}transport=undefined;responseHeadersString=headers||""; jqXHR.readyState=status?4:0;var isSuccess,success,error,response=responses?ajaxHandleResponses(s,jqXHR,responses):undefined,lastModified,etag;if(status>=200&&status<300||status===304){if(s.ifModified){if((lastModified=jqXHR.getResponseHeader("Last-Modified"))){jQuery.lastModified[ifModifiedKey]=lastModified;}if((etag=jqXHR.getResponseHeader("Etag"))){jQuery.etag[ifModifiedKey]=etag;}}if(status===304){statusText="notmodified"; isSuccess=true;}else{try{success=ajaxConvert(s,response);statusText="success";isSuccess=true;}catch(e){statusText="parsererror";error=e;}}}else{error=statusText;if(!statusText||status){statusText="error";if(status<0){status=0;}}}jqXHR.status=status;jqXHR.statusText=statusText;if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]); }jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger("ajax"+(isSuccess?"Success":"Error"),[jqXHR,s,isSuccess?success:error]);}completeDeferred.resolveWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}}deferred.promise(jqXHR);jqXHR.success=jqXHR.done; jqXHR.error=jqXHR.fail;jqXHR.complete=completeDeferred.done;jqXHR.statusCode=function(map){if(map){var tmp;if(state<2){for(tmp in map){statusCode[tmp]=[statusCode[tmp],map[tmp]];}}else{tmp=map[jqXHR.status];jqXHR.then(tmp,tmp);}}return this;};s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().split(rspacesAjax);if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase()); s.crossDomain=!!(parts&&(parts[1]!=ajaxLocParts[1]||parts[2]!=ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?80:443))!=(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?80:443))));}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return false;}fireGlobals=s.global;s.type=s.type.toUpperCase(); s.hasContent=!rnoContent.test(s.type);if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");}if(!s.hasContent){if(s.data){s.url+=(rquery.test(s.url)?"&":"?")+s.data;}ifModifiedKey=s.url;if(s.cache===false){var ts=jQuery.now(),ret=s.url.replace(rts,"$1_="+ts);s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType); }if(s.ifModified){ifModifiedKey=ifModifiedKey||s.url;if(jQuery.lastModified[ifModifiedKey]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[ifModifiedKey]);}if(jQuery.etag[ifModifiedKey]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[ifModifiedKey]);}}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", */*; q=0.01":""):s.accepts["*"]); for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){jqXHR.abort();return false;}for(i in {success:1,error:1,complete:1}){jqXHR[i](s[i]);}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]); }if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}try{state=1;transport.send(requestHeaders,done);}catch(e){if(status<2){done(-1,e);}else{jQuery.error(e);}}}return jqXHR;},param:function(a,traditional){var s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);};if(traditional===undefined){traditional=jQuery.ajaxSettings.traditional; }if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix],traditional,add);}}return s.join("&").replace(r20,"+");}});function buildParams(prefix,obj,traditional,add){if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"||jQuery.isArray(v)?i:"")+"]",v,traditional,add); }});}else{if(!traditional&&obj!=null&&typeof obj==="object"){for(var name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}}}jQuery.extend({active:0,lastModified:{},etag:{}});function ajaxHandleResponses(s,jqXHR,responses){var contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields,ct,type,finalDataType,firstDataType;for(type in responseFields){if(type in responses){jqXHR[responseFields[type]]=responses[type]; }}while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("content-type");}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}if(dataTypes[0] in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type; }}finalDataType=finalDataType||firstDataType;}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}function ajaxConvert(s,response){if(s.dataFilter){response=s.dataFilter(response,s.dataType);}var dataTypes=s.dataTypes,converters={},i,key,length=dataTypes.length,tmp,current=dataTypes[0],prev,conversion,conv,conv1,conv2;for(i=1;i=options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();options.animatedProperties[this.prop]=true;for(i in options.animatedProperties){if(options.animatedProperties[i]!==true){done=false; }}if(done){if(options.overflow!=null&&!jQuery.support.shrinkWrapBlocks){jQuery.each(["","X","Y"],function(index,value){elem.style["overflow"+value]=options.overflow[index];});}if(options.hide){jQuery(elem).hide();}if(options.hide||options.show){for(var p in options.animatedProperties){jQuery.style(elem,p,options.orig[p]);}}options.complete.call(elem);}return false;}else{if(options.duration==Infinity){this.now=t; }else{n=t-this.startTime;this.state=n/options.duration;this.pos=jQuery.easing[options.animatedProperties[this.prop]](this.state,n,0,1,options.duration);this.now=this.start+((this.end-this.start)*this.pos);}this.update();}return true;}};jQuery.extend(jQuery.fx,{tick:function(){for(var timers=jQuery.timers,i=0;i").appendTo(body),display=elem.css("display");elem.remove();if(display==="none"||display===""){if(!iframe){iframe=document.createElement("iframe");iframe.frameBorder=iframe.width=iframe.height=0;}body.appendChild(iframe);if(!iframeDoc||!iframe.createElement){iframeDoc=(iframe.contentWindow||iframe.contentDocument).document; iframeDoc.write((document.compatMode==="CSS1Compat"?"":"")+"");iframeDoc.close();}elem=iframeDoc.createElement(nodeName);iframeDoc.body.appendChild(elem);display=jQuery.css(elem,"display");body.removeChild(iframe);}elemdisplay[nodeName]=display;}return elemdisplay[nodeName];}var rtable=/^t(?:able|d|h)$/i,rroot=/^(?:body|html)$/i;if("getBoundingClientRect" in document.documentElement){jQuery.fn.offset=function(options){var elem=this[0],box; if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});}if(!elem||!elem.ownerDocument){return null;}if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);}try{box=elem.getBoundingClientRect();}catch(e){}var doc=elem.ownerDocument,docElem=doc.documentElement;if(!box||!jQuery.contains(docElem,elem)){return box?{top:box.top,left:box.left}:{top:0,left:0}; }var body=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=win.pageYOffset||jQuery.support.boxModel&&docElem.scrollTop||body.scrollTop,scrollLeft=win.pageXOffset||jQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft,top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;return{top:top,left:left}; };}else{jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});}if(!elem||!elem.ownerDocument){return null;}if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);}jQuery.offset.initialize();var computedStyle,offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft; while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){break;}computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&rtable.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0; left+=parseFloat(computedStyle.borderLeftWidth)||0;}prevOffsetParent=offsetParent;offsetParent=elem.offsetParent;}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}prevComputedStyle=computedStyle;}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop; left+=body.offsetLeft;}if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);}return{top:top,left:left};};}jQuery.offset={initialize:function(){var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(jQuery.css(body,"marginTop"))||0,html="
"; jQuery.extend(container.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild;checkDiv=innerDiv.firstChild;td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5); checkDiv.style.position="fixed";checkDiv.style.top="20px";this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15);checkDiv.style.position=checkDiv.style.top="";innerDiv.style.overflow="hidden";innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container); jQuery.offset.initialize=jQuery.noop;},bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;jQuery.offset.initialize();if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseFloat(jQuery.css(body,"marginTop"))||0;left+=parseFloat(jQuery.css(body,"marginLeft"))||0;}return{top:top,left:left};},setOffset:function(elem,options,i){var position=jQuery.css(elem,"position");if(position==="static"){elem.style.position="relative"; }var curElem=jQuery(elem),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=(position==="absolute"||position==="fixed")&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0; curLeft=parseFloat(curCSSLeft)||0;}if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset);}if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;}if("using" in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({position:function(){if(!this[0]){return null;}var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset(); offset.top-=parseFloat(jQuery.css(elem,"marginTop"))||0;offset.left-=parseFloat(jQuery.css(elem,"marginLeft"))||0;parentOffset.top+=parseFloat(jQuery.css(offsetParent[0],"borderTopWidth"))||0;parentOffset.left+=parseFloat(jQuery.css(offsetParent[0],"borderLeftWidth"))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body; while(offsetParent&&(!rroot.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;}return offsetParent;});}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){var elem,win;if(val===undefined){elem=this[0];if(!elem){return null;}win=getWindow(elem);return win?("pageXOffset" in win)?win[i?"pageYOffset":"pageXOffset"]:jQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method]; }return this.each(function(){win=getWindow(this);if(win){win.scrollTo(!i?val:jQuery(win).scrollLeft(),i?val:jQuery(win).scrollTop());}else{this[method]=val;}});};});function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn["inner"+name]=function(){var elem=this[0]; return elem&&elem.style?parseFloat(jQuery.css(elem,type,"padding")):null;};jQuery.fn["outer"+name]=function(margin){var elem=this[0];return elem&&elem.style?parseFloat(jQuery.css(elem,type,margin?"margin":"border")):null;};jQuery.fn[type]=function(size){var elem=this[0];if(!elem){return size==null?null:this;}if(jQuery.isFunction(size)){return this.each(function(i){var self=jQuery(this);self[type](size.call(this,i,self[type]())); });}if(jQuery.isWindow(elem)){var docElemProp=elem.document.documentElement["client"+name];return elem.document.compatMode==="CSS1Compat"&&docElemProp||elem.document.body["client"+name]||docElemProp;}else{if(elem.nodeType===9){return Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]); }else{if(size===undefined){var orig=jQuery.css(elem,type),ret=parseFloat(orig);return jQuery.isNaN(ret)?orig:ret;}else{return this.css(type,typeof size==="string"?size:size+"px");}}}};});window.jQuery=window.$=jQuery;})(window); /* Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.0.6 * * Requires: 1.2.2+ */ (function(d){var b=["DOMMouseScroll","mousewheel"]; if(d.event.fixHooks){for(var a=b.length;a;){d.event.fixHooks[b[--a]]=d.event.mouseHooks;}}d.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var e=b.length;e;){this.addEventListener(b[--e],c,false);}}else{this.onmousewheel=c;}},teardown:function(){if(this.removeEventListener){for(var e=b.length;e;){this.removeEventListener(b[--e],c,false);}}else{this.onmousewheel=null;}}};d.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel"); },unmousewheel:function(e){return this.unbind("mousewheel",e);}});function c(j){var h=j||window.event,g=[].slice.call(arguments,1),k=0,i=true,f=0,e=0;j=d.event.fix(h);j.type="mousewheel";if(h.wheelDelta){k=h.wheelDelta/120;}if(h.detail){k=-h.detail/3;}e=k;if(h.axis!==undefined&&h.axis===h.HORIZONTAL_AXIS){e=0;f=-1*k;}if(h.wheelDeltaY!==undefined){e=h.wheelDeltaY/120;}if(h.wheelDeltaX!==undefined){f=-1*h.wheelDeltaX/120; }g.unshift(j,k,f,e);return(d.event.dispatch||d.event.handle).apply(this,g);}})(jQuery);(function(a){a.fn.samplebox=function(b){var c=this;b.display=b.display||false;var f="inline";if(!b.display){f="none";}var d=a(this).width()||"";var e=a("").html(b.text).css({position:"absolute",color:"#666666",width:d,marginTop:2,marginLeft:2,display:f});a(this).before(e);e.click(function(){a(this).hide();c.focus();});c.blur(function(){if(a(this).val()==""){e.css({display:"inline"});}}); c.focus(function(){e.hide();});};a.fn.change_value=function(b){a(this).val(b);if(b==""){a(this).prev().css({display:"inline"});}else{a(this).prev().hide();}};})(jQuery);window.Y=window.YOLP={};var $=jQuery.noConflict(true);var jsc=$.now();$.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return"jquery"+(jsc++);}});Y.VERSION=__YOLP_VERSION;Y.HOST_NAME=__YOLP_HOST||"http://olp.yahooapis.jp";Y.CTRL_IMAGE_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_ctrl.png";Y.ICON_IMAGE_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";Y.DEFAULT_TILE_SIZE=256; Y.NORMAL_LAYERSET="map";Y.PHOTO_LAYERSET="photo";Y.B1_LAYERSET="map-b1";Y.EARTHQUAKEPHOTO_LAYERSET="eq-photo";var LayerSetId=Y.LayerSetId={NORMAL:"map",PHOTO:"photo",B1:"map-b1",OSM:"osm",EARTHQUAKEPHOTO:"eq-photo"};YOLP.browserIsCompatible=function(){return true;};YOLP.extend=function(c,a){function b(){}b.prototype=c.prototype;a.prototype=new b();a.prototype.__super__=c.prototype;a.prototype.__super__.constructor=c; a.prototype.constructor=a;return a;};YOLP.loadScript=function(a,b){$.ajax({url:a,dataType:"script",success:function(){if(b){setTimeout(function(){b();},100);}}});};YOLP.loadCSS=function(b){var a=$('');$(window.document.body).append(a);};YOLP.useJQuery=function(){return $;};var __css="http://i.yimg.jp/images/map/api/yolp/css/yolp_map.css?_v="+__YOLP_VERSION; if(document.compatMode=="BackCompat"){__css="http://i.yimg.jp/images/map/api/yolp/css/yolp_map_nodoctype.css?_v="+__YOLP_VERSION;}if($.isReady){YOLP.loadCSS(__css);}else{if(document&&document.getElementsByTagName("head").length>0){var head=document.getElementsByTagName("head")[0];var linkCss=document.createElement("link");linkCss.type="text/css";linkCss.rel="stylesheet";linkCss.href=__css;head.appendChild(linkCss); }else{document.write('');}}var Drawer=Y.Drawer=function(c){if(!c){return;}this.container=c;if(typeof(document.namespaces)=="unknown"){Log.write("Drawer: unknown document.namespaces");return;}var a=document,h=typeof a.documentMode!=="undefined",b=h&&a.documentMode===8,i=h&&a.documentMode===9;if(document.namespaces&&!i){this.type=Drawer.RENDERING.VML;}else{if(document.createElementNS){this.svg_xmlns="http://www.w3.org/2000/svg"; var g=document.createElementNS(this.svg_xmlns,"svg");if(g.width){this.type=Drawer.RENDERING.SVG;}g=null;delete g;}}if(!this.type&&document.createElement("canvas").getContext){this.type=Drawer.RENDERING.CANVAS;}if(!this.type){return;}while(this.container.hasChildNodes()){this.container.removeChild(this.container.firstChild);}switch(this.type){case Drawer.RENDERING.VML:if(!document.namespaces.v){document.namespaces.add("v","urn:schemas-microsoft-com:vml"); var d="behavior:url(#default#VML);margin:auto;";if(b){var f=[];f.push("v\\:stroke");f.push("v\\:polyline");f.push("v\\:fill");f.push("v\\:oval");var j=document.createStyleSheet();j.cssText=f.join(",")+"{"+d+"}";}else{document.createStyleSheet().addRule("v\\:*",d);}}break;case Drawer.RENDERING.CANVAS:break;case Drawer.RENDERING.SVG:this.svg=document.createElementNS(this.svg_xmlns,"svg");this.svg.setAttribute("width",this.container.offsetWidth); this.svg.setAttribute("height",this.container.offsetHeight);this.svg.setAttribute("viewBox","0 0 "+this.container.offsetWidth+" "+this.container.offsetHeight);this.svg.style.position="relative";this.container.appendChild(this.svg);break;default:break;}this.strokeColor=[0,0,255];this.strokeOpacity=1;this.fillColor=[255,0,0];this.fillOpacity=0.5;};if(!Drawer.RENDERING){Drawer.RENDERING={};}Drawer.RENDERING.VML=1; Drawer.RENDERING.CANVAS=2;Drawer.RENDERING.SVG=3;Drawer.prototype.getContainer=function(){return this.container;};Drawer.prototype.clear=function(){if(!this.type){return;}switch(this.type){case Drawer.RENDERING.VML:while(this.container.hasChildNodes()){this.container.removeChild(this.container.firstChild);}break;case Drawer.RENDERING.CANVAS:while(this.container.hasChildNodes()){this.container.removeChild(this.container.firstChild); }break;case Drawer.RENDERING.SVG:while(this.svg.hasChildNodes()){this.svg.removeChild(this.svg.firstChild);}break;default:break;}};Drawer.prototype.setStrokeColor=function(a){if(!this.type){return;}if(arguments.length==3){for(var b=0;b<3;b++){this.strokeColor[b]=parseInt(arguments[b]);}}else{if(typeof(a)=="string"){for(var b=0;b<3;b++){this.strokeColor[b]=parseInt("0x"+a.substr(b*2,2));}}}};Drawer.prototype.setStrokeOpacity=function(a){if(!this.type){return; }this.strokeOpacity=a;};Drawer.prototype.setStrokeStartLine=function(a){if(!this.type){return;}this.strokeStartLine=a;};Drawer.prototype.setStrokeEndLine=function(a){if(!this.type){return;}this.strokeEndLine=a;};Drawer.prototype.setFillColor=function(a){if(!this.type){return;}if(arguments.length==3){for(var b=0;b<3;b++){this.fillColor[b]=parseInt(arguments[b]);}}else{if(typeof(a)=="string"){for(var b=0; b<3;b++){this.fillColor[b]=parseInt("0x"+a.substr(b*2,2));}}}};Drawer.prototype.setFillOpacity=function(a){if(!this.type){return;}this.fillOpacity=a;};Drawer.prototype.createCanvasWrapper=function(f,b,g,a,e,d){var h=document.createElement("div");var c=h.style;c.width=(g+e)+"px";c.height=(a+e)+"px";c.position="absolute";c.top=(f.y-d)+"px";c.left=(f.x-d)+"px";return h;};Drawer.prototype.createCanvasBySize=function(d,a,b){var c=document.createElement("canvas"); c.setAttribute("width",(d+b)+"px");c.setAttribute("height",(a+b)+"px");return c;};Drawer.prototype.createCanvasContext=function(d,c,e,a){var b=d.getContext("2d");b.strokeStyle="rgba("+this.strokeColor.join(",")+","+this.strokeOpacity+")";b.fillStyle="rgba("+this.fillColor.join(",")+","+this.fillOpacity+")";b.lineWidth=c||0;b.lineCap=e||"round";b.lineJoin=a||"round";return b;};Drawer.prototype.getArrowPoint=function(h,f,b){var c=b.r||10; var e=b.beta||35;var g={};g.x=f.x-h.x;g.y=f.y-h.y;var d=Math.atan2(g.x,g.y)*(180/Math.PI)-90;var a=[];a[0]={};a[0].x=c*0.8*Math.cos((d)*(Math.PI/180))+h.x;a[0].y=-c*0.8*Math.sin((d)*(Math.PI/180))+h.y;a[1]={};a[1].x=c*Math.cos((d+e)*(Math.PI/180))+h.x;a[1].y=-c*Math.sin((d+e)*(Math.PI/180))+h.y;a[2]={};a[2].x=c*0.5*Math.cos((d)*(Math.PI/180))+h.x;a[2].y=-c*0.5*Math.sin((d)*(Math.PI/180))+h.y;a[3]={}; a[3].x=c*Math.cos((d-e)*(Math.PI/180))+h.x;a[3].y=-c*Math.sin((d-e)*(Math.PI/180))+h.y;a[4]={};a[4].x=c*0.8*Math.cos((d)*(Math.PI/180))+h.x;a[4].y=-c*0.8*Math.sin((d)*(Math.PI/180))+h.y;return a;};Drawer.prototype.drawLine=function(l,h){if(!this.type){return;}var n;switch(this.type){case Drawer.RENDERING.VML:var k=document.createElement("v:polyline");if(!h||!this.strokeOpacity){k.stroked=false;}k.filled=false; var s=new Array();for(var u=0;u=2){if(this.strokeStartLine=="arrow"){$.each(this.getArrowPoint(l[0],l[1],{r:h*2+3,beta:17.5}),function(d,i){if(d==0){s.push("M "+(i.x)+","+(i.y)); }else{s.push("L "+(i.x)+","+(i.y));}});}else{s.push("M "+l[0].x+","+l[0].y);}for(var u=1;u=1){t.push("L "+l[v].x+","+l[v].y); }else{t.push("M "+l[v].x+","+l[v].y);}if(v==(g-1)){t.push(" z");}}var y=t.join(" ");if(y===""){x.removeAttribute("d");}else{x.setAttribute("d",y);}x.setAttribute("fill","none");x.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");x.setAttribute("stroke-opacity",this.strokeOpacity);x.setAttribute("stroke-width",h);x.setAttribute("stroke-linecap","round");x.setAttribute("stroke-linejoin","round"); x.setAttribute("fill","rgb("+this.fillColor.join(",")+")");x.setAttribute("fill-opacity",this.fillOpacity);x.style.overflow="hidden";this.svg.appendChild(x);n=x;break;default:break;}return n;};Drawer.prototype.drawCircle=function(q,n,i,t){if(!this.type){return;}switch(this.type){case Drawer.RENDERING.VML:var k;if(t){k=t;}else{k=document.createElement("v:oval");}if(!i||!this.strokeOpacity){k.stroked=false; }if(!this.fillOpacity){k.filled=false;}k.style.position="absolute";k.style.left=(q.x-n.width)+"px";k.style.top=(q.y-n.height)+"px";k.style.width=(n.width*2)+"px";k.style.height=(n.height*2)+"px";this.container.appendChild(k);var y=document.createElement("v:fill");y.color="rgb("+this.fillColor.join(",")+")";y.opacity=this.fillOpacity;k.appendChild(y);var g=document.createElement("v:stroke");g.weight=i+"px"; g.color="rgb("+this.strokeColor.join(",")+")";g.opacity=this.strokeOpacity;g.endcap="round";g.joinstyle="round";k.appendChild(g);t=k;break;case Drawer.RENDERING.CANVAS:var x=i/2;var z=new Y.Point(q.x+n.width,q.y+n.height);var v=new Y.Point(q.x-n.width,q.y-n.height);var s=z.x-v.x;var o=z.y-v.y;var f;if(t){f=t;}else{f=this.createCanvasWrapper(v,z,s,o,i,x);}var d=this.createCanvasBySize(s,o,i);var u=this.createCanvasContext(d,i); var e=new Y.Point(q._offset.x+((v.x-x)-q._offset.x),q._offset.y+((v.y-x)-q._offset.y));var i=n.width;var A=n.height;var m=0.5522847498307933;var l=m*i;var j=m*A;var D=q.x-e.x-i;var B=q.x-e.x+i;var b=q.y-e.y-A;var a=q.y-e.y+A;u.beginPath();u.moveTo(B,b+A);u.bezierCurveTo(B,b+A-j,D+i+l,b,D+i,b);u.bezierCurveTo(D+i-l,b,D,b+A-j,D,b+A);u.bezierCurveTo(D,b+A+j,D+i-l,a,D+i,a);u.bezierCurveTo(D+i+l,a,B,b+A+j,B,b+A); if(this.fillOpacity){u.fill();}if(i&&this.strokeOpacity){u.stroke();}f.appendChild(d);this.container.appendChild(f);t=f;break;case Drawer.RENDERING.SVG:var E;if(t){E=t;}else{E=document.createElementNS(this.svg_xmlns,"ellipse");}E.setAttribute("cx",q.x);E.setAttribute("cy",q.y);E.setAttribute("rx",n.width);E.setAttribute("ry",n.height);E.setAttribute("fill","none");E.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")"); E.setAttribute("stroke-opacity",this.strokeOpacity);E.setAttribute("stroke-width",i);E.setAttribute("stroke-linecap","round");E.setAttribute("stroke-linejoin","round");E.setAttribute("fill","rgb("+this.fillColor.join(",")+")");E.setAttribute("fill-opacity",this.fillOpacity);this.svg.appendChild(E);t=E;break;default:break;}return t;};var Service=Y.Service={};(function(){var c=["Map","GeoCoder","LocalSearch","RouteSearch","WeatherPlace","WeatherMapLayer"];for(var b=0,a=c.length;b=0;--f){a=b[f].getAttribute("src")||"";c=g(a);p=c.split("&");for(var e=0;e');this.updatePosition=this._createFunctionForScroll({debugTransforms:m.debugTransforms}); this.mapContainer.bind("contextmenu",function(){return false;});if(Util.Platform.isSupportTouchScroll){this.mapContainer.css("webkit-user-select","none");}this.mainContainer.append(this.mapContainer);this.containerPosition=new Point(0,0);this.currentContainerPosition=new Point(0,0);this.checkResize();this.initEvents();for(var e in a){if(!a.hasOwnProperty(e)){continue;}var g=a[e];this.addLayerSet(e,g); }if(this.configure.enableOpenStreetMap){this.toggleOpenStreetMap(true);}this.setHybridPhoto(this.configure.hybridPhoto);this.setWeatherOverlay(this.configure.weatherOverlay);this.indoorControl=null;this.indoorMaxZoom=null;this.setIndoorOverlay(this.configure.indoorOverlay);this.toggleMapType(this.configure.mapType);var h=(typeof Service.Options["seamless"]==="undefined")?"":Service.Options["seamless"]; if(h==="gws"){this.enableGWS=true;}else{this.enableGWS=false;}this.infoWindowMargin={left:10,right:10,top:30,bottom:30};this.infoWindowImage=m.infoWindowImage||"";m.logoControl=(m.logoControl==undefined)?true:m.logoControl;m.logoControlOptions=m.logoControlOptions||{};if(m.logoControl){this._logoControl=new Y.LogoControl(m.logoControlOptions);this.addControl(this._logoControl);}this._serviceName="Map"; };Map.TYPE={STANDARD:"normal",SMARTPHONE:"smartphone",WEATHER_RADAR:"weather-radar"};Map.prototype.setConfigures=function(a){for(var b in a){if(!a.hasOwnProperty(b)){continue;}this.setConfigure(b,a[b]);}};Map.prototype.setConfigure=function(b,d){if(b!=="mapType"){d=(typeof d!=="boolean")?false:d;}var c=(this.configure[b]!==d);this.configure[b]=d;if(b==="touchSupport"){var a;if(d&&this.operation.isTouchScreen){if(Y.Util.Platform.isIOS){a=new IphoneTouchBehavior(); }else{if(Y.Util.Platform.isAndroid){a=new AndroidTouchBehavior();}else{a=new TouchBehavior();}}}else{a=new Y.MouseBehavior();}this.operation.setScreenBehavior(a);}if(b==="hybridPhoto"){this.setHybridPhoto(d);if(c){Y.Event.trigger(this,"hybridphotochanged",d);}}if(b==="enableOpenStreetMap"){this.toggleOpenStreetMap(d);}if(b==="mapType"){this.toggleMapType(d);if(c){Y.Event.trigger(this,"maptypechanged",d); this.redraw(true);}}if(b==="weatherOverlay"){this.setWeatherOverlay(d);if(c){Y.Event.trigger(this,"weatheroverlaychanged",d);}}if(b==="indoorOverlay"){this.setIndoorOverlay(d);if(c){Y.Event.trigger(this,"indooroverlaychanged",d);}}};Map.prototype.getConfigure=function(a){return this.configure[a];};Map.prototype.getConfigures=function(){return this.configure;};Map.prototype.addControl=function(c,a){if(this.isLoaded()){c.load(this,a); }else{var d=this;var b=this.bind("load",function(){c.load(d,a);d.unbind(b);});}this.controls.push(c);};Map.prototype.removeControl=function(a){this.controls=$.grep(this.controls,function(d,b){if(d==a){d.remove();return false;}return true;});};Map.prototype.getContainer=function(){return this.mainContainer[0];};Map.prototype.getMapContainer=function(){return this.mapContainer[0];};Map.prototype.getMapContainerXY=function(){return this.currentContainerPosition.copy(); };Map.prototype.getLayerSets=function(){return this.layerSets;};Map.prototype.getCurrentLayerSet=function(){return this.currentLayerSet;};Map.prototype.getLayerSetByName=function(b){for(var c=0;cthis.currentLayerSet.getMaxZoom()){this.zoom=this.currentLayerSet.getMaxZoom();}else{if(this.zoomthis.getMinZoom();f--){var b=e.fromLatLngToPixel(k,f);var c=e.fromLatLngToPixel(d,f); var j=c.x-b.x;var g=c.y-b.y;if(j*0.98this.getMaxZoom()){l=this.getMaxZoom(); }else{if(lthis.getMaxZoom()||d0){i=-e;}var d=b.y-this.infoWindowMargin.top;if(d<0){h=-d;}var d=b.y+g.height+this.infoWindowMargin.bottom-this.size.height; if(d>0){h=-d;}if(f||((Math.abs(i)>0&&Math.abs(i)0&&Math.abs(h)j){v-=p;}while(v<-j){v+=p;}o[s].x=v+b;}o[s].x+=u.x;o[s].y+=u.y;}return o;};Map.prototype.fromLatLngToDivPixel=function(e){var c=this.getProjection();var a=this.fromLatLngToContainerPixel(e);var j=this.getMapContainerXY();var h=a.x-j.x;var f=a.y-j.y;var b=c.getWrapWidth(this.getZoom());if(b!=Infinity){var d=-j.x+this.size.width/2;var i=h-d;while(i>b/2){i-=b;}while(i<-b/2){i+=b;}h=i+d;}return new Point(h,f); };Map.prototype.fromLatLngsToDivPixels=function(a,d){var c=this.getMapContainerXY();var d=d||new Y.Point(0,0);var b={current:c,parent:d};return this.fromLatLngsToContainerPixels(a,b);};Map.prototype.fromDivPixelToContainerPixel=function(b){var a=this.getMapContainerXY();return new Point(b.x+a.x,b.y+a.y);};Map.prototype.fromLatLngToTile=function(b){var a=this.getProjection();return a.fromLatLngToTile(b,this.getZoom()); };Map.prototype.fromTileToLatLng=function(c,b,a,e){var d=this.getProjection();return d.fromTileToLatLng(c,b,a,e,this.getZoom());};Map.prototype.updateBounds=function(){var d=this.getProjection();if(!this.isLoaded()){return;}var e=d.fromLatLngToPixel(this.center,this.getZoom());var f=new Point(e.x-this.size.width/2,e.y-this.size.height/2);var b=new Point(e.x+this.size.width/2,e.y+this.size.height/2); var c=d.fromPixelToLatLng(f,this.getZoom(),true);var a=d.fromPixelToLatLng(b,this.getZoom(),true);this.bounds=new LatLngBounds(c,a);};Map.prototype.getMouseLatLng=function(c){var a=this.fromPagePixelToContainerPixel(new Point(c.pageX,c.pageY));var b=this.fromContainerPixelToLatLng(a);return b;};Map.prototype.checkRange=function(c){var e=this.getProjection();var f=e.scrollRange;if(c){if(!f||!f.enable){return c; }var k=c.x;var j=c.y;var i=this.getZoom();var g=e.fromLatLngToPixel(this.center,i);var d=e.fromPixelToLatLng(new Point(g.x-c.x,g.y+c.y),i);var h=d.lat();var b=d.lng();if(f.top>h||f.bottomh){h=f.top;}if(f.bottomf.right){if(bf.right){b=f.right;}var a=e.fromLatLngToPixel(new LatLng(d.lat(),b),i); k=parseInt(a.x-g.x);}return new Point(k,j);}else{if(f&&f.enable){var h=this.center.lat();if(f.top>h||f.bottomh){h=f.top;}if(f.bottoma){return;}var o=n.getScreenPoint(p);if(f){clearTimeout(f);}f=setTimeout(function(){if(!j||j.distance(o)<4){var q=d.fromContainerPixelToLatLng(o);if(h.singleClickPan){d.panTo(q,true); }Event.trigger(d,"click",q);}},300);};this._dblclick=function(q){if(f){clearTimeout(f);}var o=n.getScreenPoint(q);var p=d.fromContainerPixelToLatLng(o);if(h.doubleClickPan&&h.doubleClickZoom){d.zoomIn(p,h.continuousZoom,true);}else{if(h.doubleClickPan){d.panTo(p,true);}else{if(h.doubleClickZoom){d.zoomIn(p,h.continuousZoom,false);}}}Event.trigger(d,"dblclick",p);};var b=null;this._mousedown=function(p){k=c(); j=n.getScreenPoint(p);g=j;i=true;d.mapContainer.stop();p.preventDefault();if(h.dragging){l();}if(h.holdSupport){if(b){clearTimeout(b);}var o=d.fromContainerPixelToLatLng(j);b=setTimeout(function(){Event.trigger(d,"hold",o);n._mouseup(p);},a);}};this._mousemove=function(s){if(!i||!h.dragging){return;}if(h.dragging&&!m){d._stopTween();Event.trigger(d,"movestart");Event.trigger(d,"dragstart",s);m=true; if($.browser.msie&&d.mainContainer[0].setCapture){d.mainContainer[0].setCapture();}}if(h.holdSupport&&b){clearTimeout(b);b=null;}var r=n.getScreenPoint(s);var p=r.x-g.x;var o=r.y-g.y;var q=d.checkRange(new Point(p,o));d.updatePosition(q.x,q.y);d.panUpdate();d.currentLayerSet.onPan(q.x,q.y);g=r;Event.trigger(d,"move");Event.trigger(d,"drag",s);};this._mouseup=function(p){if(!i){return;}if($.browser.msie&&d.mainContainer[0].releaseCapture){d.mainContainer[0].releaseCapture(); }e();if(m){d.panUpdate();if(h.enableFlickScroll&&c()-k0){d.zoomIn(o,h.continuousZoom,false);}else{d.zoomOut(o,h.continuousZoom,false);}p.stopPropagation();p.preventDefault();}};if($.browser.mozilla){this._force_mouseup=function(p){if(!p.relatedTarget&&m){n._mouseup(p);return;}var o;try{o=(p.relatedTarget)?p.relatedTarget.tagName.toLowerCase():null;}catch(p){o=null; }if(o==="iframe"&&m){n._mouseup(p);return;}};}if($.browser.msie){this._force_mouseup=function(p){var o=(p.toElement)?false:true;if(o&&m){n._mouseup(p);return;}};}};MouseBehavior.prototype.setValid=function(a){var c=$(window);var b=this.map;if(a){if($.browser.msie){b.mainContainer.bind("mousemove",this._mousemove);b.mainContainer.bind("mouseup",this._mouseup);b.mainContainer.bind("mousedown",this._mousedown); }else{c.bind("mousemove",this._mousemove);c.bind("mouseup",this._mouseup);b.mainContainer.bind("mousedown",this._mousedown);}b.mainContainer.bind("click",this._click);b.mainContainer.bind("dblclick",this._dblclick);b.mainContainer.bind("mousewheel",this._mousewheel);if($.browser.mozilla){c.bind("mouseout",this._force_mouseup);}else{if($.browser.msie){b.mainContainer.bind("mouseout",this._force_mouseup); }}}else{if($.browser.msie){b.mainContainer.unbind("mousemove",this._mousemove);b.mainContainer.unbind("mouseup",this._mouseup);b.mainContainer.unbind("mousedown",this._mousedown);}else{c.unbind("mousemove",this._mousemove);c.unbind("mouseup",this._mouseup);b.mainContainer.unbind("mousedown",this._mousedown);}b.mainContainer.unbind("click",this._click);b.mainContainer.unbind("dblclick",this._dblclick); b.mainContainer.unbind("mousewheel",this._mousewheel);if($.browser.mozilla){c.unbind("mouseout",this._force_mouseup);}else{if($.browser.msie){b.mainContainer.unbind("mouseout",this._force_mouseup);}}}};MouseBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");Behavior.prototype.uninitialize.call(this);this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null; this._mouseup=null;this._mousewheel=null;if($.browser.mozilla||$.browser.msie){this._force_mouseup=null;}};var TouchBehavior=Y.TouchBehavior=Y.extend(Y.ScreenBehavior,function(){Y.ScreenBehavior.call(this);this.enableTouchScroll=true;this.zoomThreshold=30;});TouchBehavior.prototype.initEventListener=function(){var l=this;var d=this.map;var c=function(){return new Date().getTime();};var e=false;var j; var i;var f;var k=false;var a=false;var h=d.configure;var g=500;var b=null;this._touchstart=function(n){if(k&&n.touches.length>1){i=l.getScreenPoint(n,k);}else{if(!l.enableTouchScroll){return;}j=c();i=l.getScreenPoint(n);if(h.holdSupport){if(b){clearTimeout(b);}var m=d.fromContainerPixelToLatLng(i);b=setTimeout(function(){Event.trigger(d,"hold",m);i=null;l._touchend(n);},g);}}f=i;n.preventDefault(); };this._touchmove=function(q){if(!k&&!l.enableTouchScroll){return;}if(a){return;}if(!i){return;}if(!e){d._stopTween();e=true;Event.trigger(d,"movestart");Event.trigger(d,"dragstart");}if(h.holdSupport&&b){clearTimeout(b);b=null;}var p=l.getScreenPoint(q,k);var n=p.x-f.x;var m=p.y-f.y;var o=d.checkRange(new Point(n,m));d.updatePosition(o.x,o.y);d.panUpdate();d.currentLayerSet.onPan(o.x,o.y);f=p;Event.trigger(d,"move"); Event.trigger(d,"drag");};this._touchend=function(n){if(!k&&!l.enableTouchScroll){return;}if(e&&n.touches.length===0){d.panUpdate();d.updateBounds();if(h.enableFlickScroll&&c()-jg){return;}else{if(b){clearTimeout(b);b=null;}}}Event.trigger(d,"click",d.fromContainerPixelToLatLng(i));i=null;}};this._gesturestart=function(m){h.dragging=false;k=true;};this._gesturechange=function(n){n.preventDefault();var o=n.scale;if(!l.enableTouchScroll){return;}var m=d.mainContainer;m.css({"-webkit-transform":"scale("+o+")"}); };this._gestureend=function(t){t.preventDefault();if(!l.enableTouchScroll){k=false;t.stopPropagation();i=null;if(e){Event.trigger(d,"dragend");Event.trigger(d,"moveend");e=false;}return;}var w=d.getCenter();var q=t.scale;var s=q*100;var v=(s>100)?Math.round(s-100):Math.round(100-s);var x=(v<=l.zoomThreshold);if(x){l._normalizeScale();}else{var p=Math.LOG2E*Math.log(q);p=(p>0)?Math.ceil(p):Math.floor(p); var u=d.getZoom();u+=p;if(d.getMaxZoom()u){u=d.getMinZoom();}d.setZoom(u);a=true;}h.dragging=true;k=false;t.stopPropagation();i=null;var o=!x;if(Y.Util.Platform.scrollType==="CSS3"){var n=d.mapContainer.next()[0];var r=d.mapContainer[0];r.parentNode.removeChild(r);n.parentNode.insertBefore(r,n);}d.redraw(o);};this._normalizeScale=function(){var m=d.mainContainer; m.css({"-webkit-transform":"scale(1.0)"});a=false;};this._zoomendlistener=d.bind("zoomend",this._normalizeScale,l);};TouchBehavior.prototype.getScreenPoint=function(g,f){var f=(typeof f==="undefined")?false:f;if(g&&g.touches&&g.touches[0]){if(f&&g.touches.length>=2){var d=g.touches[0],b=g.touches[1];var c=(d.pageX+b.pageX)/2;var a=(d.pageY+b.pageY)/2;return new Y.Point(c,a);}else{var c=g.touches[0].pageX; var a=g.touches[0].pageY;}}else{return MouseBehavior.prototype.getScreenPoint.call(this,g);}return this.map.fromPagePixelToContainerPixel(new Point(c,a));};TouchBehavior.prototype.setValid=function(a){var b=this.map;if(a){b.mapContainer[0].addEventListener("touchstart",this._touchstart,false);b.mainContainer[0].addEventListener("touchmove",this._touchmove,false);b.mainContainer[0].addEventListener("touchend",this._touchend,false); b.mainContainer[0].addEventListener("gesturestart",this._gesturestart,false);b.mainContainer[0].addEventListener("gesturechange",this._gesturechange,false);b.mainContainer[0].addEventListener("gestureend",this._gestureend,false);}else{b.mainContainer[0].removeEventListener("touchmove",this._touchmove,false);b.mainContainer[0].removeEventListener("touchend",this._touchend,false);b.mapContainer[0].removeEventListener("touchstart",this._touchstart,false); b.mainContainer[0].removeEventListener("gesturestart",this._gesturestart,false);b.mainContainer[0].removeEventListener("gesturechange",this._gesturechange,false);b.mainContainer[0].removeEventListener("gestureend",this._gestureend,false);b.unbind(this._zoomendlistener);}};TouchBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");Behavior.prototype.uninitialize.call(this); this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null;this._mouseup=null;this._mousewheel=null;this._gesturestart=null;this._gesturechange=null;this._gestureend=null;};TouchBehavior.prototype._fixscale=function(l,h,i,f,c,b,p){l.preventDefault();if(f==undefined){return;}var q;var o;if(!c){var k=this.map.getSize();var s=(k.width/2)-f.x;var r=(k.height/2)-f.y;q=this.map.checkRange(new Point(s,r)); this.map.updatePosition(q.x,q.y);this.map.panUpdate();o=this.map.getCenter();}if(!p){var g=Math.LOG2E*Math.log(h);g=(g>0)?Math.ceil(g):Math.floor(g);var n=this.map.getZoom();n+=g;if(this.map.getMaxZoom()n){n=this.map.getMinZoom();}}this.map.setZoom(n);}if(!c){this.map.updatePosition(-(q.x),-(q.y));this.map.panUpdate();}b=true;l.stopPropagation(); var d=!p;if(Y.Util.Platform.scrollType==="CSS3"){var a=this.map.mapContainer.next()[0];var j=this.map.mapContainer[0];j.parentNode.removeChild(j);a.parentNode.insertBefore(j,a);}i.css({"-webkit-transform":"scale(1.0)"});};TouchBehavior.prototype._scaletf=function(f,e,d,b){var a;var g;if(!b){a=d.x-this.map.currentContainerPosition.x;g=d.y-this.map.currentContainerPosition.y;}else{var c=this.map.getSize(); a=c.width/2-this.map.currentContainerPosition.x;g=c.height/2-this.map.currentContainerPosition.y;}e.css({"-webkit-transform-origin":a+"px "+g+"px","-webkit-transform":"scale("+f+")"});};TouchBehavior.prototype.pythagorean=function(b,a,d,c){return Math.sqrt(Math.pow(Math.abs(b-a),2)+Math.pow(Math.abs(d-c),2));};TouchBehavior.prototype._changeZoom=function(d){var c=d*100;var b=(c>100)?Math.round(c-100):Math.round(100-c); var a=(b<=this.zoomThreshold);return a;};TouchBehavior.prototype._makeCanvasMap=function(C,D,B,A){var e=this.map.getSize();this.canvas=$("#mapCanvas",this.map.getContainer()).get();if(this.canvas.length>0){$("#mapCanvas",this.map.getContainer()).remove();}var a;var j=this.map.getZoom();var f=1;var d=1;var h=1;var s=Math.LOG2E*Math.log(C);s=(s>0)?Math.ceil(s):Math.floor(s);var a=j+s;if(j==this.map.getMaxZoom()&&a>this.map.getMaxZoom()){return; }if(j==this.map.getMinZoom()&&aa){a=this.map.getMinZoom();s=a-j;}var n=Y.Util.level2Scale(j);var l=Y.Util.level2Scale(a);f=n/l;this.canvas=$('');$(this.map.getContainer()).prepend(this.canvas); $(this.map.getContainer()).css({"text-align":"left"});if(!(this.canvas[0].getContext)||A){this.canvas.remove();return;}var x=$(".yolp-tilelayer img",this.map.getContainer()).get();var o=this.map.getProjection().tileSize;var v=this.canvas[0].getContext("2d");var r;var g;var u=0;var k=0;var b;if(B){b=new Y.Point(((e.width/2)-((e.width*f)/2)),((e.height/2)-((e.height*f)/2)));}else{b=new Y.Point((D.x-(D.x*f)),(D.y-(D.y*f))); }if(f<1){this.canvas.css({position:"relative",width:e.width*f,height:e.height*f,top:b.y+"px",left:b.x+"px"});var q=Math.round(o);for(var w=0;w0){$("#mapCanvas",c.map.getContainer()).remove();}i=null;},1000);};var IphoneTouchBehavior=Y.IphoneTouchBehavior=Y.extend(Y.TouchBehavior,function(){Y.TouchBehavior.call(this);this.enableTouchScroll=true;});IphoneTouchBehavior.prototype.initEventListener=function(){var j=this; var c=this.map;var q=true;var e=false;var o=function(){return new Date().getTime();};this.isKeepZoomer;this.enableTouchScroll=this.map.configure.dragging;var k=$(c.getMapContainer());if(this.enableTouchScroll){q=this.map.configure.PinchZoomCenter;e=this.map.configure.enableFlickScroll;}var p=false;var l;var m;var b;var i=false;var g=c.configure;var d;var r=500;var h=null;var f=false;var a=0;var n=false; this._touchstart=function(u){var s=$("#mapCanvas",c.getContainer()).get();if(s.length>0){$("#mapCanvas",c.getContainer()).remove();}l=o();if((u.touches.length>1)&&g.scrollPinchZoom){i=true;}if(u.touches.length>1){m=j.getScreenPoint(u,i);}else{if(!j.enableTouchScroll){return;}m=j.getScreenPoint(u,i);if(g.holdSupport){if(h){clearTimeout(h);}var t=c.fromContainerPixelToLatLng(m);h=setTimeout(function(){Event.trigger(c,"hold",t); j._touchend(u);},r);}}b=m;u.preventDefault();a=u.touches.length;};this._touchmove=function(w){if(!j.enableTouchScroll){return;}if(f){return;}f=true;w.preventDefault();if(!i&&!j.enableTouchScroll){f=false;return;}if(!m){f=false;return;}if(!p){c._stopTween();p=true;Event.trigger(c,"movestart");Event.trigger(c,"dragstart");}if(g.holdSupport&&h){clearTimeout(h);h=null;}var v=j.getScreenPoint(w,i);var t=v.x-b.x; var s=v.y-b.y;var u=c.checkRange(new Point(t,s));if((w.scale>1)&&(q)){}else{if(w.scale>0.9){c.updatePosition(u.x,u.y);c.panUpdate();c.currentLayerSet.onPan(u.x,u.y);}else{if(!q){c.updatePosition(u.x,u.y);c.panUpdate();}}}b=v;d=v;Event.trigger(c,"move");Event.trigger(c,"drag");f=false;};this._touchend=function(t){if(t.touches.length==1){if(l&&o()-l>Y.Behavior.TWEEN_RANGE){i=false;}}if(!i&&!j.enableTouchScroll){m=null; return;}if(p&&t.touches.length===0){c.panUpdate();c.updateBounds();if(e&&o()-lr){return;}else{if(h){clearTimeout(h); h=null;}}}if((j.pythagorean(b.x,m.x,b.y,m.y)<4)&&a==1){Event.trigger(c,"click",c.fromContainerPixelToLatLng(m));}}b=null;m=null;f=false;};this._gesturestart=function(s){n=true;if(g.scrollPinchZoom){this.enableTouchScroll=false;}c.mainContainer[0].addEventListener("gestureend",j._gestureend,false);};this._gesturechange=function(u){if(!n){return;}if(g.scrollPinchZoom){u.preventDefault();if(!i&&!j.enableTouchScroll){return; }if(!d){return;}var t=$(".yolp-tilelayer",k);j._scaletf(u.scale,t,d,q);if(u.scale!=1){var s=$(".yolp-layer",k);s.css({display:"none"});}}};this._gestureend=function(u){n=false;if(g.scrollPinchZoom){var v=u.scale;this.isKeepZoomer=j._changeZoom(v);if(this.isKeepZoomer){var s=$(".yolp-layer",k);s.css({display:"block"});}var t=$(".yolp-tilelayer",k);j._makeCanvasMap(v,d,q,this.isKeepZoomer);j._fixscale(u,v,t,d,q,this.enableTouchScroll,this.isKeepZoomer); i=false;}c.mainContainer[0].removeEventListener("gestureend",j._gestureend,false);};this._normalizeScale=function(){var s=$(".yolp-layer",k);s.css({display:"block"});};this._zoomendlistener=c.bind("zoomend",this._normalizeScale,j);};IphoneTouchBehavior.prototype.getScreenPoint=function(g,f){var f=(typeof f==="undefined")?false:f;var d;var b;if(g&&g.touches&&g.touches[0]){if(f&&g.touches.length>=2){var c=g.touches[0],a=g.touches[1]; d=(c.pageX+a.pageX)/2;b=(c.pageY+a.pageY)/2;}else{d=g.touches[0].pageX;b=g.touches[0].pageY;}}else{if(g&&g.pageX&&g.pageY){d=g.pageX;b=g.pageY;}}return this.map.fromPagePixelToContainerPixel(new Point(d,b));};IphoneTouchBehavior.prototype.setValid=function(a){var b=this.map;if(a){b.mapContainer[0].addEventListener("touchstart",this._touchstart,false);b.mainContainer[0].addEventListener("touchmove",this._touchmove,false); b.mainContainer[0].addEventListener("touchend",this._touchend,false);b.mainContainer[0].addEventListener("gesturestart",this._gesturestart,false);b.mainContainer[0].addEventListener("gesturechange",this._gesturechange,false);}else{b.mainContainer[0].removeEventListener("touchmove",this._touchmove,false);b.mainContainer[0].removeEventListener("touchend",this._touchend,false);b.mapContainer[0].removeEventListener("touchstart",this._touchstart,false); b.mainContainer[0].removeEventListener("gesturestart",this._gesturestart,false);b.mainContainer[0].removeEventListener("gesturechange",this._gesturechange,false);b.unbind(this._zoomendlistener);}};IphoneTouchBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");TouchBehavior.prototype.uninitialize.call(this);this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null; this._mouseup=null;this._mousewheel=null;this._gesturestart=null;this._gesturechange=null;this._gestureend=null;};var AndroidTouchBehavior=Y.AndroidTouchBehavior=Y.extend(Y.TouchBehavior,function(){Y.TouchBehavior.call(this);this.enableTouchScroll=true;this.zoomThreshold=5;});AndroidTouchBehavior.prototype.initEventListener=function(){var k=this;var d=this.map;var f=false;var r=true;var o=function(){return new Date().getTime(); };this.enableTouchScroll=this.map.configure.dragging;if(this.enableTouchScroll){r=this.map.configure.PinchZoomCenter;f=this.map.configure.enableFlickScroll;}var p=false;var l;var n;var c;var i=false;var g=d.configure;var e;var s=500;var h=null;var m=1;var q;var b=0;var a=false;var j=$(d.getMapContainer());this._touchstart=function(w){l=o();if((w.touches.length>1)&&g.scrollPinchZoom){i=true;var u=$("#mapCanvas",d.getContainer()).get(); if(u.length>0){$("#mapCanvas",d.getContainer()).remove();}}if(w.touches.length>1){this.enableTouchScroll=false;n=k.getScreenPoint(w,i);q=k.pythagorean(w.touches[0].pageX,w.touches[1].pageX,w.touches[0].pageY,w.touches[1].pageY);var t=$(".yolp-layer",j);t.css({display:"none"});}else{n=k.getScreenPoint(w,i);if(g.holdSupport){if(h){clearTimeout(h);}var v=d.fromContainerPixelToLatLng(n);h=setTimeout(function(){Event.trigger(d,"hold",v); k._touchend(w);},s);}}c=n;w.preventDefault();b=w.touches.length;};this._touchmove=function(A){A.preventDefault();if(A.touches.length>1){var z=10;var x=2;var v=k.pythagorean(A.touches[0].pageX,A.touches[1].pageX,A.touches[0].pageY,A.touches[1].pageY);if((Math.abs(v-q)>1)&&!a){if(g.scrollPinchZoom){a=true;i=true;var t=$(".yolp-tilelayer",j);var u=d.getSize();var C=k.pythagorean(u.width,0,u.height,0); if(v>q){m=m+(((v-q)/C)*x);}else{if(v1)){}else{if(m>0.9){d.updatePosition(B.x,B.y);d.panUpdate();d.currentLayerSet.onPan(B.x,B.y);}else{if(!r){d.updatePosition(B.x,B.y);d.panUpdate();}}}c=w;Event.trigger(d,"move");Event.trigger(d,"drag");}};this._touchend=function(w){if(w.touches.length==1&&g.scrollPinchZoom){this.isKeepZoomer=k._changeZoom(m);if(this.isKeepZoomer){var t=$(".yolp-layer",j); t.css({display:"block"});}var v=$(".yolp-tilelayer",j);k._makeCanvasMap(m,e,r,this.isKeepZoomer);k._fixscale(w,m,v,e,r,this.enableTouchScroll,this.isKeepZoomer);m=1;if(o()-l>Y.Behavior.TWEEN_RANGE){i=false;}}if(p&&w.touches.length===0){d.panUpdate();d.updateBounds();if(f&&o()-ls){return;}else{if(h){clearTimeout(h);h=null;}}}if((k.pythagorean(c.x,n.x,c.y,n.y)<4)&&b==1){Event.trigger(d,"click",d.fromContainerPixelToLatLng(n));}}n=null;c=null;};this._normalizeScale=function(){var t=$(".yolp-layer",j);t.css({display:"block"});};this._zoomendlistener=d.bind("zoomend",this._normalizeScale,k); };AndroidTouchBehavior.prototype.getScreenPoint=function(g,f){var f=(typeof f==="undefined")?false:f;var d;var b;if(g&&g.touches&&g.touches[0]){if(f&&g.touches.length>=2){var c=g.touches[0],a=g.touches[1];d=(c.pageX+a.pageX)/2;b=(c.pageY+a.pageY)/2;}else{d=g.touches[0].pageX;b=g.touches[0].pageY;}}else{if(g&&g.pageX&&g.pageY){d=g.pageX;b=g.pageY;}}return this.map.fromPagePixelToContainerPixel(new Point(d,b)); };AndroidTouchBehavior.prototype.setValid=function(a){var b=this.map;if(a){b.mapContainer[0].addEventListener("touchstart",this._touchstart,false);b.mainContainer[0].addEventListener("touchmove",this._touchmove,false);b.mainContainer[0].addEventListener("touchend",this._touchend,false);}else{b.mainContainer[0].removeEventListener("touchmove",this._touchmove,false);b.mainContainer[0].removeEventListener("touchend",this._touchend,false); b.mapContainer[0].removeEventListener("touchstart",this._touchstart,false);b.unbind(this._zoomendlistener);}};AndroidTouchBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");TouchBehavior.prototype.uninitialize.call(this);this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null;this._mouseup=null;this._mousewheel=null;};var TransitBehavior=Y.TransitBehavior=Y.extend(Y.Behavior,function(){}); TransitBehavior.prototype.initialize=function(c){this.enableGuideLayer=true;this.guide=null;this.lastll=null;this.map=c;this.platform={};var a={webkitTransform:"webkitTransformOrigin",MozTransform:"MozTransformOrigin",msTransform:"msTransformOrigin"};for(var b in a){if(this.map.mapContainer[0].style[b]!==void 0){this.platform.transform=b;this.platform.origin=a[b];switch(b){case"webkitTransform":this.platform.gpu="translate3d(0px, 0px, 0px)"; break;default:this.platform.gpu="";}break;}}var d=this;this._movestart=function(){if(d.guide){d.guide.remove();d.guide=null;}d.lastll=null;};this.setValid(true);};TransitBehavior.prototype.pan=function(l,j,a){var g=this;var d=this.map;var c=d.mapContainer;var k=d.currentContainerPosition.copy();var h=6;var o=l/h;var n=j/h;var f=1;b();function b(){d.panning=setTimeout(function(){d.updatePosition(o,n); d.panUpdate();Event.trigger(d,"move");if(++f3||C){c();return;}var w=1;if(!A){w=k;}var u;var B;var e;if(D.transform){x.css(D.origin,h.x+"px "+h.y+"px");}else{e=a.getProjection().getTilePixel();B=[];u=a.mapContainer.find(".yolp-tilelayer").children();var s=0;u.each(function(){var i=$(this).position(); B[s++]=new Y.Point(i.left,i.top);});}function g(){if(w<=k){var z;if(D.transform){if(j>1){z=((j-1)/k*w)+1;}else{if(j<1){z=1-((1-j)/k*w);}}x.css(D.transform,D.gpu+" scale("+z+")");}else{var i=0;if(j>1){z=j-1;u.each(function(){var t;if((t=B[i++])){$(this).css({left:Math.round(t.x+(t.x-h.x)/k*w*z)+"px",top:Math.round(t.y+(t.y-h.y)/k*w*z)+"px",width:Math.ceil(e+e/k*w*z),height:Math.ceil(e+e/k*w*z)});}}); }else{if(j<1){z=1-j;u.each(function(){var t;if((t=B[i++])){$(this).css({left:Math.round(t.x-(t.x-h.x)/k*w*z)+"px",top:Math.round(t.y-(t.y-h.y)/k*w*z)+"px",width:Math.ceil(e-e/k*w*z),height:Math.ceil(e-e/k*w*z)});}});}}}w++;}else{clearInterval(v.zoomAnimation);v.zoomAnimation=null;c();}}function c(){var i=h.x+a.currentContainerPosition.x;var G=h.y+a.currentContainerPosition.y;var F=a.getSize();var z=(F.width/2)-i; var t=(F.height/2)-G;if(j<1){z=-z*j;t=-t*j;}var E=a.checkRange(new Point(z,t));if(v.enableGuideLayer){if(v.guide){v.guide.remove();v.guide=null;}v.guide=a.mapContainer.children(".yolp-tilelayer").clone();v.guide.css({left:(v.guide.position().left-E.x)+"px",top:(v.guide.position().top-E.y)+"px"});a.mapContainer.prepend(v.guide);}if(C){a.pan(E.x,E.y,false,true,o);}else{a.pan(E.x,E.y,false,true);}a.redraw(true); delete v.zoomAnimation;if(v.enableGuideLayer){setTimeout(function(){if(v.guide){v.guide.remove();v.guide=null;}},1000);}if(D.transform){x.css(D.transform,"");x.css(D.origin,"");}b.css({display:"block"});v.is_zooming=false;if(n){Event.trigger(a,"moveend");}Event.trigger(a,"zoomend",d,l);}v.zoomAnimation=setInterval(function(){g();},1);};TransitBehavior.prototype.setValid=function(a){if(a){this.map.bind("movestart",this._movestart); }else{this.map.unbind("movestart",this._movestart);}};var PinchZoomBehavior=Y.PinchZoomBehavior=Y.extend(Y.TransitBehavior,function(){});PinchZoomBehavior.prototype.initialize=function(a){this.map=a;this.setValid(true);};PinchZoomBehavior.prototype.zoom=function(h,l,A,w){var v=this;var b=this.map;if(w){w=false;}var q=b.getCenter(),i=false;if(l){i=!q.equals(l);}else{l=q;}if(i){Event.trigger(b,"movestart"); }var e=b.fromLatLngToDivPixel(l);var j=Math.abs(b.zoom-h);var o=Math.pow(2,j)-1;var r=1-Math.pow(0.5,j);var a=b.zoom;var d=(b.getMinZoom()<=h&&h<=b.getMaxZoom())?h:b.zoom;b.zoom=d;var u=b.mapContainer;var s=b.getMapContainerXY();var x=b.getProjection().getTilePixel();var A=A||false;var f=3;if(A&&l){var g=b.fromLatLngToDivPixel(b.center);var t=b.fromLatLngToDivPixel(l);var n=parseFloat(g.x-t.x)/f;var k=parseFloat(g.y-t.y)/f; }else{var g=b.fromLatLngToDivPixel(b.center);var t=g;var n=0;var k=0;}if(!w){c();return;}function c(){v.animationZoomEnd=setTimeout(function(){var m=y=0;if(A){if(a>d){var B=(n*f)*(o+1);var z=(k*f)*(o+1);}else{var B=(n*f)*(1-r);var z=(k*f)*(1-r);}}else{if(a>d){var B=(e.x-(u.width()/2-s.x))*r;var z=(e.y-(u.height()/2-s.y))*r;}else{var B=((u.width()/2-s.x)-e.x)*o;var z=((u.height()/2-s.y)-e.y)*o;}}var p=null; if(A&&l){p=l;}b.pan(B,z,false,true,p);if(i){Event.trigger(b,"move");}b.redraw(true);Event.trigger(b,"zoomend",d,a);if(i){Event.trigger(b,"moveend");}v.animationZoomEnd=null;},50);}};PinchZoomBehavior.prototype.setValid=function(a){};var AndroidPinchZoomBehavior=Y.AndroidPinchZoomBehavior=Y.extend(Y.Behavior,function(){});AndroidPinchZoomBehavior.prototype.pan=function(l,j,a){var g=this;var d=this.map; var c=d.mapContainer;var k=d.currentContainerPosition.copy();var h=6;var o=l/h;var n=j/h;var f=1;b();function b(){d.panning=setTimeout(function(){d.updatePosition(o,n);d.panUpdate();Event.trigger(d,"move");if(++fe){w.each(function(){var i;if((i=j[$(this).attr("src")])){$(this).css({left:i.orgx-(i.dx*E)*x+"px",top:i.orgy-(i.dy*E)*x+"px",width:G-(i.ds*E)*x,height:G-(i.ds*E)*x});}});if(I){b.updatePosition((t*E)*(u+1),(r*E)*(u+1)); }}}n(E);E++;f();}else{d();}},20);}function c(){if(typeof D.zoomAnimation!=="undefined"){clearTimeout(D.zoomAnimation);delete D.zoomAnimation;}if(D.animationZoomImages!=null){D.animationZoomImages.remove();D.animationZoomImages=null;}if(D.animationZoomEnd){clearTimeout(D.animationZoomEnd);D.animationZoomEnd=null;}if(D.animationZoomOthers){D.animationZoomOthers.show();D.animationZoomOthers=null;}}function n(m){$("#zoomguide").remove(); var p=$("");p.css({position:"relative",left:g.x-15,top:g.y-15});if(a>e){p.addClass("crtl"+(4-m));}else{p.addClass("mgnfctn"+m);}C.append(p);}function d(){$("#zoomguide").remove();D.animationZoomEnd=setTimeout(function(){var i=y=0;if(I){if(a>e){var z=(t*h)*(u+1);var p=(r*h)*(u+1);}else{var z=(t*h)*(1-x);var p=(r*h)*(1-x);}}else{if(a>e){var z=(g.x-(C.width()/2-A.x))*x; var p=(g.y-(C.height()/2-A.y))*x;}else{var z=((C.width()/2-A.x)-g.x)*u;var p=((C.height()/2-A.y)-g.y)*u;}}if(!I&&w){w.each(function(){$(this).css({left:parseFloat($(this).css("left"))-z,top:parseFloat($(this).css("top"))-p});});}var m=null;if(I&&s){m=s;}else{m=b.getCenter();}b.pan(z,p,false,true,m);if(o){Event.trigger(b,"move");}b.redraw(true);if(H){setTimeout(function(){H.show();D.animationZoomOthers=null; },50);}if(D.animationZoomImages){D.removeImagesEvent=setTimeout(function(){if(D.animationZoomImages!=null){D.animationZoomImages.remove();D.animationZoomImages=null;}},1000);}D.is_zooming=false;delete D.zoomAnimation;if(o){Event.trigger(b,"moveend");}D.animationZoomEnd=null;Event.trigger(b,"zoomend",e,a);},50);}};var Point=Y.Point=function(c,d,a){this.x=c||0;this.y=d||0;};Point.prototype.equals=function(a){if(a&&a.valid){return(this.x==a.x&&this.y==a.y);}return false;};Point.prototype.toString=function(){return this.x+","+this.y;};Point.prototype.valid=function(){return true;};Point.prototype.distance=function(c){var b=this.pointDiff(c);return Math.sqrt(b.x*b.x+b.y*b.y);};Point.prototype.pointDiff=function(c){var b=c.x-this.x; var a=this.y-c.y;return(new Point(b,a));};Point.prototype.offset=function(b,a){this.x+=b;this.y+=a;};Point.prototype.copy=function(){return new Y.Point(this.x,this.y);};var Size=Y.Size=function(a,b){this.width=a||0;this.height=b||0;};Size.prototype.equals=function(a){if(a&&a.valid){return(this.width==a.width&&this.height==a.height);}return false;};Size.prototype.hasSmallerSide=function(a){return(this.widththis.bottom())&&(d.bottom()d.bottom())&&(this.bottom()this.bottom())&&(d.top()d.bottom())&&(this.top()this.left())&&(d.right()d.left())&&(this.right()this.left())&&(d.left()d.left())&&(this.left()=this.left())&&(e.left()<=this.right());g=(e.top()>=this.bottom())&&(e.top()<=this.top());a=(e.right()>=this.left())&&(e.right()<=this.right());f=(e.bottom()>=this.bottom())&&(e.bottom()<=this.top()); }else{c=(e.left()>this.left())&&(e.left()this.bottom())&&(e.top()this.left())&&(e.right()this.bottom())&&(e.bottom()=this.minX&&a.x<=this.maxX)&&(a.y>=this.minY&&a.y<=this.maxY);};Bounds.prototype.extend=function(a){}; var LatLng=Y.LatLng=function(d,c,e){this.Lat=(typeof d==="number")?d:parseFloat(d)||0;this.Lon=(typeof c==="number")?c:parseFloat(c)||0;if(!e){this.unbound();}this.unbounded=e;this.isLatLng=true;};LatLng.prototype.unbound=function(){var d=this.Lat;var c=this.Lon;if(Math.abs(d)>180){d%=180;}if(d<-90){d+=180;}else{if(d>90){d-=180;}}if(Math.abs(c)>360){c%=360;}if(c<-180){c+=360;}else{if(c>180){c-=360; }}this.Lat=d;this.Lon=c;};LatLng.prototype.lat=function(){return this.Lat;};LatLng.prototype.lng=function(){return this.Lon;};LatLng.prototype.setLat=function(a){this.Lat=a;};LatLng.prototype.setLng=function(a){this.Lon=a;};LatLng.prototype.copy=function(){return new Y.LatLng(this.Lat,this.Lon,this.unbounded);};LatLng.prototype.greater=function(a){if(a&&a.valid){return(this.Lat>a.Lat&&this.Lon>a.Lon); }return false;};LatLng.prototype.equals=function(a){var b=1e-11;return(Math.abs(this.lat()-a.lat())1){f=1;}}var b=Math.acos(f);return a*b;};LatLng.prototype.angle=function(g){var d=this.lng()*Math.PI/180; var f=this.lat()*Math.PI/180;var c=g.lng()*Math.PI/180;var e=g.lat()*Math.PI/180;var b=c-d;var a=Math.log(Math.tan(Math.PI/4+e/2))-Math.log(Math.tan(Math.PI/4+f/2));var h=Math.acos(b/Math.sqrt(b*b+a*a))*180/Math.PI;if(a<0){h=180+180-h;}h-=90;if(h<0){h+=360;}return 360-h;};LatLng.prototype.detachedLatLng=function(b,a){var d=6366707;var e=this.lat();var c=this.lng();if(a){c=(a/(d*Math.cos(this.lat()*Math.PI/180)))*(180/Math.PI)+this.lng(); }if(b){e=(b/d)*(180/Math.PI)+this.lat();}return new Y.LatLng(e,c);};LatLng.prototype.pointDiff=function(b){if(!b){return;}var a=this.Lat-b.Lat;var c=b.Lon-this.Lon;return(new LatLng(a,c));};LatLng.prototype.middle=function(c){var b=(this.Lat+c.Lat)/2;var a=(this.Lon+c.Lon)/2;return(new LatLng(b,a));};LatLng.prototype.setgeobox=function(a){this.LatMax=(this.Lat>a.Lat)?this.Lat:a.Lat;this.LatMin=(this.Lat>a.Lat)?a.Lat:this.Lat; this.LonMax=(this.Lon>a.Lon)?this.Lon:a.Lon;this.LonMin=(this.Lon>a.Lon)?a.Lon:this.Lon;this.min=new LatLng((this.Lat>a.Lat)?a.Lat:this.Lat,(this.Lon>a.Lon)?a.Lon:this.Lon);this.max=new LatLng((this.Lat>a.Lat)?this.Lat:a.Lat,(this.Lon>a.Lon)?this.Lon:a.Lon);};LatLng.prototype.toString=function(){return this.lat()+","+this.lng();};LatLng.prototype.toUrlValue=function(){return this.lng()+","+this.lat(); };LatLng.fromUrlValue=function(b){if(typeof(b)!="string"){return b;}var a=b.split(",");if(a.length<2){return b;}return new Y.LatLng(a[1],a[0]);};LatLng.fromString=function(a,b){var a=(a instanceof String)?a.toString():a;var b=(b instanceof String)?b.toString():b;if(typeof a!=="string"||typeof b!=="string"){return new Y.LatLng(0,0);}var c=function(l){var j="/";var g=(l.charAt(0)==="-")?-1:1;var h=l.split(j); var f=h.length;var k=0,e=0,i=0;if(f>=1){k=parseFloat(Math.abs(h[0])/1);}if(f>=2){e=parseFloat(h[1]/60);}if(f>=3){i=parseFloat(h[2]/3600);}return g*(k+e+i);};return new Y.LatLng(c(a),c(b));};var LatLngBounds=Y.LatLngBounds=function(){var m,g;if(arguments.length==2){m=arguments[0];g=arguments[1];}else{if(arguments.length==1){var n=arguments[0];if(n.length<1){return null;}var f=maxX=n[0].lng();var d=maxY=n[0].lat(); for(var h=0,e=n.length;h360){m=new LatLng(m.lat(),-180);g=new LatLng(g.lat(),180);}else{var k=m.lng();if(k==Number.POSITIVE_INFINITY){k=-180;}else{if(k==Number.NEGATIVE_INFINITY){k=180;}}while(k>180){k-=360; }while(k<-180){k+=360;}var j=g.lng();if(j==Number.POSITIVE_INFINITY){j=-180;}else{if(j==Number.NEGATIVE_INFINITY){j=180;}}while(j>180){j-=360;}while(j<-180){j+=360;}m=new LatLng(m.lat(),k);g=new LatLng(g.lat(),j);}this.sw=m;this.ne=g;}this.isLatLngBounds=true;};LatLngBounds.prototype.equals=function(a){return(this.sw.equals(a.sw)&&this.ne.equals(a.ne));};LatLngBounds.prototype.isEmpty=function(){return(!this.ne||!this.sw); };LatLngBounds.prototype.extend=function(a){if(!a){return;}if(this.isEmpty()){this.sw=a.copy();this.ne=a.copy();}if(this.sw.lat()>a.lat()){this.sw.Lat=a.lat();}if(this.sw.lng()>a.lng()){this.sw.Lon=a.lng();}if(this.ne.lat()this.sw.lng()){var b=this.ne.lng()-this.sw.lng();}else{var b=(180-this.sw.lng())+(180+this.ne.lng());}return new LatLng(a,b);};LatLngBounds.prototype.left=function(){return this.sw.lng();};LatLngBounds.prototype.right=function(){return this.ne.lng();};LatLngBounds.prototype.top=function(){return this.ne.lat(); };LatLngBounds.prototype.bottom=function(){return this.sw.lat();};LatLngBounds.prototype.containsLatLng=function(c,a){if(a==null){a=true;}var b=false;if(a){b=((c.lng()>=this.left())&&(c.lng()<=this.right())&&(c.lat()>=this.bottom())&&(c.lat()<=this.top()));}else{b=((c.lng()>this.left())&&(c.lng()this.bottom())&&(c.lat()=this.left())&&(e.left()<=this.right());g=(e.top()>=this.bottom())&&(e.top()<=this.top());a=(e.right()>=this.left())&&(e.right()<=this.right());f=(e.bottom()>=this.bottom())&&(e.bottom()<=this.top());}else{c=(e.left()>this.left())&&(e.left()this.bottom())&&(e.top()this.left())&&(e.right()this.bottom())&&(e.bottom()this.bottom())&&(d.bottom()d.bottom())&&(this.bottom()this.bottom())&&(d.top()d.bottom())&&(this.top()this.left())&&(d.right()d.left())&&(this.right()this.left())&&(d.left()d.left())&&(this.left()1){var m=new Y.LatLng(i[f],i[j]);e.push(m);}});}}else{if($.isArray(h)){for(var d in h){if(h[d].lat){var g=new Y.LatLng(h[d].lat,h[d].lon);}else{var g=new Y.LatLng(h[d].Lat,h[d].Lon);}e.push(g);}}else{if(h.lat){var g=new Y.LatLng(h.lat,h.lon);e.push(g);}else{if(h.Lat){var g=new Y.LatLng(h.Lat,h.Lon); e.push(g);}}}}return e;},encodeCoordinates:function(b,c,a){if(a){var h=0;var e=1;}else{var e=0;var h=1;}c=c||" ";var g=[];for(var d in b){if(b[d].isLatLng){var f=[];f[h]=b[d].lat();f[e]=b[d].lng();f.join(",");}g.push(f);}return g.join(c);},roundDigit:function(b,a){return Math.round((b+1/Math.pow(10,a+1))*Math.pow(10,a))/Math.pow(10,a);},isJapan:function(d,b){var c=[{max:{lat:21.2,lon:136.7},min:{lat:20.2,lon:135.5}},{max:{lat:29.5,lon:154.5},min:{lat:21.2,lon:122.5}},{max:{lat:33.7,lon:130},min:{lat:29.5,lon:127.3}},{max:{lat:37.2,lon:138},min:{lat:29.5,lon:130}},{max:{lat:45.75,lon:149.2},min:{lat:29.5,lon:138}},{max:{lat:34.8,lon:130},min:{lat:33.7,lon:129}},{max:{lat:39.3,lon:138},min:{lat:37.2,lon:131.35}}]; var a=false;$.each(c,function(e,f){if(!a&&f.min.lat1;var j=("ontouchstart" in window);var i=("ongesturestart" in window);var p=(o||n)&&j;var d=(o||n)&&i;if(o&&/; CPU.*OS (?:3_2|4_0)/i.test(a)){$.fn.Oldoffset=$.fn.offset;$.fn.offset=function(){var q=$(this).Oldoffset();q.top-=window.scrollY;q.left-=window.scrollX;return q;};}var m=location.protocol==="https:"; return{osVersion:l,isIOS:o,isIPhone:c,isAndroid:n,isMac:k,isWin:g,isRetinaDisplay:e,isSupportAlphaChanel:b,isSupportTouchScroll:p,isSupportPinchZoom:d,isSecure:m,devicePixelRatio:(window.devicePixelRatio||1)};})(navigator.userAgent.toLowerCase());Y.Util.IS_LEGACY_MSIE=!Util.Platform.isSupportAlphaChanel;Y.Util.MSIE_BLANK_IMG="http://i.yimg.jp/images/map/api/blank.gif";Y.Util.IS_TOUCH_SCREEN=Util.Platform.isSupportTouchScroll; Y.Cache={_data:{},set:function(a,b){this._data[a]=b;},get:function(a){return this._data[a];},has:function(a){return this.get(a)!=null;},clear:function(){this._data={};}};Y.Cache.KEY_PLOT_LAYER="label";$.extend({removeArray:function(b,a){$.grep(b,function(d,c){return(d!=a);});}});$.fn.extend({stopMousePropagation:function(){function a(b){b.stopPropagation();}this.bind("mousedown",a);this.bind("click",a); this.bind("dblclick",a);this.bind("mousewheel",a);return this;}});$.fn.extend({disableImageSelect:function(){if(this.css("MozUserSelect")!=undefined){this.css("MozUserSelect","none");}else{this[0].unselectable="on";this[0].galleryImg="no";}return this;}});$.fn.extend({loadAlphaImage:function(e){if(!Y.Util.IS_LEGACY_MSIE){return this;}var f=this.attr("src");if(!(/\.(png)$/i).test(f)){return this;}var e=$.extend({blankImg:Y.Util.MSIE_BLANK_IMG},e); var a="DXImageTransform.Microsoft.AlphaImageLoader";var g="progid:"+a+"(src='__SRC__',sizingMethod='image');";var d=e.blankImg;var c=e.size||new Size(this.attr("width"),this.attr("height"));var b=this.attr("filters");if(b&&b[a]){b[a].enabled=true;b[a].src=d;b[a].sizingMethod="image";}else{this.css("filter",g.replace("__SRC__",f)).attr("src",d);}if(c.width!==0&&c.height!==0){return this.attr({width:c.width,height:c.height}); }else{return this;}}});Y.Util._later_timer={};$.extend({later:function(f,d,c){var e=Y.Util._later_timer;c=c||"_global";if(e[c]){clearTimeout(e[c]);}var a=f.arguments||[];var b=function(){f.apply(this,a);};e[c]=setTimeout(b,d);}});var DraggableObject=Y.DraggableObject=function(b,l){l=l||{};l.container=l.container||$(window.document.body);l.handle=l.handle||b;l.disableMove=l.disableMove||false;var b=$(b);var g=$(l.handle);var a=$(l.container);$(b).css({position:"absolute"});var f=this;var j=false;var h;var c=false;var i=null;var d=function(n){var m;var o;if(Y.Util.IS_TOUCH_SCREEN){m=n.originalEvent.touches[0].pageX;o=n.originalEvent.touches[0].pageY; }else{m=n.pageX;o=n.pageY;}i=b.position();n.stopPropagation();n.preventDefault();j=true;c=false;h=new Point(m,o);DraggableObject.dragging=true;if(Y.Util.IS_TOUCH_SCREEN){a.bind("touchmove",k);a.bind("touchend",e);}else{a.bind("mousemove",k);a.bind("mouseup",e);}Event.trigger(f,"dragstart",h);};var k=function(q){if(!j){return;}var n;var m;if(Y.Util.IS_TOUCH_SCREEN){n=q.originalEvent.touches[0].pageX-h.x; m=q.originalEvent.touches[0].pageY-h.y;}else{n=q.pageX-h.x;m=q.pageY-h.y;}if(!l.disableMove){var p=i.left+n;var o=i.top+m;b.css({left:p+"px",top:o+"px",bottom:"",right:""});i.left=p;i.top=o;}c=true;if(Y.Util.IS_TOUCH_SCREEN){h=new Point(q.originalEvent.touches[0].pageX,q.originalEvent.touches[0].pageY);}else{h=new Point(q.pageX,q.pageY);}q.preventDefault();q.stopPropagation();Event.trigger(f,"drag",h); };var e=function(n){if(!j){return;}j=false;DraggableObject.dragging=false;if(c){var m=parseFloat(b.css("left"));var o=parseFloat(b.css("top"));Event.trigger(f,"dragend",new Point(m,o));}if(Y.Util.IS_TOUCH_SCREEN){a.unbind("touchmove",k);a.unbind("touchend",e);}else{a.unbind("mousemove",k);a.unbind("mouseup",e);}};if(Y.Util.IS_TOUCH_SCREEN){g.bind("touchstart",d);}else{g.bind("mousedown",d);}this.clearDrag=function(){if(Y.Util.IS_TOUCH_SCREEN){g.unbind("touchstart",d); }else{g.unbind("mousedown",d);}};};var _stacks=[];var Request=Y.Request=function(){};Request.prototype.request=function(b){var a=this;if($.browser.msie&&$.browser.version=="6.0"){$.ajax(b);}else{if(this.is_cache(b)){b.success(this.load(b));}else{if(!this.is_wait(b)){$.ajax({url:b.url,data:b.data,dataType:b.dataType,success:function(c){a.save(b,c);a.free(b);b.success(c);},error:b.error});}}}};Request.prototype.is_wait=function(b){var a=Y.Cache.get(this.hash(b)); if(a==""){_stacks.push(b.success);return true;}else{Y.Cache.set(this.hash(b),"");return false;}};Request.prototype.free=function(b){for(var a=0;a<_stacks.length;a++){_stacks[a](this.load(b));}_stacks=[];};Request.prototype.save=function(b,a){Y.Cache.set(this.hash(b),a);};Request.prototype.is_cache=function(b){var a=Y.Cache.get(this.hash(b));if(a!==undefined&&a!==""){return true;}return false;};Request.prototype.load=function(a){return Y.Cache.get(this.hash(a)); };Request.prototype.hash=function(b){var a=b.url;for(param in b.data){a+=b.data[param];}return a;};var InfoWindow=Y.InfoWindow=function(b,a,d,c){function e(h){if(typeof h==="string"){var g=$('
'+h+"
"),f=Y.Util.Platform;if(f.isSupportTouchScroll){g.css("-webkit-overflow-scrolling","touch");}return g;}else{return $(h);}}this.options=c||{};this.options.image=this.options.image||InfoWindow.IMAGE_DEFAULT_GRAY;this.margin=this.options.margin||{left:10,top:50,right:10,bottom:20}; this.padding=this.options.padding||{left:14,top:20,right:14,bottom:87};this.maxPadding=this.options.maxPadding||{left:14,top:20,right:14,bottom:36};this.maxContent=this.options.maxContent||null;if(this.maxContent){this.maxContent=e(this.maxContent);}this._maximize=this.options.maximize||false;this.container=$(b);this.content=e(d);this.open(a);};InfoWindow.IMAGE_DEFAULT_GRAY="http://i.yimg.jp/images/map/api/yolp/images/yolp_f_bg.png"; InfoWindow.prototype.hide=function(){this.node.hide();this._hidden=true;};InfoWindow.prototype.show=function(){this.node.show();this._hidden=false;};InfoWindow.prototype.isHidden=function(){return this._hidden;};InfoWindow.prototype.close=function(){this.hide();this.node.remove();this.content.remove();if(this.maxContent){this.maxContent.remove();}Y.Event.trigger(this,"close");};InfoWindow.prototype.getMinSize=function(){return new Y.Size(230,100); };InfoWindow.prototype.getMaxSize=function(){var d=690;var b=690;var a=this.container.width()-this.margin.left-this.margin.right-5;var c=this.container.height()-this.margin.top-this.margin.bottom-5;if(d>a){d=a;}if(b>c){b=c;}return new Y.Size(d,b);};InfoWindow.prototype.setPosition=function(a){this.position=a;if(this._maximize){this.createMaxWindow();}else{this.createWindow();}};InfoWindow.prototype.getWindowPosition=function(){var a=parseInt(this.node.css("left")); var b=parseInt(this.node.css("top"));return new Y.Point(a,b);};InfoWindow.prototype.getWindowSize=function(){var a=parseInt(this.node.width());var b=parseInt(this.node.height()+this.anchor.height());return new Y.Size(a,b);};InfoWindow.prototype.isMaximize=function(){return this._maximize;};InfoWindow.prototype.open=function(a){this._hidden=false;if(a){this.position=a;}if(this._maximize){this.createMaxWindow(); }else{this.createWindow();}if(this._maximize){var f=this.maxContent.find("img");}else{var f=this.content.find("img");}var b=0;var d=0;var e=this;if(f.length>0){$.each(f,function(){if(!this.complete){b++;$(this).bind("load",function(){$(this).show();d++;if(d>=b){if(e._maximize){e.createMaxWindow();}else{e.createWindow();}Y.Event.trigger(e,"load");}});}if(b<=0){c();}});}else{c();}function c(){setTimeout(function(){Y.Event.trigger(e,"load"); },100);}};InfoWindow.prototype.maximize=function(){this._maximize=true;this.open();Y.Event.trigger(this,"maximizeend");};InfoWindow.prototype.restore=function(){this._maximize=false;this.open();Y.Event.trigger(this,"restoreend");};InfoWindow.prototype.evacuateContent=function(){this.content.addClass("infowindow-content");this.content.hide();this.container.append(this.content);if(this.maxContent){this.maxContent.addClass("infowindow-content"); this.maxContent.addClass("infowindow-content-max");this.maxContent.hide();this.container.append(this.maxContent);}};InfoWindow.prototype.createWindow=function(){this.evacuateContent();this.content.css("position","absolute");this.content.css("width","");this.content.css("height","");var h=this.getMaxSize();var f=this.getMinSize();var c=this.content.width()+this.padding.left+this.padding.right;if(c>h.width){c=h.width; }if(ch.height){e=h.height;this.content.css("overflow","auto");}var d=e-this.padding.top-this.padding.bottom;this.content.css("height",d+"px");this.content.css("position","");var a=this.position.x-c/2;var g=this.position.y-e; this.createWindowHtml(this.content,a,g,c,e,(this.maxContent!=null),false);};InfoWindow.prototype.createMaxWindow=function(){var h=this.getMaxSize();var f=this.getMinSize();var c=h.width;var e=h.height;var b=c-this.maxPadding.left-this.maxPadding.right;var d=e-this.maxPadding.top-this.maxPadding.bottom;this.maxContent.css("position","absolute");this.maxContent.css("position","relative");this.maxContent.css("overflow","auto"); this.maxContent.css("width",b+"px");this.maxContent.css("height",d+"px");var a=this.position.x-c/2-12;var g=this.position.y-e;this.createWindowHtml(this.maxContent,a,g,c,e,false,true);};InfoWindow.prototype.createWindowHtml=function(f,j,i,d,l,a,g){var e=this;if(this.node){this.evacuateContent();this.node.empty();this.node.css({left:j+"px",top:i+"px"});}else{this.node=$('
'); }var b=this.node;var k=$('
');b.append(k);var h=$("").disableImageSelect();k.append(h);var c=$('');h.append(c);if(g){this.anchor=$('
').append($('').loadAlphaImage()); }else{this.anchor=$('
').append($('').loadAlphaImage());}c.append(this.anchor.disableImageSelect());if(a){c.append($('\u8a73\u7d30\u3092\u898b\u308b').bind("click",function(m){e.maximize(); m.stopPropagation();}));}if(g){c.append($('\u5143\u306e\u30b5\u30a4\u30ba\u306b\u623b\u3059').bind("click",function(m){e.restore();m.stopPropagation();}));}c.append($('\u9589\u3058\u308b').bind("click",function(m){e.close(); m.stopPropagation();}));h.append($(''));h.append($(''));k.append(h);k.append($('').append($('')).append($('').append(f)).append($('').disableImageSelect())); k.append($('').disableImageSelect());f.show();this.container.append(b);if(Y.Util.IS_TOUCH_SCREEN){b[0].addEventListener("touchstart",function(m){m.stopPropagation(); },false);f[0].addEventListener("touchstart",function(m){m.stopPropagation();},false);}else{b.stopMousePropagation();f.stopMousePropagation();}};var Projection=Y.Projection=function(){};Projection.prototype.fromLatLngToPixel=function(b,a){};Projection.prototype.fromPixelToLatLng=function(a,b){};Projection.prototype.getWrapWidth=function(a){return Infinity;};var MercatorProjection=Y.MercatorProjection=Y.extend(Y.Projection,function(b,a){a=a||{};this.tileSize=b||Y.DEFAULT_TILE_SIZE;this.earthRadius=a.earthRadius||6378137;this.initialResolution=2*Math.PI*this.earthRadius/this.tileSize;this.originShift=2*Math.PI*this.earthRadius/2;this.scrollRange={};this.scrollRange.enable=true;this.scrollRange.top=-84.99999;this.scrollRange.bottom=85;});MercatorProjection.prototype.fromTileToLatLng=function(c,b,a,f,d){var e=this.fromTileToPixel(c,b,a,f,d); return this.fromPixelToLatLng(e,d);};MercatorProjection.prototype.fromLatLngToPixel=function(c,b){var a=this.fromLatLngToMeters(c);return this.fromMetersToPixel(a,b);};MercatorProjection.prototype.fromLatLngToTile=function(c,a){var b=this.fromLatLngToPixel(c,a);return this.fromPixelToTile(b,a);};MercatorProjection.prototype.fromPixelToLatLng=function(b,c,d){var a=this.fromPixelToMeters(b,c);return this.fromMetersToLatLng(a,d); };MercatorProjection.prototype.resolution=function(a){return this.initialResolution/Math.pow(2,a-1);};MercatorProjection.prototype.tileLength=function(a){return Math.pow(2,a-1);};MercatorProjection.prototype.fromLatLngToMeters=function(c){var b=c.lng()*this.originShift/180;var a=Math.log(Math.tan((90+c.lat())*Math.PI/360))/(Math.PI/180);a=a*this.originShift/180;return new Y.Point(b,a);};MercatorProjection.prototype.fromMetersToLatLng=function(a,d){var c=(a.x/this.originShift)*180; var b=(a.y/this.originShift)*180;b=180/Math.PI*(2*Math.atan(Math.exp(b*Math.PI/180))-Math.PI/2);return new Y.LatLng(b,c,d);};MercatorProjection.prototype.fromPixelToMeters=function(d,b){var a=this.resolution(b);d.y=d.y+this.tileLength(b)/2*this.tileSize;var e=d.x*a-this.originShift;var c=d.y*a-this.originShift;return new Y.Point(e,c);};MercatorProjection.prototype.fromMetersToPixel=function(a,e){var d=this.resolution(e); var c=(a.x+this.originShift)/d;var b=(a.y+this.originShift)/d;b=b-this.tileLength(e)/2*this.tileSize;return new Y.Point(c,b);};MercatorProjection.prototype.fromPixelToTile=function(e,d){var g=Math.abs(e.y);var c=Math.floor(e.x/this.tileSize);var b=Math.floor(g/this.tileSize);var a=e.x%this.tileSize;var f=g%this.tileSize;if(e.y<0){b=-b;var f=g%this.tileSize;if(f&&f>0){b--;f=this.tileSize-f;}}return{tx:c,ty:b,x:a,y:f}; };MercatorProjection.prototype.fromTileToPixel=function(c,b,a,g,f){var e=c*this.tileSize+a;var d=b*this.tileSize+g;return new Y.Point(e,d);};MercatorProjection.prototype.getWrapWidth=function(a){return(1<<(a-1))*this.tileSize;};MercatorProjection.prototype.setTilePixel=function(a){this.tileSize=a;this.initialResolution=2*Math.PI*this.earthRadius/this.tileSize;};MercatorProjection.prototype.getTilePixel=function(){return this.tileSize; };var TokyoMercatorProjection=Y.TokyoMercatorProjection=Y.extend(Y.MercatorProjection,function(b,a){Y.MercatorProjection.apply(this,[b,a]);});TokyoMercatorProjection.prototype.WgsToTokyo=function(a){return this.BesslWgs(1,a);};TokyoMercatorProjection.prototype.TokyoToWgs=function(a){return this.BesslWgs(0,a);};TokyoMercatorProjection.prototype.BesslWgs=function(h,q){function a(f){return f*180/Math.PI; }function B(f){return f*Math.PI/180;}var t=1e-15;var n=Math.PI;var e=new Array(2);e[0]=6377397.155;e[1]=6378137;var O=new Array(2);O[0]=1/299.152813;O[1]=1/298.257223563;var r=new Array(2);r[0]=O[0]*(2-O[0]);r[1]=O[1]*(2-O[1]);var d=new Array(2);var c=new Array(2);var b=new Array(2);d[0]=-146.43;c[0]=507.89;b[0]=681.46;d[1]=146.43;c[1]=-507.89;b[1]=-681.46;var u=h;var H=1-h;var I=B(q.lat());var N=B(q.lng()); var k=0;var o=e[u]/Math.sqrt(1-r[u]*Math.sin(I)*Math.sin(I));var K=(o+k)*Math.cos(I)*Math.cos(N);var j=(o+k)*Math.cos(I)*Math.sin(N);var A=(o*(1-r[u])+k)*Math.sin(I);var G=K+d[u];var F=j+c[u];var E=A+b[u];var J=Math.sqrt(G*G+F*F);var D=E/J;var m=Math.sqrt((1-r[H])*D*D+1);var v=m*m*m;var w=D-E/J-e[H]*r[H]*D/J/m;var l=1-e[H]*r[H]/J/v;var C=D-w/l;var M;for(var L=0;(w>t||-t>w)&&L<10;L++){D=C;m=Math.sqrt((1-r[H])*D*D+1); v=m*m*m;M=e[H]*r[H]/J;w=D-E/J-M*D/m;l=1-M/v;C=D-w/l;}var P=Math.atan2(C,1);var g=Math.atan2(F,G);var s=e[H]/Math.sqrt(1-r[H]*Math.sin(P)*Math.sin(P));return new Y.LatLng(a(P),a(g));};TokyoMercatorProjection.prototype.fromLatLngToMeters=function(b){var a=this.TokyoToWgs(b);return MercatorProjection.prototype.fromLatLngToMeters.apply(this,[a]);};TokyoMercatorProjection.prototype.fromMetersToLatLng=function(a,c){var b=MercatorProjection.prototype.fromMetersToLatLng.apply(this,[a,c]); return this.WgsToTokyo(b);};var Event=Y.Event=function(){};Event.addListener=function(d,a,f,e){var c=$(d);var b=function(){if(!e){e=d;}var g=[];for(var j=1,h=arguments.length;j');}if(!this.iconSize){this.iconSize=Y.Cache.get("iconsize:"+this.image); if(!this.iconSize){a.hide();var b=this;a.bind("load",function(){b.iconSize=new Size(a.width(),a.height());Y.Cache.set("iconsize:"+b.image,b.iconSize);b.setIconStyle(a);a.show();});return a;}}this.setIconStyle(a);return a;};Icon.prototype.setIconStyle=function(b){if(!this.iconAnchor){this.iconAnchor=new Point(this.iconSize.width/2,this.iconSize.height);}if(!this.infoWindowAnchor){this.infoWindowAnchor=new Point(this.iconSize.width/2,0); }if(!this.labelAnchor){this.labelAnchor=new Point(this.iconSize.width/2,-this.iconSize.height/3*2);}b.attr("width",this.iconSize.width);b.attr("height",this.iconSize.height);b.loadAlphaImage({size:this.iconSize}).css({marginLeft:-this.iconAnchor.x,marginTop:-this.iconAnchor.y});b.disableImageSelect();var a=Y.Util.Platform.isRetinaDisplay;if(a){b.css("-webkit-transform","translate3d(0px, 0px, 0px)"); }};Y.Icon.DEFAULT_ICONURL="http://i.yimg.jp/images/map/icon/pin_crimson_s/shape/icon_0.png";Y.Icon.DEFAULT_ICON=new Y.Icon(Y.Icon.DEFAUTL_ICONURL);Y.Icon.HOME_ICONURL="http://i.yimg.jp/images/map/icon/pin_home_m/shape/home.png";var Style=Y.Style=function(b,d,c,a,e){this.color=b;this.weight=(typeof d==="undefined")?1:d;this.opacity=(typeof c==="undefined")?1:c;this.startline=a||"";this.endline=e||"";};var YDF=Y.YDF=function(d){this.result={};this.features=[];if(d.ResultInfo){this.result.count=parseInt(d.ResultInfo.Count,10);this.result.total=parseInt(d.ResultInfo.Total,10);this.result.start=parseInt(d.ResultInfo.Start,10);this.result.end=parseInt(this.result.start,10)+parseInt(this.result.count,10)-1;this.result.description=Y.Util.stripScript(d.ResultInfo.Description);this.result.status=parseInt(d.ResultInfo.Status,10); this.result.copyright=Y.Util.stripScript(d.ResultInfo.Copyright,10);this.result.letency=parseFloat(d.ResultInfo.Latency,10);}else{if(d.Result){this.result.count=parseInt(d.Result.Count,10);this.result.total=parseInt(d.Result.Total,10);this.result.start=parseInt(d.Result.Start,10);this.result.end=parseInt(this.result.start,10)+parseInt(this.result.count,10)-1;this.result.description=Y.Util.stripScript(d.Result.Description,10); }else{if(d.Error){this.result.count=this.result.total=this.result.start=this.result.end=0;this.error={};this.error.message=d.Error.Message;if(d.Error.Detail){this.error.code=d.Error.Detail.Code;}}}}if(d.Dictionary){this.result.dictionary=d.Dictionary;}this.styles=[];this.result.bounds=new Y.LatLngBounds();var c=d.Style;if(!c&&d.Dictionary&&d.Dictionary.Style){c=d.Dictionary.Style;}if(c){for(var a in c){if(c.hasOwnProperty(a)){var b=c[a]; this.styles[b.Id]=b;}}}var e=this;if(d.Feature){$.each(d.Feature,function(f,h){var g=e.parseFeature(h);if(g){e.features.push(g);e.result.bounds.extend(g.getLatLng());}});}else{if(d.ResultInfo&&d.Result){$.each(d.Feature,function(f,h){var g=e.parseFeature(h);if(g){e.features.push(g);e.result.bounds.extend(g.getLatLng());}});}else{if(d.Item){$.each(d.Item,function(f,h){var g=e.parseFeature(h);if(g){e.features.push(g); e.result.bounds.extend(g.getLatLng());}});}}}};YDF.prototype.parseFeature=function(e){var c=null;var d=e.Geometry;if(!d){d={};d.Type="point";if(e.Property&&e.Property.Lon&&e.Property.Lat){d.Coordinates=e.Property.Lon+","+e.Property.Lat;}}else{if($.isArray(d)){d=d[0];}}var k={id:e.Id,gid:e.Gid,name:Y.Util.stripScript(e.Name),category:e.Category,description:Y.Util.stripScript(e.Description),property:e.Property,route:e.RouteInfo}; var g=e.Style;if(g){if(!$.isArray(g)){g=[g];}for(var b in g){if(g.hasOwnProperty(b)){var a=g[b];if(!a){continue;}if(a.Target){a=this.styles[a.Target];}if(!a||!a.Type){continue;}switch(a.Type){case"icon":k.icon=new Y.Icon(a.Image);if(a.Size){var j=a.Size.split(",");k.icon.iconSize=new Y.Size(j[0],j[1]);}if(a.Anchor){var h=a.Anchor.split(",");k.icon.iconAnchor=new Y.Point(h[0],h[1]);}break;case"fill":k.fillStyle=new Y.Style(a.Color,a.Size,a.Opacity/100); break;case"line":k.strokeStyle=new Y.Style(a.Color,a.Size,a.Opacity/100,a.EndLine,a.StartLine);break;}}}}return this.parseGeometry(d,k);};YDF.prototype.parseGeometry=function(g,b){var i=this;var a=g.Radius?this.parseRadius(g.Radius):null;var e=g.Coordinates?Y.Util.parseCoordinates(g.Coordinates):null;if(g.Exterior){e=g.Exterior.Coordinates?Y.Util.parseCoordinates(g.Exterior.Coordinates):null;}var d=null; if((!e||e.length<0|!e[0])&&g.Type!="multigeometry"){d=new Y.NonGeometry(b);}else{switch(g.Type){case"point":d=new Y.Marker(e[0],b);break;case"polyline":case"linestring":d=new Y.Polyline(e,b);break;case"polygon":if(g.Interior){var h=[];$.each(g.Interior.Coordinates,function(f,k){var j=k?Y.Util.parseCoordinates(k):null;h.push(new Y.Polygon(j));});d=new Y.Patch(h,new Y.Polygon(e),b);}else{d=new Y.Polygon(e,b); }break;case"circle":b.unit="km";d=new Y.Circle(e[0],a,b);break;case"ellipse":b.unit="km";d=new Y.Circle(e[0],a,b);break;case"multigeometry":if(g.Geometry){var c=[];$.each(g.Geometry,function(f,j){c.push(i.parseGeometry(j,b));});d=new Y.Multi(c,b);}break;default:d=new Y.Marker(e[0],b);break;}}return d;};YDF.prototype.parseRadius=function(a){var b=a.split(",");if(b.length>=2){return new Y.Size(b[0]/1000,b[1]/1000); }else{return parseInt(a,10)/1000;}};var Log=Y.Log={};Log.id="ymapdebug";Log.initialized=false;Log.initialize=function(i,f){if(this.initialized){return;}var i=new Size(400,200);var h=$(window.document).width()-i.width-30;var g=$(window.document).height()-i.height-20-30;var b='
';this.node=$(b);var a={display:"none",position:"absolute",background:"#EEEEEE",left:h+"px",top:g+"px",width:i.width+"px",height:(i.height+20)+"px",zIndex:999,borderStyle:"solid"}; var e={width:i.width+"px",height:i.height+"px",background:"#ffffff",overflow:"auto"};this.node.css(a);var d=$('
Log
');var c=this;d.append($(' clear').bind("click",function(){c.clear();}));d.append($(' close').bind("click",function(){c.hide(); }));this.node.append(d);this.body=$("
");this.body.css(e);this.node.append(this.body);$(document.body).append(this.node);this.initialized=true;this.visible=false;this.count=0;this.drag=new DraggableObject(this.node,{handle:d});};Log.print=function(a){this.initialize();if(this.visible){this.body.prepend("
"+(++this.count)+":"+a+"
");this.body.attr("scrollTop",0);}};Log.clear=function(){this.body.empty(); };Log.hide=function(){this.node.hide();this.visible=false;};Log.show=function(){this.initialize();this.node.show();this.visible=true;};Log.write=function(a){this.print(a);};Log.props=function props(l,q){if(l===null){this.print("props called with null argument","error");return;}if(l===undefined){this.print("props called with undefined argument","error");return;}var n=["Methods","Fields","Unreachables"]; var f=[[],[],[]];var d,h,k;var b=0;for(d=l;d;d=d.__proto__){for(k=0;k=2){latlon[i]=latlon_cp[i-2]-latlon_cp[i];}if(latlon[i]<0){latlon[i]=Math.abs(latlon[i]);plus[i]=1;}else{plus[i]=0; }latlon[i]=latlon[i].toString(2);latlon[i]=latlon[i]+plus[i];}merge=new Array();for(i=0,k=0;ij;j++){str+="0";}latlon[i]=str+latlon[i];}else{if(lat_digit!=lon_digit){diff=lat_digit-lon_digit;for(j=0,str="";diff>j;j++){str+="0";}latlon[i+1]=str+latlon[i+1]; }}five_diff=5-latlon[i].length%5;if(five_diff<5){for(j=0,str="";five_diff>j;j++){str+="0";}latlon[i]=str+latlon[i];latlon[i+1]=str+latlon[i+1];}resolution_lat=new Array();resolution_lon=new Array();for(j=0;j0;a--){b+="0";}five_poi[j]=b.concat(five_poi[j]);}merge="";for(j=0;j=e.minZoom){return true; }}return false;};var Copyright=Y.Copyright=function(d,a,c,b){this.id=d;this.minZoom=c;this.bounds=a;this.text=b;};var Feature=Y.Feature=function(){};Feature.prototype.initialize=function(a){this.layer=a;this.drawn=false;};Feature.prototype.draw=function(a){Y.Log.write("not implement");};Feature.prototype.adjust=function(){Y.Log.write("not implement");};Feature.prototype.remove=function(){Y.Log.write("not implement");};Feature.prototype.getLayer=function(){return this.layer;};Feature.prototype.getMap=function(){return this.layer.getMap(); };Feature.prototype.bind=function(a,b,c){return Y.Event.addListener(this,a,b,c);};Feature.prototype.unbind=function(a){Y.Event.removeListener(a);};Feature.prototype.openInfoWindow=function(b,a){var d=this.getLatLng(),c;if(this.getInfoWindowOffset){c=this.getInfoWindowOffset();}else{c=new Y.Point(0,0);}return this.layer.getMap().openInfoWindow(d,b,a,c);};Feature.prototype.bindInfoWindow=function(b,a){var c=this; this.bind("click",function(){c.openInfoWindow(b,a);});};Feature.prototype.isDrawn=function(){return this.drawn;};Feature.prototype.getLatLng=function(){return null;};Feature.prototype.getLatLngs=function(){return[];};Feature.prototype.isRaster=function(){return false;};Feature.prototype.getContainableBounds=function(d){if(!this.drawn){return null;}d=(typeof d==="undefined")?1:d;var a=this.getLatLngs(),c=a.length; if(c===0){return null;}else{if(c===1){var b=new Y.LatLngBounds();return b.extend(a[0]);}else{if(c>=2){return new Y.LatLngBounds(this.getLatLngs());}}}};Feature.prototype.getContainableSize=function(a){return{sw:new Y.Size(0,0),ne:new Y.Size(0,0)};};var NonGeometry=Y.NonGeometry=Y.extend(Y.Feature,function(a){a=a||{};this.icon=a.icon||Y.Icon.DEFAULT_ICON;this.clickable=a.clickable||true;this.draggable=a.draggable||false; this.id=a.id||"";this.name=a.name||"";this.property=a.property||{};this.title=a.title||this.name||"";});var Label=Y.Label=Y.extend(Y.Feature,function(d,c,b){this.latlng=d;this.text=c;b=b||{};this.className=b.className||"yolp-tlchp";this.label=$("

",{"class":this.className,html:c});var a=$("",{src:"http://i.yimg.jp/images/map/api/yolp/images/yolp_icn_02.png",alt:""}).css({position:"absolute",left:"-12px",top:"-139px"}).loadAlphaImage();this.pointer=$("

",{"class":"yolp-tlchpimg"}).css({left:"-9px",margin:0,padding:0,overflow:"hidden",background:"none"}).append(a); if(this.className=="yolp-tlchp"){this.label.append(this.pointer);}this.clickable=(typeof b.clickable==="undefined")?true:b.clickable;this.draggable=b.draggable||false;this.centering=(typeof b.centering=="undefined")?false:b.centering;this.offset=b.offset||new Y.Point(0,0);this.id=b.id||"";this.name=b.name||"";this.property=b.property||{};});Label.prototype.remove=function(){if(this.node){this.node.empty(); this.node.remove();this.node=null;this.drawn=false;}};Label.prototype.draw=function(e){if(!this.node||e){if(this.node){this.remove();}var b=this.layer.getContainer();var d=this.layer.fromLatLngToDivPixel(this.latlng);var l=d.x;var k=d.y;var a=this.getMap();var g=a.getProjection();var f=g.getWrapWidth(a.getZoom());if(f!=Infinity){var j=this.layer.fromLatLngToDivPixel(a.getCenter());var o=l-j.x;while(o>f/2){o-=f; }while(o<-f/2){o+=f;}l=o+j.x;}l+=this.offset.x;k+=this.offset.y;this.node=$("

");this.node.append(this.label);this.node.css({zIndex:0,position:"absolute",left:l+"px",top:k+"px"});b.append(this.node);var m=this.node.width();var i=this.node.height();if($.browser.msie&&$.support.boxModel){m+=10;}if(m>0&&i>0){this.node.css({fontSize:"90%",position:"absolute",margin:"0",padding:"0",width:m+"px",height:i+"px"}); }var n=this.label.height();if(this.centering){if(n){k-=n;this.node.css("top",k+"px");}}this.node.stopMousePropagation();this.drawn=true;this.setDraggable(this.draggable);this.setClickable(this.clickable);}};Label.prototype.setLatLng=function(a){this.latlng=a;this.draw(true);};Label.prototype.setClickable=function(a){Y.Marker.prototype.setClickable.call(this,a);};Label.prototype.isClickable=function(){return this.clickable; };Label.prototype.setDraggable=function(a){this.draggable=a;if(a){var d=this;var c=this.getMap();var b=this.getLayer();this.drag=new Y.DraggableObject(this.node,{container:c.getContainer()});Y.Event.addListener(this.drag,"dragstart",function(e){c.closeInfoWindow();Y.Event.trigger(d,"dragstart");});Y.Event.addListener(this.drag,"dragend",function(g){var f=g.x;var h=g.y;f-=d.offset.x;h-=d.offset.y;var e=d.label.height(); if(d.centering){if(e){h+=e;}}d.latlng=b.fromDivPixelToLatLng(new Y.Point(f,h));Y.Event.trigger(d,"dragend");});}else{if(this.drag){this.drag.clearDrag();this.drag=null;}}};Label.prototype.isDraggable=function(){return this.draggable;};Label.prototype.focus=function(){if(this.node){this.node.css({zIndex:1});}};Label.prototype.blur=function(){if(this.node){this.node.css({zIndex:0});}};Label.prototype.adjust=function(){var b=this.layer.fromLatLngToDivPixel(this.latlng); var i=b.x,h=b.y;var a=this.getMap();var f=a.getProjection();var d=f.getWrapWidth(a.getZoom());if(d!=Infinity){var g=this.layer.fromLatLngToDivPixel(a.getCenter());var k=i-g.x;while(k>d/2){k-=d;}while(k<-d/2){k+=d;}i=k+g.x;}var e=parseInt(this.node.css("left"),10);if(e==Math.round(i)){return;}i+=this.offset.x;h+=this.offset.y;if(this.centering){var j=this.label.height();if(j){h-=(j/2);}}this.node.css({left:i+"px",top:h+"px"}); };Label.prototype.isRaster=function(){return true;};Label.prototype.getLatLng=function(){return this.latlng;};Label.prototype.getLatLngs=function(){return[this.latlng];};Label.prototype.getInfoWindowOffset=function(){return new Y.Point(-this.icon.iconAnchor.x+this.icon.infoWindowAnchor.x,-this.icon.iconAnchor.y+this.icon.infoWindowAnchor.y);};Label.prototype.getPoint=function(){var a=parseInt(this.node.css("left"),10); var b=parseInt(this.node.css("top"),10);return new Y.Point(a,b);};Label.prototype.getContainableBounds=function(){return Y.Feature.prototype.getContainableBounds.call(this);};var Marker=Y.Marker=Y.extend(Y.Feature,function(b,a){this.latlng=b;a=a||{};this.icon=a.icon||Y.Icon.DEFAULT_ICON;this.clickable=(typeof a.clickable==="undefined")?true:a.clickable;this.draggable=a.draggable||false;this.id=a.id||"";this.gid=a.gid||"";this.name=a.name||"";this.property=a.property||{};this.title=a.title||this.name||"";this.category=a.category||"";this.description=a.description||"";this.dictionary=a.dictionary||{}; this.labelClassName=a.labelClassName||"";});Marker.prototype.remove=function(){if(this.node){this.removeLabel();this.node.remove();this.drawn=false;}};Marker.prototype.draw=function(d){if(!this.node||d){if(this.node){this.remove();}var b=this.layer.getContainer();var c=this.layer.fromLatLngToDivPixel(this.latlng);var j=c.x;var i=c.y;var a=this.getMap();var h=a.getProjection();var e=h.getWrapWidth(a.getZoom()); if(e!=Infinity){var g=a.getMapContainerXY();var f=-g.x+a.size.width/2;var k=j-f;while(k>e/2){k-=e;}while(k<-e/2){k+=e;}j=k+f;}this.node=this.icon.createNode();this.node.css({zIndex:0,position:"absolute",left:j+"px",top:i+"px"});this.setIconOverEffect();b.append(this.node);this.drawn=true;this.setDraggable(this.draggable);this.setClickable(this.clickable);}};Marker.prototype.setLatLng=function(a){this.latlng=a; this.draw(true);};Marker.prototype.setTitle=function(a){this.title=a;};Marker.prototype.addLabel=function(){if(Y.DraggableObject.dragging||!this.title||this.title===""){return;}var a=this.layer.map;var b=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);if(!b){b=new Y.FeatureLayer("label");Y.Cache.set(Y.Cache.KEY_PLOT_LAYER,b);}if(!b.isInitialized()){a.addLayer(b);}this.fixLabelLayerOrder();if(this.label){b.removeFeature(this.label); }this.label=new Y.Label(this.getLatLng().copy(),this.title,{offset:this.icon.labelAnchor,className:this.labelClassName,clickable:false});b.addFeature(this.label);this.label.focus();};Marker.prototype.removeLabel=function(a){if(Y.DraggableObject.dragging||!this.label){return;}var b=this.layer.map;var e=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);var d=this;if(e){if(this.label&&this.label.node){this.label.node.css({visibility:"hidden"}); }if($.browser.safari){var c=this.label;setTimeout(function(){e.removeFeature(c);},0);}else{e.removeFeature(this.label);}}this.label=null;};Marker.prototype.fixLabelLayerOrder=function(){var e=this.layer.map;var g=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);var d=e.getCurrentLayerSet().getLayers();var f=0;for(var b=0,a=d.length;bc/2){j-=c;}while(j<-c/2){j+=c;}i=j+g;}var d=this.node.css("left");if(d==Math.round(i)){return;}this.node.css({left:Math.round(i)+"px",top:Math.round(h)+"px"}); };Marker.prototype.setIconOverEffect=function(){var b=this,a=Y.Event;if(!Y.Util.IS_TOUCH_SCREEN){this.node.bind("mouseover",function(){b.focus();a.trigger(b,"mouseover");});this.node.bind("mouseout",function(){b.blur();a.trigger(b,"mouseout");});}};Marker.prototype.focus=function(){this.node.css({zIndex:1});this.addLabel();};Marker.prototype.blur=function(){this.node.css({zIndex:0});this.removeLabel(); };Marker.prototype.isRaster=function(){return true;};Marker.prototype.getLatLng=function(){return this.latlng;};Marker.prototype.getLatLngs=function(){return[this.latlng];};Marker.prototype.getInfoWindowOffset=function(){var a=Y.Point;if(!this.icon||!this.icon.iconAnchor||!this.icon.infoWindowAnchor){return new a(0,0);}return new a(-this.icon.iconAnchor.x+this.icon.infoWindowAnchor.x,-this.icon.iconAnchor.y+this.icon.infoWindowAnchor.y); };Marker.prototype.getPoint=function(){var a=parseInt(this.node.css("left"),10);var b=parseInt(this.node.css("top"),10);return new Y.Point(a,b);};Marker.prototype.getDOMNode=function(){if(this.node){return this.node[0];}return null;};Marker.prototype.setIcon=function(a){this.icon=a;this.draw(true);};Marker.prototype.getContainableBounds=function(e){if(!this.drawn){return null;}e=(typeof e==="undefined")?1:e; var b=this.getPoint(),l=this.icon.iconSize,f=this.icon.iconAnchor,g=this.layer;var k=new Y.Point(b.x+(-f.x*e),b.y+(-f.y*e)),h=new Y.Point(k.x+l.width*e,k.y+l.height*e),d=new Y.Point(h.x,k.y),i=new Y.Point(k.x,h.y),j=g.fromDivPixelToLatLng(i),c=g.fromDivPixelToLatLng(d),a=new Y.LatLngBounds(g.fromDivPixelToLatLng(k),g.fromDivPixelToLatLng(h));return a;};Marker.prototype.getContainableSize=function(d){d=(typeof d==="undefined")?1:d; var c=this.icon,b=c.iconSize,a=c.iconAnchor;return{ne:new Y.Size(Math.abs((b.width-a.x))*d,a.y*d),sw:new Y.Size(a.x*d,Math.abs((b.height-a.y))*d)};};var Polyline=Y.Polyline=Y.extend(Feature,function(a,b){this.options=b||{};this.strokeStyle=this.options.strokeStyle||new Style("ff0000",4,0.75);this.compress=this.options.compress||false;this.compressFormat=this.options.compressFormat||new Compress("YEncode");if(this.compress==true){this.latlngs=this.compressFormat.decode(a);}else{this.latlngs=a;}this.clickable=(this.options.clickable==undefined)?true:this.options.clickable; this.draggable=this.options.draggable||false;this.clipping=(typeof this.options.clipping==="undefined")?true:this.options.clipping;this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};this.route=this.options.route||{};});Polyline.prototype.draw=function(b){if(b||!this.node){var a=this.layer.getDrawer();if(this.node){this.remove();}var d=this.layer.vectorOffset; var c=this.layer.fromLatLngsToDivPixels(this.latlngs,d.copy());if(this.clipping&&c.length>0){c=this.clipRect(c,this.layer.getDrawBounds());if(this.isCompatible()){c._offset=d.copy();}}a.setStrokeColor(this.strokeStyle.color);a.setStrokeOpacity(this.strokeStyle.opacity);a.setStrokeStartLine(this.strokeStyle.startline);a.setStrokeEndLine(this.strokeStyle.endline);this.node=$(a.drawLine(c,this.strokeStyle.weight)); this.drawn=true;this.setClickable(this.clickable);this.setDraggable(this.draggable);}};Polyline.prototype.clipRect=function(h,a){var d=function(n,m,l,i){if(n.x>=m.x){if((n.xl.x&&m.x>i.x)){return false;}}else{if((m.xl.x&&n.x>i.x)){return false;}}if(n.y>=m.y){if((n.yl.y&m.y>i.y)){return false;}}else{if((m.yl.y&&n.y>i.y)){return false; }}if(((n.x-m.x)*(l.y-n.y)+(n.y-m.y)*(n.x-l.x))*((n.x-m.x)*(i.y-n.y)+(n.y-m.y)*(n.x-i.x))>0){return false;}if(((l.x-i.x)*(n.y-l.y)+(l.y-i.y)*(l.x-n.x))*((l.x-i.x)*(m.y-l.y)+(l.y-i.y)*(l.x-m.x))>0){return false;}return true;};var c=function(w,t,r,o){if(r.equals(o)){return new Y.Point(r.x,r.y);}var i=new Y.Point(0,0);var q=t.y-w.y;var n=w.x-t.x;var x=(t.y-w.y)*w.x-(t.x-w.x)*w.y;var m=o.y-r.y;var l=r.x-o.x; var s=(o.y-r.y)*r.x-(o.x-r.x)*r.y;i.x=(l*x-n*s)/(q*l-n*m);i.y=(q*s-m*x)/(q*l-n*m);return i;};var k=function(l,r,u,o){var m=[];var t=l.length;var q=t-1;for(var n=0;nf.x){f.x=j.x;}if(j.y>f.y){f.y=j.y;}if(j.x=a.bottom();},new Y.Point(b.x,a.bottom()),new Y.Point(f.x,a.bottom()));h=k(h,function(i){return i.y<=a.top();},new Y.Point(b.x,a.top()),new Y.Point(f.x,a.top()));h=k(h,function(i){return i.x>=a.left();},new Y.Point(a.left(),b.y),new Y.Point(a.left(),f.y));h=k(h,function(i){return i.x<=a.right(); },new Y.Point(a.right(),b.y),new Y.Point(a.right(),f.y));return h;};Polyline.prototype.isCompatible=function(){if(!this.layer){return true;}return this.layer.getDrawer().type===Drawer.RENDERING.CANVAS;};Polyline.prototype.getLength=function(){var a=0;for(var c=0,b=this.latlngs.length-1;c=2){var e=this.latlngs[a-1];var d=this.latlngs[a];var c=new LatLng((e.lat()+d.lat())/2,(e.lng()+d.lng())/2); }else{if(b==1){var c=this.latlngs[0];}else{c=false;}}return c;};Polyline.prototype.getLatLngs=function(){return this.latlngs;};Polyline.prototype.getPoint=function(){var b=this.getLatLng();var a=this.layer.fromLatLngToDivPixel(b);return a;};Polyline.prototype.getContainableBounds=function(a){return Y.Feature.prototype.getContainableBounds.call(this);};var DrawingFeature=function(a){this.latlngs=[]; this.strokeStyle=new Style("000000",4,0.75);this.jointNodes=[];this.node;this.feature;var b=a.getLayer().getMap();this.initialize(b);};DrawingFeature.prototype.initialize=function(a){var a=this.map=a;this.layer=this.map.getSystemLayer();var b=this;this.clickListener=Y.Event.addListener(a,"click",function(d){if(d){var c=b.latlngs.length;if(c==0||!b.latlngs[c-1].equals(d)){b.addLatLng(d);}}});this.dblclickListener=Y.Event.addListener(a,"dblclick",function(c){b.endLine(); });};DrawingFeature.prototype.endLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);Event.trigger(this,"endline");};DrawingFeature.prototype.cancelLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);Event.trigger(this,"cancelline");};DrawingFeature.prototype.addLatLng=function(a){this.latlngs.push(a); this.drawJoint(a);this.drawLine();};DrawingFeature.prototype.remove=function(){if(this.node){this.node.remove();}$.each(this.jointNodes,function(a,b){b.remove();});};DrawingFeature.prototype.drawLine=function(){var a=this.layer.getDrawer();if(this.node){this.node.remove();}var d=this.layer.vectorOffset;var c=this.layer.fromLatLngsToDivPixels(this.latlngs,d.copy());if(a.type===Y.Drawer.RENDERING.CANVAS&&c.length>0){c=Y.Polyline.prototype.clipRect.call(this,c,this.layer.getDrawBounds()); c._offset=d.copy();}a.setStrokeColor(this.strokeStyle.color);a.setStrokeOpacity(this.strokeStyle.opacity);a.setStrokeStartLine(this.strokeStyle.starline);a.setStrokeEndLine(this.strokeStyle.endline);this.node=$(a.drawLine(c,this.strokeStyle.weight));if(Y.Util.Platform.isIPhone){var b=this.node;b.hide().show();}};DrawingFeature.prototype.drawJoint=function(g){var b=12;var f=this.layer.fromLatLngToDivPixel(g); var e=Math.round(f.x-b/2-2)+"px";var d=Math.round(f.y-b/2-2)+"px";var b=b+"px";var a='
';var c=$(a);this.layer.getContainer().append(c);this.jointNodes.push(c);return c;};var EditingFeature=function(a){this.latlngs=a.latlngs; this.strokeStyle=new Style("000000",4,0.75);this.jointNodes=[];this.dragNodes=[];this.node;this.feature=a;var b=a.getLayer().getMap();this.initialize(b);};EditingFeature.prototype.initialize=function(a){var a=this.map=a;this.layer=this.map.getSystemLayer();this.drawLine();};EditingFeature.prototype.endLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener); Event.trigger(this,"endline");};EditingFeature.prototype.cancelLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);Event.trigger(this,"cancelline");};EditingFeature.prototype.addLatLng=function(a){this.latlngs.push(a);this.drawJoint(a);this.drawLine();};EditingFeature.prototype.remove=function(){if(this.node){this.node.remove();this.drawn=false;}$.each(this.jointNodes,function(a,b){b.remove(); });};EditingFeature.prototype.drawLine=function(){for(var b=0,a=this.latlngs.length;b'; var c=$(e);var d=new DraggableObject(c,{container:this.map.getContainer()});this.dragNodes.push(d);var f=this;var j=g;Event.addListener(d,"dragstart",function(){f.nowEditing=true;Log.write("EditingFeature:now editing");});Event.addListener(d,"dragend",function(m){f.nowEditing=false;var l=f.layer.fromDivPixelToLatLng(new Point(m.x+k/2+2,m.y+k/2+2));f.feature.latlngs[j]=l;f.feature.clearEditingFeature(); f.feature.draw(true);Log.write("EditingFeature:end editing");});this.layer.getContainer().append(c);this.jointNodes.push(c);return c;};var Polygon=Y.Polygon=Y.extend(Polyline,function(a,b){this.latlngs=a;this.options=b||{};this.strokeStyle=this.options.strokeStyle||new Style("000000",4,0.75);this.fillStyle=this.options.fillStyle||new Style("0000ff",4,0.5);this.clickable=(this.options.clickable==undefined)?true:this.options.clickable;this.draggable=this.options.draggable||false;this.clipping=(typeof this.options.clipping==="undefined")?true:this.options.clipping; this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};});Polygon.prototype.draw=function(b){if(b||!this.node){var a=this.layer.getDrawer();this.remove();var d=this.layer.vectorOffset;var c=this.layer.fromLatLngsToDivPixels(this.latlngs,d.copy());if(this.clipping&&c.length>0){c=this.clipRect(c,this.layer.getDrawBounds());if(this.isCompatible()){c._offset=d.copy(); }}a.setStrokeColor(this.strokeStyle.color);a.setStrokeOpacity(this.strokeStyle.opacity);a.setFillColor(this.fillStyle.color);a.setFillOpacity(this.fillStyle.opacity);if(c.length>2){this.node=$(a.drawArea(c,this.strokeStyle.weight));this.drawn=true;}this.setClickable(this.clickable);this.setDraggable(this.draggable);}};Polygon.prototype.clipRect=function(h,a){var d=function(n,m,l,i){if(n.x>=m.x){if((n.xl.x&&m.x>i.x)){return false; }}else{if((m.xl.x&&n.x>i.x)){return false;}}if(n.y>=m.y){if((n.yl.y&m.y>i.y)){return false;}}else{if((m.yl.y&&n.y>i.y)){return false;}}if(((n.x-m.x)*(l.y-n.y)+(n.y-m.y)*(n.x-l.x))*((n.x-m.x)*(i.y-n.y)+(n.y-m.y)*(n.x-i.x))>0){return false;}if(((l.x-i.x)*(n.y-l.y)+(l.y-i.y)*(l.x-n.x))*((l.x-i.x)*(m.y-l.y)+(l.y-i.y)*(l.x-m.x))>0){return false; }return true;};var c=function(w,t,r,o){if(r.equals(o)){return new Y.Point(r.x,r.y);}var i=new Y.Point(0,0);var q=t.y-w.y;var n=w.x-t.x;var x=(t.y-w.y)*w.x-(t.x-w.x)*w.y;var m=o.y-r.y;var l=r.x-o.x;var s=(o.y-r.y)*r.x-(o.x-r.x)*r.y;i.x=(l*x-n*s)/(q*l-n*m);i.y=(q*s-m*x)/(q*l-n*m);return i;};var k=function(l,r,u,o){var m=[];var t=l.length;var q=t-1;for(var n=0;nf.x){f.x=j.x;}if(j.y>f.y){f.y=j.y;}if(j.x=a.bottom();},new Y.Point(b.x,a.bottom()),new Y.Point(f.x,a.bottom()));h=k(h,function(i){return i.y<=a.top(); },new Y.Point(b.x,a.top()),new Y.Point(f.x,a.top()));h=k(h,function(i){return i.x>=a.left();},new Y.Point(a.left(),b.y),new Y.Point(a.left(),f.y));h=k(h,function(i){return i.x<=a.right();},new Y.Point(a.right(),b.y),new Y.Point(a.right(),f.y));return h;};Polygon.prototype.setClickable=function(a){Polyline.prototype.setClickable.apply(this,[a]);};Polygon.prototype.setDraggable=function(a){Polyline.prototype.setDraggable.apply(this,[a]); };Polygon.prototype.adjust=function(){this.draw(true);};Polygon.prototype.remove=function(){if(this.node){this.node.remove();this.drawn=false;}};Polygon.prototype.getLatLng=function(){var d=0;var c=0;$.each(this.latlngs,function(e,f){d+=f.lat();c+=f.lng();});var a=this.latlngs.length;var b=new LatLng(d/a,c/a);return b;};Polygon.prototype.getPoint=function(){var b=this.getLatLng();var a=this.layer.fromLatLngToDivPixel(b); return a;};var Circle=Y.Circle=Y.extend(Feature,function(c,a,b){this.latlng=c;if(a instanceof Size){this.radius=a;}else{this.radius=new Y.Size(a,a);}this.options=b||{};this.clickable=this.options.clickable||true;this.strokeStyle=this.options.strokeStyle||new Style("000000",4,0.75);this.fillStyle=this.options.fillStyle||new Style("0000ff",4,0.5);this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{}; this.editmode=false;this.move=false;this.eventDragstart=null;this.eventDrag=null;this.eventDragend=null;this.elem=null;this.shift=false;this.reverse_w=false;this.reverse_h=false;});Circle.prototype.getLatLng=function(){return this.latlng;};Circle.prototype.getLatLngs=function(){return[this.latlng];};Circle.prototype.getRadiusKilometers=function(){var d=this.getPoint();var c=new Point(d.x+this.radius.width,d.y+this.radius.height); var b=this.layer.fromDivPixelToLatLng(d);var a=this.layer.fromDivPixelToLatLng(c);return b.distance(a).kilometers;};Circle.prototype.getRadiusPixel=function(){var a=new Y.Size(this.radius.width,this.radius.height);if(this.options.unit=="km"){var c=this.layer.fromLatLngToDivPixel(this.latlng);var b=this.layer.fromLatLngToDivPixel(this.latlng.detachedLatLng(this.radius.width*1000));a.width=Math.sqrt(Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2)); b=this.layer.fromLatLngToDivPixel(this.latlng.detachedLatLng(this.radius.height*1000));a.height=Math.sqrt(Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2));}a.width=Math.abs(a.width);a.height=Math.abs(a.height);return a;};Circle.prototype.setClickable=function(a){Polyline.prototype.setClickable.apply(this,[a]);};Circle.prototype.draw=function(c,a){if(c||!this.node){var b=this.layer.getDrawer();var f=a||{};f.editing=(typeof f.editing==="undefined")?false:f.editing; if(this.node&&!f.editing){this.remove();}var d=this.layer.fromLatLngToDivPixel(this.latlng);var e=this.layer.vectorOffset;d.x+=e.x;d.y+=e.y;if(this.isCompatible()){d._offset=e.copy();}b.setStrokeColor(this.strokeStyle.color);b.setStrokeOpacity(this.strokeStyle.opacity);b.setFillColor(this.fillStyle.color);b.setFillOpacity(this.fillStyle.opacity);this.elem=b.drawCircle(d,this.getRadiusPixel(),this.strokeStyle.weight,this.elem); this.node=$(this.elem);this.drawn=true;this.setClickable(this.clickable);if(this.editmode&&!f.editing){this.enableEditing();}}};Circle.prototype.adjust=function(){this.draw(true);};Circle.prototype.remove=function(){this.removeEvent();if(this.node){$(this.elem).remove();this.node.remove();this.drawn=false;}if(this.drawingFeature){this.drawingFeature.cancelLine();this.drawingFeature.remove();this.drawingFeature=null; }};Circle.prototype.getPoint=function(){var a=this.layer.fromLatLngToDivPixel(this.latlng);return a;};Circle.prototype.isCompatible=function(){return Y.Polyline.prototype.isCompatible.call(this);};Circle.prototype.getContainableBounds=function(a){return Y.Feature.prototype.getContainableBounds.call(this);};Circle.prototype.enableEditing=function(){this.editmode=true;var d=this;this.removeEvent();this.drag=new DraggableObject(this.node,{container:document,disableMove:true}); var c;this.eventDragstart=Event.addListener(this.drag,"dragstart",function(l){c=l;var i=d.getRadiusPixel(d.radius);var e=i.width/2;var f=i.height/2;var k=d.getLayer().getMap();var j=k.fromLatLngToContainerPixel(d.latlng);var g=k.fromPagePixelToContainerPixel(l);if(j.x+e>g.x&&j.x-eg.y&&j.y-f

').append($('').loadAlphaImage());e.mainContainer.append(this.centerMark);if(!this.options.visible){this.centerMark.hide(); }var b=Y.Util.Platform.scrollType==="CSS3";if(b){this.centerMark.css("-webkit-transform","translate3d(0, 0, 0)");}this.button=$('
').bind("click",function(){if(f.isVisibleCenterMark()){f.hideCenterMark();}else{f.showCenterMark();}});if(!this.options.visibleButton){this.button.hide();}if(this.options.visible){this.showCenterMark();}else{this.hideCenterMark();}function c(){var h=d(); if(b){f.centerMark.css("-webkit-transform","translate3d("+h.x+"px,"+h.y+"px,0)");}else{f.centerMark.css({left:h.x+"px",top:h.y+"px"});}}this.resizeEvent=this.map.bind("resize",c);c();return this.button;};CenterMarkControl.prototype.isVisibleCenterMark=function(){return this.visible;};CenterMarkControl.prototype.showCenterMark=function(){this.visible=true;this.button.empty();this.button.append('\u4e2d\u5fc3\u70b9\u3092\u975e\u8868\u793a\u306b\u3059\u308b'); this.button.attr("title","\u4e2d\u5fc3\u70b9\u3092\u975e\u8868\u793a\u306b\u3059\u308b");this.centerMark.show();this._isHideCenterMark=false;};CenterMarkControl.prototype.hideCenterMark=function(){this.visible=false;this.button.empty();this.button.append('\u4e2d\u5fc3\u70b9\u3092\u8868\u793a\u3059\u308b');this.button.attr("title","\u4e2d\u5fc3\u70b9\u3092\u8868\u793a\u3059\u308b"); this.centerMark.hide();this._isHideCenterMark=true;};CenterMarkControl.prototype.hide=function(){if(this.isVisibleCenterMark()){this.hideCenterMark();}if(this.options.visibleButton===true){Y.Control.prototype.hide.call(this);}};CenterMarkControl.prototype.show=function(){if(!this.isVisibleCenterMark()){this.showCenterMark();}if(this.options.visibleButton===true){Y.Control.prototype.show.call(this); }};CenterMarkControl.prototype.isVisible=function(){if(this.options.visibleButton===true){return Y.Control.prototype.isVisible.call(this);}else{return this.isVisibleCenterMark();}};CenterMarkControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_LEFT,new Y.Size(5,5));};CenterMarkControl.prototype.printable=function(){return false;};CenterMarkControl.prototype.remove=function(){this.map.unbind(this.resizeEvent); if(this.node){this.centerMark.remove();this.centerMark=null;}Y.Control.prototype.remove.call(this);};var LayerSetControl=Y.LayerSetControl=Y.extend(Control,function(a){this.options=a||{};this.options.enableOverlayButton=(typeof this.options.enableOverlayButton==="undefined")?true:this.options.enableOverlayButton;this.options.offsetOverlayButton=(typeof this.options.offsetOverlayButton==="undefined")?new Y.Point(0,0):this.options.offsetOverlayButton;this.isOverlay=(typeof Y.WeatherMapLayer==="undefined")?false:true; });LayerSetControl.prototype.initialize=function(d){var c=$('
    ');this.btn=$('
    ');this.list=$("
    ").hide();this.overlays;var e=this;function a(){e.btn.empty();e.list.empty();c.empty();e.setEnableOverlayButton(e.options.enableOverlayButton);var i=$('
  • '); if(e.options.offsetOverlayButton.x!==0||e.options.offsetOverlayButton.y!==0){i.css({position:"relative",left:e.options.offsetOverlayButton.x+"px",top:e.options.offsetOverlayButton.y+"px"});}if(Y.Util.IS_TOUCH_SCREEN){e.btn.bind("touchstart",function(){if(e.list.css("display")==="block"){e.setBtn();e.list.hide();}else{var o=20;if(!e.isUpper()){o=-e.list.height()-3;}e.setBtn(true);e.list.css({"margin-top":o+"px",color:"black"}).show(); }});}else{i.bind("mouseover",function(){var o=20;if(!e.isUpper()){o=-e.list.height()-3;}e.setBtn(true);e.list.css({"margin-top":o+"px",color:"black"}).show();});i.bind("mouseout",function(){e.setBtn();e.list.hide();});}e.overlays={};var h={};h.id="weatherOverlay";h.minZoom=1;h.maxZoom=15;h.name="\u96e8\u96f2\u30ec\u30fc\u30c0\u30fc";h.item=e.createOverlay(h);e.list.append(h.item);e.overlays[h.id]=h;if(e.map.enableIndoorMapLayer){var g={}; g.id="indoorOverlay";g.minZoom=18;g.maxZoom=22;g.name="\u5c4b\u5185\u5730\u56f3";g.item=e.createOverlay(g);e.list.append(g.item);e.overlays[g.id]=g;}i.append(e.btn);i.append(e.list);c.append(i);var n=d.getLayerSets();var k=d.getCurrentLayerSet();for(var f in n){if(!n.hasOwnProperty(f)){continue;}var j=n[f],l;if(k==j){l="yolp-layerset-on";}else{if(!j.getEnable()){l="yolp-layerset-disable";}else{l="yolp-layerset-off";}}l+=" "+f; var m=$('
  • '+j.getFullName()+"
  • ");if(e.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){m.bind("touchstart",(function(o){return function(q){var p=e.map.getLayerSet(o);if(p.getEnable()&&d.currentLayerSetId!=o){d.setLayerSet(o);}};})(f));}else{m.bind("click",(function(o){return function(q){var p=e.map.getLayerSet(o);if(p.getEnable()&&d.currentLayerSetId!=o){d.setLayerSet(o); }};})(f));}c.append(m);}}function b(h){var g=e.map.getConfigure(h);var f=e.node.find("#"+h).children("input:checkbox");if(g){f.attr("checked","checked");}else{f.removeAttr("checked");}}a();this.listeners=[];this.listeners.push(Event.addListener(d,"layersetchanged",function(){a();}));this.listeners.push(Event.addListener(d,"addlayerset",function(){a();}));this.listeners.push(Event.addListener(d,"removelayerset",function(){a(); }));this.listeners.push(Event.addListener(d,"layerlistchanged",function(){var j=d.getLayerSets();var i=d.getCurrentLayerSet();for(var l in j){if(!j.hasOwnProperty(l)){continue;}var g=j[l],f;if(i==g){f="yolp-layerset-on "+l;var k=$("."+l);var h=k.attr("class");if(f==h){}else{k.removeClass(h).addClass(f);}}else{if(!g.getEnable()){f="yolp-layerset-disable "+l;var k=$("."+l);var h=k.attr("class");if(f==h){}else{k.removeClass(h).addClass(f); }}else{f="yolp-layerset-off "+l;var k=$("."+l);var h=k.attr("class");if(f==h){}else{k.removeClass(h).addClass(f);}}}}e.setEnableIndoorOverlay();}));this.listeners.push(Event.addListener(this.map,"weatheroverlaychanged",function(){b("weatherOverlay");}));this.listeners.push(Event.addListener(this.map,"indooroverlaychanged",function(){b("indoorOverlay");}));this.listeners.push(Event.addListener(e.map,"zoomend",function(){e.setEnableWeatherOverlay(); e.setEnableIndoorOverlay();}));return c;};LayerSetControl.prototype.getDefaultPosition=function(){return new ControlPosition(ControlPosition.TOP_RIGHT,new Size(3,3));};LayerSetControl.prototype.printable=function(){return false;};LayerSetControl.prototype.setPosition=function(a){Y.Control.prototype.setPosition.apply(this,[a]);this.setBtn();};LayerSetControl.prototype.load=function(b,a){Y.Control.prototype.load.apply(this,[b,a]); this.setBtn();};LayerSetControl.prototype.isUpper=function(){var b=$(this.map.getContainer());var a=b.height();var c=this.node.offset().top-b.offset().top;if(c>a/2){return false;}return true;};LayerSetControl.prototype.setBtn=function(b){var a="yolp-ctrl-overlay-btn-on";var c="yolp-ctrl-overlay-btn-off";if(b){a="yolp-ctrl-overlay-btn-off";c="yolp-ctrl-overlay-btn-on";}if(this.isUpper()){this.btn.removeClass().addClass(a); }else{this.btn.removeClass().addClass(c);}};LayerSetControl.prototype.setEnableOverlayButton=function(a){var b=a&&this.isOverlay;if(b){this.btn.show();}else{this.btn.hide();this.list.hide();}this.options.enableOverlayButton=b;};LayerSetControl.prototype.createOverlay=function(a){var d="";var f=this;if(this.map.getConfigure(a.id)){d="checked";}var b;var e=this.map.getZoom();if(e>a.maxZoom&&e
    '+a.name+"
    ");if(!Y.Util.IS_TOUCH_SCREEN){c.bind("mouseover",function(){$(this).removeClass().addClass("yolp-ctrl-overlay-item-on"); });c.bind("mouseout",function(){$(this).removeClass().addClass("yolp-ctrl-overlay-item-off");});}if(Y.Util.IS_TOUCH_SCREEN){$("input:checkbox",c).click(function(g){g.preventDefault();});c.bind("touchstart",function(h){var j=$(this).attr("id");var i=f.map.getConfigure(j);f.map.setConfigure(j,!i);var g=$(this).children("input:checkbox");if(!i){g.attr("checked","checked");}else{g.removeAttr("checked"); }});}else{c.bind("click",function(h){var j=$(this).attr("id");var i=f.map.getConfigure(j);f.map.setConfigure(j,!i);var g=$(this).children("input:checkbox");if(!i){g.attr("checked","checked");}else{g.removeAttr("checked");}});}return c;};LayerSetControl.prototype.setEnableWeatherOverlay=function(){var c=this.overlays.weatherOverlay;if(c){var b=this.map.getZoom();var a=(b>c.maxZoom||bc.maxZoom||b").css({width:"206px",height:"10px",bottom:"1px",right:"1px",font:"normal 9px verdana",position:"absolute"}).attr({align:"left","class":"scalebar"}); var b=$("
    ").css({overflow:"hidden",width:this.BOUNDARY_WIDTH+"px",height:this.BOUNDARY_HEIGHT+"px",position:"absolute"}).attr("sBoundary",true);var j=this.getScaleImg(this.START_BOUNDARY_LEFT,this.START_BOUNDARY_TOP);b.append(j);e.append(b);var d=this.scalePanels=$("
    ").css({overflow:"hidden",width:"206px",height:"4px",position:"absolute",top:"3px"}).attr("scalePanels",true);for(var a=0; a<3;a++){var f=this.getScaleImg(this.SCALE_PANEL_LEFT,this.SCALE_PANEL_TOP).css({left:this.SCALE_PANEL_WIDTH*a+"px"});d.append(f);}e.append(d);var c=$("
    ").css({overflow:"hidden",width:this.BOUNDARY_WIDTH+"px",height:this.BOUNDARY_HEIGHT+"px",position:"absolute"}).attr("eBoundary",true);var g=this.getScaleImg(this.END_BOUNDARY_LEFT,this.END_BOUNDARY_TOP);c.append(g);e.append(c);var h=this.unitsPanel=$("").css({position:"absolute",top:"1px",right:"0px"}).attr("unitsPanel",true); e.append(h);return e;};ScaleControl.prototype.getScaleImg=function(b,c){var a=$('');a.css({border:"0px none",margin:"0px",padding:"0px",position:"absolute",left:b+"px",top:c+"px",width:this.UI_IMG_WIDTH+"px",height:this.UI_IMG_HEIGHT+"px",filter:""}).disableImageSelect().loadAlphaImage({size:new Size(this.UI_IMG_WIDTH,this.UI_IMG_HEIGHT)});return a;};ScaleControl.prototype.redraw=function(){var c=this.getUnits(); var g=this.container.children();var f=c.scaleLength;var b=c.unitsContent;var h=(this.map.getCurrentLayerSetId()===Y.LayerSetId.PHOTO)?"white":"black";g.each(function(){var i=$(this);if(i.attr("scalePanels")){i.css("width",f+"px");}if(i.attr("unitsPanel")){i.css("color",h);i.html(b);}});var a=this.unitsPanel.width();var e=a+this.BOUNDARY_WIDTH;var d=e+this.scalePanels.width();g.each(function(){var i=$(this); if(i.attr("eBoundary")){i.css("right",a+"px");}if(i.attr("scalePanels")){i.css("right",e+"px");}if(i.attr("sBoundary")){i.css("right",d+"px");}});};ScaleControl.prototype.getUnits=function(){var f=10;var n=(f/2);var e=this.map;var i=e.getSize();var g=i.width/2;var h=i.height/2;var c=new Point(g-n,h);var j=new Point(g+n,h);var d=e.fromContainerPixelToLatLng(c).distance(e.fromContainerPixelToLatLng(j))*1000; f*=12;d*=12;var m=10;while(true){if(d');var a=$('
    ').bind("click",function(){c.zoomOut(); });var d=$('
    ').bind("click",function(){c.zoomIn();});b.append(a);b.append(d);return b;};ZoomControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.TOP_LEFT; var a=this.options.size||new Size(3,3);return new ControlPosition(b,a);};ZoomControl.prototype.printable=function(){return false;};var LogoControl=Y.LogoControl=Y.extend(Y.Control,function(a){this.options=a||{};this.param=a.param||{};this.src=new Image().src="http://i.yimg.jp/images/maps/logo/yj_logo.png";this.URL_DEFAULT="http://rd.yahoo.co.jp/maps/map_api/*http://maps.loco.yahoo.co.jp/pl?";this.URL_WEATHER="http://rd.yahoo.co.jp/maps/map_api/*http://weather.yahoo.co.jp/weather/zoomradar/";this.link=this.URL_DEFAULT;});LogoControl.prototype.initialize=function(a){this.map=a; var b=this;this.node=this.container=$('').append($('').loadAlphaImage());this.node.attr("href",this.getMapLink());a.bind("moveend",function(){b.node.attr("href",b.getMapLink());});a.bind("layersetchanged",function(){b.node.attr("href",b.getMapLink()); });a.bind("zoomend",function(){b.node.attr("href",b.getMapLink());});a.bind("dispweathermaplayer",function(c){b.node.attr("href",b.getMapLink(c));});if(Y.Util.Platform.isIPhone){this.node.css("-webkit-transform","translate3d(0, 0, 0)");}return this.node;};LogoControl.prototype.getDefaultPosition=function(){var b=this.options.position||Y.ControlPosition.BOTTOM_RIGHT;var a=this.options.size||new Y.Size(3,3); return new Y.ControlPosition(b,a);};LogoControl.prototype.getMapLink=function(b){if(b===true){this.link=this.URL_WEATHER;}else{if(b===false){this.link=this.URL_DEFAULT;}}if(this.link===this.URL_WEATHER){return this.link;}var c=this.link;var a=this.map.getCenter();this.param.lat=a.lat();this.param.lon=a.lng();this.param.z=this.map.getZoom();this.param.datum="wgs";var d=this.param.mode;if(!d||d===""){d=this.map.getCurrentLayerSetId(); if(d==Y.LayerSetId.PHOTO){this.param.mode="aero";}else{if(d==Y.LayerSetId.B1){this.param.mode="b1";}else{this.param.mode="map";}}}$.each(this.param,function(e,f){c+=e+"="+f+"&";});c=c.substr(0,c.length-1);return c;};var SliderZoomControl=Y.SliderZoomControl=Y.extend(Control,function(a){this.options=a||{};this.mode=this.options.mode||MODE.HORIZONTAL;this.hasCaptureFunc=(document.releaseCapture)?true:false;this.isBlow=(this.options.blow===undefined)?true:a.blow;this.UI_IMG=Y.CTRL_IMAGE_URL;this.src=new Image().src=this.UI_IMG;this.UI_IMG_WIDTH=161;this.UI_IMG_HEIGHT=271;this.SLIDER_MARGIN=4;this.ATTRIBUTE_ZOOM="zoomLevel"; this.BLOW_LAYERSETS={};this.BLOW_LAYERSETS[Y.LayerSetId.NORMAL]="";this.BLOW_LAYERSETS[Y.LayerSetId.PHOTO]="";this.BLOW_LAYERSETS[Y.LayerSetId.B1]="";this.BLOW_ZOOM_LEVELS=[4,7,10,13,15,18];this.tooltipZoomOut=decodeURIComponent("%E7%B8%AE%E5%B0%8F");this.tooltipZoomIn=decodeURIComponent("%E6%8B%A1%E5%A4%A7");if(this.constructor!==SliderZoomControl){return this;}switch(this.mode){case MODE.VERTICAL:return new SliderZoomControlVertical(this.options); break;case MODE.HORIZONTAL:return new SliderZoomControlHorizontal(this.options);break;default:return new SliderZoomControlVertical(this.options);break;}});var MODE=SliderZoomControl.MODE={VERTICAL:1,HORIZONTAL:2};SliderZoomControl.prototype.load=function(b,a){Control.prototype.load.apply(this,[b,a]);if(this.node&&this.hasCaptureFunc){this.node=$(this.node).stopMousePropagation();}};SliderZoomControl.prototype.printable=function(){return false; };SliderZoomControl.prototype.initialize=function(b){var a=this.container=$("
    ");this.gripBar=null;this.blowButtons=null;this.blowTimer=null;this.gripMouseDown=false;this.enableBlow=true;this.gripDragged=false;this.minZoom=this.map.getMinZoom();this.maxZoom=this.map.getMaxZoom();this.zoomCount=this.maxZoom-this.minZoom+1;this.initAdjustPosition();this._window=window;this.sliderLayerSetId=this.map.getCurrentLayerSetId(); if(this._setup){this._window.clearTimeout(this._setup);}this._setup=this.later(this.setupSlider);this.zoomEvent=this.map.bind("zoomend",this.onZoomChanged,this);this.layerSetEvent=this.map.bind("layersetchanged",this.onLayerSetChanged,this);this.numLayerEvent=this.map.bind("numlayerchanged",this.numLayerChanged,this);return a;};SliderZoomControl.prototype.later=function(d,g){var a=this;var b=Array.prototype.slice.call(arguments); b.shift();b.shift();var c=g||10;var e=function(){return d.apply(a,b);};return this._window.setTimeout(e,c);};SliderZoomControl.prototype.setupSlider=function(){if(!this.node){return;}var a=this.createSlider();this.container.append(a);this.setGripBarPosition(this.map.getZoom());delete this._setup;};SliderZoomControl.prototype.createSlider=function(){var b=$("
    ").css({top:this.SLIDER_MARGIN+"px",left:this.SLIDER_MARGIN+"px",position:"absolute"}); var g=$("
    ").css({position:"absolute",borderColor:"orange",borderStyle:"none",borderWidth:"1px",cursor:"pointer"});b.append(g);var e=this.createZoomOutButton();e.bind("click",this.bindThis(this.zoomOut));e.bind("mousedown",this.bindThis(this.stopEvent));e.bind("dblclick",this.bindThis(this.stopEvent));g.append(e);var i=this.createZoomInButton();i.bind("click",this.bindThis(this.zoomIn));i.bind("mousedown",this.bindThis(this.stopEvent)); i.bind("dblclick",this.bindThis(this.stopEvent));g.append(i);var c=this.graduatedBar=this.createSliderGraduatedBar();g.append(c);c.bind("click",this.bindThis(this.changeClickedZoomLevel));c.bind("mousedown",this.bindThis(this.stopEvent));c.bind("dblclick",this.bindThis(this.stopEvent));var f=this.blowButtons=$("
    ").css({position:"absolute",borderColor:"orange",borderStyle:"none",borderWidth:"1px",cursor:"pointer",visibility:"hidden"}); if(this.isMercatorProjection()===true&&this.isBlow){b.append(f);this.createBlowButtons();b.bind("mouseover",this.bindThis(this.setChangeBlowTimer));b.bind("mouseout",this.bindThis(this.setChangeBlowTimer));}var a=this.gripBar=this.createGripBar();b.append(a);var h=this.hasCaptureFunc?a:$(this._window);a.bind("mousedown",this.bindThis(this.startGrip));this.onMoveGrip=this.bindThis(this.moveGrip);h.bind("mousemove",this.onMoveGrip); var d=this;this.onEndGrip=function(j){d.endGrip(j);};h.bind("mouseup",this.onEndGrip);a.bind("dblclick",this.bindThis(this.stopEvent));a.bind("click",this.bindThis(this.stopEvent));if($.browser.mozilla){this.forceOutGrip=this.bindThis(this.onWindowMouseOut);h.bind("mouseout",this.forceOutGrip);}if($.browser.msie){this.forceOutGrip=this.bindThis(this.onFrameMouseOut);h.bind("mouseout",this.forceOutGrip); }this.adjustMinZoomLevel();return b;};SliderZoomControl.prototype.remove=function(){this.map.unbind(this.zoomEvent);this.map.unbind(this.layerSetEvent);this.map.unbind(this.numLayerEvent);if(!this.hasCaptureFunc){var a=$(this._window);if(this.onMoveGrip){a.unbind("mousemove",this.onMoveGrip);}if(this.onEndGrip){a.unbind("mouseup",this.onEndGrip);}if(this.forceOutGrip){a.unbind("mouseout",this.forceOutGrip); }}Control.prototype.remove.call(this);};SliderZoomControl.prototype.getContainer=function(){return this.container;};SliderZoomControl.prototype.getEnableBlow=function(){return this.enableBlow;};SliderZoomControl.prototype.setEnableBlow=function(a){this.enableBlow=a;};SliderZoomControl.prototype.bindThis=function(b){var a=this;return function(){b.apply(a,arguments);};};SliderZoomControl.prototype.stopEvent=function(a){a.preventDefault(); a.stopPropagation();};SliderZoomControl.prototype.zoomIn=function(a){this.map.zoomIn();this.stopEvent(a);};SliderZoomControl.prototype.zoomOut=function(a){this.map.zoomOut();this.stopEvent(a);};SliderZoomControl.prototype.changeClickedZoomLevel=function(b){var a=$(b.target);var c=a.attr(this.ATTRIBUTE_ZOOM);if(typeof c!=="undefined"){this.map.setZoom(parseInt(c));}return this.stopEvent(b);};SliderZoomControl.prototype.isMercatorProjection=function(){var a=this.map.getProjection(); if(a.constructor===Y.MercatorProjection){return true;}else{if(a.__super__&&a.__super__.constructor===Y.MercatorProjection){return true;}else{return false;}}};SliderZoomControl.prototype.isDispBlowZoomLevel=function(c){if(this.isMercatorProjection()===false){return false;}if(!this.map.getCurrentLayerSetId() in this.BLOW_LAYERSETS){return false;}for(var b=0,a=this.BLOW_ZOOM_LEVELS.length;b');a.css({border:"0px none",margin:"0px",padding:"0px",position:"absolute",left:b+"px",top:c+"px",width:this.UI_IMG_WIDTH+"px",height:this.UI_IMG_HEIGHT+"px",filter:""}).disableImageSelect().loadAlphaImage({size:new Size(this.UI_IMG_WIDTH,this.UI_IMG_HEIGHT)});return a;};SliderZoomControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.TOP_LEFT; var a=this.options.size||new Size(5,2);return new ControlPosition(b,a);};var SliderZoomControlVertical=Y.SliderZoomControlVertical=Y.extend(SliderZoomControl,function(a){this.__super__.constructor.apply(this,arguments);});SliderZoomControlVertical.prototype.initialize=function(a){this.ZOOM_OUT_BUTTON_WIDTH=25;this.ZOOM_OUT_BUTTON_HEIGHT=24;this.ZOOM_OUT_BUTTON_LEFT=-135;this.ZOOM_OUT_BUTTON_LEFT=-93; this.ZOOM_OUT_BUTTON_TOP=-44;this.ZOOM_OUT_BUTTON_TOP=-101;this.ZOOM_IN_BUTTON_WIDTH=25;this.ZOOM_IN_BUTTON_HEIGHT=24;this.ZOOM_IN_BUTTON_LEFT=-134;this.ZOOM_IN_BUTTON_LEFT=-93;this.ZOOM_IN_BUTTON_TOP=-147;this.ZOOM_IN_BUTTON_TOP=-203;this.STEP_WIDTH=25;this.STEP_HEIGHT=8;this.NORMAL_STEP_LEFT=-109;this.NORMAL_STEP_LEFT=-68;this.LONG_STEP_LEFT=-134;this.LONG_STEP_LEFT=-93;this.STEP_WIDE_LIMIT=9;this.GRADUATED_BAR_OFFSET=this.ZOOM_IN_BUTTON_TOP+this.STEP_HEIGHT-1; this.BLOW_WIDTH=67;this.BLOW_HEIGHT=21;this.BLOW_LEFT=0;this.BLOW_TOP=-32;this.BLOW_TOP=-100;this.BLOW_OFFSET_Y=-11;this.BLOW_OFFSET_X=-5;this.GRIP_WIDTH=24;this.GRIP_HEIGHT=9;this.GRIP_LEFT=-32;this.GRIP_LEFT=-85;this.GRIP_TOP=-21;this.GRIP_TOP=-42;this.GRIP_OFFSET=-9;this.gripMouseDownY=0;this.gripPosY=0;return this.__super__.initialize.apply(this,arguments);};SliderZoomControlVertical.prototype.initAdjustPosition=function(){if(this.minZoom>0){this.adjustPosition=-((this.minZoom-1)*this.STEP_HEIGHT); }else{this.adjustPosition=0;}};SliderZoomControlVertical.prototype.createZoomOutButton=function(){var a=$("
    ").attr({title:this.tooltipZoomOut}).css({top:"0px",overflow:"hidden",width:this.ZOOM_OUT_BUTTON_WIDTH+"px",height:this.ZOOM_OUT_BUTTON_HEIGHT+"px",position:"absolute"}).disableImageSelect().loadAlphaImage({size:new Size(this.ZOOM_OUT_BUTTON_WIDTH,this.ZOOM_OUT_BUTTON_HEIGHT)});a.append(this.getSliderImg(this.ZOOM_OUT_BUTTON_LEFT,this.ZOOM_OUT_BUTTON_TOP)); return a;};SliderZoomControlVertical.prototype.createZoomInButton=function(){var a=$("
    ").attr({title:this.tooltipZoomIn}).css({top:this.ZOOM_OUT_BUTTON_HEIGHT+(this.zoomCount*this.STEP_HEIGHT)+"px",overflow:"hidden",width:this.ZOOM_IN_BUTTON_WIDTH,height:this.ZOOM_IN_BUTTON_HEIGHT,position:"absolute"});a.append(this.getSliderImg(this.ZOOM_IN_BUTTON_LEFT,this.ZOOM_IN_BUTTON_TOP));return a; };SliderZoomControlVertical.prototype.createSliderGraduatedBar=function(){var a;if(this.maxZoom>20){a=this._createSliderGraduatedBar();}else{a=this._createSliderGraduatedBar_old();}return a;};SliderZoomControlVertical.prototype._createSliderGraduatedBar_old=function(){this.STEP_WIDE_LIMIT=12;this.GRADUATED_BAR_OFFSET=this.ZOOM_OUT_BUTTON_TOP-this.ZOOM_OUT_BUTTON_HEIGHT;var e=$("
    ").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",top:this.ZOOM_OUT_BUTTON_HEIGHT}); for(var c=this.minZoom,a=this.maxZoom;c<=a;c++){var b=$("
    ").css({top:((c-1)*this.STEP_HEIGHT)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var g=c;if(g<=this.STEP_WIDE_LIMIT){g=0;}else{g-=this.STEP_WIDE_LIMIT;}var f=this.NORMAL_STEP_LEFT;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_LEFT;}var d=this.getSliderImg(f,this.GRADUATED_BAR_OFFSET-(g*this.STEP_HEIGHT)); d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);}return e;};SliderZoomControlVertical.prototype._createSliderGraduatedBar=function(){var e=$("
    ").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",top:this.ZOOM_OUT_BUTTON_HEIGHT});var a=this.maxZoom-this.minZoom;var g=(a=this.minZoom;c--){var b=$("
    ").css({top:((c-1)*this.STEP_HEIGHT)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"}); var f=this.NORMAL_STEP_LEFT;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_LEFT;}var d=this.getSliderImg(f,this.GRADUATED_BAR_OFFSET+(g*this.STEP_HEIGHT));d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);if(gthis.maxZoom){continue;}var c=$("
    ");b.append(c);var f=g*this.STEP_HEIGHT;c.css({left:this.STEP_WIDTH+this.BLOW_OFFSET_X+"px",top:(parseInt(f-(this.STEP_HEIGHT/2)+this.ZOOM_OUT_BUTTON_HEIGHT+this.BLOW_OFFSET_Y))+"px",overflow:"hidden",width:this.BLOW_WIDTH+"px",height:this.BLOW_HEIGHT+"px",position:"absolute"});c.bind("click",this.bindThis(this.changeClickedZoomLevel)); c.bind("mousedown",this.bindThis(this.stopEvent));c.bind("dblclick",this.bindThis(this.stopEvent));var d=this.getSliderImg(0,this.BLOW_TOP-(e*this.BLOW_HEIGHT));d.attr(this.ATTRIBUTE_ZOOM,(f/this.STEP_HEIGHT));c.append(d);}};SliderZoomControlVertical.prototype.createGripBar=function(){var b=$("
    ").css({left:"1px",overflow:"hidden",width:this.GRIP_WIDTH+"px",height:this.GRIP_HEIGHT+"px",position:"absolute"}); var a=this.getSliderImg(this.GRIP_LEFT,this.GRIP_TOP);b.append(a);return b;};SliderZoomControlVertical.prototype.adjustMinZoomLevel=function(){if(this.adjustPosition!==0){this.graduatedBar.css("top",this.adjustPosition+this.ZOOM_OUT_BUTTON_HEIGHT+"px");this.blowButtons.css("top",this.adjustPosition+"px");}};SliderZoomControlVertical.prototype.startGrip=function(a){if(!this.gripMouseDown){this.gripDragged=false; this.gripMouseDownY=a.screenY;this.gripPosY=parseInt(this.gripBar.css("top"));if(this.hasCaptureFunc){this.gripBar[0].setCapture();}this.gripMouseDown=true;}return this.stopEvent(a);};SliderZoomControlVertical.prototype.moveGrip=function(c){if(this.gripMouseDown){var b=c.screenY-this.gripMouseDownY;var a=this.gripPosY+b;if(athis.ZOOM_OUT_BUTTON_HEIGHT+(this.zoomCount-1)*this.STEP_HEIGHT){a=this.ZOOM_OUT_BUTTON_HEIGHT+(this.zoomCount-1)*this.STEP_HEIGHT; }this.gripBar.css("top",a+"px");this.gripDragged=true;}};SliderZoomControlVertical.prototype.endGrip=function(b){if(this.hasCaptureFunc){document.releaseCapture();}if(this.gripMouseDown){if(this.gripDragged){var a=parseInt(this.gripBar.css("top"));var c=this.getZoomLevelByGripBarPos(a);if(c>this.maxZoom){c=this.maxZoom;}if(c0){b+=(this.minZoom-1);}return b;};SliderZoomControlVertical.prototype.getGripBarPosByZoomLevel=function(a){return this.ZOOM_OUT_BUTTON_HEIGHT+(a*this.STEP_HEIGHT)+this.GRIP_OFFSET;};SliderZoomControlVertical.prototype.setGripBarPosition=function(b){if(!this.gripBar){return; }if(bthis.maxZoom){this.gripBar.css("visibility","hidden");}else{this.gripBar.css("visibility","visible");}var a=this.getGripBarPosByZoomLevel(b);if(this.adjustPosition!==0){a+=this.adjustPosition;}this.gripBar.css("top",a+"px");};var SliderZoomControlHorizontal=Y.SliderZoomControlHorizontal=Y.extend(SliderZoomControl,function(a){this.__super__.constructor.apply(this,arguments);}); SliderZoomControlHorizontal.prototype.initialize=function(a){this.ZOOM_OUT_BUTTON_WIDTH=22;this.ZOOM_OUT_BUTTON_HEIGHT=22;this.ZOOM_OUT_BUTTON_LEFT=0;this.ZOOM_OUT_BUTTON_TOP=-193;this.ZOOM_OUT_BUTTON_TOP=-248;this.ZOOM_IN_BUTTON_WIDTH=22;this.ZOOM_IN_BUTTON_HEIGHT=22;this.ZOOM_IN_BUTTON_LEFT=-133;this.ZOOM_IN_BUTTON_TOP=-193;this.ZOOM_IN_BUTTON_TOP=-248;this.STEP_WIDTH=8;this.STEP_HEIGHT=20;this.NORMAL_STEP_TOP=-193; this.NORMAL_STEP_TOP=-248;this.LONG_STEP_TOP=-171;this.LONG_STEP_TOP=-226;this.STEP_WIDE_LIMIT=13;this.GRADUATED_BAR_OFFSET=this.ZOOM_IN_BUTTON_LEFT+this.STEP_WIDTH-1;this.BLOW_WIDTH=21;this.BLOW_HEIGHT=53;this.BLOW_LEFT=-67;this.BLOW_LEFT=-118;this.BLOW_TOP=0;this.BLOW_OFFSET_Y=-3;this.BLOW_OFFSET_X=-11;this.GRIP_WIDTH=9;this.GRIP_HEIGHT=26;this.GRIP_LEFT=-106;this.GRIP_TOP=0;this.GRIP_OFFSET=-9;this.gripMouseDownX=0; this.gripPosX=0;return this.__super__.initialize.apply(this,arguments);};SliderZoomControlHorizontal.prototype.initAdjustPosition=function(){if(this.minZoom>0){this.adjustPosition=-((this.minZoom-1)*this.STEP_WIDTH);}else{this.adjustPosition=0;}};SliderZoomControlHorizontal.prototype.createZoomOutButton=function(){var a=$("
    ").attr({title:this.tooltipZoomOut}).css({left:"0px",overflow:"hidden",width:this.ZOOM_OUT_BUTTON_WIDTH+"px",height:this.ZOOM_OUT_BUTTON_HEIGHT+"px",position:"absolute"}).disableImageSelect().loadAlphaImage({size:new Size(this.ZOOM_OUT_BUTTON_WIDTH,this.ZOOM_OUT_BUTTON_HEIGHT)}); a.append(this.getSliderImg(this.ZOOM_OUT_BUTTON_LEFT,this.ZOOM_OUT_BUTTON_TOP));return a;};SliderZoomControlHorizontal.prototype.createZoomInButton=function(){var a=$("
    ").attr({title:this.tooltipZoomIn}).css({left:this.ZOOM_OUT_BUTTON_WIDTH+(this.zoomCount*this.STEP_WIDTH)+"px",overflow:"hidden",width:this.ZOOM_IN_BUTTON_WIDTH,height:this.ZOOM_IN_BUTTON_HEIGHT,position:"absolute"});a.append(this.getSliderImg(this.ZOOM_IN_BUTTON_LEFT,this.ZOOM_IN_BUTTON_TOP)); return a;};SliderZoomControlHorizontal.prototype.createSliderGraduatedBar=function(){var a;if(this.maxZoom>20){a=this._createSliderGraduatedBar();}else{a=this._createSliderGraduatedBar_old();}return a;};SliderZoomControlHorizontal.prototype._createSliderGraduatedBar_old=function(){this.STEP_WIDE_LIMIT=9;this.GRADUATED_BAR_OFFSET=this.ZOOM_OUT_BUTTON_LEFT-this.ZOOM_OUT_BUTTON_WIDTH;var e=$("
    ").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",left:this.ZOOM_OUT_BUTTON_HEIGHT}); for(var c=this.minZoom,a=this.maxZoom;c<=a;c++){var b=$("
    ").css({left:((c-1)*this.STEP_WIDTH)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var g=c;if(g<=this.STEP_WIDE_LIMIT){g=0;}else{g-=this.STEP_WIDE_LIMIT;}var f=this.NORMAL_STEP_TOP;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_TOP;}var d=this.getSliderImg(this.GRADUATED_BAR_OFFSET-(g*this.STEP_WIDTH),f); d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);}return e;};SliderZoomControlHorizontal.prototype._createSliderGraduatedBar=function(){var e=$("
    ").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",left:this.ZOOM_OUT_BUTTON_HEIGHT});var a=this.maxZoom-this.minZoom;var g=(a=this.minZoom; c--){var b=$("
    ").css({left:((c-1)*this.STEP_WIDTH)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var f=this.NORMAL_STEP_TOP;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_TOP;}var d=this.getSliderImg(this.GRADUATED_BAR_OFFSET+(g*this.STEP_WIDTH),f);d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);if(gthis.maxZoom){continue;}var c=$("
    ");b.append(c);var f=g*this.STEP_WIDTH;c.css({left:(parseInt(f-(this.STEP_WIDTH/2)+this.ZOOM_OUT_BUTTON_WIDTH+this.BLOW_OFFSET_X))+"px",top:this.STEP_HEIGHT+this.BLOW_OFFSET_Y+"px",overflow:"hidden",width:this.BLOW_WIDTH+"px",height:this.BLOW_HEIGHT+"px",position:"absolute"}); c.bind("click",this.bindThis(this.changeClickedZoomLevel));c.bind("mousedown",this.bindThis(this.stopEvent));c.bind("dblclick",this.bindThis(this.stopEvent));var d=this.getSliderImg(this.BLOW_LEFT-(parseInt(e%2)*this.BLOW_WIDTH),this.BLOW_TOP-(parseInt(e/2)*this.BLOW_HEIGHT));d.attr(this.ATTRIBUTE_ZOOM,(f/this.STEP_WIDTH));c.append(d);}};SliderZoomControlHorizontal.prototype.createGripBar=function(){var b=$("
    ").css({top:"-2px",overflow:"hidden",width:this.GRIP_WIDTH+"px",height:this.GRIP_HEIGHT+"px",position:"absolute"}); var a=this.getSliderImg(this.GRIP_LEFT,this.GRIP_TOP);b.append(a);return b;};SliderZoomControlHorizontal.prototype.adjustMinZoomLevel=function(){if(this.adjustPosition!==0){this.graduatedBar.css("left",this.adjustPosition+this.ZOOM_OUT_BUTTON_WIDTH+"px");this.blowButtons.css("left",this.adjustPosition+"px");}};SliderZoomControlHorizontal.prototype.startGrip=function(a){if(!this.gripMouseDown){this.gripDragged=false; this.gripMouseDownX=a.screenX;this.gripPosX=parseInt(this.gripBar.css("left"));if(this.hasCaptureFunc){this.gripBar[0].setCapture();}this.gripMouseDown=true;}return this.stopEvent(a);};SliderZoomControlHorizontal.prototype.moveGrip=function(c){if(this.gripMouseDown){var a=c.screenX-this.gripMouseDownX;var b=this.gripPosX+a;if(bthis.ZOOM_OUT_BUTTON_WIDTH+(this.zoomCount-1)*this.STEP_WIDTH){b=this.ZOOM_OUT_BUTTON_WIDTH+(this.zoomCount-1)*this.STEP_WIDTH; }this.gripBar.css("left",b+"px");this.gripDragged=true;}};SliderZoomControlHorizontal.prototype.endGrip=function(b){if(this.hasCaptureFunc){document.releaseCapture();}if(this.gripMouseDown){if(this.gripDragged){var a=parseInt(this.gripBar.css("left"));var c=this.getZoomLevelByGripBarPos(a);if(c>this.maxZoom){c=this.maxZoom;}if(c0){b+=(this.minZoom-1);}return b;};SliderZoomControlHorizontal.prototype.getGripBarPosByZoomLevel=function(a){return this.ZOOM_OUT_BUTTON_WIDTH+(a*this.STEP_WIDTH)+this.GRIP_OFFSET;};SliderZoomControlHorizontal.prototype.setGripBarPosition=function(b){if(!this.gripBar){return; }if(bthis.maxZoom){this.gripBar.css("visibility","hidden");}else{this.gripBar.css("visibility","visible");}var a=this.getGripBarPosByZoomLevel(b);if(this.adjustPosition!==0){a+=this.adjustPosition;}this.gripBar.css("left",a+"px");};var IndoorMapControl=Y.IndoorMapControl=Y.extend(Y.Control,function(a,b){this.options=b||{};this.indoorMapLayer=a;});IndoorMapControl.prototype.initialize=function(a){this.indoormaps=this.indoorMapLayer.indoormaps;this.buttonHeight=44;this.drumHeight=this.buttonHeight*6;this.listlength=0;this.minTop=0;this.maxTop=0;this.listTop;this.prevY;this.diffY;this.mosuedown=false;this.dragging=false;this.setFloorIdTime; this.node=$('
    ');this.scaler=$('
    ');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"}); }this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY; b.diffY=0;c.stopPropagation();c.preventDefault();};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}d.stopPropagation();d.preventDefault();};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px"); b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY; f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup); }else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps; b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a); var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1; var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;b');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false; });var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("
    "+e[b]+"
    ");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove); $(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a); };Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8; };IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a');this.scaler=$('
    ');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"}); }this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY; b.diffY=0;c.stopPropagation();c.preventDefault();};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}d.stopPropagation();d.preventDefault();};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px"); b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY; f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup); }else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps; b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a); var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1; var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;b');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false; });var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("
    "+e[b]+"
    ");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove); $(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a); };Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8; };IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a

    ').append($('\u76ee\u5370\u306b\u623b\u308b').loadAlphaImage());a.bind("click",function(){if(d.isVisibleHomeIcon()){d.panToHome();}else{d.showIcon();}});}if(this.visible){this.showIcon(c); }else{this.hideIcon();}return a;};HomeControl.prototype.isVisibleHomeIcon=HomeControl.prototype.isHome=function(){return this.visible;};HomeControl.prototype.getLatLng=function(){if(this.marker){return this.marker.getLatLng();}};HomeControl.prototype.setIcon=function(c){var a=c||this.map.getCenter();var d=this;if(!this.visible){return;}if(a){if(this.marker){this.map.closeInfoWindow();this.getMarkerPlotLayer().removeFeature(this.marker); }var b=new Y.Icon();b.iconHtml="

    ";b.iconAnchor=new Y.Point(12,34);if(this.draggable){this.marker=new Y.Marker(a,{icon:b,draggable:true,title:"\u76ee\u5370\u3092\u30c9\u30e9\u30c3\u30b0\u3067\u304d\u307e\u3059"});}else{this.marker=new Y.Marker(a,{icon:b});}this.getMarkerPlotLayer().addFeature(this.marker);if(this.visibleButton){this.marker.bind("click",function(){var g=$("
    "); var e=$("

    ");g.append(e);var f=$("\u76ee\u5370\u3092\u975e\u8868\u793a\u306b\u3059\u308b").click(function(h){h.stopPropagation();d.hideIcon();});e.append(f);e.append("\u76ee\u5370\u306e\u518d\u8868\u793a\uff1a\u5730\u56f3\u306e"+d.embedPosition()+"\u306e");e.append($('\u76ee\u5370\u3092\u4e2d\u5fc3\u70b9\u306b\u8868\u793a\u3059\u308b').loadAlphaImage({size:new Y.Size(20,20)})); e.append("\u3092\u30af\u30ea\u30c3\u30af");if(d.popup){d.marker.openInfoWindow(g);}});}}this.map.bind("dragend",function(){var e=d.map.getBounds();if(!e.containsLatLng(d.getLatLng())){d.map.closeInfoWindow();}});};HomeControl.prototype.embedPosition=function(){if(!this.position){return"";}switch(this.position.anchor){case Y.ControlPosition.TOP_RIGHT:return"\u53f3\u4e0a";case Y.ControlPosition.TOP_LEFT:return"\u5de6\u4e0a";case Y.ControlPosition.BOTTOM_RIGHT:return"\u53f3\u4e0b"; case Y.ControlPosition.BOTTOM_LEFT:return"\u5de6\u4e0b";}};HomeControl.prototype.panToHome=function(){if(this.isVisibleHomeIcon()){this.map.panTo(this.marker.getLatLng(),true);}};HomeControl.prototype.showIcon=function(a){this.visible=true;if(this.node){this.node.attr("title","\u76ee\u5370\u306b\u623b\u308b");this.node.attr("className","yolp-home-on");}this.setIcon(a);};HomeControl.prototype.hideIcon=function(){this.map.closeInfoWindow(); if(this.marker){this.getMarkerPlotLayer().removeFeature(this.marker);}if(this.node){this.node.attr("title","\u76ee\u5370\u3092\u4e2d\u5fc3\u70b9\u306b\u8868\u793a\u3059\u308b");this.node.attr("className","yolp-home-off");}this.visible=false;};HomeControl.prototype.hide=function(){if(this.visible===true){this.hideIcon();this._isHideMarker=true;}if(this.visibleButton===true){Y.Control.prototype.hide.call(this);}};HomeControl.prototype.show=function(){if(this._isHideMarker===true){this.showIcon(); this._isHideMarker=false;}if(this.visibleButton===true){Y.Control.prototype.show.call(this);}};HomeControl.prototype.isVisible=function(){if(this.visibleButton===true){return Y.Control.prototype.isVisible.call(this);}else{return this.visible;}};HomeControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_RIGHT,new Y.Size(5,5));};HomeControl.prototype.remove=function(){if(this.marker){this.getMarkerPlotLayer().removeFeature(this.marker); }this.node.remove();};HomeControl.prototype.printable=function(){return false;};HomeControl.prototype.getMarkerPlotLayer=function(){var a=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);if(!a){a=new Y.FeatureLayer("label");Y.Cache.set(Y.Cache.KEY_PLOT_LAYER,a);}if(!a.isInitialized()){var b=this.map;b.addLayer(a);}return a;};var LayerSet=Y.LayerSet=function(c,e,b){this.name=c;this.layers=e||[];this.layerList=new Y.LayerList();for(var d=0,a=this.layers.length;d1&&Y.Util.Platform.devicePixelRatio<2){this.magnify=1.4140625; }else{if(Y.Util.Platform.devicePixelRatio>=2){this.magnify=2;}}};LayerSet.prototype.initialize=function(d){this.map=d;var b=Y.DEFAULT_TILE_SIZE*this.magnify/Y.Util.Platform.devicePixelRatio;for(var a=0,c=this.layers.length;a').css({left:"1px",bottom:"1px",position:"absolute"});var a=$("
    ").css({position:"static",fontSize:"12px",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"bold",textAlign:"left",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",lineHeight:"100%",MozUserSelect:"none"}).attr("cr",true); a.unselectable="on";a.onselectstart=function(){return false;};a.oncontextmenu=function(){return false;};if(Y.Util.Platform.isIPhone){b.css("-webkit-transform","translate3d(0, 0, 0)");}b.append(a);};LayerSet.prototype.copyrightRemove=function(){if(this.copyrightContainer){this.copyrightContainer.remove();}this.copyrightAppended=false;};LayerSet.prototype.setImageTileCustomStyle=function(c,d){var e=this.layers; for(var b=0,a=e.length;b'); this.map.mapContainer.append(c);this.container=c;Y.Event.trigger(this,"containerRefreshed");}this.drawLayer(b);};Layer.prototype.drawLayer=function(a){};Layer.prototype.isDrawn=function(){return(this.container!=null);};Layer.prototype.setName=function(a){this.name=a;};Layer.prototype.getName=function(){return this.name;};Layer.prototype.getContainer=function(){return this.container;};Layer.prototype.getMap=function(){return this.map; };Layer.prototype.getMapContainer=function(){return this.map.mapContainer;};Layer.prototype.initDrawer=function(){if(!this.isSystemLayer()){this.drawer=this.map.getSystemLayer().getDrawer();}else{var b=this.drawContainer=this.createDrawContainer();var a=this.getContainer();$(a).append(b);this.drawer=new Drawer(b[0]);}};Layer.prototype.getDrawer=function(){if(!this.drawer){this.initDrawer();}return this.drawer; };Layer.prototype.fromContainerPixelToLatLng=function(a){return this.map.fromContainerPixelToLatLng(a);};Layer.prototype.fromDivPixelToLatLng=function(a){return this.map.fromDivPixelToLatLng(a);};Layer.prototype.fromLatLngToContainerPixel=function(a){return this.map.fromLatLngToContainerPixel(a);};Layer.prototype.fromLatLngToDivPixel=function(a){return this.map.fromLatLngToDivPixel(a);};Layer.prototype.fromLatLngsToDivPixels=function(a,b){return this.map.fromLatLngsToDivPixels(a,b); };Layer.prototype.fromLatLngToTile=function(a){return this.map.fromLatLngToTile(a);};Layer.prototype.fromTileToLatLng=function(c,b,a,d){return this.map.fromTileToLatLng(c,b,a,d);};Layer.prototype.bind=function(a,b,d){var c=Event.addListener(this,a,b,d);return c;};Layer.prototype.unbind=function(a){Event.removeListener(a);};Layer.prototype.getCopyrightCollection=function(){return this.copyrightCollection; };Layer.prototype.hasFeature=function(){return false;};Layer.prototype.show=function(){this.container.css("visibility","visible");};Layer.prototype.hide=function(){this.container.css("visibility","hidden");};Layer.prototype.isHidden=function(){return this.container.css("visibility")=="hidden";};var LayerList=Y.LayerList=function(){this.firstNode=null;this.lastNode=null;this.size=0;};LayerList.prototype.add=function(b,c){if(!this.firstNode){this.firstNode=this.lastNode=new LayerListNode(b);this.size++;return;}var a=c||this.lastNode;var d=new LayerListNode(b,a,a.getNextNode());a.setNextNode(d);if(a===this.lastNode){this.lastNode=d;}this.size++;};LayerList.prototype.remove=function(c){for(var d=this.firstNode; d;d=d.getNextNode()){if(d.getLayer()===c){var b=d.getPrevNode();var a=d.getNextNode();if(d===this.firstNode){this.firstNode=a;}else{b.setNextNode(a);}if(d===this.lastNode){this.lastNode=b;}else{a.setPrevNode(b);}d.destruct();this.size--;return;}}};LayerList.prototype.forEach=function(c,b){for(var a=this.firstNode;a;a=a.getNextNode()){c.call(b,a.getLayer());}};LayerList.prototype.isEmpty=function(){return(this.size===0); };LayerList.prototype.count=function(){return this.size;};LayerList.prototype.getFirstNode=function(){return this.firstNode;};LayerList.prototype.getLastNode=function(){return this.lastNode;};LayerList.prototype.clear=function(){this.firstNode=null;this.lastNode=null;this.size=0;};var LayerListNode=Y.LayerListNode=function(c,b,a){this.layer=c;this.prevNode=b||null;this.nextNode=a||null;};LayerListNode.prototype.getLayer=function(){return this.layer; };LayerListNode.prototype.setNextNode=function(a){this.nextNode=a;};LayerListNode.prototype.getNextNode=function(){return this.nextNode;};LayerListNode.prototype.setPrevNode=function(a){this.prevNode=a;};LayerListNode.prototype.getPrevNode=function(){return this.prevNode;};LayerListNode.prototype.destruct=function(){this.layer=null;this.prevNode=null;this.nextNode=null;};var FeatureLayer=Y.FeatureLayer=Y.extend(Layer,function(a){this.features=[];Layer.apply(this,[a,{}]);});FeatureLayer.prototype.initialize=function(){Layer.prototype.initialize.apply(this,arguments);this.zIndex=1;if(!this.features){this.features=[];}for(var b=0,a=this.features.length;b');return a;};FeatureLayer.prototype.onPan=function(a,i){if(!this.isSystemLayer()){return;}this.scrollOffset.offset(a,i);var h=this.mapSize.height-this.drawContainerSize;var f=this.drawContainerSize;var c=this.mapSize.width-this.drawContainerSize; var g=this.drawContainerSize;if(this.scrollOffset.xg||this.scrollOffset.yf){var d=this.map.getMapContainerXY();this.drawer.clear();this.drawContainer.css({top:+(-this.drawContainerSize-d.y)+"px",left:(-this.drawContainerSize-d.x)+"px"});this.scrollOffset=new Y.Point(0,0);var b=new Y.Point(-(-this.drawContainerSize-d.x),-(-this.drawContainerSize-d.y)); Y.Event.trigger(this,"drawcontainerchanged",b);}};FeatureLayer.prototype.addFeature=function(a){if(!this.initialized){return;}a.initialize(this);this.features.push(a);a.draw(true);Event.trigger(this,"addfeature",a);};FeatureLayer.prototype.addFeatures=function(c){if(!this.initialized){return;}for(var b=0,a=c.length;b=2){for(var d=0;d=1;};FeatureLayer.prototype.onMapResize=function(){var b=this.mapSize;var a=this.mapSize=this.map.getSize();if(b.hasSmallerSide(a)){this.onPan(-parseInt(a.width-b.width),-parseInt(a.height-b.height));}};FeatureLayer.prototype.renewOffset=function(d){this.vectorOffset=d;if(!this.hasFeature()){return; }for(var c=0,a=this.features.length;c=0){for(q=0;q0){for(var a=0;athis.tileSize.width/2){a++; }else{b++;}if(this.tileCenter.y>this.tileSize.height/2){d++;}else{i++;}var e=m.width/2;var c=(this.tileSize.width-this.tileCenter.x)+(a*this.tileSize.width);if(c<=e){a++;}var j=this.tileCenter.x+(b*this.tileSize.width);if(j<=e){b++;}var h=m.height/2;var k=(this.tileSize.height-this.tileCenter.y)+(d*this.tileSize.height);if(kz){K=K-z-1;}while(K<0){K=K+z+1;}}var M=this.getTileById(K,F);var t=(a.x+(G-P)*this.tileSize.width);var r=(a.y+(O-F)*this.tileSize.height);if(M!=null){M.setPosition(Math.round(t),Math.round(r));M.enable=true;}else{var q=new Point((G+0.5)*this.tileSize.width,(F+0.5)*this.tileSize.height);var H=q.distance(L);var g=new Object(); g.i=G;g.j=F;g.tx=K;g.ty=F;g.x=t;g.y=r;g.name=this.name;u.push({d:H,request:g});}}}u.sort(function(i,d){return i.d-d.d;});this._newTiles=[];for(var E=0;E0){this.requestTiles(I);}};TileLayer.prototype.getTileById=function(c,a){for(var d=0,b=this.tileArray.length; d");a.css({position:"absolute",border:"1px solid #ff0000",width:""+this.tileSize.width+"px",height:""+this.tileSize.height+"px"});return a;};TileLayer.prototype.drawTile=function(c,b,a,e){var d=this.getFirstEditableTile();if(d){d.enable=true;d.dom.css({visibility:"hidden"});d.tx=c;d.ty=b;d.setPosition(a,e);this._newTiles.push({dom:d.dom});}};TileLayer.prototype.show=function(){this._isHidden=false; if(this.isDrawn()){this.reflectContainerDisplay();}};TileLayer.prototype.hide=function(){this._isHidden=true;if(this.isDrawn()){this.reflectContainerDisplay();}};TileLayer.prototype.reflectContainerDisplay=function(){if(this._isHidden){this.container.css("display","none");}else{this.container.css("display","");}};TileLayer.prototype.isHidden=function(){return this._isHidden;};var ImageTileLayer=Y.ImageTileLayer=Y.extend(TileLayer,function(c,b,a){this.url=b; this.count=0;this.options=a||{};this.opacity=this.options.opacity||1;this.customStyle=this.options.customStyle||{};this.rangeOfBounds=this.options.rangeOfBounds||null;if(Util.Platform.isRetinaDisplay){this.customStyle["-webkit-transform"]="translate3d(0px, 0px, 0px)";}this.smartphoneOptimize=this.options.smartphoneOptimize||false;this.enableFadeIn=(typeof this.options.enableFadeIn==="undefined")?true:this.options.enableFadeIn; this.MIN_ZOOM_LEVEL=this.options.minZoomLevel||1;this.MAX_ZOOM_LEVEL=this.options.maxZoomLevel||20;TileLayer.apply(this,[c,this.options.tileSize,this.options]);});ImageTileLayer.prototype.createTile=function(){var d=[];d.push("position:absolute");d.push("padding:0px");d.push("visibility:hidden");d.push("border:none");d.push("margin:0px");d.push("width:"+this.tileSize.width+"px");d.push("height:"+this.tileSize.height+"px"); d.push("zIndex:0");var c=this.customStyle;for(var b in c){if(!c.hasOwnProperty(b)){continue;}d.push(b+":"+c[b]);}var f=d.join(";");var a;if($.browser.msie){a='';}else{a='';}var e=$(a).disableImageSelect();e.bind("load",function(){$(this).css("visibility","visible");});e.loadAlphaImage({size:this.tileSize});if(this.opacity&&this.opacity<1){$(e).fadeTo(0,this.opacity); }return e;};ImageTileLayer.prototype.setCustomStyle=function(d,e){this.customStyle[d]=e;var b=this.tileArray,a=b.length;for(var c=0;ce){return"";}if(b instanceof Object){b=b[e]||b["0"]; this.count=b.length<=this.count?0:this.count;b=b[this.count++];}var d=b+"x="+a+"&y="+g+"&z="+f;if(this.smartphoneOptimize){var c=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);if(c!==Y.DEFAULT_TILE_SIZE){d+="&size="+c;}}return d;};ImageTileLayer.prototype.requestTiles=function(a){var b=a;var c=this;setTimeout(function(){for(var g=0,e=b.length;ge){return"";}if(b instanceof Object){b=b[e]||b["0"];this.count=b[this.vendor].length<=this.count?0:this.count;b=b[this.vendor][this.count++];if(this.vendor===Y.YahooMapLayer.VENDOR.INC){if(!this.map.enableGWS){b=this.osmUrl;}}}var d=b+"x="+a+"&y="+f+"&z="+e;if(this.smartphoneOptimize){var c=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(c!==Y.DEFAULT_TILE_SIZE){d+="&size="+c;}}return d;};YahooMapImageTileLayer.prototype.setUrl=function(b,a){this.url[b]=a;};YahooMapImageTileLayer.prototype.getVendor=function(){return this.vendor;};YahooMapImageTileLayer.prototype.setVendor=function(a){this.vendor=a;};var PhotoLabelLayer=Y.PhotoLabelLayer=Y.extend(Y.ImageTileLayer,function(c,b,a){var c=c||"PhotoLabel";var b=b||"http://m.map.c.yimg.jp/m?r=1&style=base:hybrid&";var a=a||{};a.smartphoneOptimize=true;Y.ImageTileLayer.apply(this,[c,b,a]);});PhotoLabelLayer.prototype.drawLayer=function(a){if(this.isHidden()||!this.map.getConfigure("hybridPhoto")){return;}this.__super__.drawLayer.call(this,a);};PhotoLabelLayer.prototype.reflectContainerDisplay=function(){if(this._isHidden){this.container.css("display","none"); }else{this.container.css("display","");this.drawLayer(true);}};var ListingLayer=Y.ListingLayer=Y.extend(Y.FeatureLayer,function(b,a){a=a||{};this.url=a.url;this.autoPanMap=(a.autoPanMap!=undefined)?a.autoPanMap:true;this.autoUpdate=a.autoUpdate||false;if(this.autoUpdate){this.setAutoUpdate(this.autoUpdate);}this.infoWindowEnable=(a.infoWindowEnable!=undefined)?a.infoWindowEnable:true;this.maxMapCount=a.maxMapCount||1000;this.maxListCount=a.maxListCount||1000;this.chunk=a.chunk||false; this.chunkCount=a.chunkCount||10;this.name="Listing";this.dispProperties={};FeatureLayer.apply(this,[name]);});ListingLayer.prototype.initializeByListing=function(a){this.initialized=true;this.listing=a;};ListingLayer.prototype.isInitialized=function(){return this.initialized&&this.map;};ListingLayer.prototype.isAutoPanMap=function(){return this.autoPanMap;};ListingLayer.prototype.setAutoPanMap=function(a){this.autoPanMap=a; };ListingLayer.prototype.isInfoWindowEnable=function(){return this.infoWindowEnable;};ListingLayer.prototype.execute=function(b,c,a){var b=b||{};this.drawList(b.query,b,c,a);};ListingLayer.prototype.drawList=function(c,b,e,a){this.query=c;this.options=$.extend(true,{},b);Y.Event.trigger(this,"drawstart");this.ydf=null;var d=this;this.abort();this.ajaxRequest=this.search(c,this.options,function(f){d.ydf=d.ydfFilter(f); d.drawYDFToMap(d.ydf);d.drawYDFToList(d.ydf);if(e){e(f);}Y.Event.trigger(d,"drawend");},function(){if(typeof(a)=="function"){a();}});return this.ajaxRequest;};ListingLayer.prototype.abort=function(){if(this.ajaxRequest){this.ajaxRequest.abort();}};ListingLayer.prototype.ydfFilter=function(a){return a;};ListingLayer.prototype.getApiUrl=function(){return this.url;};ListingLayer.prototype.getApiRequest=function(c,b){var a=["results","start","detail","center","dist","bbox","lat","lon"]; var d=$.extend(true,{},b);d.ei="utf-8";d.query=c||"";d.output=b.output||"jsonp";d.results=b.results||10;d.page=b.page||1;d.detail=b.detail||"";if(b.center){d.lat=b.center.lat();d.lon=b.center.lng();if(b.dist){d.dist=b.dist;}delete d.center;}if(b.bbox){if(typeof(b.bbox)==="string"){d.bbox=b.bbox;}else{d.bbox=b.bbox.toUrlValue();}}return d;};ListingLayer.prototype.search=function(h,l,k,j){var a=new Y.Request(); try{var b=this.getApiUrl();var d=this.getApiRequest(h,l);if(!b||!d){Util.error({message:"getApiRequest\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f\u3002"});}d.opt=l.opt||{};if(d.opt&&typeof(d.opt)=="object"){var c=d.opt;d.opt="";for(var f in c){d.opt+="&"+f+"="+encodeURI(c[f]);}}$.each(d,function(e,i){if(typeof(i)=="function"){delete d[e];}});return a.request({url:b,data:d,dataType:"jsonp",success:function(e){var i=new Y.YDF(e);k(i);},error:function(e,m,i){Util.error(j,i); }});}catch(g){Util.error(j,g);}};ListingLayer.prototype.setAutoUpdate=function(c,h,f,j,g){this.updateRate=h||this.updateRate||1;this.boundsRate=f||this.boundsRate||1;this.autoUpdate=c;this.callback=j||"";this.error=g||"";if(!this.map||!this.map.isLoaded()){return;}if(c){this.setAutoPanMap(false);this.moveend=this.map.bind("moveend",a);this.zoomend=this.map.bind("zoomend",a);}else{if(this.moveend){this.map.unbind(this.moveend); }if(this.zoomend){this.map.unbind(this.zoomend);}}Y.Event.trigger(this,"autoUpdateChanged",c);var e=this;var b=this.map.getZoom();var i=this.map.getBounds();function a(){if(e.map.isInfoWindowInBounds()){return;}if(!e.options){return;}if(!e.ydf){d();return;}if(b!=e.map.getZoom()){d();return;}var k=e.map.getBounds();var l=i.copy();l.extendRate(e.updateRate);if(!l.containsBounds(k)){d();}}function d(){if(e.updating){clearTimeout(e.updating); }e.updating=setTimeout(function(){var k=e.map.getBounds();k.extendRate(e.boundsRate);delete e.options.center;e.options.bbox=k;e.options.page=1;i=k;b=e.map.getZoom();e.drawList(e.query,e.options,e.callback,e.error);},500);}};ListingLayer.prototype.isAutoUpdate=function(){return this.autoUpdate;};ListingLayer.prototype.fitToMap=function(){if(this.ydf&&this.ydf.result.bounds&&!this.ydf.result.bounds.isEmpty()){this.getMap().drawBounds(this.ydf.result.bounds); }};ListingLayer.prototype.drawYDFToMap=function(f){if(!this.isInitialized()){return;}if(!this.map){return;}this.clearFeatures();if(this.container){this.container.empty();}this.map.closeInfoWindow();if((this.isAutoPanMap()&&!this.isAutoUpdate())||!this.map.isLoaded()){}var g=this;if(f&&f.result&&f.result.count>0){var e=[];for(var c=0,a=f.features.length;cthis.maxMapCount-2){break;}}this.addFeatures(e.reverse());}};ListingLayer.prototype.clearList=function(){if(this.listContainer){this.listContainer.empty();}};ListingLayer.prototype.drawYDFToList=function(b){if(!this.listing){return;}if(!this.listContainer){this.listContainer=$("
    "); this.listing.container.append(this.listContainer);}var a=this.createResultHtml(b,this.query,this.options);this.listContainer.html(a);};ListingLayer.prototype.createResultHtml=function(d,c,a){var b=$('
    ');if(d.result.count<=0){b.append(this.createNoMatchHtml(d,c,a));return b;}b.append(this.createHeaderHtml(d,c,a));b.append(this.createHeaderAdHtml(d,c,a));b.append(this.createListHtml(d,c,a)); b.append(this.createFooterAdHtml(d,c,a));b.append(this.createFooterHtml(d,c,a));return b;};ListingLayer.prototype.createNoMatchHtml=function(d,c,a){var b=$('
    '+c+"\u306b\u4e00\u81f4\u3059\u308b\u7d50\u679c\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002
    ");return b;};ListingLayer.prototype.createHeaderHtml=function(b){var a=$('
    ');if(b.result.description&&b.result.description!=""){a.append($("

    ").html(b.result.description)); }if(b.result.total!=b.result.count){a.append("

    \u5168"+b.result.total+"\u4ef6\u4e2d"+b.result.start+"\uff5e"+(b.result.start+b.result.count-1)+"\u4ef6\u8868\u793a

    ");}return a;};ListingLayer.prototype.createListHtml=function(g,e,a){var c=$('
      ');for(var b=0;bthis.maxListCount-2){break; }}return c;};ListingLayer.prototype.createItemHtml=function(b,d){if(!d){return"";}if(!d.name){return"";}var c=$("
    • ");if(d.property.ListDescription){c.append(Util.stripScript(d.property.ListDescription));var e=c;}else{if(d.icon){var a='';c.append(a);}var e=$('

      ').html(d.name);c.append(e);}var f=this;if(f.map){e.bind("click",function(){f.openInfoWindow(d); });e.bind("mouseover",function(){});e.css("cursor","pointer");}return c;};ListingLayer.prototype.createFooterHtml=function(b){var d=$('');if(b.result.total==b.result.count){return d;}var f=this.chunkCount;if((f%2)==0){var j=f/2;var a=f/2-1;}else{var j=f/2-0.5;var a=f/2-0.5;}var g=this.options.results;var h=this.getCurrentPage();var k=this.getTotalPageCount();var e=this; if(h>1){d.append($('\u524d\u3078').bind("click",function(){e.drawPage(h-1);}));}if(this.chunk&&this.chunkCount>0){if(h<=a||k<=f){for(var c=1;c<=k&&c<=f;c++){if(h==c){d.append(""+c+"");}else{d.append($(""+c+" ").bind("click",{num:c},function(i){e.drawPage(i.data.num); }));}}}else{if(h>k-j){for(var c=k-f+1;c<=k;c++){if(h==c){d.append(""+c+"");}else{d.append($(""+c+"").bind("click",{num:c},function(i){e.drawPage(i.data.num);}));}}}else{for(var c=h-a;c<=h+j;c++){if(h==c){d.append(""+c+"");}else{d.append($(""+c+"").bind("click",{num:c},function(i){e.drawPage(i.data.num); }));}}}}}if(h\u6b21\u3078').bind("click",function(){e.drawPage(h+1);}));}return d;};ListingLayer.prototype.createHeaderAdHtml=function(c,b,a){return"";};ListingLayer.prototype.createFooterAdHtml=function(c,b,a){return"";};ListingLayer.prototype.createCopyrightHtml=function(a){};ListingLayer.prototype.openInfoWindow=function(b,d){var c={}; var a=this.createInfoWindowMaxContentHtml(b);if(a){c.maxContent=a;}if(d){c.maximize=true;}if(this.isHidden()){this.infoWindow=this.map.openInfoWindow(b.getLatLng(),this.createInfoWindowHtml(b),c);}else{this.infoWindow=b.openInfoWindow(this.createInfoWindowHtml(b),c);}this.infoWindowFeature=b;Y.Event.trigger(this,"infowindowopen",b);};ListingLayer.prototype.getInfoWindow=function(){if(this.infoWindow&&!this.infoWindow.isHidden()){return this.infoWindow; }};ListingLayer.prototype.getOpenFeature=function(){if(this.infoWindow&&!this.infoWindow.isHidden()){return this.infoWindowFeature;}};ListingLayer.prototype.createInfoWindowMaxContentHtml=function(a){return null;};ListingLayer.prototype.createInfoWindowHtml=function(b){var a=$('
      ');var c=b.description||b.Description||b.property.description||b.property.Description||b.property.desc||b.name; if(c){c=$('
      ').html(Util.stripScript(c));a.append(c);}return a;};ListingLayer.prototype.getCustomIcon=function(a,b){return null;};ListingLayer.prototype.getCustomStyle=function(a,b){return null;};ListingLayer.prototype.getYDF=function(){return this.ydf;};ListingLayer.prototype.hasResult=function(){return this.ydf!=null;};ListingLayer.prototype.getTotalPageCount=function(){var a=this.options.results||10; return parseInt((this.ydf.result.total-1)/a)+1;};ListingLayer.prototype.getCurrentPage=function(){var a=this.options.results||10;return parseInt(this.ydf.result.start/a)+1;};ListingLayer.prototype.getStart=function(){return this.ydf.result.start;};ListingLayer.prototype.drawPage=function(a){this.options.page=a;this.drawList(this.query,this.options);};ListingLayer.prototype.bind=function(a,b,c){return Event.addListener(this,a,b,c); };ListingLayer.prototype.unbind=function(a){Event.removeListener(a);};ListingLayer.prototype.remove=function(){FeatureLayer.prototype.remove.apply(this);if(this.listContainer){this.listContainer.empty();this.listContainer.remove();this.listContainer=null;}if(this.infoWindow){this.infoWindow.close();this.infoWindow=null;}if(this.moveend){this.map.unbind(this.moveend);}if(this.zoomend){this.map.unbind(this.zoomend); }if(this.rotateOpenInfoWindowId){clearInterval(this.rotateOpenInfoWindowId);}Y.Event.trigger(this,"removelayer");};ListingLayer.prototype.rotateOpenInfoWindow=function(c){var b=0;var d=this;function a(){if(d.ydf&&d.ydf.features[b]){var e=d.ydf.features[b];d.openInfoWindow(e);b++;}}if(this.rotateOpenInfoWindowId){clearInterval(this.rotateOpenInfoWindowId);}this.rotateOpenInfoWindowId=setInterval(a,c); setTimeout(a,10);};ListingLayer.prototype.clearRotateOpenInfoWindow=function(){if(this.rotateOpenInfoWindowId){clearInterval(this.rotateOpenInfoWindowId);}};var GeoXmlLayer=Y.GeoXmlLayer=Y.extend(Y.ListingLayer,function(b,a){this.xmlurl=b;a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/geoxmlProxy";Y.ListingLayer.apply(this,["Geoxml",a]);});GeoXmlLayer.prototype.getApiRequest=function(b,a){a.apiurl=this.xmlurl;a.output="jsonp";return Y.ListingLayer.prototype.getApiRequest.apply(this,[b,a]);};var WMSLayer=Y.WMSLayer=Y.extend(Y.ImageTileLayer,function(c,b,d,a){this.defaultparams={VERSION:"1.1.1",STYLES:"",SRS:"",FORMAT:"image/png",WIDTH:Y.DEFAULT_TILE_SIZE,HEIGHT:Y.DEFAULT_TILE_SIZE,SERVICE:"WMS"};a=a||{};a.enableFadeIn=a.enableFadeIn||false;this.options=a;this.wmsurl=b||"";this.name=c||"";this.wmsbaseurl=a.wmsbaseurl||"";this.params=$.extend(this.defaultparams,d||{});this.wmslayers=[];this.drawpost=false; this.cache=new Y.Request();Y.ImageTileLayer.apply(this,[this.name,"",a]);});WMSLayer.prototype.setCapabilities=function(b){var a=this;this.getCapabilities(function(c){a.wmsbaseurl=$($(c).find("Service > OnlineResource")[0]).attr("xlink:href");var d=$(c).find("Capability > Layer > Layer");a.wmslayers=[];d.each(function(){var e={};e.name=$(this).find("Name").text();e.title=$(this).find("Title").text(); if($(this).find("ScaleHint").length>0){e.scalemin=$($(this).find("ScaleHint")[0]).attr("min");e.scalemax=$($(this).find("ScaleHint")[0]).attr("max");e.scalemin=e.scalemin*39.3701*72/Math.sqrt(2);e.scalemax=e.scalemax*39.3701*72/Math.sqrt(2);}if($(this).find("LatLonBoundingBox").length>0){e.latlngbox={};e.latlngbox.minx=$($(this).find("LatLonBoundingBox")[0]).attr("minx");e.latlngbox.miny=$($(this).find("LatLonBoundingBox")[0]).attr("miny"); e.latlngbox.maxx=$($(this).find("LatLonBoundingBox")[0]).attr("maxx");e.latlngbox.maxy=$($(this).find("LatLonBoundingBox")[0]).attr("maxy");}a.wmslayers.push(e);});Y.Event.trigger(a,"loadcomplete");});};WMSLayer.prototype.getCapabilities=function(d,b){var a="/OpenLocalPlatform/V1/wms";var c=this.params;c.REQUEST="getcapabilities";c.wmsurl=this.wmsurl;c.t="__";this.cache.request({url:a,data:c,cache:false,dataType:"xml",success:function(e){d(e); },error:function(f){b(f);}});};WMSLayer.prototype.isLimitScale=function(c){var b=Math.pow(2,(20-c))*2980;var a=false;$.each(this.wmslayers,function(d,e){if(e.scalemin){if(b<=e.scalemin){a=true;}}if(e.scalemax){if(b>=e.scalemax){a=true;}}});a=false;return a;};WMSLayer.prototype.isOutOfRange=function(a,d,c){var b=false;return b;};WMSLayer.prototype.drawLayer=function(a){var b=this;if(!this.wmsbaseurl||this.wmsbaseurl==""){Y.Event.addListener(this,"loadcomplete",function(){Y.TileLayer.prototype.drawLayer.apply(b,[a]); });this.setCapabilities();}else{Y.TileLayer.prototype.drawLayer.apply(this,[a]);}};WMSLayer.prototype.getImageSrc=function(f,e){var d=this.map.getZoom();if(this.isLimitScale(d)){return"";}if(this.isOutOfRange(f,e,d)){return"";}if(!this.wmsbaseurl||this.wmsbaseurl==""){return"";}var g=this.fromTileToLatLng(f,e,0,0);var b=this.fromTileToLatLng(f+1,e+1,0,0);var c=this.map.getProjection();var j=c.fromPixelToMeters(c.fromLatLngToPixel(g,d),d); var h=c.fromPixelToMeters(c.fromLatLngToPixel(b,d),d);var i=j.x+","+j.y+","+h.x+","+h.y;delete this.params.wmsurl;this.params.BBOX=i;this.params.REQUEST="GetMap";this.params.SRS="EPSG:900913";this.params.LAYERS=this.params.LAYERS||this.params.layers||"";delete this.params.layers;var a=this.wmsbaseurl+$.param(this.params);return a;};var BlankMapLayer=Y.BlankMapLayer=Y.extend(ImageTileLayer,function(a){var a=a||{};a.smartphoneOptimize=true;this.param=a.param||{};this.url="http://m.map.c.yimg.jp/b?r=1&";this.name="BlankMapLayer";ImageTileLayer.apply(this,[this.name,this.url,a]);});BlankMapLayer.prototype.getImageSrc=function(a,d,c){var b=ImageTileLayer.prototype.getImageSrc.call(this,a,d,c);return b+this.createQueryParameter();}; BlankMapLayer.prototype.setStyle=function(c,e){var g="";for(var b in c){if(c.hasOwnProperty(b)){var f=c[b];if(b=="label"){for(var d in f){if(f.hasOwnProperty(d)){var a=f[d];if(g!=""){g+="|";}g+="bm.c."+d+":"+a;}}}else{if(b=="border"){for(var d in f){if(f.hasOwnProperty(d)){var a=f[d];if(g!=""){g+="|";}g+="bm.b."+d+":"+a;}}}else{if(b=="area"){for(var d in f){if(f.hasOwnProperty(d)){var a=f[d];if(g!=""){g+="|"; }g+="bm.p."+d+":"+a;}}}else{if(b=="bg"){if(g!=""){g+="|";}var a=f;g+="bm.bg:"+a;}}}}}}this.param.style=g;if(e){this.redraw();}};BlankMapLayer.prototype.createQueryParameter=function(){var b="";for(var a in this.param){if(this.param.hasOwnProperty(a)){b+="&"+a+"="+encodeURIComponent(this.param[a]);}}return b;};BlankMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty(); this.drawLayer(true);}};var StyleMapLayer=Y.StyleMapLayer=Y.extend(Y.ImageTileLayer,function(a,b){this.url="http://m.map.c.yimg.jp/m?";this.base=a?a:"standard";this.mode=b||"";this.style="";this.onZoomend=null;this.onLayerListChanged=null;this.onLayerSetChanged=null;this.onMoved=null;Y.ImageTileLayer.apply(this,["StyleMapLayer",this.url,{copyrightCollection:new Y.CopyrightCollection(),smartphoneOptimize:true}]);});StyleMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b); var a=this;setTimeout(function(){var e=a.map.getCurrentLayerSet().getLayers();for(var d=0,c=e.length;dd){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ad){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ad){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a0?true:false;c.setEnable(e);}f=this.getCurrentLayerList(Y.LayerSetId.EARTHQUAKEPHOTO);if(!f){return;}var a=this.map.getLayerSets()[Y.LayerSetId.EARTHQUAKEPHOTO];if(a){e=f.length>0?true:false;a.setEnable(e);}var b;if(!this.enableVendorChange){f=this.getCurrentLayerList(Y.LayerSetId.PHOTO); if(!f){return;}b=this.map.getLayerSets()[Y.LayerSetId.PHOTO];if(b){e=f.length>0?true:false;b.setEnable(e);}}else{b=this.map.getLayerSets()[Y.LayerSetId.PHOTO];if(b){b.setEnable(true);}}};YahooMapLayer.prototype.autoLayerChange=function(){var c=this.map.getCurrentLayerSetId();var s=this.map.getZoom();var f=this.level2Scale(s);var j=this.map.getCurrentLayerSet();var g=j.getLayers();var a=[];var o=YahooMapLayer.VENDOR; for(var h=0;h0&&j.copyrightContainer){for(var h=0;h=d[a].scale){b=d[a].scale;}}return this.scale2Level(b);};YahooMapLayer.prototype.IsNearestJapan=function(){return this.IsEnableLayer(this.keyLayer.id,this.keyLayer.scale);};YahooMapLayer.prototype.getExistJpVendor=function(c,a){var b=this.config[c].maxJpScale; if(!b||b>=a){return true;}return false;};YahooMapLayer.prototype.getTargetVendor=function(h,c,g){var e=YahooMapLayer.VENDOR;if(!this.enableVendorChange){return e.JAPAN;}var d=this.level2Scale(c);var f=this.getExistJpVendor(h,d);if(this.hasNasaPhoto){f=true;}var a=this.IsEnableLayer(h,d);var b=this.IsNearestJapan();if(g==e.JAPAN){if((!f||(!a&&!b))){g=e.INC;}}else{if(g==e.INC){if(f&&(a||b)){g=e.JAPAN; }}}return g;};YahooMapLayer.prototype.getCurrentLayerListCopyright=function(g,d){var c="";var e=this.getCurrentLayerList(g);if(!e){return c;}var f=this.level2Scale(d);var a=e.length;for(var b=0;b"));}return b.join("
      "); };YahooMapLayer.prototype.moveEnd=function(){if(this.timer!==null){clearTimeout(this.timer);this.timer=null;}if(this.lastMoveEndTime==new Date(1,1,1).getTime()){this.lastMoveEndTime=new Date().getTime();}var a=new Date().getTime();if((a-this.lastMoveEndTime)>this.forceTime){this.timerGetYahooMapLayer();}else{this.timer=setInterval(this.bindThis(this.timerGetYahooMapLayer),this.interval);}};YahooMapLayer.prototype.timerGetYahooMapLayer=function(){if(this.timer!==null){clearTimeout(this.timer); this.timer=null;}this.lastMoveEndTime=new Date(1,1,1).getTime();this.getYahooMapLayer();};YahooMapLayer.prototype.bindThis=function(b){var a=this;return function(){b.apply(a,arguments);};};YahooMapLayer.prototype.enableNasaPhotoLayer=function(){var a=this.map.getCurrentLayerSetId();if(a!==Y.LayerSetId.PHOTO){return false;}var c=this.map.getZoom();var b=this.getCurrentLayerListCopyright(a,c);return b.toUpperCase().indexOf("NASA")!==-1; };YahooMapLayer.prototype.getApplicationId=Y.Service.getApplicationId;var PanControl=Y.PanControl=Y.extend(Control,function(a){this.nodes=[];this.options=a||{};});PanControl.prototype.initialize=function(c){var a="/OpenLocalPlatform/V1/jsapi/image/img.png";var b=$('

      ').append($('\u4e0a\u3078\u9032\u3080').loadAlphaImage()); b.click(function(d){c.panDirection(0,0.5,true);d.stopPropagation();});b.dblclick(function(d){d.stopPropagation();});c.mainContainer.append(b);this.nodes.push(b);var b=$('

      ').append($('').loadAlphaImage());b.click(function(d){c.panDirection(-0.5,0,true); d.stopPropagation();});b.dblclick(function(d){d.stopPropagation();});c.mainContainer.append(b);this.nodes.push(b);var b=$('

      ').append($('').loadAlphaImage());b.click(function(d){c.panDirection(0,-0.5,true);d.stopPropagation(); });b.dblclick(function(d){d.stopPropagation();});c.mainContainer.append(b);this.nodes.push(b);var b=$('

      ').append($('').loadAlphaImage());b.click(function(d){c.panDirection(0.5,0,true);d.stopPropagation();});b.dblclick(function(d){d.stopPropagation(); });c.mainContainer.append(b);this.nodes.push(b);return b;};PanControl.prototype.getDefaultPosition=function(){return null;};PanControl.prototype.hide=function(){for(var a=0;a<4;a++){this.nodes[a].hide();}};PanControl.prototype.show=function(){for(var a=0;a<4;a++){this.nodes[a].show();}};var ApiProxyLayer=Y.ApiProxyLayer=Y.extend(Y.ListingLayer,function(b,a){this.api=b.api;this.apiurl=b.apiurl;a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/ydf";ListingLayer.apply(this,["ApiProxy",a]);});ApiProxyLayer.prototype.getApiRequest=function(b,a){if(this.api){a.api=this.api;}if(this.apiurl){a.apiurl=this.apiurl;}a.output="jsonp";return ListingLayer.prototype.getApiRequest.apply(this,[b,a]); };var NavigationLayer=Y.NavigationLayer=Y.extend(Y.FeatureLayer,function(b){var b=b||{};var a=b.url||"";this.navi=new Y.Navigation(a);this.travelMode=Y.Navigation.TRAVEL_MODE_WALKING;this.autoPanMap=b.autoPanMap||false;this.maxDistance=b.maxDistance||200;this.walkingDistance=b.walkingDistance||3;FeatureLayer.apply(this,["navigation",b]);});NavigationLayer.prototype.drawRoute=function(e,d,a,c){var b=this; a=a||{};a.gui=(this.detail)?3:1;a.relays=a.relays||this.relays||[];a.trv=0;a.def=1;a.gl=2;a.spw=4.8;a.sp="80,80,30,20,20,20,20,20,30";if(this.walkingDistance&&e.isLatLng&&d.isLatLng&&e.distance(d)>this.walkingDistance){this.travelMode=Navigation.TRAVEL_MODE_DRIVING;}else{this.travelMode=Navigation.TRAVEL_MODE_WALKING;}a.tra=this.travelMode;this.from=e;this.to=d;this.options=a;this.ydf=null;Y.Event.trigger(this,"drawstart"); this.removeRoute();this.navi.search(e,d,a,function(f){b.drawYDF(f);if(c){c(f);}});};NavigationLayer.prototype.drawYDF=function(e){e=e||this.ydf;if(!e){return;}if(e.result.totalDistance>this.maxDistance){if(e.result.status>=0){e.result.status=Navigation.ERROR_MAX_DISTANCE;}}var c=(e.result.status<0);this.clearFeatures();this.fromFeature=null;this.toFeature=null;this.routeFeature=null;this.relayFeatures=[]; this.guideFeatures=[];var b=[];for(var a in e.features){var d=e.features[a];if(d.id==="from"){this.fromFeature=d;}else{if(d.id==="to"){this.toFeature=d;}else{if(d.id==="route"){if(!c){this.routeFeature=d;}else{d=null;}}else{if(d.id.substr(0,6)==="relay-"){this.relayFeatures.push(d);}else{if(d.id.substr(0,6)==="guide-"){if(!this.detail){continue;}this.guideFeatures.push(d);}}}}}if(d){b.push(d);}}this.addFeatures(b.reverse()); this.setEditable();this.ydf=e;if(this.autoPanMap){this.fitToMap();}Y.Event.trigger(this,"drawend");};NavigationLayer.prototype.getDistance=function(){if(this.ydf&&this.ydf.result.totalDistance){return this.ydf.result.totalDistance;}return null;};NavigationLayer.prototype.getDuration=function(){if(this.ydf&&this.ydf.result.totalTime){return this.ydf.result.totalTime;}return null;};NavigationLayer.prototype.getFromFeature=function(){return this.fromFeature; };NavigationLayer.prototype.getToFeature=function(){return this.toFeature;};NavigationLayer.prototype.getRouteFeature=function(){return this.routeFeature;};NavigationLayer.prototype.getGuideFeatures=function(){return this.guideFeatures;};NavigationLayer.prototype.getRelayFeatures=function(){return this.relayFeatures;};NavigationLayer.prototype.hasResult=function(){return this.ydf&&this.ydf.result.status>=0; };NavigationLayer.prototype.isError=function(){return this.ydf.result.status<0;};NavigationLayer.prototype.getError=function(){if(this.ydf&&this.ydf.result.status<0){return this.ydf.result.status;}return false;};NavigationLayer.prototype.fitToMap=function(){if(this.ydf&&this.ydf.result&&!this.isError()){this.map.drawBounds(this.ydf.result.bounds.copy().extendRate(1.2));}};NavigationLayer.prototype.setEditable=function(b){var c=this; this.editable=(b!=undefined)?b:this.editable;if(this.fromFeature){var a=this.fromFeature;a.setDraggable(this.editable);a.bind("dragend",function(){c.setFromLatLng(this.getLatLng());Y.Event.trigger(c,"fromdragend");});if(this.editable){a.setTitle("\u51fa\u767a\u5730\u70b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u79fb\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 ["+a.name+"]");}}if(this.toFeature){var a=this.toFeature;a.setDraggable(this.editable);a.bind("dragend",function(){c.setToLatLng(this.getLatLng()); Y.Event.trigger(c,"todragend");});if(this.editable){a.setTitle("\u5230\u7740\u5730\u70b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u79fb\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 ["+a.name+"]");}}};NavigationLayer.prototype.setDetail=function(a){if(this.detail!=a){this.detail=a;this.drawRoute(this.from,this.to,this.options);}};NavigationLayer.prototype.isDetail=function(){return this.detail;};NavigationLayer.prototype.addRelay=function(b){var a=this.relays||[];a.push(b);this.relays=a;this.options.relays=a; this.drawRoute(this.from,this.to,this.options);};NavigationLayer.prototype.getRelays=function(){return this.relays;};NavigationLayer.prototype.setFromLatLng=function(e,b,d){var c=this;var a=false;if(!b){c.getAddress(e,function(f){c.setFromLatLng(e,f,d);});return;}if(this.fromFeature){this.fromFeature.setLatLng(e);this.fromFeature.name=b;}else{this.fromFeature=this.navi.createFromFeature(e,b);this.addFeature(this.fromFeature); }this.options=this.options||{};this.options.from_label=b||"";this.from=e;if(this.to&&this.from){this.drawRoute(this.from,this.to,this.options);a=true;}else{this.setEditable();}if(d){d(a);}};NavigationLayer.prototype.setToLatLng=function(e,b,d){var c=this;var a=false;if(!b){this.getAddress(e,function(f){c.setToLatLng(e,f,d);});return;}if(this.toFeature){this.toFeature.setLatLng(e);this.toFeature.name=b; }else{this.toFeature=this.navi.createToFeature(e,b);this.addFeature(this.toFeature);}this.options=this.options||{};this.options.to_label=b||"";this.to=e;if(this.to&&this.from){this.drawRoute(this.from,this.to,this.options);a=true;}else{this.setEditable();}if(d){d(a);}};NavigationLayer.prototype.removeFrom=function(){if(this.fromFeature){this.removeFeature(this.fromFeature);this.fromFeature=null;this.from=null; }this.removeRoute();};NavigationLayer.prototype.removeTo=function(){if(this.toFeature){this.removeFeature(this.toFeature);this.toFeature=null;this.to=null;}this.removeRoute();};NavigationLayer.prototype.removeRoute=function(){if(this.routeFeature){this.removeFeature(this.routeFeature);}if(this.relayFeatures){for(var a in this.relayFeatures){this.removeFeature(this.relayFeatures[a]);}}if(this.guideFeatures){for(var a in this.guideFeatures){this.removeFeature(this.guideFeatures[a]); }}};NavigationLayer.prototype.getAddress=function(c,b){var a=new Y.LocationInfo();a.getAddress(c,{},function(d){if(d.AddressString){b(d.AddressString.unstructuredAddressString);}else{b(" ");}});};var TunnelLayer=Y.TunnelLayer=Y.extend(Y.ListingLayer,function(b,a){this.api=b.api;this.apiurl=b.apiurl;a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/ydf";this.empty_query=a.emptyQuery||false;if(a.appid){this.appid=a.appid;}ListingLayer.apply(this,["Tunnel",a]);});TunnelLayer.prototype.getApiRequest=function(b,a){a=a||{};a.opt=a.opt||{};if(this.api){a.api=this.api;}if(this.apiurl){a.apiurl=this.apiurl; }if(this.appid){a.appid=this.appid;}a.output="jsonp";if(this.req_opt){$.each(this.req_opt,function(c,f){if(!a.opt[c]){a.opt[c]=f;}});}var d=ListingLayer.prototype.getApiRequest.apply(this,[b,a]);if((!d.query||d.query.length==0)&&!this.empty_query){Y.Log.write("\u691c\u7d22\u6587\u5b57\u5217\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002");return null;}if(this.map&&!d.bbox&&!d.lat&&!d.lon){if(this.map.getBounds){d.bbox=this.map.getBounds().toUrlValue();}else{if(this.map.getCenter){var e=this.map.getCenter(); d.lat=e.lat();d.lon=e.lng();}}}return d;};TunnelLayer.prototype.enableEmptyQuery=function(a){this.empty_query=a||true;};TunnelLayer.prototype.setAppId=function(a){this.appid=a;};TunnelLayer.prototype.setOption=function(a,b){if(!this.req_opt){this.req_opt={};}this.req_opt[a]=b;};var WeatherMapLayer=Y.WeatherMapLayer=Y.extend(Y.ImageTileLayer,function(a){this.url="http://weather.map.c.yimg.jp/weather?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";this.viewdate="";this.timeshift=0;this.DATA_INTERVAL=60000*5;this.timerId=null;this.nowdate=0;this.olddate=0;this.updateInterval=this.DATA_INTERVAL;this.isAutoUpdateRunning=false;this.MAX_ANIMATION_TIME=3600000;this.MIN_ANIMATION_TIME=-7200000; this.animationTimerId=0;this.animationInterval=1000;this.animationTimeshift=this.MIN_ANIMATION_TIME;this.animationStep=30000;this.animationFinishListener=null;this.animationUpdateListener=null;this.updateListener=null;this.isAnimationStarting=false;this.MAX_ZOOM_LEVEL=15;this.MIN_ZOOM_LEVEL=1;this.onLayerSetChangedScaleChange=null;this.onLayerSetChangedLabelOff=null;this.NOW_TIME_OFFSET=-10*60*1000; this.gettime=null;this.mtime=null;this.name="WeatherMapLayer";a=a||{};this.options=a;this.options.opacity=this.options.opacity||1;var b=new Y.LatLngBounds(new Y.LatLng(20.004167,118.00625),new Y.LatLng(47.995833,149.99375));this.options.rangeOfBounds=b;this.isDisplay=false;this.timeContainer=null;this.timePosition=null;this._serviceName="WeatherMapLayer";this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4"; this.viewdate=this.convTime();this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,this.url,this.options]);});WeatherMapLayer.prototype.initialize=function(a){this.__super__.initialize.call(this,a);this.timeContainer=$('
      ').hide(); a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();});this.logging();};WeatherMapLayer.prototype.startAutoUpdate=function(b){var a=this; b=b||{};if(b.interval){this.setAutoUpdateInterval(b.interval);}this.timerId=setInterval(function(){a.updateWeather({timeupdate:true});},a.updateInterval);this.isAutoUpdateRunning=true;};WeatherMapLayer.prototype.stopAutoUpdate=function(){clearInterval(this.timerId);this.timerId=0;this.isAutoUpdateRunning=false;};WeatherMapLayer.prototype.setUpdateCallback=function(a){if(a){if(this.updateListener){this.unbind(this.updateListener); }this.updateListener=this.bind("dataupdate",a,window);}};WeatherMapLayer.prototype.setAutoUpdateInterval=function(a){if(a>=2){this.updateInterval=a*60000;}};WeatherMapLayer.prototype.getTimeShift=function(){return this.timeshift;};WeatherMapLayer.prototype.setTimeShift=function(a){if(!isNaN(a)){this.timeshift=parseInt(a,10);this.setAnimationTimeShift(this.timeshift);}};WeatherMapLayer.prototype.updateWeather=function(b){b=b||{}; var a=(typeof b.timeupdate==="undefined")?false:b.timeupdate;var c=this;this.getDate(function(){c.redraw();},a);};WeatherMapLayer.prototype.getNowDate=function(){return this.viewdate;};WeatherMapLayer.prototype.startAnimation=function(b){if(this.animationTimerId!==0){clearTimeout(this.animationTimerId);this.animationTimerId=0;}b=b||{};if(b.onFinish){this.setAnimationFinishCallback(b.onFinish);}if(b.onUpdate){this.setAnimationUpdateCallback(b.onUpdate); }if(b.interval){this.setAnimationInterval(b.interval);}if(b.step){this.setAnimationStep(b.step);}var a=this;if(this.timerId!==0&&this.isAutoUpdateRunning===true){clearInterval(this.timerId);this.timerId=0;}this.timeshift=this.animationTimeshift;this.isAnimationStarting=true;this.animationTimerId=setTimeout(function(){a.runAnimation();},this.animationInterval);};WeatherMapLayer.prototype.stopAnimation=function(){clearTimeout(this.animationTimerId); this.animationTimerId=0;if(this.isAutoUpdateRunning===true){this.startAutoUpdate();}Y.Event.trigger(this,"animationstop");};WeatherMapLayer.prototype.setAnimationFinishCallback=function(a){if(a){if(this.animationFinishListener){this.unbind(this.animationFinishListener);}this.animationFinishListener=this.bind("animationstop",a,window);}};WeatherMapLayer.prototype.setAnimationUpdateCallback=function(a){if(a){if(this.animationUpdateListener){this.unbind(this.animationUpdateListener); }this.animationUpdateListener=this.bind("animationupdate",a,window);}};WeatherMapLayer.prototype.setAnimationInterval=function(a){this.animationInterval=parseInt(a,10);};WeatherMapLayer.prototype.setAnimationStep=function(a){this.animationStep=parseInt(a,10);};WeatherMapLayer.prototype.getAnimationTimeShift=function(){return this.animationTimeshift;};WeatherMapLayer.prototype.setAnimationTimeShift=function(a){if(!isNaN(a)){this.animationTimeshift=parseInt(a,10); }};WeatherMapLayer.prototype.setDispTime=function(a){this.isDisplay=a;this.dispTime();};WeatherMapLayer.prototype.setTimePosition=function(a){if(!this.timeContainer){return;}if(a){this.timePosition=a;}var c={position:"absolute"};var d=this.timePosition.offset;var b=this.timePosition.anchor;if(b===Y.ControlPosition.TOP_RIGHT){c.right=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.TOP_LEFT){c.left=d.width+"px"; c.top=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_RIGHT){c.right=d.width+"px";c.bottom=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_LEFT){c.left=d.width+"px";c.bottom=d.height+"px";}}}}this.timeContainer.css(c);};WeatherMapLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"]; this.count=b.length<=this.count?0:this.count;b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);}return c;};WeatherMapLayer.prototype.remove=function(){if(this.timerId!==0){this.stopAutoUpdate();}if(this.animationTimerId!==0){this.stopAnimation();}if(this.onLayerSetChangedScaleChange){this.map.unbind(this.onLayerSetChangedScaleChange);this.onLayerSetChangedScaleChange=null; }if(this.onLayerSetChangedLabelOff){this.map.unbind(this.onLayerSetChangedLabelOff);this.onLayerSetChangedLabelOff=null;}if(this.animationFinishListener){this.unbind(this.animationFinishListener);this.animationFinishListener=null;}if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);this.animationUpdateListener=null;}if(this.updateListener){this.unbind(this.updateListener);this.updateListener=null; }if(this.timeContainer){this.timeContainer.remove();this.timeContainer=null;}if(this.eventZoomend){this.map.unbind(this.eventZoomend);}if(this.eventLayersetchanged){this.map.unbind(this.eventLayersetchanged);}if(this.eventLoad){this.map.unbind(this.eventLoad);}Y.Event.trigger(this.map,"dispweathermaplayer",false);Y.Layer.prototype.remove.call(this);};WeatherMapLayer.prototype.getDefaultTimePosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(1,26)); };WeatherMapLayer.prototype.dispTime=function(){if(!this.map||!this.timeContainer||!this.viewdate){return;}var b=this.map.getZoom();if(this.MAX_ZOOM_LEVEL>=b&&this.MIN_ZOOM_LEVEL<=b){var a=this.viewdate.slice(0,4)+"\u5e74"+this.viewdate.slice(4,6)+"\u6708"+this.viewdate.slice(6,8)+"\u65e5"+this.viewdate.slice(8,10)+"\u6642"+this.viewdate.slice(10,12)+"\u5206";if(this.isDisplay){this.timeContainer.html(a).show();}else{this.timeContainer.hide(); }Y.Event.trigger(this.map,"dispweathermaplayer",true);}else{this.timeContainer.hide();Y.Event.trigger(this.map,"dispweathermaplayer",false);}};WeatherMapLayer.prototype.UpdateWeather=function(){this.updateWeather();};WeatherMapLayer.prototype.getDate=function(h,b){if(!b){if(this.gettime){var f=new Date();var a=f.getTime()-this.gettime;if(this.updateInterval>a){var c=this.mtime+parseInt(this.timeshift,10); this.nowdate=Math.floor(c/this.DATA_INTERVAL)*(this.DATA_INTERVAL);h();return;}}}var g=this;var e=this.getApplicationId();if(!e){e=this.appid;}var f=new Date();this.gettime=f.getTime();$.ajax({url:this.url_info,data:"appid="+e,dataType:"jsonp",timeout:3000,success:function(j){var l=j.Observation;if(typeof l==="string"){var k=new Date(l.slice(0,4),l.slice(4,6)-1,l.slice(6,8),l.slice(8,10),l.slice(10,12)); g.mtime=k.getTime();var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);}h();},error:function(){var j=new Date();g.mtime=j.getTime()+g.NOW_TIME_OFFSET;var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);h();}});};WeatherMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty(); this.drawLayer(true);this.olddate=this.nowdate;this.dispTime();Y.Event.trigger(this,"dataupdate");}};WeatherMapLayer.prototype.runAnimation=function(){var a=this;a.updateAnimationWeather();if(a.isAnimationStarting===true){a.animationTimerId=setTimeout(function(){a.runAnimation();},a.animationInterval);}};WeatherMapLayer.prototype.AnimationWeather=function(){this.updateAnimationWeather();};WeatherMapLayer.prototype.updateAnimationWeather=function(){this.getAnimationDate(); if(this.nowdate!=this.olddate){var b=Math.floor(this.animationTimeshift/this.DATA_INTERVAL)*this.DATA_INTERVAL;if(this.timeshift!=b){this.timeshift=b;this.redraw();}}Y.Event.trigger(this,"animationupdate");var a=this.animationTimeshift+this.animationStep;if(this.MAX_ANIMATION_TIMEa){this.animationTimeshift=this.MIN_ANIMATION_TIME; this.isAnimationStarting=false;}else{this.animationTimeshift=a;}}if(this.isAnimationStarting===false){this.stopAnimation();return;}};WeatherMapLayer.prototype.getAnimationDate=function(){var a;if(this.mtime){a=this.mtime+parseInt(this.animationTimeshift,10);}else{var b=new Date();this.mtime=b.getTime()+this.NOW_TIME_OFFSET;a=this.mtime+parseInt(this.animationTimeshift,10);}this.nowdate=Math.floor(a/this.DATA_INTERVAL)*(this.DATA_INTERVAL); };WeatherMapLayer.prototype.convTime=function(a){var k=a;if(!k){var b=new Date();var h=b.getTime()+this.NOW_TIME_OFFSET+parseInt(this.timeshift,10);k=Math.floor(h/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}var j=new Date(k);var g=j.getYear();var f=j.getMonth()+1;var i=j.getDate();var c=j.getHours();var d=j.getMinutes();var e=j.getSeconds();if(g<2000){g+=1900;}if(f<10){f="0"+f;}if(i<10){i="0"+i;}if(c<10){c="0"+c; }if(d<10){d="0"+d;}if(e<10){e="0"+e;}return String(g)+String(f)+String(i)+String(c)+String(d)+String(e);};WeatherMapLayer.prototype.logging=function(){var b=this.map.getPlugin("YahooMapLayer");var a=this.findOwnApplicationId();if(b&&b.yml){b.yml.getYahooMapLayer({mode:"rainfall",appid:a,trigger:false});}};WeatherMapLayer.prototype.setApplicationId=Y.Service.setApplicationId;WeatherMapLayer.prototype.getApplicationId=Y.Service.getApplicationId; WeatherMapLayer.prototype.findOwnApplicationId=Y.Service.findOwnApplicationId;var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,""); this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVELd){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ad){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ad){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ai.maxDistance){h(Navigation.ERROR_MAX_DISTANCE); }else{c(e,f);}function c(m,l){if(typeof(m)==="string"){var k=Util.parseCoordinates(m);if(k&&k.length>0){c(k[0],l);return;}var j=new Y.GeoCoder();j.getLocation(m,{},function(n){if(n.result.count>0){c(n.features[0].getLatLng(),l);}});return;}else{if(!i.from_label){b(m,function(n){i.from_label=n;c(m,l);});}}if(typeof(l)==="string"){var k=Util.parseCoordinates(l);if(k&&k.length>0){b(k[0],function(n){i.to_label=n; c(m,k[0]);});}var j=new Y.GeoCoder();j.getLocation(l,{},function(n){if(n.result.count>0){c(m,n.features[0].getLatLng());}});return;}else{if(!i.to_label){b(l,function(n){i.to_label=n;c(m,l);});}}if(m.equals(l)){h(Navigation.ERROR_SAME_POINT);return;}a.from=m.lat()+","+m.lng();a.to=l.lat()+","+l.lng();if(a.relays&&typeof(a.relays)!="string"){a.relays=Util.encodeCoordinates(a.relays,",",true);}a.output="jsonp"; a.datum="wgs";d.req.request({url:d.url,data:a,dataType:"jsonp",success:function(n){var o=d.parseYDF(m,l,i,n);if(g){g(o);}},error:function(){onerror();}});}function b(l,k){var j=new Y.LocationInfo();j.getAddress(l,{},function(m){if(m.AddressString){k(m.AddressString.unstructuredAddressString);}else{k(" ");}});}};Navigation.prototype.parseYDF=function(q,c,d,k){var w={};w.result={status:k.Result,total:1,count:1,start:1,end:1,bounds:new Y.LatLngBounds()}; w.features=[];var h=this.createFromFeature(q,d.from_label);w.features.push(h);w.result.bounds.extend(h.getLatLng());var m=this.createToFeature(c,d.to_label);w.features.push(m);w.result.bounds.extend(m.getLatLng());if(k.Result<0){w.result.total=0;w.result.count=0;w.result.end=0;return w;}var s=k.Coordinate;var l=[];l.push(h.getLatLng());if(s.Part.Seg){s=[s.Part];}else{s=s.Part;}for(var t=0;t30){a=0;}var x=new Y.Icon();x.iconHtml="

      "; guideFeature=new Y.Marker(new Y.LatLng(p.y,p.x),{id:"guide-"+e,name:B,property:{sectionName:f.Name,code:p.code,toll:p.toll,name:p.name,rosenName:p.rosenname,time:p.time,dist:p.dist,distSum:o,turn:p.turn},icon:x,size:new Y.Size(19,26)});e++;w.features.push(guideFeature);}}w.result.totalDistance=k.distance/1000;w.result.totalTime=parseInt(k.totaltime);if(w.result.totalTime<=0){w.result.totalTime=1;}var e=1; if(d.relays){var v=Util.parseCoordinates(d.relays,",",true);for(var t in v){relayFeature=new Y.Marker(v[t],{id:"relay-"+e,name:"\u4e2d\u7d99\u70b9"+e,icon:new Y.Icon("http://i.yimg.jp/images/map/icon/pin_crimson_m/shape/icon_"+e+".png")});e++;w.features.push(relayFeature);}}return w;};Navigation.prototype.createFromFeature=function(d,a){a=a||d;var c=new Y.Icon("");c.iconHtml=$('

      '); c.iconSize=new Y.Size(24,35);c.iconAnchor=new Y.Point(12,35);c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);var b=new Y.Marker(d,{id:"from",name:a,icon:c,title:a});return b;};Navigation.prototype.createToFeature=function(d,a){a=a||d;var c=new Y.Icon("");c.iconHtml=$('

      ');c.iconSize=new Y.Size(24,35);c.iconAnchor=new Y.Point(12,35); c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);var b=new Y.Marker(d,{id:"to",name:a,icon:c,title:a});return b;};Navigation.TRAVEL_MODE_DRIVING=1;Navigation.TRAVEL_MODE_WALKING=2;Navigation.TRAVEL_PRIORITY_TIME=1;Navigation.TRAVEL_PRIORITY_DISTANCE=2;Navigation.TRAVEL_PRIORITY_RECOMMEND=3;Navigation.ERROR_INVALID_POINT=-2;Navigation.ERROR_MAX_DISTANCE=-10;Navigation.ERROR_SAME_POINT=-20; var AddressCategory=Y.AddressCategory=function(b,a){this.options=a||{};this.url=b||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/address";this.req=new Y.Request();this.coder=new Y.GeoCoder();};AddressCategory.prototype.getPath=function(a,c){var b=a||this.options||{};b.callapi="map";this.search(b,c);};AddressCategory.prototype.getList=function(a,c){var b=a||this.options||{};b.callapi="list";this.search(b,c); };AddressCategory.prototype.getCategory=function(a,d){var c=this;var b=a||this.options||{};b.callapi="both";if(a.ll&&a.ll instanceof LatLng){this.coder.execute({latlng:a.ll},function(e){if(e&&e.features&&e.features[0]&&e.features[0].property){var f=e.features[0].property;if(f.AddressElement){if(f.AddressElement[1]&&b.level>=2){b.ac=f.AddressElement[1].Code;}else{if(f.AddressElement[0]){b.ac=f.AddressElement[0].Code; }}}}c.search(b,d);});}else{this.search(b,d);}};AddressCategory.prototype.search=function(b,g){var f=this;var d=b||this.options||{};d.output="jsonp";if(b.ll&&b.ll instanceof LatLng){d.lat=b.ll.lat();d.lon=b.ll.lng();}var a={data:{ac:d.ac,az:d.az,level:d.level}};if(this.req.is_cache(a)){var e=this.req.load(a);g(this.req.load(a));return;}delete d.ll;this.req.request({url:this.url,data:d,dataType:"jsonp",success:function(c){f.req.save(a,c); g(c);},error:function(c){}});};var YDFMapping=Y.YDFMapping=function(b,a){this.cid=b||"";this.options=a||{};};YDFMapping.prototype.get=function(b,c){var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/ydfmapping";var b={cid:this.cid};$.ajax({url:a,data:b,async:false,dataType:"jsonp",success:function(d){c(d);}});};var RouteSearch=Y.RouteSearch=function(b,a){this.cache=new Y.Request();this.api=b||"http://navi.olp.yahooapis.jp/OpenLocalPlatform/V1/routeSearch";this.options=a||{};this.roadType={"0":"\u9ad8\u901f\u81ea\u52d5\u8eca\u56fd\u9053","1":"\u90fd\u5e02\u9ad8\u901f\u9053\u8def","2":"\u56fd\u9053","3":"\u4e3b\u8981\u5730\u65b9\u9053","4":"\u90fd\u9053\u5e9c\u770c\u9053","5":"\u57fa\u672c\u9053","6":"\u305d\u306e\u4ed6","7":"\u30d5\u30a7\u30ea\u30fc\u822a\u8def","10":"\u6709\u6599\u9053\u8def\uff08\u9ad8\u901f\u30fb\u90fd\u5e02\u9ad8\u901f\u4ee5\u5916\uff09"};this.direction={"1":"\u76f4\u9032","2":"\u53f3\u6298","3":"\u5de6\u6298","4":"\u659c\u3081\u524d\u65b9\u53f3\u65b9\u5411","5":"\u659c\u3081\u524d\u65b9\u5de6\u65b9\u5411","6":"\u659c\u3081\u5f8c\u65b9\u53f3\u65b9\u5411","7":"\u659c\u3081\u5f8c\u65b9\u5de6\u65b9\u5411","9":"\u51fa\u767a\u5730","10":"\u76ee\u7684\u5730"}; this.tollwayType={"0":"\u306a\u3057","1":"\u30a4\u30f3\u30bf\u30fc\u30c1\u30a7\u30f3\u30b8","2":"\u30a4\u30f3\u30bf\u30fc\u30c1\u30a7\u30f3\u30b8/\u30d1\u30fc\u30ad\u30f3\u30b0\u30a8\u30ea\u30a2","3":"\u30a4\u30f3\u30bf\u30fc\u30c1\u30a7\u30f3\u30b8/\u30b5\u30fc\u30d3\u30b9\u30a8\u30ea\u30a2","4":"\u30b8\u30e3\u30f3\u30af\u30b7\u30e7\u30f3","5":"\u30d1\u30fc\u30ad\u30f3\u30b0\u30a8\u30ea\u30a2","6":"\u30b5\u30fc\u30d3\u30b9\u30a8\u30ea\u30a2"};this.tollwayRoadFigure={"0":"\u306a\u3057","1":"\u672c\u7dda\u304b\u3089\u53f3\u3078\u5206\u5c90","2":"\u672c\u7dda\u304b\u3089\u5de6\u3078\u5206\u5c90","3":"Y\u5b57\u53f3\u3078\u5206\u5c90","4":"Y\u5b57\u5de6\u3078\u5206\u5c90","5":"\u672c\u7dda\u3078\u53f3\u304b\u3089\u5408\u6d41","6":"\u672c\u7dda\u3078\u5de6\u304b\u3089\u5408\u6d41","7":"\u672c\u7dda\u53f3\u5206\u5c90\u3042\u308a","8":"\u672c\u7dda\u5de6\u5206\u5c90\u3042\u308a"};this.regulationType={"3":"\u901a\u884c\u7981\u6b62\uff08\u6761\u4ef6\u4ed8\u304d\uff09","6":"\u4e00\u65b9\u901a\u884c\uff08\u6b63\u65b9\u5411\u3001\u6761\u4ef6\u4ed8\u304d\uff09","7":"\u4e00\u65b9\u901a\u884c\uff08\u9006\u65b9\u5411\u3001\u6761\u4ef6\u4ed8\u304d\uff09","8":"\u4e00\u65b9\u901a\u884c\uff08\u6b63\u9006\u5207\u308a\u66ff\u3048\u3042\u308a\uff09"};this.regulationCar={"1":"\u8eca\u4e21","2":"\u8eca\u4e21\uff08\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","3":"\u8eca\u4e21\uff08\u30bf\u30af\u30b7\u30fc\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","4":"\u8eca\u4e21\uff08\u30bf\u30af\u30b7\u30fc\u30fb\u8ca8\u7269\u3092\u9664\u304f\uff09","5":"\u8eca\u4e21\uff08\u30d0\u30b9\u3092\u9664\u304f\uff09","6":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","7":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","8":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","9":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u30fb\u81ea\u4e8c\u8f2a\u3092\u9664\u304f\uff09","10":"\u8eca\u4e21\uff08\u30de\u30a4\u30af\u30ed\u3092\u9664\u304f\uff09","11":"\u8eca\u4e21\uff08\u30de\u30a4\u30af\u30ed\u30fb\u30bf\u30af\u30b7\u30fc\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","12":"\u8eca\u4e21\uff08\u81ea\u4e8c\u8f2a\u3092\u9664\u304f\uff09","13":"\u8eca\u4e21\uff08\u89b3\u5149\u30d0\u30b9\u3092\u9664\u304f\uff09","14":"\u8eca\u4e21\uff08\u9ad8\u901f\u9053\u8def\u51fa\u5165\u8eca\u4e21\u3092\u9664\u304f\uff09","15":"\u8eca\u4e21\uff08\u5927\u8ca8\u3092\u9664\u304f\uff09","16":"\u8eca\u4e21\uff08\u5927\u578b\u30fb\u5927\u7279\u3092\u9664\u304f\uff09","17":"\u8eca\u4e21\uff08\u5927\u578b\u30fb\u5927\u7279\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","18":"\u8eca\u4e21\uff08\u5927\u578b\u3092\u9664\u304f\uff09","19":"\u8eca\u4e21\uff08\u5927\u578b\u30d0\u30b9\u30fb\u81ea\u4e8c\u8f2a\u3092\u9664\u304f\uff09","20":"\u8eca\u4e21\uff08\u5927\u578b\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","21":"\u8eca\u4e21\uff08\u4e8c\u8f2a\u3092\u9664\u304f\uff09","22":"\u8eca\u4e21\uff08\u4e8c\u8f2a\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","23":"\u8eca\u4e21\uff08\u666e\u4e57\u3092\u9664\u304f\uff09","24":"\u8eca\u4e21\uff08\u5927\u578b\u30d0\u30b9\u30fb\u666e\u901a\u3092\u9664\u304f\uff09","40":"\u4e8c\u8f2a","41":"\u4e8c\u8f2a\uff08125cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","42":"\u4e8c\u8f2a\uff08700cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","43":"\u4e8c\u8f2a\uff08700cc\u4ee5\u4e0a\u3092\u9664\u304f\uff09","44":"\u81ea\u4e8c\u8f2a","45":"\u81ea\u4e8c\u8f2a\uff08125cc\u4ee5\u4e0b\uff09","46":"\u81ea\u4e8c\u8f2a\uff08125cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","47":"\u81ea\u4e8c\u8f2a\uff08250cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","50":"\u4e57\u7528","53":"\u666e\u8ca8","55":"\u666e\u901a","56":"\u666e\u901a\uff08\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","57":"\u30bf\u30af\u30b7\u30fc","58":"\u666e\u4e57","59":"\u666e\u4e57\uff08\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","60":"\u8ca8\u7269","61":"\u30de\u30a4\u30af\u30ed","62":"\u30d0\u30b9","63":"\u5927\u578b\u30d0\u30b9","64":"\u5927\u8ca8","66":"\u5927\u8ca8\u7b49","68":"\u5927\u7279","70":"\u5927\u578b","71":"\u5927\u578b\uff08\u30de\u30a4\u30af\u30ed\u3092\u9664\u304f\uff09","72":"\u5927\u578b\uff08\u30d0\u30b9\u3092\u9664\u304f\uff09","73":"\u5927\u578b\uff08\u5927\u578b\u30d0\u30b9\u3092\u9664\u304f\uff09","77":"\u6700\u5927\u7a4d\u8f09\u91cf2t\u4ee5\u4e0a\u306e\u8ca8\u7269","78":"\u6700\u5927\u7a4d\u8f09\u91cf2.5t\u4ee5\u4e0a\u306e\u8ca8\u7269","79":"\u6700\u5927\u7a4d\u8f09\u91cf3t\u4ee5\u4e0a\u306e\u8ca8\u7269","80":"\u6700\u5927\u7a4d\u8f09\u91cf3.5t\u4ee5\u4e0a\u306e\u8ca8\u7269","81":"\u6700\u5927\u7a4d\u8f09\u91cf4t\u4ee5\u4e0a\u306e\u8ca8\u7269","82":"\u6700\u5927\u7a4d\u8f09\u91cf4.5t\u4ee5\u4e0a\u306e\u8ca8\u7269","87":"\u7dcf\u91cd\u91cf4t\u4ee5\u4e0a","88":"\u7dcf\u91cd\u91cf5t\u4ee5\u4e0a","89":"\u7dcf\u91cd\u91cf14t\u4ee5\u4e0a","90":"\u7dcf\u91cd\u91cf16t\u4ee5\u4e0a","91":"\u7dcf\u91cd\u91cf20t\u4ee5\u4e0a","92":"\u7dcf\u91cd\u91cf8t\u4ee5\u4e0a","93":"\u7dcf\u91cd\u91cf9t\u4ee5\u4e0a","96":"\u5371\u967a\u7269\u7a4d\u8f09\u8eca\u4e21","0":"\u672a\u8abf\u67fb"}; this.regulationDay={"1":"\u65e5\u30fb\u4f11\u65e5","2":"\u65e5\u30fb\u4f11\u65e5\u3092\u9664\u304f","3":"\u4f11\u65e5","4":"\u4f11\u65e5\u3092\u9664\u304f","5":"\u5e73\u65e5\uff08\u6708\uff5e\u571f\uff09","6":"\u65e5\u66dc","7":"\u6708\u66dc","8":"\u706b\u66dc","9":"\u6c34\u66dc","10":"\u6728\u66dc","11":"\u91d1\u66dc","12":"\u571f\u66dc","13":"\u571f\u65e5\u30fb\u4f11\u65e5","14":"\u571f\u65e5\u30fb\u4f11\u65e5\u3092\u9664\u304f","15":"\u5168\u66dc\u65e5","16":"\u65e5\u66dc\u3092\u9664\u304f","17":"\u65e5\u4f11\u306e\u524d\u65e5","0":"\u672a\u8abf\u67fb"};this.errorCode={"1002":"\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u4e0d\u6b63\u3067\u3059\u3002","1003":"\u63a2\u7d22\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002","1004":"\u59cb\u70b9\u8fd1\u508d\u306b\u9053\u8def\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","1005":"\u7d42\u70b9\u8fd1\u508d\u306b\u9053\u8def\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","1006":"\u63a2\u7d22\u6761\u4ef6\u306b\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3059\u3002","1007":"\u63a2\u7d22\u3092\u4e2d\u65ad\u8a2d\u5b9a\u306b\u3088\u308a\u4e2d\u65ad\u3057\u307e\u3057\u305f\u3002"};this.params=new Y.RouteSearch.Params(); this._serviceName="RouteSearch";};RouteSearch.prototype.execute=function(b,a){this.request(b,a);};RouteSearch.prototype.request=function(e,c){var b=this.params.toReqParams()||{};var a=this.getApplicationId();if(a){b.appid=a;}else{b.appid="D_KP2Maxg65ULY8iGPzdIAZ4zGseyKAu9z0DNA7xDKJX8LwkHgV3fX9p1E4Udw--";}var d=this;this.cache.request({url:this.api,data:b,dataType:"jsonp",success:function(k){if(typeof(k.Error)!="undefined"){var j=k.Error.Detail.Code; var i=typeof(d.errorCode[j])!="undefined"?d.errorCode[j]:"\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002";var g={code:j,message:i};e.call(c,false,g,null);return;}var f=k.ResultInfo.Description;var h=d.parseFeature(k.Feature);e.call(c,true,f,h,k);},error:function(){Y.Log.write("error");}});};RouteSearch.prototype.parseFeature=function(h){var c=[];var b="",a=[],g=[],d;for(var f=0,e=h.length;f0){c.push({route:{latlng:a},guide:g});}b=d;a=[];g=[];}a=a.concat(this.parseGeometry(h[f].Geometry));if(typeof(h[f].RouteInfo)!="undefined"){g.push(this.parseGuide(h[f].RouteInfo.Edge.GuideInfo.Guide));}}a=this.checkLatLngs(a);c.push({route:{latlng:a},guide:g});return c;};RouteSearch.prototype.checkLatLngs=function(a){var d=[];if(a.length>2){d[0]=a[0];for(var c=1,b=a.length-1; c0){n+=o+"\u6642\u9593";}if(p>0){n+=p+"\u5206";}n+=s+"\u79d2";b.property[t]={label:"\u6642\u9593",value:n};break;case"PassTime":var e=(isFinite(l)?l+"\u5206":l.replace("+09:00","").split("T").join(" "));b.property[t]={label:"\u7d4c\u904e\u6642\u9593",value:e};break;case"Regulations":b.property[t]={label:"\u4ea4\u901a\u898f\u5236",value:[]};if(l){for(var q=0,g=l.Regulation.length; q1){for(var b=0;b0){f=d[0];}else{f=this.nearestPolygon("pix",a);}var c=f.pix;var b=f.llp;var i=c.toMatrix();var h=b.toMatrix();return{pix:i,llp:h};};MapMixer.prototype.getMatrixByLLp=function(e,f){var d,c,b,i,h,g;var a=new Mx.Point(e,f);d=this.containsPolygon("llp",a);if(d.length>0){g=d[0];}else{g=this.nearestPolygon("llp",a);}c=g.pix;b=g.llp;i=c.toMatrix();h=b.toMatrix();return{pix:i,llp:h};};MapMixer.prototype.transfer=function(d,e,i,g){var f,h,j,c,b; j=[i,g,1];f=e.inverse();h=d.multiply(f);c=h.multiplyVector(j);b=new Mx.Point(c[0],c[1]);return b;};var MxMatrix=Mx.Matrix=function(a){this.ary=a;this.ary.copy=function(b){var d=[];if(!b){b=this;}for(var c=0;c1){b=1;}j=h*Math.acos(b);return j;};MxLine.util.intersection=function(d,c,b,a){if(((d.x-c.x)*(b.y-d.y)+(d.y-c.y)*(d.x-b.x))*((d.x-c.x)*(a.y-d.y)+(d.y-c.y)*(d.x-a.x))<0){if(((b.x-a.x)*(d.y-b.y)+(b.y-a.y)*(b.x-d.x))*((b.x-a.x)*(c.y-b.y)+(b.y-a.y)*(b.x-c.x))<0){return true;}}return false;};MxLine.prototype.distance=function(){var a=Mx.Line.util; var c=this.p1;var b=this.p2;if(!this.dist){this.dist=a.distance(c,b);}return this.dist;};MxLine.prototype.inter=function(b){var g,f,e,d,c;var a=Mx.Line.util;g=this.p1;f=this.p2;e=b.p1;d=b.p2;c=a.intersection(g,f,e,d);return c;};var MxPolygon=Mx.Polygon=function(a){this.vertex=this.checkParams(a);};MxPolygon.prototype.checkParams=function(d){var b=[];var c,e;if(!d){return[];}for(var a=0;a=a.x&&c.y>=a.y;return b;};MxPolygon.prototype.intersect=function(e){var r=e.vertex;var q=this.vertex;var h=r.length;var f=q.length;var l=Mx.Line.util;for(var j=0;j');this.inputNode=$('');a.append(this.inputNode);this.submitNode=$('');a.append(this.submitNode);var c=this;this.submitNode.click(function(){c.search(c.inputNode.val()); });return a;};GeoCoderControl.prototype.setQuery=function(b,a){this.inputNode.val(b);if(a){this.search(b);}};GeoCoderControl.prototype.search=function(a){var b=this;this.geocoder.getLocation(a,this.options,function(d){if(d.result.count>0){var c=d.features[0];b.map.panTo(c.getLatLng());Y.Event.trigger(b,"searchend",d);}else{Y.Event.trigger(b,"searcnerror");}},function(c){Y.Event.trigger(b,"searcnerror"); });};GeoCoderControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(2,18));};GeoCoderControl.prototype.remove=function(){this.submitnode.unbind("click",this.search);Control.prototype.remove.apply(this);};var AddressCategoryControl=Y.AddressCategoryControl=Y.extend(Y.Control,function(a,b){if(b){this.node=$("#"+b);}this.options=a||{};this.options.draggable=true;this.maximize=(this.options.maximize===undefined)?true:this.options.maximize;this.marker=(this.options.marker===undefined)?false:this.options.marker;this.addrctg=new Y.AddressCategory();this.addresslevel={world:{zoom:7,level:0},pref:{zoom:10,level:1},city:{zoom:13,level:2},oaza:{zoom:15,level:3},aza:{zoom:18,level:4},detail1:{zoom:19,level:5},detail2:{zoom:20,level:6}}; });AddressCategoryControl.prototype.initialize=function(c){var d=this;this.map=c;this.marking=false;var b=$("
      ").css({opacity:0.9});function a(){d.create(b,true);}this.showAddress=a;this.moveend=c.bind("moveendlazy",a);a();if(this.node){this.node.append(b);}else{if(this.options.draggable){new Y.DraggableObject(b);}return b;}};AddressCategoryControl.prototype.create=function(d,e){var g=this; var f=this.levelChoose();var a=this.map.getCenter();var c="";var b="";if(this.marking&&f>2){c=this.ac||"";b=this.az||"";}this.addrctg.getCategory({ac:c,az:b,ll:a,level:f},function(h){if(g.marking){if(g.addrmarker){g.map.removeFeature(g.addrmarker);}if(h.category&&h.category.address){if(g.marker){g.addrmarker=marker=new Y.Marker(a,{title:h.category.address});g.map.addFeature(marker);}}g.marking=false; }if(f>0){if(h.category){d.html("");d.append(g.createPath(h.category,h.map,0));if(g.maximize){d.append(g.createList(h.list));}}}else{d.html("");d.append(g.createPath("","",0));if(g.maximize){d.append(g.createList(""));}}});};AddressCategoryControl.prototype.createPath=function(b,e,c){var f=this;var d=$("
      ");d.append($("

      ").append("").click(function(){if(f.maximize){f.maximize=false; $(this).removeClass("yolp-addrssctgry-cls");$(this).addClass("yolp-addrssctgry-opn");$("#yolp-addresslist").hide();}else{f.maximize=true;$(this).removeClass("yolp-addrssctgry-opn");$(this).addClass("yolp-addrssctgry-cls");if(!$("#yolp-addresslist").html()){f.show();}else{$("#yolp-addresslist").show();}}}).css({cursor:"pointer"}));var a=$("

      ");if(!b||!b.link){a.append($("\u65e5\u672c")); d.append(a);return d;}else{a.append($("\u65e5\u672c").click(function(){f.map.setZoom(f.chooseZoom(0));}));}if(!b.link[0]){b.link=[b.link];}c=c||b.link.length;$.each(b.link,function(g,h){if(g",{text:" > "}));}if(g==(c-1)){a.append($(""+h.label+""));}else{a.append($(""+h.label+"").click((function(i){return function(j){f.marking=true; f.map.setZoom(f.chooseZoom(i+1));j.stopPropagation();};})(g)));}});d.append(a);return d;};AddressCategoryControl.prototype.createList=function(g){var f=this;var c=$("
      ");var k=$("
      ");var b=$("

      ");var d=$("
        "); var i=$("");this.sublist=d;this.foot=i;k.append(b);k.append(d);c.append(k);c.append(i);if(!g||!g.items){g={};g.items=[{name:"\u5317\u6d77\u9053\u30fb\u6771\u5317",item:[{name:"\u5317\u6d77\u9053",ruby:"\u307b\u3063\u304b\u3044\u3069\u3046",wgslat:43.064291652547,wgslon:141.34685873425},{name:"\u9752\u68ee\u770c",ruby:"\u3042\u304a\u3082\u308a\u3051\u3093",wgslat:40.824286954341,wgslon:140.74007617389},{name:"\u5ca9\u624b\u770c",ruby:"\u3044\u308f\u3066\u3051\u3093",wgslat:39.703673839864,wgslon:141.15225914322},{name:"\u5bae\u57ce\u770c",ruby:"\u3042\u304d\u305f\u3051\u3093",wgslat:38.268888926568,wgslon:140.87184058367},{name:"\u79cb\u7530\u770c",ruby:"\u3042\u304d\u305f\u3051\u3093",wgslat:39.718611889844,wgslon:140.10239344986},{name:"\u5c71\u5f62\u770c",ruby:"\u3084\u307e\u304c\u305f\u3051\u3093",wgslat:38.240434399724,wgslon:140.36327898967},{name:"\u798f\u5cf6\u770c",ruby:"\u3075\u304f\u3057\u307e\u3051\u3093",wgslat:37.750026029135,wgslon:140.46768326621}]},{name:"\u95a2\u6771",item:[{name:"\u6771\u4eac\u90fd",ruby:"\u3068\u3046\u304d\u3087\u3046\u3068",wgslat:35.689875642551,wgslon:139.69165634866},{name:"\u795e\u5948\u5ddd\u770c",ruby:"\u304b\u306a\u304c\u308f\u3051\u3093",wgslat:35.447680274526,wgslon:139.64243606788},{name:"\u57fc\u7389\u770c",ruby:"\u3055\u3044\u305f\u307e\u3051\u3093",wgslat:35.857239405694,wgslon:139.64900232778},{name:"\u5343\u8449\u770c",ruby:"\u3061\u3070\u3051\u3093",wgslat:35.604578242004,wgslon:140.12319578145},{name:"\u8328\u57ce\u770c",ruby:"\u3044\u3070\u3089\u304d\u3051\u3093",wgslat:36.341828371401,wgslon:140.44678049139},{name:"\u6803\u6728\u770c",ruby:"\u3068\u3061\u304e\u3051\u3093",wgslat:36.565558992874,wgslon:139.88348987428},{name:"\u7fa4\u99ac\u770c",ruby:"\u3050\u3093\u307e\u3051\u3093",wgslat:36.391199481952,wgslon:139.06087027999},{name:"\u5c71\u68a8\u770c",ruby:"\u3084\u307e\u306a\u3057\u3051\u3093",wgslat:35.664159337171,wgslon:138.56844771417}]},{name:"\u4fe1\u8d8a\u30fb\u5317\u9678",item:[{name:"\u65b0\u6f5f\u770c",ruby:"\u306b\u3044\u304c\u305f\u3051\u3093",wgslat:37.902473987365,wgslon:139.02321198742},{name:"\u9577\u91ce\u770c",ruby:"\u306a\u304c\u306e\u3051\u3093",wgslat:36.651276002273,wgslon:138.18090320487},{name:"\u5bcc\u5c71\u770c",ruby:"\u3068\u3084\u307e\u3051\u3093",wgslat:36.695113165438,wgslon:137.21134462382},{name:"\u77f3\u5ddd\u770c",ruby:"\u3044\u3057\u304b\u308f\u3051\u3093",wgslat:36.594528400221,wgslon:136.62570137249},{name:"\u798f\u4e95\u770c",ruby:"\u3075\u304f\u3044\u3051\u3093",wgslat:36.065151484988,wgslon:136.22173322653}]},{name:"\u6771\u6d77",item:[{name:"\u611b\u77e5\u770c",ruby:"\u3042\u3044\u3061\u3051\u3093",wgslat:35.180389261451,wgslon:136.906549812},{name:"\u5c90\u961c\u770c",ruby:"\u304e\u3075\u3051\u3093",wgslat:35.39123763717,wgslon:136.72214884793},{name:"\u9759\u5ca1\u770c",ruby:"\u3057\u305a\u304a\u304b\u3051\u3093",wgslat:34.976857046568,wgslon:138.38302088965},{name:"\u4e09\u91cd\u770c",ruby:"\u307f\u3048\u3051\u3093",wgslat:34.730257093228,wgslon:136.50865046731}]},{name:"\u8fd1\u757f",item:[{name:"\u5927\u962a\u5e9c",ruby:"\u304a\u304a\u3055\u304b\u3075",wgslat:34.686299116135,wgslon:135.51973711939},{name:"\u5175\u5eab\u770c",ruby:"\u3072\u3087\u3046\u3054\u3051\u3093",wgslat:34.691563904291,wgslon:135.18335244209},{name:"\u4eac\u90fd\u5e9c",ruby:"\u304d\u3087\u3046\u3068\u3075",wgslat:35.021772777987,wgslon:135.75571213347},{name:"\u6ecb\u8cc0\u770c",ruby:"\u3057\u304c\u3051\u3093",wgslat:35.004313621354,wgslon:135.86849007947},{name:"\u5948\u826f\u770c",ruby:"\u306a\u3089\u3051\u3093",wgslat:34.685276219236,wgslon:135.83282944882},{name:"\u548c\u6b4c\u5c71\u770c",ruby:"\u308f\u304b\u3084\u307e\u3051\u3093",wgslat:34.226031920712,wgslon:135.16718637803}]},{name:"\u4e2d\u56fd",item:[{name:"\u9ce5\u53d6\u770c",ruby:"\u3068\u3063\u3068\u308a\u3051\u3093",wgslat:35.50388129034,wgslon:134.23769748703},{name:"\u5cf6\u6839\u770c",ruby:"\u3057\u307e\u306d\u3051\u3093",wgslat:35.472343249176,wgslon:133.05055267763},{name:"\u5ca1\u5c71\u770c",ruby:"\u304a\u304b\u3084\u307e\u3051\u3093",wgslat:34.66167127311,wgslon:133.93438698943},{name:"\u5e83\u5cf6\u770c",ruby:"\u3072\u308d\u3057\u307e\u3051\u3093",wgslat:34.396423053517,wgslon:132.45941340878},{name:"\u5c71\u53e3\u770c",ruby:"\u3084\u307e\u3050\u3061\u3051\u3093",wgslat:34.185709480219,wgslon:131.47090125076}]},{name:"\u56db\u56fd",item:[{name:"\u5fb3\u5cf6\u770c",ruby:"\u3068\u304f\u3057\u307e\u3051\u3093",wgslat:34.065935538613,wgslon:134.55910696838},{name:"\u9999\u5ddd\u770c",ruby:"\u304b\u304c\u308f\u3051\u3093",wgslat:34.340135954008,wgslon:134.04325095817},{name:"\u611b\u5a9b\u770c",ruby:"\u3048\u3072\u3081\u3051\u3093",wgslat:33.841717232432,wgslon:132.76615977013},{name:"\u9ad8\u77e5\u770c",ruby:"\u3053\u3046\u3061\u3051\u3093",wgslat:33.559689312268,wgslon:133.53106379811}]},{name:"\u4e5d\u5dde\u30fb\u6c96\u7e04",item:[{name:"\u798f\u5ca1\u770c",ruby:"\u3075\u304f\u304a\u304b\u3051\u3093",wgslat:33.606452164248,wgslon:130.41807746193},{name:"\u4f50\u8cc0\u770c",ruby:"\u3055\u304c\u3051\u3093",wgslat:33.249413559961,wgslon:130.29962134295},{name:"\u9577\u5d0e\u770c",ruby:"\u306a\u304c\u3055\u304d\u3051\u3093",wgslat:32.744939549738,wgslon:129.87347044365},{name:"\u718a\u672c\u770c",ruby:"\u304f\u307e\u3082\u3068\u3051\u3093",wgslat:32.790175599651,wgslon:130.74168636089},{name:"\u5927\u5206\u770c",ruby:"\u304a\u304a\u3044\u305f\u3051\u3093",wgslat:33.238135907521,wgslon:131.61251909756},{name:"\u5bae\u5d0e\u770c",ruby:"\u307f\u3084\u3056\u304d\u3051\u3093",wgslat:31.911012021043,wgslon:131.42385980611},{name:"\u9e7f\u5150\u5cf6\u770c",ruby:"\u304b\u3054\u3057\u307e\u3051\u3093",wgslat:31.560178558132,wgslon:130.55799640849},{name:"\u6c96\u7e04\u770c",ruby:"\u304a\u304d\u306a\u308f\u3051\u3093",wgslat:26.212400630994,wgslon:127.68091204058}]}]; }if(g.items.item){var e=20;var j=6;var a=Math.floor((g.items.item.length-1)/e)+1;var h=function(m,p,r){b.hide();f.sublist.removeClass("yolp-addresscategory-list");f.sublist.addClass("yolp-addresscategory-list-num");if(g.items.item.areacode){g.items.item=[g.items.item];}$.each(g.items.item,function(v,w){if(v>=m&&v<(m+p)){f.sublist.append($("
      • ").append($(""+w.name+"").click(function(){f.marking=true; f.ac=w.areacode;f.az=w.azacode;f.map.panTo(new Y.LatLng(w.wgslat,w.wgslon));f.map.setZoom(f.chooseZoom(f.levelChoose()+1));})));}});i.hide();if(g.items.item.length>e){var l=0;var s=a;if(a>j){if(r<=Math.floor(j/2)){s=j;}else{if(r>=a-Math.floor(j/2)){l=a-j;s=a;}else{l=r-Math.floor(j/2);s=r+Math.floor(j/2);}}}var t=function(v){f.foot.html("");f.sublist.html("");h(v*e,e,v);};if(r>=1){var n=$("").append($("\u524d\u3078")).append($("\u524d\u3078").click(function(){t(r-1); }).css({cursor:"pointer"}));f.foot.append(n);}for(var o=l;o"+(o+1)+"").click((function(v){return function(){t(v);};})(o));if(o==m/e){q.addClass("select");}f.foot.append(q);}if(r").append($("\u6b21\u3078").click(function(){t(r+1);}).css({cursor:"pointer"})).append($("\u6b21\u3078")); f.foot.append(u);}i.show();}};h(0,e,0);}else{if(g.items){$.each(g.items,function(l,n){var o=function(p){return function(){f.foot.html("");$(this).parent().find("a").removeClass("select");$(this).addClass("select");f.createSubList(g.items[p]);};};var m=$(""+n.name+"").click(o(l));if(l==0){m.addClass("select");}b.append(m);if(l|")); }});if(g.items[0]){this.createSubList(g.items[0]);}else{k.hide();i.hide();}}}return c;};AddressCategoryControl.prototype.createSubList=function(e){var g=this;var d=this.sublist;d.html("");if(!e){return d;}if(e.item.name){e.item=[e.item];}var c=20;var f=10;var a=Math.floor((e.item.length-1)/c)+1;var b=function(j,m,o){$.each(e.item,function(i,s){if(i>=j&&i<(j+m)){d.append($("
      • ").append($(""+s.name+"").click(function(){g.marking=true; g.ac=s.areacode;g.az=s.azacode;g.map.panTo(new Y.LatLng(s.wgslat,s.wgslon));g.map.setZoom(g.chooseZoom(g.levelChoose()+1));}).attr("title",s.ruby)));}});g.foot.hide();if(e.item.length>c){var h=0;var p=a;if(a>f){if(o<=Math.floor(f/2)){p=f;}else{if(o>=a-Math.floor(f/2)){h=a-f;p=a;}else{h=o-Math.floor(f/2);p=o+Math.floor(f/2);}}}var q=function(s){g.foot.html("");d.html("");b(s*c,c,s);};if(o>=1){var k=$("").append($("\u524d\u3078")).append($("\u524d\u3078").click(function(){q(o-1); }).css({cursor:"pointer"}));g.foot.append(k);}for(var l=h;l"+(l+1)+"").click((function(s){return function(){q(s);};})(l));if(l==j/c){n.addClass("select");}g.foot.append(n);}if(o").append($("\u6b21\u3078").click(function(){q(o+1);}).css({cursor:"pointer"})).append($("\u6b21\u3078")); g.foot.append(r);}g.foot.show();}};b(0,c,0);};AddressCategoryControl.prototype.levelChoose=function(){var a=this.map.getZoom();var b=0;if(a<=this.addresslevel.world.zoom){b=this.addresslevel.world.level;}else{if(a<=this.addresslevel.pref.zoom){b=this.addresslevel.pref.level;}else{if(a<=this.addresslevel.city.zoom){b=this.addresslevel.city.level;}else{if(a<=this.addresslevel.oaza.zoom){b=this.addresslevel.oaza.level; }else{if(a<=this.addresslevel.aza.zoom){b=this.addresslevel.aza.level;}else{if(a<=this.addresslevel.detail1.zoom){b=this.addresslevel.detail1.level;}else{b=this.addresslevel.detail2.level;}}}}}}return b;};AddressCategoryControl.prototype.chooseZoom=function(b){var a=this.map.getZoom();$.each(this.addresslevel,function(c,d){if(d.level==b){a=d.zoom;}});return a;};AddressCategoryControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_LEFT,new Y.Size(2,25)); };AddressCategoryControl.prototype.remove=function(){this.node.remove();this.map.unbind(this.moveend);};var GeoXmlHeatSwitchControl=Y.GeoXmlHeatSwitchControl=Y.extend(Y.Control,function(a){this.options=a||{};this.iconlayer=a.icon;this.heatlayer=a.heat;});GeoXmlHeatSwitchControl.prototype.initialize=function(b){var c=this;var a={icon:this.iconlayer,heat:this.heatlayer};if(this.heatlayer.initialized){this.mode="heat";this.modename="\u30a2\u30a4\u30b3\u30f3";}else{this.mode="icon";this.modename="\u30d2\u30fc\u30c8\u30de\u30c3\u30d7";}this.node=$('

        ').addClass("yolp-"+this.mode+"-on").append($(""+this.modename+"")).click(function(){var d=""; if(c.mode=="icon"){d="heat";$(this).attr({title:"\u30a2\u30a4\u30b3\u30f3\u8868\u793a\u3078\u5909\u66f4\u3059\u308b",alt:"\u30a2\u30a4\u30b3\u30f3\u8868\u793a\u3078\u5909\u66f4\u3059\u308b"});}else{d="icon";$(this).attr({title:"\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u8868\u793a\u3078\u5909\u66f4\u3059\u308b",alt:"\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u8868\u793a\u3078\u5909\u66f4\u3059\u308b"});}$(this).removeClass("yolp-"+c.mode+"-on");$(this).addClass("yolp-"+d+"-on");b.removeLayer(a[c.mode]);b.addLayer(a[d]);if(d=="icon"){a[d].execute();}a[d].draw(true);c.mode=d;}).css({cursor:"pointer",margin:0});return this.node;};GeoXmlHeatSwitchControl.prototype.remove=function(){this.node.remove(); };GeoXmlHeatSwitchControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.TOP_RIGHT;var a=this.options.size||new Size(212,3);return new ControlPosition(b,a);};var SearchControl=Y.SearchControl=Y.extend(Y.Control,function(a){this.options=a;this.url="http://map.yahooapis.jp/LocalSearchService/V1/LocalSearch";this.container=null;this.appid="V0u5cnGxg66gbc6VnNI7t.kKWafgn0Qc0YyJA5L_DF.N_ekmVnIiXOjQ.fMdYQ--";this.query;this.b=1;this.category="";this.categoryList={Station:"0",Landmark:"1",Address:"2",Zipcode:"3"};this.dialog;this.result={};this.searchlink;this.bDefaultQuery=true; this.conv={Address:{title:"\u4f4f\u6240",search:"address",table:""},Zipcode:{title:"\u90f5\u4fbf\u756a\u53f7",search:"zipcode",table:"\u90f5\u4fbf\u756a\u53f7"},Landmark:{title:"\u30e9\u30f3\u30c9\u30de\u30fc\u30af",search:"landmark",table:"\u540d\u79f0"},Station:{title:"\u99c5",search:"station",table:"\u540d\u79f0"}};this.keydown;this.busy=0;this.marker;this.obj=window;if($.browser.msie){this.obj=document.body;}});SearchControl.prototype.initialize=function(b){this.map=b;if($.browser.msie){try{document.execCommand("BackgroundImageCache",false,true); }catch(a){}}this.container=$('');this.drag=new Y.DraggableObject(this.container,{handle:this.container});this.keydown=this.bind(function(c){if(c.keyCode==27){this.busy=0;}},this);$(this.obj).bind("keydown",this.keydown);this.createSearchBox();this.dialog=new SearchDialog(this.map,this.container);return this.container;};SearchControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_LEFT,new Y.Size(3,28)); };SearchControl.prototype.createSearchBox=function(){var b=this;this.searchbox=$('
        ');this.query=$('');this.query.css("color","rgb(153, 153, 153)");this.query.one("focus",function(){b.bDefaultQuery=false;b.query.val("");b.query.css("color",""); });this.query.keydown(function(c){if(c.keyCode==13){b.search(true);}});var a=$('');a.click(function(){b.search(true);});this.query.mousedown(function(c){c.stopPropagation();});a.click(function(c){c.stopPropagation();});this.searchbox.append(this.query);this.searchbox.append(a);this.container.append(this.searchbox); };SearchControl.prototype.search=function(d,b){if(this.busy>0){return;}if(this.bDefaultQuery){this.bDefaultQuery=false;this.query.val("");this.query.css("color","");}var b=b||{};b.appid=b.appid||this.appid;b.p=b.p||this.escape(this.query.val());b.category=b.category||this.category;b.b=b.b||1;b.n=10;b.o="json";b.datum="wgs";b.al=3;if(!b.p){delete b.p;var f=this.map.getCenter();b.lat=b.lat||f.lat();b.lon=b.lon||f.lng(); b.dist=b.dist||100;}if(b.b==1){b.n=5;b.category=["station","landmark","address","zipcode"];}if(!d){b.n=1;b.category=[""];}this.b=b.b;this.category=b.category;delete this.result;this.result={};var a={};var e=[];this.busy=this.category.length;for(var c=0;c0){var i=g.categoryList[h.Item[0].Category]; e[i]=(g.createList(h));if(!d){a.count=h.Count;a.lat=h.Item[0].DatumWgs84.Lat;a.lon=h.Item[0].DatumWgs84.Lon;a.title=h.Item[0].Title;}}},complete:function(i,l){g.busy--;if(g.busy<=0){g.dialog.clearDialog();var k=g.createTitle();g.dialog.setTitle(k);if(e.length>0){for(var h=0;h0){g.dialog.close();g.move(a.lat,a.lon,{title:a.title}); }else{g.dialog.open();}}}});}};SearchControl.prototype.more=function(a){this.category=[a];this.search(true,{b:6});};SearchControl.prototype.next=function(){this.search(true,{b:this.b+10});};SearchControl.prototype.prev=function(){var a=this.b-10;if(a<=0){a=1;}this.search(true,{b:a});};SearchControl.prototype.move=function(b,c,a){this.map.setCenter(new Y.LatLng(b,c),18);if(this.marker){this.map.removeFeature(this.marker); this.marker=null;}if(a){a.icon=this.createIcon();}this.marker=new Y.Marker(new Y.LatLng(b,c),a);this.map.addFeature(this.marker);};SearchControl.prototype.createIcon=function(){var a=new Y.Icon("");a.iconHtml='

        star

        ';a.iconSize=new Y.Size(24,35);a.iconAnchor=new Y.Point(12,35);a.labelAnchor=new Y.Point(12,-35); return a;};SearchControl.prototype.createList=function(q){var f=this;var d=$('
        ');var b=q.Item[0].Category;var p=this.conv[b]["search"];var l=this.conv[b]["title"];var o=this.conv[b]["table"];this.result[b]=q;var g=100>q.Count?q.Count:100;var c=$("
        "+l+"\u3068\u306e\u4e00\u81f4("+this.createListHead(g,q.ViewCount)+")
        ");var n=$('
        '); var j=$("");j.append('\u4f4f\u6240');if(b!=="Address"){j.prepend(''+o+"");}n.append(j);for(var e=0;e'+q.Item[e].Title+"");k.click(function(){var a=$(this).attr("name");f.move(f.result[b].Item[a].DatumWgs84.Lat,f.result[b].Item[a].DatumWgs84.Lon,{title:f.result[b].Item[a].Title}); f.dialog.close();$(".yolp-address-search-txtbx").focus();});var j=$("");j.append($("").append(k));if(b!=="Address"){j.append($("").append($(""+q.Item[e].Address+"")));}n.append(j);}var h=$("

        ");if(g>5&&this.b==1){var k=$("\u3082\u3063\u3068\u898b\u308b");k.click(function(){f.more(p);});h.append("").append(k); }else{h.append(this.createPageNavi(g,q.ViewCount));}var m=$("
        ");m.append(n);m.append(h);d.append(c);d.append(m);return d;};SearchControl.prototype.createTitle=function(){var a=this.escape(this.query.val());if(!a){return"\u5468\u8fba\u691c\u7d22";}return'\u30ad\u30fc\u30ef\u30fc\u30c9\u691c\u7d22\uff1a'+a+"\u3068\u306e\u4e00\u81f4";};SearchControl.prototype.createListHead=function(c,a){var b=this.b*1+a*1-1; var d="";if(this.b==b){d=c+"\u4ef6\u4e2d"+this.b+" \u4ef6\u76ee";}else{d=c+"\u4ef6\u4e2d"+this.b+"~"+b+" \u4ef6\u76ee";}return d;};SearchControl.prototype.createPageNavi=function(f,a){var h=this;var c=f-(this.b*1+a*1-1);var b=this.b-1;var d="";if(c>0){if(c>10){c=10;}d=$('\u6b21\u306e'+c+"\u4ef6");d.click(function(){h.next();});}var e="";if(b>0){if(b>10){b=10;}e=$('\u524d\u306e'+b+"\u4ef6");e.click(function(){h.prev(); });}var g=$("
        ");if(e){g.append(e);}g.append("  ");if(d){g.append(d);}return g;};SearchControl.prototype.createZero=function(){var a=$('
        ');a.append('

        \u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u4e00\u81f4\u3059\u308b\u60c5\u5831\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002

        ');a.append('

        \u30d2\u30f3\u30c8\u4ee5\u4e0b\u306e\u30d2\u30f3\u30c8\u3092\u53c2\u8003\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002

        ');a.append('
          '); a.append("
        • \u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u6b63\u3057\u304f\u5165\u529b\u3067\u304d\u3066\u3044\u308b\u304b\u3001\u8aa4\u5b57\u304c\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002
        • ");a.append("
        • \u90f5\u4fbf\u756a\u53f7\u3084\u5730\u56f3\u4e0a\u306b\u5b58\u5728\u3059\u308b\u5168\u56fd\u306e\u4e3b\u8981\u306a\u5730\u540d\u3001\u4f4f\u6240\u3001\u99c5\u540d\u3001\u4ea4\u5dee\u70b9\u540d\u3001\u65bd\u8a2d\u540d\u306a\u3069\u304b\u3089\u5730\u56f3\u3092\u691c\u7d22\u3067\u304d\u307e\u3059\u3002
        • ");a.append("
        ");return a;};SearchControl.prototype.bind=function(a,b){return function(){a.apply(b,arguments);};};SearchControl.prototype.unload=function(){this.dialog.unload();if(this.marker){this.map.removeFeature(this.marker);this.marker=null;}this.container.css({overflow:"",background:""}); if(this.keydown){$(this.obj).unbind("keydown",this.keydown);this.keydown=null;}this.container.empty();};SearchControl.prototype.escape=function(a){if(a.match(/^[ \u3000\t]+$/)){return"";}return a.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">");};var SearchDialog=Y.SearchDialog=function(a,b){this.map=a;this.parentContainer=b;this.container;this.is_open=false; this.keyword="";this.modal_title;this.modal_scroll;this.modal_close;this.drag=false;this.prev=null;this.keydown;this.mousemove;this.mouseup;this.obj=window;if($.browser.msie){this.obj=document.body;}this.load();};SearchDialog.prototype.load=function(a){this.container=$("
        ").css({display:"none",zIndex:3});$(this.map.getContainer()).append(this.container); this.createDialog();this.keydown=this.bind(function(b){if(b.keyCode==27){this.close();}},this);$(this.obj).bind("keydown",this.keydown);};SearchDialog.prototype.createDialog=function(){var c=this;this.modal_title=$('

        ');var b=$("").click(function(){c.close(); });var a=$('\u9589\u3058\u308b').click(function(){c.close();});this.modal_close=$("

        ").append(b).append(a);this.modal_scroll=$('
        ');if(Y.Util.Platform.isIOS||Y.Util.Platform.Android){this.modal_scroll.css({overflow:"hidden"});}this.modal_scroll.mousedown(function(d){d.stopPropagation();}).click(function(d){d.stopPropagation(); }).dblclick(function(d){d.stopPropagation();}).mousewheel(function(d){d.stopPropagation();});this.container.append(this.modal_title);this.container.append(this.modal_scroll);this.container.append(this.modal_close);this.parentContainer.append(this.container);};SearchDialog.prototype.open=function(){this.is_open=true;this.container.slideDown();this.modal_scroll.scrollTop(0);};SearchDialog.prototype.close=function(){this.is_open=false; if($.browser.msie){this.container.hide();}else{this.container.slideUp();}};SearchDialog.prototype.setTitle=function(a){this.modal_title.html(a);};SearchDialog.prototype.setContents=function(a){this.modal_scroll.append(a);};SearchDialog.prototype.clearDialog=function(){this.modal_title.html("");this.modal_scroll.html("");};SearchDialog.prototype.unload=function(){if(this.keydown){$(this.obj).unbind("keydown",this.keydown); this.keydown=null;}if(this.mousemove){$(this.obj).unbind("mousemove",this.mousemove);this.mousemove=null;}if(this.mouseup){$(this.obj).unbind("mouseup",this.mouseup);this.mouseup=null;}this.modal_title.empty();this.modal_scroll.empty();this.modal_close.empty();this.container.empty();};SearchDialog.prototype.bind=function(a,b){return function(){a.apply(b,arguments);};};var ConvenienceControl=Y.ConvenienceControl=Y.extend(Y.Control,function(a){this.options=a||{};this.conv=new Y.Convenience();this.geocoder=new Y.GeoCoder();this.weather=new Y.Weather();this.infoopen=false;});ConvenienceControl.prototype.initialize=function(b){var c=this;this.node=$("
        ");this.areanode=$("
        ");this.infonode=$("
        ");this.closebtn=$("\u9589\u3058\u308b"); this.openbtn=$("

        ").append($("\u60c5\u5831\u3092\u958b\u304f"));this.btnnode=$("
        ");var a=$("
        ");a.append(this.areanode);a.append(this.infonode);a.append(this.btnnode.append(this.openbtn).click(function(){c.toggle();}));this.node.append(a);this.moveend=b.bind("moveendlazy",function(){c.update();});if(!this.infoopen){this.infonode.hide(); this.btnnode.html(this.openbtn);}else{this.infonode.show();this.btnnode.html(this.closebtn);}this.update(true);return this.node;};ConvenienceControl.prototype.toggle=function(){var a=this;if(this.infoopen){this.infonode.hide("fast");this.btnnode.html(this.openbtn);}else{if(this.changed){this.update();this.changed=false;}this.infonode.show("fast");this.btnnode.html(this.closebtn);}this.infoopen=!this.infoopen; };ConvenienceControl.prototype.update=function(a){var b=this;this.code=this.code||"";this.geocoder.getAddress(this.map.getCenter(),{},function(c){var d="\u4ed8\u8fd1";var i=false;var h="";if(c&&c.features&&c.features[0]){var f=c.features[0];var g="";if(f.property&&f.property.AddressElement){var e=f.property.AddressElement;if(e[1]&&e[1].Name){d=e[1].Name;}if(e[1]&&e[1].Code){g=e[1].Code;}}if(f.property&&f.property.Country){if(f.property.Country.Code=="JP"){i=true; }else{i=false;g=f.property.Country.Code;}h=f.property.Country;}}b.areanode.html("");if(i){b.areanode.append($("").append(""+d+"\u306e\u60c5\u5831").click(function(){b.toggle();}));}else{b.areanode.append($("").append(""+h.Name+"\u306e\u60c5\u5831").click(function(){b.toggle();}));}b.isjapan=i;b.country=h;if(b.infoopen||a){b.conv.get(b.map.getCenter(),{},function(j){b.show(j); });b.code=g;}else{b.changed=true;}if(h==""){b.node.hide();}else{b.node.show();}});};ConvenienceControl.prototype.show=function(a){var c=this;this.infonode.html("");if(this.isjapan){this.weatherlink=$("\u5929\u6c17\u60c5\u5831").click(function(){c.weather.get(c.map.getCenter(),{},function(d){if(d&&d.features&&d.features[0]){var e=d.features[0];if(e.property&&e.property.Detail&&e.property.Detail.PcUrl1){window.open(e.property.Detail.PcUrl1); }}});});}else{this.weatherlink=$("\u4e16\u754c\u306e\u5929\u6c17\u60c5\u5831");}this.weathernode=$("
      • ").append($("")).append(this.weatherlink);var b=$("
          ");b.append(this.weathernode);if(a&&a.features){$.each(a.features,function(d,e){var f=$("
        • ");f.append($("")).append($(""+e.title+"")); b.append(f);});}this.infonode.append(b);};ConvenienceControl.prototype.remove=function(){this.node.remove();this.map.unbind(this.moveend);};ConvenienceControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.BOTTOM_LEFT;var a=this.options.size||new Size(5,20);return new ControlPosition(b,a);};var IndoorMapControl=Y.IndoorMapControl=Y.extend(Y.Control,function(a,b){this.options=b||{};this.indoorMapLayer=a;});IndoorMapControl.prototype.initialize=function(a){this.indoormaps=this.indoorMapLayer.indoormaps;this.buttonHeight=44;this.drumHeight=this.buttonHeight*6;this.listlength=0;this.minTop=0;this.maxTop=0;this.listTop;this.prevY;this.diffY;this.mosuedown=false;this.dragging=false;this.setFloorIdTime; this.node=$('
          ');this.scaler=$('
          ');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"}); }this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY; b.diffY=0;c.stopPropagation();c.preventDefault();};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}d.stopPropagation();d.preventDefault();};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px"); b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY; f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup); }else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps; b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a); var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1; var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;b');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false; });var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("
          "+e[b]+"
          ");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove); $(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a); };Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8; };IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a');this.scaler=$('
          ');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"}); }this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY; b.diffY=0;c.stopPropagation();c.preventDefault();};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}d.stopPropagation();d.preventDefault();};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px"); b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY; f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup); }else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps; b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a); var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1; var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;b');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false; });var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("
          "+e[b]+"
          ");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove); $(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a); };Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8; };IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a');function a(){b.empty();var g=c.getLayerSets();var f=c.getCurrentLayerSet();if(d.groups&&d.groups.length>0){$.each(d.groups,function(r,q){var j=q.name||q[0].getFullName(); var p=$("
        • ",{title:j+"\u3078\u5909\u66f4\u3059\u308b"}).append($("

          ",{"class":"dsstr-txt",text:j}));if(q.width){p.css({width:q.width});}var n=$("

            ",{"class":"dsstr-info-list"});var o="yolp-layerset-off";var l=true;$.each(q.layersets,function(s,x){var t=g[x];if(f==t){o="yolp-layerset-on";}if(t.getEnable()){l=false;}var w="layersetsgroup"+r;var v=(f==t)?"checked":"";var u=!t.getEnable()?"disabled":"";n.append($("
          • ").append($("").attr({checked:v})).append($("
          • '+e.getFullName()+"
          • "); if(e.getEnable()){h.bind("click",(function(j){return function(k){if(c.currentLayerSetId!=j){c.setLayerSet(j);}};})(i));}b.append(h);}}}a();this.listeners=[];this.listeners.push(Y.Event.addListener(c,"layersetchanged",function(){a();}));this.listeners.push(Y.Event.addListener(c,"addlayerset",function(){a();}));this.listeners.push(Y.Event.addListener(c,"removelayerset",function(){a();}));this.listeners.push(Y.Event.addListener(c,"layerlistchanged",function(){a(); }));return b;};LayerSetGroupControl.prototype.getDefaultPosition=function(){return new ControlPosition(ControlPosition.TOP_RIGHT,new Size(3,3));};LayerSetGroupControl.prototype.printable=function(){return false;};var GeoSearchHeatmapLayer=Y.GeoSearchHeatmapLayer=Y.extend(Y.ImageTileLayer,function(a){a=a||{};a.opacity=a.opacity||1;a.enableFadeIn=a.enableFadeIn||false;Y.ImageTileLayer.apply(this,["\u30d2\u30fc\u30c8\u30de\u30c3\u30d7","",a]);});GeoSearchHeatmapLayer.prototype.drawHeat=function(b,a){this.query=b;a=a||{};this.draw(true);};GeoSearchHeatmapLayer.prototype.getImageSrc=function(a,c){if(!this.query){return;}var b="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/heatmapGeosearch?"; b+="x="+a+"&y="+c+"&z="+this.map.getZoom()+"&p="+encodeURI(this.query);return b;};var GeoSearchLayer=Y.GeoSearchLayer=Y.extend(Y.ListingLayer,function(a){a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/geoSearch";ListingLayer.apply(this,["GeoSearch",a]);this.dispProperties={Address:"\u4f4f\u6240",Tel:"\u96fb\u8a71\u756a\u53f7",Description:"\u6982\u8981"};this._serviceName="Map";});GeoSearchLayer.prototype.getApiRequest=function(b,a){a=a||{};a.opt=a.opt||{};a.opt.appid=this.getApplicationId();return ListingLayer.prototype.getApiRequest.apply(this,[b,a]); };GeoSearchLayer.prototype.getApplicationId=Y.Service.getApplicationId;var YolpSearchLayer=Y.YolpSearchLayer=Y.extend(Y.ListingLayer,function(a){a=a||{};this.searchBox=a.searchBox||false;this.cid=a.cid||"";this.info=a.info||"standard";this.pageCount=a.pageCount||10;this.noquery="\u540d\u79f0\u30fb\u4f4f\u6240\u306a\u3069\u3092\u5165\u529b";this.fit=(a.fit===undefined)?true:a.fit;this.mixer=false;this.ebisu="132c700e0ebf5a1d386e9b725d7d1e6b";this.getYDFMapping();a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/yolpsearch"; ListingLayer.apply(this,["GeoSearch",a]);this.loadCss();this._serviceName="Map";});YolpSearchLayer.prototype.removeImageMapLayer=function(){if(this.imagelayer){this.imagelayer="";this.mixer=false;this.drawList(this.query,this.options);}};YolpSearchLayer.prototype.setImageMapLayer=function(a,b){var c=this;this.imagelayer=a;this.mixer=true;if(b){this.drawList(this.query,this.options);}};YolpSearchLayer.prototype.loadCss=function(){var b="http://i.yimg.jp/images/map/yolp/storage_ui/css/preview_20110415.css"; var a=$(window.document.body).find("link[href='"+b+"']");if(!a||a.length==0){YOLP.loadCSS(b);}};YolpSearchLayer.prototype.getYDFMapping=function(){var b=this;this.ydfprops=[];var a=this.cid.split(",");$.each(a,function(c,f){f=f.replace(" ","");var e=new YDFMapping(f);var d=[];e.get({},function(g){if(g.mapping){$.each(g.mapping,function(h,i){d.push({name:i.name,prop:i.tag,path:i.path});});}b.ydfprops[f]=d; });});};YolpSearchLayer.prototype.getApiRequest=function(b,a){a=a||{};a.opt=a.opt||{};a.start=((a.page||1)-1)*this.pageCount+1;a.results=this.pageCount;a.sort=this.sort||"";a.opt.appid=this.getApplicationId();a.detail="full";a.cid=this.cid;a.output="json";return ListingLayer.prototype.getApiRequest.apply(this,[b,a]);};YolpSearchLayer.prototype.initializeByListing=function(a){a.container.addClass("preview-list"); ListingLayer.prototype.initializeByListing(a);};YolpSearchLayer.prototype.execute=function(b,c,a){b.query=b.query.replace(/\u3000/g," ");b.query=b.query.replace(/ +/g," ");b.query=b.query.replace(/ $/,"");b.query=b.query.replace(/^ /,"");if(b.query==""&&b.research){b.query=this.noquery;}else{b.query=b.query;}var b=b||{};this.drawList(b.query,b,c,a);};YolpSearchLayer.prototype.initialize=function(){FeatureLayer.prototype.initialize.apply(this,arguments); if(!this.map.mainContainer.parent().hasClass("preview-image")){this.map.mainContainer.wrap("
            ");this.map.mainContainer.parent().css({height:"auto"});}var f=this;$(window).resize(f.adjust);this.drawfirst=true;var f=this;Y.Event.addListener(this,"firstdrawend",function(){if(f.drawfirst){f.drawfirst=false;if(f.fit){f.fitToMap();}}});var c=this.map.getInfoWindow();Y.Event.addListener(c,"close",function(){Y.Log.write("close"); });var d=this.map.getLayerSets();for(var e in this.map.getLayerSets()){for(var b in d[e].getLayers()){var a=d[e].getLayers()[b];if(a instanceof ImageMapMixerLayer){if(a.isInitialized()){this.setImageMapLayer(a);}}}}};YolpSearchLayer.prototype.fitToMap=function(){if(this.ydf&&this.ydf.result.bounds&&!this.ydf.result.bounds.isEmpty()){this.getMap().drawBounds(this.ydf.result.bounds.extendRate(2));var a=this; setTimeout(function(){Y.Event.trigger(a,"drawend");},1000);}else{Y.Event.trigger(this,"drawend");}};YolpSearchLayer.prototype.getCustomIcon=function(b,d){var f="";if(d.icon&&d.icon.image&&d.icon.image!=Y.Icon.DEFAULT_ICONURL){f=d.icon.image;}else{f="http://i.yimg.jp/images/map/yolp/storage_ui/images/no"+(b>=9?"":"0")+(b+1)+".png";}var c=d.icon.iconSize||new Y.Size(20,20);if(c.width==19&&c.height==26){c=new Y.Size(20,20); }var a=d.icon.iconAnchor||new Y.Anchor(0,0);var e=new Y.Icon(f,{iconSize:c});return e;};YolpSearchLayer.prototype.createSearchBox=function(){var e=this;var d=$("
            ");if(this.searchBox){var c=this.listContainer.width();var a=this.query||this.noquery;var b="black";if(a==this.noquery){b="#aaaaaa";}d.append($("").css({width:c-150,color:b}).keypress(function(f){if(f.which==13){e.options.query=$(this).parent().find("input").val(); e.options.page=1;e.options.research=true;e.execute(e.options);}}).focus(function(){if($(this).val()==e.noquery){$(this).css({color:"black"});$(this).val("");}}).blur(function(){if($(this).val()==""){$(this).css({color:"#aaaaaa"});$(this).val(e.noquery);}}));d.append($("").click(function(){e.options.query=$(this).parent().find("input").val();e.options.page=1; e.options.research=true;e.execute(e.options);}));d.append($("

            ").append($("")).append($("\u6761\u4ef6\u89e3\u9664").click(function(){e.options.query="";e.options.page=1;e.options.research=false;e.execute(e.options);})));}return d;};YolpSearchLayer.prototype.draw=function(a){if(this.mixer&&this.features&&this.features.length>0){this.features=this.imagelayer.convertFeatures(this.features,this.imagelayer.mixer,this.imagelayer.imgnode); }Y.FeatureLayer.prototype.draw.apply(this,[a]);};YolpSearchLayer.prototype.drawList=function(c,b,e,a){this.query=c;this.options=$.extend(true,{},b);Y.Event.trigger(this,"drawstart");this.ydf=null;var d=this;this.abort();this.ajaxRequest=this.search(c,this.options,function(f){d.ydf=d.ydfFilter(f);d.drawYDFToMap(d.ydf);d.drawYDFToList(d.ydf);if(e){e(f);}if(!d.drawfirst){Y.Event.trigger(d,"drawend");Y.Log.write("drawend"); }else{Y.Event.trigger(d,"drawend");Y.Event.trigger(d,"firstdrawend");Y.Log.write("firstdrawend");}},function(){if(typeof(a)=="function"){a();}});return this.ajaxRequest;};YolpSearchLayer.prototype.createHeaderHtml=function(d){if(this.searchBox){var c=$('
            ');c.append(this.createSearchBox());}else{c="";}var b=$('

            ');if(d.result.total>1){b.append("\u691c\u7d22\u7d50\u679c "+d.result.total+" \u4ef6\u4e2d "+d.result.start+" \uff5e "+(d.result.start+d.result.count-1)+" \u4ef6\u8868\u793a"); }else{if(d.result.total==1){b.append("\u691c\u7d22\u7d50\u679c1\u4ef6\u4e2d1\u4ef6\u8868\u793a");}else{if(this.query==this.noquery){b.append("\u691c\u7d22\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u307e\u305b\u3093");}else{b.append("\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u60c5\u5831\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002");}}}var a=$("
            ").append(c).append(b);return a;};YolpSearchLayer.prototype.openInfoWindow=function(a,c){var b={};if(this.isHidden()){this.infoWindow=this.map.openInfoWindow(a.getLatLng(),this.createInfoWindowHtml(a),b); }else{this.infoWindow=a.openInfoWindow(this.createInfoWindowHtml(a),b);}this.infoWindowFeature=a;if(a.listnode){a.listnode.parent().find("li").removeClass("current");a.listnode.addClass("current");}Y.Event.trigger(this,"infowindowopen",a);};YolpSearchLayer.prototype.createFooterHtml=function(b){var e=$('');if(b.result.total==b.result.count){e.css({height:"22px"});return e; }var g=this.chunkCount;if((g%2)==0){var k=g/2;var a=g/2-1;}else{var k=g/2-0.5;var a=g/2-0.5;}var h=this.pageCount||10;var j=this.getCurrentPage();var m=this.getTotalPageCount();var f=this;var l=$("
              ");if(j>1){l.append($("").append($("\u524d\u3078").click(function(){f.drawPage(j-1);})));}else{l.append($("").append("\u524d\u3078"));}if(j").append($("\u6b21\u3078").click(function(){f.drawPage(j+1); })));}else{l.append($("").append("\u6b21\u3078"));}e.append(l);var c=$("

              ");if(this.chunk&&this.chunkCount>0){if(j<=a||m<=g){for(var d=1;d<=m&&d<=g;d++){if(j==d){c.append(""+d+"");}else{c.append($(""+d+" ").bind("click",{num:d},function(i){f.drawPage(i.data.num);}));}}}else{if(j>m-k){for(var d=m-g+1;d<=m;d++){if(j==d){c.append(""+d+""); }else{c.append($(""+d+"").bind("click",{num:d},function(i){f.drawPage(i.data.num);}));}}}else{for(var d=j-a;d<=j+k;d++){if(j==d){c.append(""+d+"");}else{c.append($(""+d+"").bind("click",{num:d},function(i){f.drawPage(i.data.num);}));}}}}}e.append(c);return e;};YolpSearchLayer.prototype.createResultHtml=function(d,c,a){var b=$('
              '); b.css({height:"auto"});b.append(this.createHeaderHtml(d,c,a));b.append(this.createHeaderAdHtml(d,c,a));b.append(this.createListHtml(d,c,a));b.append(this.createFooterAdHtml(d,c,a));b.append(this.createFooterHtml(d,c,a));return b;};YolpSearchLayer.prototype.createListHtml=function(a,h,l){var d=$('
              ');var b=this.listContainer.parent().css("height").replace("px","");var k=$("#yolp_search_header").height()||75; var j=$("#yolp_search_pager").height()||22;d.css({height:(b-(k+j+1))+"px"});var g=$("
                ");for(var c=0;cthis.maxListCount-2){break;}}d.append(g);return d;};YolpSearchLayer.prototype.createItemHtml=function(i,l){if(!l){return"";}if(!l.name){return"";}var g=new YolpSearchInfoBuilder(l);var d="";var h=this;var f=$("
              • "); if(l.property.ListDescription){f.append(Util.stripScript(l.property.ListDescription));var a=f;}else{var k="";if(l.icon&&l.icon.image&&l.icon.image!=Y.Icon.DEFAULT_ICONURL){k=l.icon.image;}else{k="http://i.yimg.jp/images/map/yolp/storage_ui/images/no"+(i>=9?"":"0")+(i+1)+".png";}var e=l.icon.iconSize;var b=$('').css({width:e.x+"px"});f.append(b);var j=$("
                ");var a=$("
                "); var c=$("
                ");a.append($("").append(l.name)).append($("\u8a73\u7d30").click(function(m){h.openInfoWindow(l,false);h.showDetail(l);m.stopPropagation();}));j.append(a);if(this.info!="simple"){if((image=g.getImageInfo())){if(image&&image[1]&&image[1].Url){j.append($("
                ").append($("").css({width:74}).load(function(){h.resizeImage(this,74,63); }).attr({src:image[1].Url}).click((function(m){return function(){if(m[1].LinkUrl){h.sendUrl(m[1].LinkUrl);}else{h.showImage(l.name,m[1].Title||"",m[1].Url,m[1].Caption||"");}};})(image))));}}if((d=g.getAddressInfo())!=""){j.append($("
                ").append(d));}if((d=g.getTelInfo())!=""){j.append($("
                ").append(d));}if((d=g.getNearStationInfo())!=""){j.append($("
                ").append(d));}}j.append(c); f.append(j);}var h=this;if(h.map){j.bind("click",function(){h.openInfoWindow(l,false);});j.bind("mouseover",function(){l.focus();});j.bind("mouseout",function(){l.blur();});j.css("cursor","pointer");}l.listnode=f;return f;};YolpSearchLayer.prototype.createInfoWindowMaxContentHtml=function(b){var a=this.createInfoWindowHtml(b);a.find(".yolplayer-detail").remove();return a;};YolpSearchLayer.prototype.createInfoWindowHtml=function(d){var f=this; var a=new YolpSearchInfoBuilder(d);var e="";var c=$("
                ");var b=$("
                ");c.append(b);b.append($("
                ").append(d.name));if((e=a.getAddressInfo())!=""){b.append($("
                ").append(e));}if((e=a.getTelInfo())!=""){b.append($("
                ").append(e));}if((e=a.getNearStationInfo())!=""){b.append($("
                ").append(e));}if((image=a.getImageInfo())){if(image&&image[1]&&image[1].Url){b.append($("
                ").append($("").css({width:105}).load(function(){f.resizeImage(this,105,90); }).attr({src:image[1].Url})));}}b.append($("
                ").append($("")).append($("\u8a73\u7d30\u3092\u898b\u308b").click(function(){f.showDetail(d);})));return c;};YolpSearchLayer.prototype.closeImage=function(){if(this.imagebox){this.imagebox.hide();if(this.detailshow){this.detailback.css({zIndex:10000});}else{this.detailback.hide(); }}};YolpSearchLayer.prototype.createDetailBack=function(){this.detailback=$('
                ');this.detailback.css({opacity:0.5,width:"100%",height:$(document).height()});var a=this;this.detailback.click(function(){if($(this).css("z-index")==10002){a.closeImage(); }else{a.closeDetail();}});};YolpSearchLayer.prototype.showImage=function(a,i,b,f){var g=this;if(!this.imagebox){this.imagebox=$("
                ").click(function(){g.closeImage();});$(window.document.body).prepend(this.imagebox);}if(!this.detailback){this.createDetailBack();$(window.document.body).append(this.detailback);}var c=($(window).width()-520)/2;this.imagebox.html("");var d=$("
                ").click(function(k){k.stopPropagation(); }).css({marginLeft:c});this.imagebox.append(d);d.append($("
                ").append($("

                "+a+"

                ")).append($("

                ").append($("\u9589\u3058\u308b").click(function(){g.closeImage();}))));var j=$("
                ");d.append(j);var e=$("
                ");j.append(e);e.append($("
                "+i+"
                "));e.append($("
                ").append($("").load(function(){g.resizeImage(this,500,500); })));e.append($("
                ").append(f));var h=($(window).height()-420)/2;this.imagebox.css({top:$(document).scrollTop()+h,zIndex:10003});this.imagebox.show();this.detailback.css({zIndex:10002});this.detailback.show();};YolpSearchLayer.prototype.closeDetail=function(){this.detailbox.hide();this.detailback.hide();this.detailshow=false;};YolpSearchLayer.prototype.showDetail=function(a){var e=this; if(!this.detailbox){this.detailbox=$("
                ").click(function(){e.closeDetail();}).css({zIndex:"10001",fontSize:"smaller"});$(window.document.body).prepend(this.detailbox);}if(!this.detailback){this.createDetailBack();$(window.document.body).append(this.detailback);}var d=($(window).width()-940)/2;var c=$("
                ").click(function(f){f.stopPropagation(); }).css({marginLeft:d});c.append($("
                ").append($("

                "+a.name+"

                ")).append($("

                ").append($("\u9589\u3058\u308b").click(function(){e.closeDetail();}))));var b=$("
                ");b.append(this.commonInfo(a)).append(this.navigationtab(a));this.detailnode=this.getDetailNode(a,"common");b.append(this.detailnode);c.append(b); this.detailbox.html("");this.detailbox.append(c);this.detailbox.css({top:$(document).scrollTop()+50});this.detailbox.show();this.detailback.css({zIndex:10000});this.detailback.show();this.detailshow=true;this.adjust();};YolpSearchLayer.prototype.getDetailNode=function(a,b){var c;this.detailnodes=[];if(!this.detailnodes[b]){switch(b){case"common":c=this.detailInfo(a);break;case"image":c=this.imageInfo(a); break;case"menu":c=this.menuInfo(a);break;case"room":c=this.roomInfo(a);break;case"review":c=this.reviewInfo(a);break;default:c=this.detailInfo(a);break;}this.detailnodes[b]=c;}else{c=this.detailnodes[b];}return c;};YolpSearchLayer.prototype.navigationtab=function(d){var g=this;var e=$("
                ",{"class":"nav"});var f="common";var c={common:"\u6982\u8981"};var a=new YolpSearchInfoBuilder(d);if(a.getImageInfo()){c.image="\u753b\u50cf"; }if(a.getMenuInfo()&&this.cid!=this.ebisu){c.menu="\u5546\u54c1\u3001\u30e1\u30cb\u30e5\u30fc\u3001\u30d7\u30e9\u30f3";}if(a.getRoomInfo()){c.room="\u90e8\u5c4b\u60c5\u5831";}var b=$("
                  ");$.each(c,function(i,j){var h=$("
                • ");if(i==f){h.addClass("current");}if(i=="review"){h.addClass("none");}h.append($("",{text:j,href:"javascript:void(0);"}));h.click((function(k){return function(){b.find("li").removeClass("current");$(this).addClass("current");g.detailnode.html(g.getDetailNode(d,k)); g.adjust();};})(i));b.append(h);});e.append(b);return e;};YolpSearchLayer.prototype.commonInfo=function(c){var a=new YolpSearchInfoBuilder(c);var g="";var e=$("
                  ");var h=this;if((image=a.getImageInfo())!=""){if(image[1]&&image[1].Url&&image[1].Url!=""){e.append($("

                  ").append($("").css({width:155}).click(function(){if(image[1].LinkUrl){h.sendUrl(image[1].LinkUrl); }else{h.showImage(c.name,image[1].Title||"",image[1].Url,image[1].Caption||"");}}).load(function(){h.resizeImage(this,155,103);}).css({cursor:"pointer",width:"155"}).attr("src",image[1].Url||"")));}else{e.append($("

                  ").append($("")));}}else{e.append($("

                  ").append($(""))); }var b=$("
                  ");e.append(b);var d="";if((g=a.getZipInfo())!=""){d="\u3012"+g+"\u3000";}if((g=a.getAddressInfo())!=""){b.append($("

                  ").append(d+g));}if((g=a.getTelInfo())!=""){b.append($("

                  ").append(g));}if((g=a.getAccessInfo())!=""){b.append($("

                  ").append(g));}else{if((g=a.getNearStationInfo())!=""){b.append($("

                  ").append(g));}}if((g=a.getCategoryInfo())!=""){b.append($("

                  ").append($("\u30b8\u30e3\u30f3\u30eb\uff1a")).append(g.replace(/"/g,""))); }var f="";if((g=a.getPropInfo("ReviewUrl"))!=""){f=$("
                  \u30af\u30c1\u30b3\u30df\u3092\u898b\u308b");}if((g=a.getRatingInfo())!=""){b.append($("

                  ").append($("\u8a55\u4fa1\uff1a")).append($(""+g.data+"")).append($("\uff08"+g.data+"\u70b9/100\u70b9\u6e80\u70b9\u4e2d\uff09")).append(f));}else{if(f!=""){b.append($("

                  ").append(f));}}return e;};YolpSearchLayer.prototype.imageInfo=function(d){var h=this; var b=new YolpSearchInfoBuilder(d);var g="";var f=$("
                  ");var a=$("
                  ");f.append(a);var e=$("
                  ");if((image=b.getImageInfo())){e.append($("

                  ",{"class":"ttl",html:"\u753b\u50cf"}));var c=$("
                    ");$.each(image,function(j,k){if(!k){return;}if(k.Url&&k.Url!=""){var i=$("
                  • ").append($("

                    ",{"class":"ph"}).append($("").css({width:121}).load(function(){h.resizeImage(this,121,81); }).attr({alt:k.Caption||"",src:k.Url}).click(function(){if(k.LinkUrl){h.sendUrl(k.LinkUrl);}else{h.showImage(d.name,k.Title||"",k.Url,k.Caption||"");}}).css({cursor:"pointer"})).append($("

                    ",{"class":"sttl",text:k.Title})).append($("

                    ",{"class":"txt",text:k.Caption})));c.append(i);}});e.append($("

                    ",{"class":"photoList01"}).append(c));}a.append(e);return f;};YolpSearchLayer.prototype.menuInfo=function(h){var d=this; var c=new YolpSearchInfoBuilder(h);var a="";var b=$("
                    ");var i=$("
                    ");b.append(i);var f=$("
                    ");if((menu=c.getMenuInfo())){var g=$("
                    ",{"class":"menuArea"});$.each(menu,function(k,n){if(!n){return;}var j=$("
                    ",{"class":"content"});var l=$("
                    ",{"class":"summary"});var m=$("
                    ",{"class":"detail"}); if(n.Item){j.append($("
                    ",{"class":"ttl",text:n.Item}));}else{if(n.ItemCatchCopy){j.append($("
                    ",{"class":"ttl",text:n.ItemCatchCopy}));}}if(n.ItemCatchCopy||n.ItemDescription){j.append(l);}if(n.ItemCatchCopy&&n.Item){l.append($("

                    ",{"class":"sttl",text:n.ItemCatchCopy}));}if(n.ItemDescription){l.append($("

                    ",{"class":"txt",html:n.ItemDescription}));}if(n.ItemPrice){m.append($("

                    ",{"class":"dl",text:n.ItemPrice}).prepend($("",{text:"\u6599\u91d1\uff1a"}))); }if(n.ItemBenefit){m.append($("

                    ",{"class":"dl",text:n.ItemBenefit}).prepend($("",{text:"\u7279\u5178\uff1a"})));}if(n.ItemPeopleNumber){m.append($("

                    ",{"class":"dl",text:n.ItemPeopleNumber}).prepend($("",{text:"\u30d7\u30e9\u30f3\u4eba\u6570\uff1a"})));}if(n.ItemStartDay){m.append($("

                    ",{"class":"dl",text:n.ItemStartDay}).prepend($("",{text:"\u30d7\u30e9\u30f3\u958b\u59cb\u65e5\uff1a"})));}if(n.ItemEndDay){m.append($("

                    ",{"class":"dl",text:n.ItemEndDay}).prepend($("",{text:"\u30d7\u30e9\u30f3\u7d42\u4e86\u65e5\uff1a"}))); }if(n.ItemUrl){m.append($("

                    ",{"class":"dl",html:""+n.ItemUrl+""}).prepend($("",{text:"URL\uff1a"})));}if(m.html()!=""){j.append(m);}if(j.html()!=""){g.append(j);}});if(g.html()!=""){f.append($("

                    ",{"class":"ttl",html:"\u5546\u54c1\u3001\u30e1\u30cb\u30e5\u30fc\u3001\u30d7\u30e9\u30f3"}));f.append(g);}var e=$("
                      ");$.each(menu,function(k,l){if(!l){return;}var j=$("
                    • ");if(l.ItemImage){j.append($("

                      ",{"class":"ph"}).append($("",{alt:"",css:{width:89,cursor:"pointer"},src:l.ItemImage,load:function(){d.resizeImage(this,89,61); },click:function(){if(l.ItemImageUrl&&l.ItemImageUrl!=""){d.sendUrl(l.ItemImageUrl);}else{d.showImage(h.name,l.ItemImageTitle||"",l.ItemImage,l.ItemImageCaption||"");}}})));}if(l.ItemImageTitle||l.ItemImageCaption){j.append($("

                      ").append($("

                      ",{"class":"txt01",text:l.ItemImageTitle})).append($("

                      ",{"class":"txt02",text:l.ItemImageCaption})));}if(j.html()!=""){e.append(j);}});f.append($("

                      ",{"class":"photoList01"}).append(e)); }i.append(f);return b;};YolpSearchLayer.prototype.roomInfo=function(h){var g=this;var f=new YolpSearchInfoBuilder(h);var b="";var e=$("
                      ");var i=$("
                      ");e.append(i);var c=$("
                      ");if((room=f.getRoomInfo())){var d=$("
                      ",{"class":"roomArea"});$.each(room,function(k,m){if(!m){return;}var j=$("
                      ",{"class":"content"}); var l=$("
                      ",{"class":"detail"});if(m.RoomName){j.append($("
                      ",{"class":"ttl",text:m.RoomName}));}if(m.RoomDescription){j.append($("
                      ",{"class":"summary"}).append($("

                      ",{"class":"txt",html:m.RoomDescription})));}if(m.RoomType){l.append($("

                      ",{"class":"dl",text:m.RoomType}).prepend($("",{text:"\u90e8\u5c4b\u30bf\u30a4\u30d7\uff1a"})));}if(l.html()!=""){j.append(l);}if(j.html()!=""){d.append(j);}});if(d.html()!=""){c.append($("

                      ",{"class":"ttl",html:"\u5ba2\u5ba4\u60c5\u5831"})); c.append(d);}var a=$("
                        ");$.each(room,function(k,l){if(!l){return;}var j=$("
                      • ");if(l.RoomImage){j.append($("

                        ",{"class":"ph"}).append($("",{alt:"",css:{width:89,cursor:"pointer"},src:l.RoomImage,load:function(){g.resizeImage(this,89,61);},click:function(){if(l.RoomImageUrl&&l.RoomImageUrl!=""){g.sendUrl(l.RoomImageUrl);}else{g.showImage(h.name,l.RoomImageTitle||"",l.RoomImage,l.RoomImageCaption||""); }}})));}if(l.RoomImageTitle||l.RoomImageCaption){j.append($("

                        ").append($("

                        ",{"class":"txt01",text:l.RoomImageTitle})).append($("

                        ",{"class":"txt02",text:l.RoomImageCaption})));}if(j.html()!=""){a.append(j);}});c.append($("

                        ",{"class":"photoList01"}).append(a));}i.append(c);return e;};YolpSearchLayer.prototype.detailInfo=function(e){var k=this;var j=new YolpSearchInfoBuilder(e);var o=""; var g=$("
                        ");var c=$("
                        ");g.append(c);var m=$("
                        ");if((o=j.getCatchCopyInfo())!=""){m.append($("

                        ",{"class":"ttl",html:o}));}if((o=j.getDescriptionInfo())!=""){m.append($("
                        ",{"class":"textArea"}).append($("

                        ",{html:o})));}c.append(m);var r=$("

                        ");if((business=j.getBusinessInfo(this.cid!=this.ebisu?"detail":"simple"))!=""){var n=""; $.each(business,function(t,u){n+=u+"
                        ";});r.append($("

                        ",{"class":"ttl",html:"\u55b6\u696d\u6642\u9593"}));r.append($("
                        ",{"class":"textArea"}).append($("

                        ",{html:n})));}c.append(r);var h=$("

                        ");if((o=j.getHolidayInfo())!=""){h.append($("

                        ",{"class":"ttl",html:"\u5b9a\u4f11\u65e5"}));h.append($("
                        ",{"class":"textArea"}).append($("

                        ",{html:o})));}c.append(h);var a=$("

                        ");if((o=j.getPcUrlInfo())){if(o.length>0){a.append($("

                        ",{"class":"ttl",html:"\u8a73\u7d30\u30da\u30fc\u30b8\uff08PC\uff09URL"})); }$.each(o,function(t,u){if(!u){return;}if(u.Url){if(u.Image){a.append($("
                        ",{"class":"textArea"}).append($("

                        ").append($(""+u.Url+"").click(function(){k.sendUrl(u.Url);}).css({cursor:"pointer"}))));}else{a.append($("

                        ",{"class":"textArea"}).append($("

                        ").append($(""+u.Url+"").click(function(){k.sendUrl(u.Url);}))));}}});}c.append(a); var d=$("

                        ");if((o=j.getCouponInfo())){var q=$("
                        ",{"class":"roomArea"});$.each(o,function(u,w){if(!w){return;}var t=$("
                        ",{"class":"content"});var v=$("
                        ",{"class":"detail"});if(w.Name){t.append($("
                        ",{"class":"ttl",text:w.Name}));}if(w.Comment){t.append($("
                        ",{"class":"summary"}).append($("

                        ",{"class":"txt",html:w.Comment})));}if(w.StartDay){v.append($("

                        ",{"class":"dl",text:w.StartDay}).prepend($("",{text:"\u958b\u59cb\u65e5\uff1a"}))); }if(w.EndDay){v.append($("

                        ",{"class":"dl",text:w.EndDay}).prepend($("",{text:"\u7d42\u4e86\u65e5\uff1a"})));}if(v.html()!=""){t.append(v);}if(t.html()!=""){q.append(t);}});if(q.html()!=""){d.append($("

                        ",{"class":"ttl",html:"\u30af\u30fc\u30dd\u30f3"}));d.append(q);}}c.append(d);var f=e.property.CassetteId;var i=this.ydfprops[f];var l="";$.each(i,function(t,v){if(v.path.match("Ppc")){v.name="\u4e88\u7d04\u5c02\u7528\u756a\u53f7";}if((o=j.getPropInfo(v.path))!=""){o=j.wrapLink(o); if(l!=v.name){var u=$("
                        ");u.append($("

                        ",{"class":"ttl",html:v.name})).append($("
                        ",{"class":"textArea"}).append($("

                        ").append(o)));c.append(u);prevdl=u;}else{prevdl.append($("

                        ",{"class":"textArea"}).append($("

                        ").append(o)));}l=v.name;}});var b=$("

                        ");if((o=j.getSmokingInfo())!=""){b.append($("

                        ",{"class":"ttl",html:"\u55ab\u7159\u30fb\u7981\u7159\u30fb\u5206\u7159"}));b.append($("
                        ",{"class":"textArea"}).append($("

                        ").append(o))); }c.append(b);var s=$("

                        ");if((o=j.getFlagInfo(i))!=""){s.append($("

                        ",{"class":"ttl",html:"\u305d\u306e\u4ed6\u306e\u60c5\u5831"}));s.append($("
                        ",{"class":"textArea"}).append($("

                        ").append(o)));}c.append(s);var p=new Date();if((copyright=j.getCopyrightInfo())!=""){c.append($("

                        ").append($("
                        ").append($("

                        "+copyright+"

                        "))));}return g;};YolpSearchLayer.prototype.adjust=function(){var c=$(window).height(); var b=$(window).width();var d=$("#commonbox").height();var a=c-d-200;if(a<150){a=150;}$("#yolp_search_detail_innr").css({height:a+"px"});var f=(c-420)/2;$(".point-photo").css({top:$(document).scrollTop()+f});var e=(b-520)/2;$(".point-photo .innr").css({marginLeft:e});var e=(b-940)/2;$("div .point-detail-innr").css({marginLeft:e});};YolpSearchLayer.prototype.remove=function(){var a=this;$(window).unbind("resize",a.adjust); ListingLayer.prototype.remove.apply(this);};YolpSearchLayer.prototype.getImageNaturalSize=function(e){var a=e.width,b=e.height;if(typeof e.naturalWidth!=="undefined"){a=e.naturalWidth;b=e.naturalHeight;}else{if(typeof e.runtimeStyle!=="undefined"){var d=e.runtimeStyle;var c={w:d.width,h:d.height};d.width="auto";d.height="auto";a=e.width;b=e.height;d.width=c.w;d.height=c.h;}else{var c={w:e.width,h:e.height}; e.removeAttribute("width");e.removeAttribute("height");a=e.width;b=e.height;e.width=c.w;e.height=c.h;}}return{width:a,height:b};};YolpSearchLayer.prototype.resizeImage=function(f,b,l){var a=l/b;var m=this.getImageNaturalSize(f);if(m.width<=0||m.heigth<=0){return;}var d=m.height;var c=m.width;var e=d/c;var k=l;var i=b;var j=0;var h=0;if(a>e){var g=b/c;if(g>1){g=1;}i=c*g;k=d*g;h=(l-k)/2;}else{var g=l/d; if(g>1){g=1;}i=c*g;k=d*g;j=(b-i)/2;}$(f).css("width",i+"px");$(f).css("height",k+"px");};YolpSearchLayer.prototype.sendUrl=function(a){window.open(a,"_ydmtl");};var YolpSearchInfoBuilder=Y.YolpSearchInfoBuilder=function(b,a){this.feature=b;this.options=a;this.setForbiddenProp();this.setEbisuProp();this.ebisu="4e7027c0f23b6a0c9d493edf6a37f12e";};YolpSearchInfoBuilder.prototype.setEbisuProp=function(){this.ebisu_props=["Name","PrefName","BusinessHour","CatchCopy","CreditcardFlag","Capacity","PrivateDiningFlag","Reservation","CharterFlag","ParkingFlag","Ppc","BanquestFlag","FriendsFlag","DatingFlag","EntertainFlag","MatchmakingPartyFlag","LadysPartyFlag","FamilyFlag","YourselfFlag","SmallGroupsFlag","ChildFriendlyFlag","PetFlag","BirthdayFlag","WeddingAnniversaryFlag","BuddhistMemorialServiceFlag","MemorialDayFlag","NightSceneFlag","GoodViewFlag","EkichikaFlag","EkinakaFlag","CreditCardsAMEXFlag","CreditCardsVISAFlag","CreditCardsJCBFlag","CreditCardsDinersFlag","CreditCardsDCFlag","CreditCardsUCFlag","CreditCardsUFJFlag","CreditCardsNICOSFlag","CreditCardsMasterFlag","CreditCardsSaisonFlag","CreditCardsOtherFlag"]; };YolpSearchInfoBuilder.prototype.setForbiddenProp=function(){this.forbidden_props=["Id","CatchCopy","CassetteId","Copyright","Access","Address","AddressMatchingLevel","DisplayAddress","DisplayAccess","ReferenceTel","Tel","ZipCode","Yomi","NameKatakana","Coordinates","LogoImage","EnablePc","EnableMobile","LeadImage","Image","ImageTitle","ImageCaption","ItemUrl","ItemCatchCopy","ItemDescription","ItemPrice","ItemBenefit","ItemPeopleNumber","ItemImageUrl","ItemImageHeight","ItemImageWidth","ItemImage","ItemImageTitle","ItemImageCaption","Item","ItemStartDay","ItemEndDay","RoomName","RoomDescription","RoomImageTitle","RoomImage","RoomImageUrl","RoomImageCaption","RoomType","ClickRate","Score","PublishStart","PublishEnd","Licence","StorageUrl","Uid","Gid","GovermentCode","AddressElement","ZenrinCode","AddressLevel","Acl","Accuracy","ContentProviderId","ContentProviderName","ContentProviderType","CompanyCode","CategoryCode","CityId","AddressCode","PrefCode","CityCode","NameHiragana","EventNameHiragana","Quate","PrefName","PrefNameRoma","AddressItem","Altitude","MapScale","MapType","MapMeshCode","LocationId","TelPayment","CouponMobileFlag","CouponDisplayFlag","DisplayMobileFlag","DisplayMediaType","AuxiliaryServiceCode","TelTape","AliasName","Tags","PcUrlRelative","PcUrlImage","PcUrl","UpdateFlag","RatingTotal","ReviewPostFlag","Priority","PriceId","OilTypeId","PriceVerifiedTime","MakerId","TwoThumbFlag","OnlineReserveFlag","GasStopOption","ShopStatus","Item","ItemImageUrl","AdultFlag","BusinessHour","MondayBusinessHour","TuesdayBusinessHour","WednesdayBusinessHour","ThursdayBusinessHour","FridayBusinessHour","SaturdayBusinessHour","SundayBusinessHour","HolidayBusinessHour","DayBeforeHolidayBusinessHour"]; };YolpSearchInfoBuilder.prototype.wrapLink=function(b){var a=b.match("^(http|ftp)://.+$");if(typeof(b)=="string"&&a&&a[0]){b=""+b+"";}return b;};YolpSearchInfoBuilder.prototype.getSmokingInfo=function(){var a="";if(this.feature.property.Detail){if(this.feature.property.Detail.SmokingFlag){a+="\u55ab\u7159\u5e2d\u6709";}if(this.feature.property.Detail.NonSmokingFlag){if(a!=""){a+="\u3001";}a+="\u7981\u7159\u5e2d\u6709";}if(this.feature.property.Detail.SmokingFlag){if(a!=""){a+="\u3001"; }a+="\u5206\u7159";}}return a;};YolpSearchInfoBuilder.prototype.getFlagInfo=function(b){var d=this;var a="";if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){var c=this.feature.property.Detail.CassetteId;$.each(this.feature.property.Detail,function(f,g){var e=false;if(c==d.ebisu){e=true;$.each(d.ebisu_props,function(h,i){if(i==f){e=false;}});}if(f.match(/Flag$/)&&(g==1||g=="true")&&!e){$.each(b,function(h,i){if(i.prop==f){a+=i.name+", "; }});}});}a=a.replace(/, $/,"");return a;};YolpSearchInfoBuilder.prototype.getPropInfo=function(h){var e="";h=h.replace("$.Feature.Property.","");var b=false;if(h.match("Detail.")){h=h.replace("Detail.","");b=true;}var g="";if(h.match(/([0-9]+)$/)){g=RegExp.$1;h=h.replace(/[0-9]+$/,"");}if(h.match(/\[([0-9]+)\]$/)){g=RegExp.$1;h=h.replace(/\[[0-9]+\]$/,"");}var c=false;$.each(this.forbidden_props,function(i,j){if(j==h){c=true; }});var f=this.feature.property.Detail.CassetteId;if(f==this.ebisu){var a=false;$.each(this.ebisu_props,function(i,j){if(j==h){a=true;}});if(!a){c=true;}}if(h.match(/.*Flag$/)){c=true;}if(c){return"";}var d=this.feature.property;if(b){d=this.feature.property.Detail;}if(d[h]&&typeof(d[h])=="string"){e=d[h];}else{if(g!=""&&d[h]&&d[h][g]){e=d[h][g];}else{if(d[h+g]&&typeof(d[h+g])=="string"){e=d[h+g];}else{e=""; }}}if(h=="Reservation"){switch(e){case"1":e="\u4e88\u7d04\u53ef\u80fd";break;case"2":e="\u8981\u4e88\u7d04";break;case"3":e="\u4e88\u7d04\u4e0d\u53ef";break;}}if(h=="Smoking"){switch(e){case"0":e="\u5b8c\u5168\u7981\u7159";break;case"1":e="\u5206\u7159";break;case"2":e="\u5168\u9762\u55ab\u7159\u53ef";break;}}if(h.match(/.*Image/)&&e!=""){e="";}return this.convertBr(e);};YolpSearchInfoBuilder.prototype.getCopyrightInfo=function(){if(this.feature.property.Detail&&this.feature.property.Detail.Copyright){return this.feature.property.Detail.Copyright; }return"";};YolpSearchInfoBuilder.prototype.getBusinessInfo=function(b){var a=[];if(this.feature.property.Detail&&this.feature.property.Detail.BusinessHour){a.push(this.convertBr(this.feature.property.Detail.BusinessHour));}if(b=="detail"){if(this.feature.property.MondayBusinessHour){a.push("[\u6708]"+this.feature.property.MondayBusinessHour);}if(this.feature.property.TuesdayBusinessHour){a.push("[\u706b]"+this.feature.property.TuesdayBusinessHour); }if(this.feature.property.WednesdayBusinessHour){a.push("[\u6c34]"+this.feature.property.WednesdayBusinessHour);}if(this.feature.property.ThursdayBusinessHour){a.push("[\u6728]"+this.feature.property.ThursdayBusinessHour);}if(this.feature.property.FridayBusinessHour){a.push("[\u91d1]"+this.feature.property.FridayBusinessHour);}if(this.feature.property.SaturdayBusinessHour){a.push("[\u571f]"+this.feature.property.SaturdayBusinessHour); }if(this.feature.property.SundayBusinessHour){a.push("[\u65e5]"+this.feature.property.SundayBusinessHour);}if(this.feature.property.HolidayBusinessHour){a.push("[\u795d\u65e5]"+this.feature.property.HolidayBusinessHour);}if(this.feature.property.DayBeforeHolidayBusinessHour){a.push("[\u795d\u524d\u65e5]"+this.feature.property.DayBeforeHolidayBusinessHour);}}return a;};YolpSearchInfoBuilder.prototype.getRoomInfo=function(){var b=[]; var a=["RoomName","RoomDescription","RoomImageTitle","RoomImage","RoomImageUrl","RoomImageCaption","RoomType"];var c=this;if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(d,e){$.each(a,function(f,h){var i=new RegExp("^"+h+"([0-9]+)$");if(d.match(i)){var g=RegExp.$1;if(e&&e!=""){b[g]=b[g]||{};b[g][h]=c.convertBr(e);}}});}); }if(b.length>0){return b;}return"";};YolpSearchInfoBuilder.prototype.getCouponInfo=function(){var b=[];var a=this;if(this.feature.property.Coupon&&typeof(this.feature.property.Coupon)!="string"){$.each(this.feature.property.Coupon,function(c,d){a.feature.property.Coupon[c].Comment=a.convertBr(d.Comment);});return this.feature.property.Coupon;}return false;};YolpSearchInfoBuilder.prototype.getMenuInfo=function(){var b=[]; var a=["Item","ItemCatchCopy","ItemDescription","ItemImageTitle","ItemImage","ItemImageUrl","ItemImageHeight","ItemImageWidth","ItemImageCaption","ItemPrice","ItemBenefit","ItemPeopleNumber","ItemUrl","ItemStartDay","ItemEndDay"];var c=this;if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(d,e){$.each(a,function(f,h){var i=new RegExp("^"+h+"([0-9]+)$"); if(d.match(i)){var g=RegExp.$1;if(e&&e!=""){b[g]=b[g]||{};b[g][h]=c.convertBr(e);}}});});}$.each(b,function(d,e){if(e&&e.ItemImage&&!e.ItemImage.match("^(http)://.+$")){e.ItemImage="http://i.yimg.jp/images/map/yolp/storage_ui/images/noimage_103x155.png";}});if(b.length>0){return b;}return"";};YolpSearchInfoBuilder.prototype.getImageInfo=function(){var a=[];var b=[];if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(d,e){if(d.match(/^Image([0-9]+)/)){var c=RegExp.$1; a[c]=a[c]||{};a[c].Url=e;}else{if(d.match(/^ImageTitle([0-9]+)/)){var c=RegExp.$1;a[c]=a[c]||{};a[c].Title=e;}else{if(d.match(/^ImageCaption([0-9]+)/)){var c=RegExp.$1;a[c]=a[c]||{};a[c].Caption=e;}else{if(d.match(/^ImageUrl([0-9]+)/)){var c=RegExp.$1;a[c]=a[c]||{};a[c].LinkUrl=e;}}}}if(d.match(/^LogoImage([0-9]+)/)){var c=RegExp.$1;b[c]=a["Logo"+c]||{};b[c].Url=e;}});}$.each(a,function(c,d){if(d&&d.Url&&!d.Url.match("^(http)://.+$")){if((d.Caption&&d.Caption!="")||(d.Title&&d.Title!="")){d.Url="http://i.yimg.jp/images/map/yolp/storage_ui/images/noimage_103x155.png"; }}});$.each(b,function(c,d){a.push(d);});if(a.length>0){return a;}return"";};YolpSearchInfoBuilder.prototype.convertBr=function(a){if(a){return a.replace(/<(br|BR)[ \/]*>/g,"
                        ");}else{return"";}};YolpSearchInfoBuilder.prototype.getDescriptionInfo=function(){if(this.feature.description){var a=this.feature.description;return this.convertBr(a);}return"";};YolpSearchInfoBuilder.prototype.getCatchCopyInfo=function(){if(this.feature.property.CatchCopy){return this.convertBr(this.feature.property.CatchCopy); }return"";};YolpSearchInfoBuilder.prototype.getCategoryInfo=function(){var a="";if(this.feature.category){if(typeof(this.feature.category)=="string"){a=this.feature.category;}else{$.each(this.feature.category,function(b,c){a+=c;});}}if(a==""){return"";}else{return a;}};YolpSearchInfoBuilder.prototype.getZipInfo=function(){if(this.feature.property.Detail&&this.feature.property.Detail.ZipCode){return this.feature.property.Detail.ZipCode; }return"";};YolpSearchInfoBuilder.prototype.getHolidayInfo=function(){if(this.feature.property.Holiday){return this.feature.property.Holiday;}return"";};YolpSearchInfoBuilder.prototype.getFaxInfo=function(){var a="";if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(b,c){if(b.match(/Fax[0-9]+/)){a+=c+", ";}});}a=a.replace(/, $/,""); return a;};YolpSearchInfoBuilder.prototype.getTelInfo=function(){var a={};$.each(this.feature.property,function(d,e){if(d.match(/^Tel([0-9]+)/)){var c=RegExp.$1;a[c]=e;}});if(this.feature.property.Detail){$.each(this.feature.property.Detail,function(d,e){if(d.match(/^TelNote([0-9]+)/)){var c=RegExp.$1;a[c]+=" \u203b"+e+"";}});}var b="";$.each(a,function(c,d){if(b!=""){b+=",";}b+=d;});return b;};YolpSearchInfoBuilder.prototype.getAddressInfo=function(){var a=""; if(this.feature.property.Address){a=this.feature.property.Address;}if(this.feature.property.Detail){var b=this.feature.property.Detail;if(b.BuildingInfoName){a+=" "+b.BuildingInfoName;}if(b.BuildingInfoFloor){a+=" "+b.BuildingInfoFloor;}}return a;};YolpSearchInfoBuilder.prototype.getRatingInfo=function(){if(this.feature.property.Rating){var a={};a.data=parseInt(this.feature.property.Rating);a.star=Math.round(a.data*2); if(a.star<1){a.star="1";}if(a.data==0){return"";}else{return a;}}return"";};YolpSearchInfoBuilder.prototype.getAccessInfo=function(){var a="";$.each(this.feature.property,function(b,c){if(b.match(/Access[0-9]+/)){a+=c+", ";}});a=a.replace(/, $/,"");return this.convertBr(a);};YolpSearchInfoBuilder.prototype.getPcUrlInfo=function(){var a=[];if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(c,d){if(c.match(/^PcUrl([0-9]+)/)){var b=RegExp.$1; a[b]=a[b]||{};a[b].Url=d;}else{if(c.match(/^PcUrlImage([0-9]+)/)){var b=RegExp.$1;a[b]=a[b]||{};a[b].Image=d;}}});}return a;};YolpSearchInfoBuilder.prototype.getNearStationInfo=function(){if(this.feature.property.Station){var a=this.feature.property.Station[0];if(a&&a.Name&&a.Time){return a.Name+"\u99c5\u304b\u3089\u5f92\u6b69\u7d04"+a.Time+"\u5206";}}return"";};YolpSearchLayer.prototype.getApplicationId=Y.Service.getApplicationId;var RouteSearchLayer=Y.RouteSearchLayer=Y.extend(Y.FeatureLayer,function(a){Y.FeatureLayer.apply(this,["RouteSearchLayer"]);a=a||{};this.ROUTE_ICON_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";this.enableMarker=typeof(a.enableMarker)!="undefined"?a.enableMarker:true;if(this.enableMarker){var c=this.ROUTE_ICON_URL;this.startMarkerOption={id:"startpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,0),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)}),clickable:false,draggable:false}; this.goalMarkerOption={id:"goalpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,36),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)}),clickable:false,draggable:false};this.viaMarkerOption={id:"viapoint*",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(0,191),new Y.Size(20,26)),labelAnchor:new Y.Point(10,-15),iconAnchor:new Y.Point(10,28)}),clickable:false,draggable:false}; }var b={iconSize:new Y.Size(16,16),iconAnchor:new Y.Point(0,16),labelAnchor:new Y.Point(17,-8)};this.guideNormalIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_4.gif",b);this.guideRestrictIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_2.gif",b);this.enableDeform=typeof(a.enableDeform)!="undefined"?a.enableDeform:true;this.strokeStyle=a.strokeStyle||new Y.Style("ff0000",4,0.75); this.routeEvents=a.routeEvents||{};this.cache=new Y.RouteSearchLayer.Cache();this.url=typeof(a.url)!="undefined"?a.url:null;this.appid="";});RouteSearchLayer.prototype.initialize=function(a){Y.FeatureLayer.prototype.initialize.call(this,a);if(this.enableDeform){this.zooming=false;this.drawnBounds=null;this.onzoomstart=a.bind("zoomstart",function(){this.zooming=true;this.beforeRedraw();},this);this.onzoomend=a.bind("zoomend",function(){if(!this.drawnBounds){return; }this.redrawRoute();this.drawnBounds=a.getBounds().extendRate(3);var b=this;setTimeout(function(){b.zooming=false;},100);},this);this.onmoveend=a.bind("move",function(){if(!this.zooming&&this.drawnBounds&&a.getZoom()>11){a.updateBounds();var b=this.drawnBounds;var c=a.getBounds();if(c.left()>b.left()&&c.right()b.bottom()){return;}this.beforeRedraw();this.redrawRoute(); this.drawnBounds=c.extendRate(3);}},this);}};RouteSearchLayer.prototype.getIconHtml=function(b,g,c){var e=new Y.Point(152,0),a=new Y.Point(152,36),f=new Y.Point(0,191);if(g.equals(e)){return this.createStartIconHtml();}else{if(g.equals(a)){return this.createEndIconHtml();}else{if(g.equals(f)){return this.createViaIconHtml();}}}var d="";d+='

                        ';};RouteSearchLayer.prototype.createEndIconHtml=function(){return'

                        '; };RouteSearchLayer.prototype.createViaIconHtml=function(){return'

                        ';};RouteSearchLayer.prototype.execute=function(a,e){var d=new Y.RouteSearch(this.url);d.setApplicationId(this.appid);e=e||{};var c=e.params||{};if(typeof(e.enableViaOptimize)!="undefined"){if(e.enableViaOptimize){c.order=1;}else{if(typeof(c.order)!="undefined"){delete c.order; }}}if(typeof(e.enableRestrict)!="undefined"){if(e.enableRestrict){c.restrict=1;}else{if(typeof(c.restrict)!="undefined"){delete c.restrict;}}}if(typeof(e.priority)!="undefined"){if(e.priority!="time"){c.priority=e.priority;}else{if(typeof(c.priority)!="undefined"){delete c.priority;}}}if(typeof(e.useCar)!="undefined"){if(!e.useCar){c.traffic="walk";}else{if(typeof(c.traffic)!="undefined"){delete c.traffic; }}}if(typeof(e.useFerry)!="undefined"){if(e.useFerry){c.ferry=2;}else{if(typeof(c.ferry)!="undefined"){delete c.ferry;}}}if(typeof(e.useTollway)!="undefined"){if(!e.useTollway){c.tollway=1;}else{if(typeof(c.tollway)!="undefined"){delete c.tollway;}}}delete c.output;delete c.arnum;delete c.coordinates;d.params.setOption(c);d.params.setCoordinates(a);Y.Event.trigger(this,"drawstart");var f=d.params.toReqParams(); if(!d.params.issetCoordinates()){d=null;var b={code:1000,message:"\u51fa\u767a\u5730\u70b9\u3068\u5230\u7740\u5730\u70b9\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002"};this.drawRoute(false,a,f,b,null);return;}d.request(function(i,h,g){this.drawRoute(i,a,f,h,g);},this);};RouteSearchLayer.prototype.drawMarker=function(a){var d=[];d.push(new Y.Marker(a[0],this.startMarkerOption));if(a.length>2){var c,b;for(c=1,b=a.length-1;c0){this.addFeatures(d);}if(this.enableMarker){this.drawMarker(b);}if(this.enableDeform){this.drawnBounds=this.map.getBounds().extendRate(3);}}Y.Event.trigger(this,"drawend",k);};RouteSearchLayer.prototype.restoreRoute=function(){var a=this.cache.getPoints();if(a.length<2){return;}this.clearFeatures(); this.redrawRoute();if(this.enableMarker){this.drawMarker(a);}};RouteSearchLayer.prototype.createGuide=function(b){var n=$("
                        ");var e="";var l=false;var i;for(var k in b.property){var c=b.property[k];e+="";if(k==="TollwayInfo"){e+=""+c.label+"";e+="";e+="
                          ";for(var j in c.value){e+="
                        • "+c.value[j].label;e+="\uff1a "+(c.value[j].value?c.value[j].value:"--")+"
                        • "; }e+="
                        ";e+="";}else{if(k==="Regulations"){e+=""+c.label+"";e+="";if(b.property[k].value.length>0){e+="
                        ";var f=b.property[k].value;for(var d=0;d";}e+="
                          ";for(var a in f[d]){e+="
                        • "+f[d][a].label;e+="\uff1a "+f[d][a].value+"
                        • ";}e+="
                        ";}e+="
                        ";l=true; }else{e+="--";}e+="";}else{if(k==="Name"){i=c.value;}e+=""+c.label+""+(c.value?c.value:"--")+"";}}e+="";}n.html(e);n.find("th").css({"font-size":"12px","background-color":"#999",color:"#fff"});n.find("td").css({"font-size":"12px",border:"1px solid #000",width:"150px"});n.find("ul").css({cssText:"padding:0px !important; margin:0px 0px 0px 15px !important;"});var h={category:!l?"normal":"restrict",icon:!l?this.guideNormalIcon:this.guideRestrictIcon,title:i?i:""}; var g=new Y.Marker(b.latlng,h);g.bindInfoWindow(n);return g;};RouteSearchLayer.prototype.beforeRedraw=function(){var b=this.getFeatures();if(b.length===0){return;}for(var a=b.length-1;a>=0;--a){if(b[a].id.indexOf("route")>-1){this.removeFeature(b[a]);}}};RouteSearchLayer.prototype.redrawRoute=function(){var e=[];var a=this.cache.getResult();var b,d,c;for(d=0,c=a.length;d0){this.addFeatures(e);}};RouteSearchLayer.prototype.createRoute=function(a,f){if(this.enableDeform){a=this.deformLatLngs(a);}if(a.length===0){return null;}var c={id:f,clickable:true,strokeStyle:this.strokeStyle};var b=new Y.Polyline(a,c);var e=this;for(var d in this.routeEvents){(function(h,g){b.bind(h,function(i){g.call(null,i,b);});})(d,this.routeEvents[d]);}return b; };RouteSearchLayer.prototype.deformLatLngs=function(c){var a=new Y.RouteSearchLayer.Deformer(this.map);var b=a.execute(c);return b;};RouteSearchLayer.prototype.clearRoute=function(){var a=typeof(arguments[0])!="undefined"?arguments[0]:true;this.map.closeInfoWindow();this.clearFeatures();if(a){this.cache.clearResult();this.cache.clearSummary();}};RouteSearchLayer.prototype.remove=function(){Y.FeatureLayer.prototype.remove.call(this); if(this.enableDeform){this.map.unbind(this.onzoomstart);this.map.unbind(this.onzoomend);this.map.unbind(this.onmoveend);}};RouteSearchLayer.prototype.setApplicationId=function(a){this.appid=a;};RouteSearchLayer.prototype.getApplicationId=function(){return this.appid;};var Cache=Y.RouteSearchLayer.Cache=function(){this.params={};this.points=[];this.result=[];this.summary={distance:0,time:0};};Cache.prototype.hasResult=function(){return this.result.length>0?true:false; };Cache.prototype.getResult=function(){return this.result;};Cache.prototype.getParams=function(a){if(a){if(typeof(this.params[a])!="undefined"){return this.params[a];}else{return false;}}return this.params;};Cache.prototype.setParams=function(a){this.params=a;};Cache.prototype.setPoints=function(a){this.points=a;};Cache.prototype.getPoints=function(){return this.points;};Cache.prototype.clearPoints=function(){this.points=[]; };Cache.prototype.setSummary=function(a){this.summary.distance=a.TotalDistance;this.summary.time=a.TotalTime;};Cache.prototype.clearSummary=function(){this.summary={distance:0,time:0};};Cache.prototype.setResult=function(a){this.result=a;};Cache.prototype.getResult=function(){return this.result;};Cache.prototype.getResultRoute=function(c){var a=this.getResult();if(c&&ca.length-1){d=a.length-1;}k=Math.ceil((b+d)/2);j=a[k];l[l.length]=new Y.Point(j.lng()*f,j.lat()*f);}j=a[a.length-1];l[l.length]=new Y.Point(j.lng()*f,j.lat()*f);return l;};Deformer.prototype.predeform_clip=function(a){var c=this.toMSEC;var q=[];var g=this.bounds.extendRate(this.drawingRate);var k=g.left(),e=g.right(),d=g.top(),m=g.bottom(),r=false,s,l,f,v;var u=false,n=this.center.lat(),h=this.center.lng(),o=null,p=100000; for(s=0,l=a.length;sj){p=j;o=s;}if(ve){if(u){q[q.length]=new Y.Point(v*c,f*c);u=false;}continue;}if(fd){if(u){q[q.length]=new Y.Point(v*c,f*c);u=false;}continue;}if(!u){if(a&&a[s-1]){q[q.length]=new Y.Point(a[s-1].lng()*c,a[s-1].lat()*c); }}u=true;q[q.length]=new Y.Point(v*c,f*c);}if(q.length===0&&o){if(o>0){q.push(new Y.Point(a[o-1].lng()*c,a[o-1].lat()*c));}q.push(new Y.Point(a[o].lng()*c,a[o].lat()*c));if(o1000){var f=this.zoom;if(f<=11){var a=(f<=8?1000:Math.floor(b.length/10));g=this.predeform_sieve(b,a);}else{g=this.predeform_clip(b);}}else{g=this.predeform_none(b);}if(g.length===0){return[];}g=this.deform(g);var h=[];var d,c;if(g.length>0){for(d=0,c=g.length;d2){var e=w[0],c=w[n-1];var f=e.x,d=e.y,l=c.x,j=c.y;var o=f-l,m=d-j;var s=((o!==0&&m!==0)?m/o:0);var r=((s!==0)?(d-f*s):d);var q=-1,h=-1,t,g,u,v,k;for(v=1,k=n-1;vh){q=v;h=u;}}if(h>this.length){var b=w.slice(0,q+1);var a=w.slice(q);w=null;var y=this.deform(b);b=null;y.pop(); var x=this.deform(a);a=null;z=y.concat(x);y=null;x=null;}else{z=[w[0],w[n-1]];w=null;}}else{z=w.concat([]);}return z;};var YolpHeatmapLayer=Y.YolpHeatmapLayer=Y.extend(Y.ImageTileLayer,function(a){a=a||{};this.isIE7=false;if($.browser.msie&&$.browser.version=="6.0"){a.opacity=a.opacity||0.5;}else{if($.browser.version=="7.0"){a.opacity=a.opacity||1;this.isIE7=true;}else{a.opacity=a.opacity||1;}}this.options=a;Y.ImageTileLayer.apply(this,["GeoXml\u30d2\u30fc\u30c8\u30de\u30c3\u30d7","",a]);});YolpHeatmapLayer.prototype.drawHeat=function(a){a=a||{}; this.draw(true);};YolpHeatmapLayer.prototype.buildUrl=function(){var a="http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?";var b={datum:"wgs",detail:"simple",results:100,appid:"QLLhVEWxg64qlOs5IqDZPlr2D8OnZ.isQ61FqqOgbhZozc5Fvk_PrGrkL87KJQ--"};b=$.extend(this.options,b);$.each(b,function(c,d){a+=c+"="+encodeURIComponent(d)+"&";});return a;};YolpHeatmapLayer.prototype.getImageSrc=function(h,g){var b=this.buildUrl(); var f=this.map.getZoom();var d=this.map.getProjection();var e=new Y.LatLngBounds();e.extend(d.fromTileToLatLng(h,g,Y.DEFAULT_TILE_SIZE,Y.DEFAULT_TILE_SIZE,f));e.extend(d.fromTileToLatLng(h,g,0,0,f));if(f>=18){e.extendRate(1.5);}else{if(f>=14){e.extendRate(2);}else{if(f>=10){e.extendRate(2.5);}else{e.extendRate(3);}}}var i=e.getSouthWest();var c=e.getNorthEast();b+="&bbox="+i.lng()+","+i.lat()+","+c.lng()+","+c.lat(); var a="http://h.map.srv.yimg.jp/h?t=11&";a+="x="+h+"&y="+g+"&z="+this.map.getZoom()+"&url="+encodeURIComponent(b);if(this.isIE7){a+="&tsize="+Y.DEFAULT_TILE_SIZE+"&dot=2,72&";}return a;};var NaviSearchLayer=Y.NaviSearchLayer=Y.extend(Y.FeatureLayer,function(a){Y.FeatureLayer.apply(this,["NaviSearchLayer"]);a=a||{};this.enableMarker=typeof(a.enableMarker)!="undefined"?a.enableMarker:true;if(this.enableMarker){var c="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";this.startMarkerOption={id:"startpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,0),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)}),clickable:true,draggable:true}; this.goalMarkerOption={id:"goalpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,36),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)}),clickable:true,draggable:true};this.viaMarkerOption={id:"viapoint*",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(0,191),new Y.Size(20,26)),labelAnchor:new Y.Point(10,-15),iconAnchor:new Y.Point(10,28)}),clickable:true,draggable:false}; }this.vxMarkerOption={id:"vx",icon:new Y.Icon("http://i.yimg.jp/images/map/api/yolp/images/yolp_dragging_via.png",{iconSize:new Y.Size(13,13),iconAnchor:new Y.Point(6.5,6.5)}),clickable:true,draggable:false};var b={iconSize:new Y.Size(16,16),iconAnchor:new Y.Point(0,16),labelAnchor:new Y.Point(17,-8)};this.walkStyle=a.walkStyle||new Y.Style("ff0000",4,0.75);this.trainStyle=a.trainStyle||new Y.Style("0000ff",4,0.75); this.routeEvents=a.routeEvents||{};});NaviSearchLayer.prototype.initialize=function(a){Y.FeatureLayer.prototype.initialize.call(this,a);};NaviSearchLayer.prototype.initializeByListing=function(a){this.initialized=true;this.listing=a;};NaviSearchLayer.prototype.getIconHtml=function(a,d,b){var c="";c+='
                        0){f.drawRoute(j,a);f.drawYDFToList(j);}else{f.clearFeatures();var e=[];if(f.startmarker){e.push(f.startmarker.getLatLng());}else{if(i&&i!=undefined){e.push(i);}}if(f.goalmarker){e.push(f.goalmarker.getLatLng()); }else{if(d&&d!=undefined){e.push(d);}}if(e.length==2){f.drawMarker(e);}f.drawError();}});}catch(c){this.drawError(c.message);}};NaviSearchLayer.prototype.drawError=function(b){var c=this;if(!this.listing){return;}if(!this.listContainer){this.listContainer=$("
                        ");this.listing.container.append(this.listContainer);}var a=this.createErrorHtml(b);this.listContainer.html(a);Y.Event.trigger(this,"drawend"); this.drawing=false;};NaviSearchLayer.prototype.createErrorHtml=function(a){return"";};NaviSearchLayer.prototype.drawYDFToList=function(b){var c=this;if(!this.listing){return;}if(!this.listContainer){this.listContainer=$("
                        ");this.listing.container.append(this.listContainer);}var a=this.createResultHtml(b);this.listContainer.html(a);};NaviSearchLayer.prototype.createResultHtml=function(b){var c=this; var a=$("
                        ");$.each(b.features,function(d,e){a.append(c.createItemHtml(e,d));});return a;};NaviSearchLayer.prototype.createItemHtml=function(b,a){var e=this;var c=$("
                        ",{css:{cursor:"pointer"}});c.append($("
                        ",{css:{backgroundColor:"lightgray"}}).append($("",{text:"\u7d4c\u8def"+(a+1)+" "+b.property.TimeOnBoard+"\u5206 \u7247\u9053"+b.property.TotalPrice.TotalPrice+"\u5186"})));c.mouseover(function(){$(this).css({backgroundColor:"aliceblue"}); });c.mouseout(function(){$(this).css({backgroundColor:""});});var d=this.createEdgeHtml(b);d.hide();c.append(d);c.click(function(){e.drawRoute(e.ydf,{no:a});d.toggle();});return c;};NaviSearchLayer.prototype.createEdgeHtml=function(a){var c=this;var b=$("
                        ");$.each(a.route.Edge,function(d,e){var g=e.Vertex;var h=c.stations[g[0].Property.Station.Target];var f=c.stations[g[1].Property.Station.Target]; b.append($("
                        ",{text:h.Name})).append($("
                        ",{text:e.Property.RailName})).append($("
                        ",{text:f.Name}));});return b;};NaviSearchLayer.prototype.drawRoute=function(b,a){var c=this;this.no=a.no||0;if(!b.features||b.features.length==0){Y.Event.trigger(this,"routeapierror");return;}this.stations={};this.stationmarker={};if(b.result&&b.result.dictionary&&b.result.dictionary.Station){$.each(b.result.dictionary.Station,function(d,f){if(f.Geometry){c.stations[f.Id]=f; var e=new Y.Marker(Y.Util.parseCoordinates(f.Geometry.Coordinates)[0],c.vxMarkerOption);e.property=f;e.title=e.property.Name;c.stationmarker[f.Id]=e;}});}this.cf=b.features[a.no||0]||b.features[0];this.clearFeatures();this.drawVertexMarker(this.cf.route);this.drawMarker(this.cf.latlngs);this.drawRailway(this.cf.property,this.cf.route);Y.Event.trigger(this,"drawend");this.drawing=false;};NaviSearchLayer.prototype.drawMarker=function(a){if(!a){return; }var c=this;var b=[];this.startmarker=new Y.Marker(a[0],this.startMarkerOption);this.goalmarker=new Y.Marker(a[a.length-1],this.goalMarkerOption);this.startmarker.title=this.startname;this.goalmarker.title=this.goalname;Y.Event.addListener(this.startmarker,"dragend",function(){if(!c.drawing){c.dragDrawRoute("start");}});Y.Event.addListener(this.goalmarker,"dragend",function(){if(!c.drawing){c.dragDrawRoute("goal"); }});b.push(this.startmarker);b.push(this.goalmarker);this.addFeatures(b);};NaviSearchLayer.prototype.dragDrawRoute=function(b){if(this.drawing){return;}var c=this.startmarker.getLatLng();var a=this.goalmarker.getLatLng();var d=this;this.execute(c,a,{station:false});};NaviSearchLayer.prototype.drawVertexMarker=function(a){var c=this;var b={};if(!a){return;}$.each(a.Edge,function(e,d){$.each(d.Vertex,function(f,g){if(g.Property&&g.Property.Station){var h=g.Property.Station.Target; b[h]=h;}});if(d.Property.Traffic&&d.Property.Traffic==128){c.drawWalkRoute(d);}if(d.Property.Traffic&&d.Property.Traffic!=128){c.drawTrafficRoute(d);}});this.markers=[];$.each(b,function(d,f){var e=c.stationmarker[f];Y.Event.addListener(e,"click",function(){c.openInfoWindow(e);});c.markers.push(e);});this.addFeatures(this.markers);};NaviSearchLayer.prototype.drawTrafficRoute=function(b){var d=this; var c=[];if(!b||!b.Vertex||b.Vertex.length==0){return;}this.walkline=[];$.each(b.Vertex,function(e,g){var h=g.Property.Station.Target;var f=d.stations[h];c.push(Y.Util.parseCoordinates(f.Geometry.Coordinates)[0]);});var a=new Y.Polyline(c,{strokeStyle:this.walkStyle});this.addFeature(a);};NaviSearchLayer.prototype.drawWalkRoute=function(b){var d=this;var c=[];if(!b||!b.Vertex||b.Vertex.length==0){return; }this.walkline=[];$.each(b.Vertex,function(e,g){var h=g.Property.Station.Target;var f=d.stations[h];c.push(Y.Util.parseCoordinates(f.Geometry.Coordinates)[0]);});var a=new Y.RouteSearch();a.params.setOption({traffic:"walk"});a.params.setCoordinates(c);a.request(function(g,f,e){$.each(e,function(h,j){var i=new Y.Polyline(j.route.latlng,{strokeStyle:d.walkStyle});d.addFeature(i);d.walkline.push(i);}); });};NaviSearchLayer.prototype.drawRailway=function(c,b){var f=this;var d=new Y.Railway();var e="";var a="";if(c.PassStationList&&c.PassStationList.PassStation){a=c.PassStationList.PassStation;}$.each(a,function(g,h){if(e!=""){e+=",";}e+=h;});$.each(b.Edge,function(g,k){var l="";if(k.Property&&k.Property.RailName&&k.Property.TrainId){l=k.Property.RailName;}var i="";if(k.Vertex&&k.Vertex[0]&&k.Vertex[0].Property&&k.Vertex[0].Property.Station){var h=k.Vertex[0].Property.Station.Target; i=f.stations[h];}if(i.StationCode&&l!=""){var j=i.StationCode;e=e.replace(j,j+"|"+l+":"+j);}});e=e.replace(/^[0-9]+\|/,"");d.execute(e,{},function(g){$.each(g.features,function(h,i){i.strokeStyle=f.trainStyle;});f.addFeatures(g.features);});};NaviSearchLayer.prototype.openInfoWindow=function(a,c){var b={};if(this.isHidden()){this.infoWindow=this.map.openInfoWindow(a.getLatLng(),this.createInfoWindowHtml(a),b); }else{this.infoWindow=a.openInfoWindow(this.createInfoWindowHtml(a),b);}this.infoWindowFeature=a;Y.Event.trigger(this,"infowindowopen",a);};NaviSearchLayer.prototype.createInfoWindowHtml=function(b){var a=$("
                        ");a.append(b.property.Name);return a;};NaviSearchLayer.prototype.remove=function(){Y.FeatureLayer.prototype.remove.call(this);if(this.enableDeform){this.map.unbind(this.onzoomstart);this.map.unbind(this.onzoomend); this.map.unbind(this.onmoveend);}if(this.listContainer){this.listContainer.empty();this.listContainer.remove();this.listContainer=null;}};NaviSearchLayer.prototype.getDrawing=function(){return this.drawing;};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,""); this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVELd){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ad){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;ad){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio); if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0; c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0]; var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;dc){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0]; if(d.floorconnections){for(var a=0;a0){for(var a=0;af){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a=g[0]&&b=g[1]&&a=h[0]-a&&d[0]<=g[0]+a&&d[1]>=h[1]-l&&d[1]<=g[1]+i); };ClickableLayer.prototype.rotate=function(d,a){var c=d[0]*Math.cos(a)-d[1]*Math.sin(a);var b=d[0]*Math.sin(a)+d[1]*Math.cos(a);return[c,b];};ClickableLayer.prototype.isHitPolygonInGeometry=function(m,c,b){var j=m.length/2;var g=0;var l=m.slice(0,2);var e=(c<=l[0]);var d=(b<=l[1]);for(var f=1;f0)?b.threshold:16; b.isRaw=(typeof b.isRaw!=="undefined")?b.isRaw:false;var a=Y.ClickableLayer;a.call(this,c,b);});AnnotationClickableLayer.prototype.initialize=function(b){this.setAutoCachePurgeEvent(b,"zoomend");var a=Y.ClickableLayer.prototype;a.initialize.call(this,b);};AnnotationClickableLayer.prototype.createClickableParams=function(d){var e=this.map,g=e.getCurrentLayerSetId(),b=d.tx,a=d.ty,f=e.getZoom(),c=(e.getConfigure("mapType")===Y.Map.TYPE.SMARTPHONE&&g===Y.LayerSetId.NORMAL); if(c){g=Y.Map.TYPE.SMARTPHONE;}return{mode:g,r:"1",x:b,y:a,z:f};};AnnotationClickableLayer.prototype.containClickHitTest=function(H,c){var L=H.tx,J=H.ty,o=H.z,m=H.rx,k=H.ry,I=H.ll;var M=this.map;var t=M.getProjection().tileSize;var f=this.options;var g=f.threshold;var C=f.isRaw;var E=this._TYPE_MAP;var v;for(var D=0,h=c.length;De){v=s; }}else{v=s;}}}}if(v){var l;if(C===true){l=v;l.type=E[v.type];}else{l={type:E[v.type],label:v.label,name:v.name,angle:v.angle,vertical:v.vertical,size:v.size,clickLatLng:v.clickLatLng,centerLatLng:v.centerLatLng,latLngBounds:v.latLngBounds};}Y.Event.trigger(this,"match",l);return;}else{Y.Event.trigger(this,"nomatch");return;}};var ImageMapLayer=Y.ImageMapLayer=Y.extend(Y.FeatureLayer,function(b,a){Y.Layer.apply(this,[name,{}]);this.imageurl=b;this.anchors=[];this.firstview=a.firstview;this.basecenter=a.center;});ImageMapLayer.prototype.initialize=function(a){var b=this;this.basezoom=a.getZoom();this.setImage(b.imageurl);if(this.evtZoomend){a.unbind(this.evtZoomend);}this.evtZoomend=a.bind("zoomend",function(d,c){if(b.zoomTimer){clearTimeout(b.zoomTimer); }b.zoomTimer=setTimeout(function(){var e=b.map.getZoom();if(e<=b.basezoom-4){e=b.basezoom-4;}if(e!=b.pastzoom){b.drawImage(e,b.pastzoom);}b.pastzoom=e;},100);});if(!this.baseoffset){this.baseoffset=a.mapContainer.offset();}FeatureLayer.prototype.initialize.apply(this,[a]);};ImageMapLayer.prototype.isInitialized=function(){try{var b=this.imgnode.position();}catch(a){return false;}return this.initialized; };ImageMapLayer.prototype.setImage=function(a){var b=this;this.mapimg=new Image();this.mapimg.onload=function(){b.initImage();};if(this.firstview){this.mapimg.src=a;}};ImageMapLayer.prototype.getInitCenter=function(){return new Y.LatLng(0,0);};ImageMapLayer.prototype.initImage=function(){var d=this;var c=this.map.mapContainer.position();var b=this.map.getSize();this.basezoom=this.map.getZoom();var a=this.map.getCenter(); this.map.panTo(this.map.getCenter());this.imgnode=$("",{src:this.imageurl,css:{position:"absolute",left:(-c.left+b.width/2-this.mapimg.width/2)+"px",top:(-c.top+b.height/2-this.mapimg.height/2)+"px",zIndex:-1}});if(this.container){this.container.append(this.imgnode);}this.imgnode.dblclick(function(i){var k=d.map.mapContainer.offset();var h=d.imgnode.position();var f=i.pageX-h.left-k.left;var j=i.pageY-h.top-k.top; var g=d.map.getZoom();if(g-d.basezoom<=0){f=f*Math.pow(2,d.basezoom-g);j=j*Math.pow(2,d.basezoom-g);}else{f=f*Math.pow(0.5,g-d.basezoom);j=j*Math.pow(0.5,g-d.basezoom);}Y.Event.trigger(d,"dblclick",new Y.Point(f,j));});this.map.panTo(this.getInitCenter());Y.Event.trigger(this,"initimage");};ImageMapLayer.prototype.fromImagePointToLatLng=function(a){var g=this.map.mapContainer.offset();var f=this.imgnode.position(); var d=this.map.getZoom();var c={};if(d-this.basezoom<=0){c.x=a.x*Math.pow(0.5,this.basezoom-d);c.y=a.y*Math.pow(0.5,this.basezoom-d);}else{c.x=a.x*Math.pow(2,d-this.basezoom);c.y=a.y*Math.pow(2,d-this.basezoom);}var c=new Y.Point(c.x+f.left+g.left,c.y+f.top+g.top);var b=this.map.fromPagePixelToContainerPixel(c);var e=this.map.fromContainerPixelToLatLng(b);return e;};ImageMapLayer.prototype.fromLatLngToImagePoint=function(e){var f=this.map.mapContainer.offset(); var d=this.imgnode.position();var a=this.map.fromLatLngToDivPixel(e);var c=this.map.getZoom();a.x=a.x-d.left;a.y=a.y-d.top;var b={};if(c-this.basezoom<=0){b.x=a.x*Math.pow(2,this.basezoom-c);b.y=a.y*Math.pow(2,this.basezoom-c);}else{b.x=a.x*Math.pow(0.5,c-this.basezoom);b.y=a.y*Math.pow(0.5,c-this.basezoom);}return new Y.Point(b.x,b.y);};ImageMapLayer.prototype.drawImage=function(l,c){if(!this.imgnode){return; }var n=this.map.getSize();var e=this.imgnode.position();var a=this.imgnode.width();var j=this.imgnode.height();var h=this.map.mapContainer.offset();var d=e.left;var g=e.top;var i=new Y.Point(e.left+h.left,e.top+h.top);var f=this.map.fromLatLngToDivPixel(this.map.getCenter(),l);var b=new Y.Point(h.left+f.x,h.top+f.y);var m=i.x-b.x;var k=i.y-b.y;if(l>c){a=a*Math.pow(2,(l-c));j=j*Math.pow(2,(l-c));d+=(m*(Math.pow(2,(l-c))-1)); g+=(k*(Math.pow(2,(l-c))-1));}else{a=a/Math.pow(2,(c-l));j=j/Math.pow(2,(c-l));d-=(m-(m/Math.pow(2,(c-l))));g-=(k-(k/Math.pow(2,(c-l))));}this.imgnode.css({width:a,height:j,left:d,top:g});};ImageMapLayer.prototype.draw=function(a){var b=this;if(this.mapimg&&!this.mapimg.src){this.mapimg.src=this.imageurl;}FeatureLayer.prototype.draw.apply(this,[a]);};ImageMapLayer.prototype.remove=function(){if(this.evtZoomend){this.map.unbind(this.evtZoomend); }if(this.evtLayerSetChanged){this.map.unbind(this.evtLayerSetChanged);}if(this.imgnode){this.imgnode.remove();}if(this.basecenter){this.map.panTo(this.basecenter);}if(this.basezoom){this.map.setZoom(this.basezoom);}FeatureLayer.prototype.remove.apply(this);};var ImageMapMixerLayer=Y.ImageMapMixerLayer=Y.extend(Y.ImageMapLayer,function(c){var b="ImageMapMixer";Y.Layer.apply(this,[b,{}]);this.imageurl="";this.anchors=[];this.cid=c.cid;this.firstview=c.firstview;this.mixer=new MapMixer();this.basecenter="";var d=this;var a=new Y.Anchor();a.getMixer(this.cid,{},function(f,g,e){d.mixer=f;d.imageurl=g;d.basecenter=e;d.setImage(g);});});ImageMapMixerLayer.prototype.getInitCenter=function(){if(this.imgnode&&this.imgnode.position){var a=this.map.getCenter(); var c=this.mixer.latlngToPix(a.lat(),a.lng());var b=this.fromImagePointToLatLng(new Y.Point(c.x,c.y));return b;}else{return new Y.LatLng(0,0);}};ImageMapMixerLayer.prototype.initialize=function(b){var c=this;ImageMapLayer.prototype.initialize.apply(c,[b]);var a=this.map.getLayerSets();setTimeout(function(){for(var g in c.map.getLayerSets()){var f=a[g].getLayers();for(var e=0;e0){this.features=this.convertFeatures(this.features,this.mixer,this.imgnode);}ImageMapLayer.prototype.draw.apply(this,[a]);};ImageMapMixerLayer.prototype.fromLatLngToImageLatLng=function(g){try{if(this.imgnode&&this.imgnode.position){var f=this.map.mapContainer.offset(); var c=this.imgnode.position();}}catch(d){}var j=this.map.getZoom();var a=this.mixer.latlngToPix(g.Lat,g.Lon);var b={};if(j-this.basezoom<=0){b.x=a.x*Math.pow(0.5,this.basezoom-j);b.y=a.y*Math.pow(0.5,this.basezoom-j);}else{b.x=a.x*Math.pow(2,j-this.basezoom);b.y=a.y*Math.pow(2,j-this.basezoom);}a=b;if(f&&c){var i=new Y.Point(a.x+c.left+f.left,a.y+c.top+f.top);var h=this.map.fromPagePixelToContainerPixel(i); var g=this.map.fromContainerPixelToLatLng(h);return g;}};ImageMapMixerLayer.prototype.convertFeatures=function(b,a,i){var h=this;var c=this.map.getZoom();try{if(i&&i.position){var g=this.map.mapContainer.offset();var f=i.position();}}catch(d){}$.each(b,function(j,m){var o=m.getLatLng();var n=a.latlngToPix(o.Lat,o.Lon);var l={};if(c-h.basezoom<=0){l.x=n.x*Math.pow(0.5,h.basezoom-c);l.y=n.y*Math.pow(0.5,h.basezoom-c); }else{l.x=n.x*Math.pow(2,c-h.basezoom);l.y=n.y*Math.pow(2,c-h.basezoom);}n=l;if(g&&f){var e=new Y.Point(n.x+f.left+g.left,n.y+f.top+g.top);var k=h.map.fromPagePixelToContainerPixel(e);var o=h.map.fromContainerPixelToLatLng(k);if(m.isMixer!=true){m.setLatLng(o);m.isMixer=true;}}});return b;};ImageMapMixerLayer.prototype.getImageCenter=function(){var a=this.fromLatLngToImagePoint(this.map.getCenter()); var b=this.mixer.pixToLatLng(a.x,a.y);if(b&&b.x&&b.y){return new Y.LatLng(b.x,b.y);}else{return this.basecenter;}};ImageMapMixerLayer.prototype.remove=function(){var e=this;var c=this.map.getLayerSets();for(var d in this.map.getLayerSets()){for(var b in c[d].getLayers()){var a=c[d].getLayers()[b];if(a.removeImageMapLayer){a.removeImageMapLayer();}}}if(this.evtZoomend){this.map.unbind(this.evtZoomend); }if(this.evtLayerSetChanged){this.map.unbind(this.evtLayerSetChanged);}if(this.basecenter){this.map.panTo(this.getImageCenter());}if(this.basezoom){}if(this.imgnode){this.imgnode.remove();}FeatureLayer.prototype.remove.apply(this);};var ImageMapAnchorLayer=Y.ImageMapAnchorLayer=Y.extend(Y.ImageMapLayer,function(b,a){Y.Layer.apply(this,[name,{}]);this.imageurl=b;this.anchors=[];this.basezoom=10;});ImageMapAnchorLayer.prototype.initialize=function(a){ImageMapLayer.prototype.initialize.apply(this,[a]);var b=this;if(this.evtDblClick){Y.Event.removeListener(this.evtDblClick);}this.evtDblClick=Y.Event.addListener(this,"dblclick",function(c){var d=b.addAnchor(c); });};ImageMapAnchorLayer.prototype.initImage=function(){Y.ImageMapLayer.prototype.initImage.apply(this);this.container.css({zIndex:10});};ImageMapAnchorLayer.prototype.getCustomIcon=function(b){var a=++b;if(b<100&&b>=10){a="0"+b;}else{if(b<10){a="00"+b;}}var d="http://i.yimg.jp/images/clear.gif";var c=new Y.Icon("");c.iconHtml=$('').loadAlphaImage();c.iconSize=new Y.Size(24,35); c.iconAnchor=new Y.Point(12,35);c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);return c;};ImageMapAnchorLayer.prototype.addAnchor=function(a,c){var f=this.map.getCenter();var e=this.features.length;var d=this.getCustomIcon(e);if(a){f=this.fromImagePointToLatLng(a);}if(this.features.length>=100){Y.Event.trigger(this,"overflow");return;}var b=new Y.Marker(f,{draggable:true,icon:d}); b.number=e;var g=this;b.bind("rightclick",function(){g.removeAnchor(b.number);});this.addFeature(b);if(c!==true){Y.Event.trigger(this,"addanchor");}return b;};ImageMapAnchorLayer.prototype.removeAnchor=function(a,b){this.removeFeature(this.features[a]);this.drawAnchor();Y.Event.trigger(this,"removeanchor",a);};ImageMapAnchorLayer.prototype.drawAnchor=function(){var c=this;for(var a=0;a=100){Y.Event.trigger(this,"overflow"); return;}var f=this;var d=this.features.length;var c=this.getCustomIcon(d);var a=new Y.Marker(e,{draggable:true,icon:c});a.number=d;this.addFeature(a);if(b!==true){Y.Event.trigger(this,"addanchor");}a.bind("rightclick",function(){f.removeAnchor(a.number);});};AnchorLayer.prototype.removeAnchor=function(a){this.removeFeature(this.features[a]);this.drawAnchor();Y.Event.trigger(this,"removeanchor",a);}; AnchorLayer.prototype.getCustomIcon=function(b){var a=++b;if(b<100&&b>=10){a="0"+b;}else{if(b<10){a="00"+b;}}var d="http://i.yimg.jp/images/clear.gif";var c=new Y.Icon("");c.iconHtml=$('').loadAlphaImage();c.iconSize=new Y.Size(24,35);c.iconAnchor=new Y.Point(12,35);c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);return c;};AnchorLayer.prototype.drawAnchor=function(){var c=this; for(var a=0;a=2){for(var l=n-2;l<=n;l++){var m=f[l];p.push({x:m.point.x,y:m.point.y});s.push({x:m.latlng.lat(),y:m.latlng.lng()});}h.addParam(p,s);}e.lat+=f[n].latlng.lat();e.lon+=f[n].latlng.lng(); }e.lat/=f.length;e.lon/=f.length;e=new Y.LatLng(e.lat,e.lon);if(f.length>3){var k=f[0];var g=f[f.length-1];for(var n=1;n0)?a.threshold:16;a.isRaw=(typeof a.isRaw!=="undefined")?a.isRaw:false;this.enable=true;this.loaded=false;});MapAnnotationPlugin.prototype.getName=function(){return"MapAnnotationPlugin"; };MapAnnotationPlugin.prototype.load=function(d){if(this.loaded){return;}this.map=d;var c=this.configs;var b={threshold:c.threshold,isRaw:c.isRaw};var a=this.clickableLayer=new Y.AnnotationClickableLayer("MapAnnotationPluginLayer",b);a.bind("match",c.match,c.object);if(typeof c.noMatch==="function"){a.bind("nomatch",c.noMatch,c.object);}if(typeof c.error==="function"){a.bind("error",c.error,c.object); }a.onClickTile=this.mapClickHandler;d.addLayer(a);this.loaded=true;};MapAnnotationPlugin.prototype.setEnable=function(c){if(!this.loaded){return;}this.enable=c;var b=this.clickableLayer,a=b.isActivated();if(c&&!a){b.activate();}else{if(!c&&a){b.deactivate();}}};MapAnnotationPlugin.prototype.getEnable=function(){return this.enable;};MapAnnotationPlugin.prototype.mapClickHandler=function(b){var a=Y.AnnotationClickableLayer.prototype.onClickTile; a.call(this,b);};MapAnnotationPlugin.prototype.search=function(a){};MapAnnotationPlugin.prototype.unload=function(){if(this.loaded){this.map.removeLayer(this.clickableLayer);}this.loaded=false;};var ListingTabPlugin=Y.ListingTabPlugin=Y.extend(Y.Plugin,function(a){this.enable=true;this.layers=a.layers||{};this.list=a.list;this.tab=$("#"+a.tab);this.params=a||{};this.loading=true;this.auto=a.auto===undefined?true:a.auto;});ListingTabPlugin.prototype.getName=function(){return"ListingTabPlugin";};ListingTabPlugin.prototype.getCurrentLayer=function(){return this.currentlayer;};ListingTabPlugin.prototype.load=function(a){this.map=a; var b=this;if(this.layers.length==1){this.currentlayer=this.layers[0].layer;this.currentidx=0;this.changeLayer(0);}else{$.each(this.layers,function(c,d){if(d.layer==b.params.current){b.changeLayer(c);b.currentidx=c;}Y.Event.addListener(d.layer,"drawstart",function(){if(b.evtDrawendLazy){clearTimeout(b.evtDrawendLazy);}b.loading=true;});Y.Event.addListener(d.layer,"drawend",function(){b.loading=false; });});}this.loaded=true;};ListingTabPlugin.prototype.showTab=function(){var a=this;this.tab.addClass("preview-list-menu");this.tab.html("");$.each(this.layers,function(b,c){var d=$("
                      • ");if(b==a.currentidx){d.addClass("current");d.append($(""+c.name+""));}else{d.append($(""+a.shortName(c.name,10)+"").click(function(){return(function(e){if(!a.loading){a.changeLayer(e); Event.trigger(a,"layerchange",a.currentlayer);}})(b);}));}a.tab.append(d);});};ListingTabPlugin.prototype.shortName=function(a,b){if(a.length>b){return a.substr(0,b)+"...";}return a;};ListingTabPlugin.prototype.changeLayer=function(a){this.currentidx=a;if(this.currentlayer){this.map.removeLayer(this.currentlayer);this.list.removeLayer(this.currentlayer);}this.currentlayer=this.layers[a].layer;this.map.addLayer(this.currentlayer); this.list.addLayer(this.currentlayer);if(this.auto){this.currentlayer.setAutoPanMap(false);this.currentlayer.setAutoUpdate(true);}this.currentlayer.execute({query:this.layers[a].default_query});if(this.layers.length>1){this.showTab();}};ListingTabPlugin.prototype.unload=function(){if(this.loaded){if(this.currentlayer){this.map.removeLayer(this.currentlayer);this.list.removeLayer(this.currentlayer); }this.tab.html("");}this.loaded=false;};var GeoXmlPlugin=Y.GeoXmlPlugin=Y.extend(Y.Plugin,function(b,a){this.url=b;this.options=a||{};this.loading=true;});GeoXmlPlugin.prototype.getName=function(){return"GeoXmlPlugin";};GeoXmlPlugin.prototype.getCurrentLayer=function(){return this.currentlayer;};GeoXmlPlugin.prototype.load=function(a){this.map=a;var b=this;this.iconlayer=new Y.GeoXmlLayer(this.url);this.iconlayer.fitToMap=function(){};this.heatlayer=new Y.GeoXmlHeatmapLayer(this.url,this.options); if(this.options.heat){this.currentlayer=this.heatlayer;}else{this.currentlayer=this.iconlayer;}this.map.addLayer(this.currentlayer);if(!this.options.heat){this.currentlayer.execute();}this.control=new Y.GeoXmlHeatSwitchControl({icon:this.iconlayer,heat:this.heatlayer});a.addControl(this.control);this.loaded=true;};GeoXmlPlugin.prototype.unload=function(){if(this.loaded){this.map.removeLayer(this.heatlayer); this.map.removeLayer(this.iconlayer);this.map.removeControl(this.control);}this.loaded=false;};var RouteSearchPlugin=Y.RouteSearchPlugin=Y.extend(Y.Plugin,function(a){this.loaded=false;this.ROUTE_ICON_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";a=a||{};this.latlngs=a.latlngs||[];this.markerDraggable=typeof(a.markerDraggable)!="undefined"?a.markerDraggable:true;this.routeEditable=typeof(a.routeEditable)!="undefined"?a.routeEditable:true;this.maxDistance=a.maxDistance||1000; this.enableDeform=typeof(a.enableDeform)!="undefined"?a.enableDeform:true;this.strokeStyle=a.strokeStyle||new Y.Style("ff0000",4,0.75);this.enableVia=typeof(a.enableVia)!="undefined"?a.enableVia:true;this.maxVia=a.maxVia||0;this.useNowloading=typeof(a.useNowloading)!="undefined"?a.useNowloading:true;if(Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid){this.SmartDevice=true;}else{this.SmartDevice=false; }this.current=null;this.currentMarker=null;this.markerTouchDragging=false;this.requestingCount=0;this.enable=true;this.noRequest=false;var c=this.ROUTE_ICON_URL;this.start={latlng:null,address:null,marker:null,markerOption:{id:"startpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,0),new Y.Size(24,35)),labelAnchor:new Y.Point(13,-17),iconAnchor:new Y.Point(12,35)}),clickable:true,draggable:this.markerDraggable}}; this.goal={latlng:null,address:null,marker:null,markerOption:{id:"goalpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,36),new Y.Size(24,35)),labelAnchor:new Y.Point(13,-17),iconAnchor:new Y.Point(12,35)}),clickable:true,draggable:this.markerDraggable}};this.via={points:[],markerOption:{id:"viapoint*",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(0,191),new Y.Size(20,26)),labelAnchor:new Y.Point(10,-15),iconAnchor:new Y.Point(10,28)}),clickable:true,draggable:this.markerDraggable}}; var b={iconSize:new Y.Size(16,16),iconAnchor:new Y.Point(0,16),labelAnchor:new Y.Point(17,-8)};this.guideNormalIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_4.gif",b);this.guideRestrictIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_2.gif",b);this.dragViaMarker=null;this.dragViaMarkerOption={id:"dragvia",icon:new Y.Icon("http://i.yimg.jp/images/map/api/yolp/images/yolp_dragging_via.png",{iconSize:new Y.Size(13,13),iconAnchor:new Y.Point(6.5,6.5)}),clickable:true,draggable:true}; this.dragViaMarkerTimer=null;this.params={};});RouteSearchPlugin.prototype.getIconHtml=function(b,g,c){var e=new Y.Point(152,0),a=new Y.Point(152,36),f=new Y.Point(0,191);if(g.equals(e)){return this.createStartIconHtml();}else{if(g.equals(a)){return this.createEndIconHtml();}else{if(g.equals(f)){return this.createViaIconHtml();}}}var d="";d+='

                        ';};RouteSearchPlugin.prototype.createEndIconHtml=function(){return'

                        ';};RouteSearchPlugin.prototype.createViaIconHtml=function(){return'

                        '; };RouteSearchPlugin.prototype.load=function(t){this.map=t;this.reqlayer=new Y.FeatureLayer("routesearch_plugin_request");this.map.addLayer(this.reqlayer);var q=this;var n={enableMarker:false,enableDeform:this.enableDeform,strokeStyle:this.strokeStyle,routeEvents:{mouseover:function(x,m){var i=q.cache.getParams("order");var w=i!==false?i:0;if(q.routeEditable&&q.enable&&w===0){q.onPolylineMouseOver(x,m); }}}};this.reslayer=new Y.RouteSearchLayer(n);this.map.addLayer(this.reslayer);this.cache=this.reslayer.cache;this.menu=$('
                        ');this.menu.bind("mousedown",function(i){i.cancelBubble=true;if(i.stopPropagation){i.stopPropagation();}});var f=false;this.menu.bind("mouseover",function(){f=false;});this.menu.bind("mouseleave",function(){f=true; setTimeout(function(){if(f){q.closeMenu();f=true;}},500);});this.menu.bind("contextmenu",function(){return false;});var p="";p+="";p+="";p+='

                        \u8a73\u7d30\u8a2d\u5b9a

                        ';this.menu.html(p);this.menu.css({position:"absolute",left:"0px",top:"0px","z-index":"2"}); $("#routesearch_plugin_rmvcoord").parent().hide();this.map.mainContainer.append(this.menu);this.closeMenu(false);if(!this.SmartDevice){this.map_oncontextmenu=function(i){q.onMapRightClick(i);};this.map.mapContainer.bind("contextmenu",this.map_oncontextmenu);}else{this.map_onclick=this.map.bind("click",this.onMapClick,this);}this.onmovestart=this.map.bind("movestart",this.closeMenu,this);if(!this.SmartDevice){$("#routesearch_plugin_setdetail").click(function(){q.openOptionMenu(); q.closeMenu();return false;});}else{if(!this.map.configure.holdSupport){this.map.setConfigure("holdSupport",true);}this.map_onhold=this.map.bind("hold",this.openOptionMenu,this);}$("#routesearch_plugin_clearcoord").click(function(){q.clearPoints();q.closeMenu();return false;});$("#routesearch_plugin_clearroute").click(function(){q.clearRoute();q.closeMenu();return false;});$("#routesearch_plugin_clearall").click(function(){q.clearPoints(); q.clearRoute();q.closeMenu();return false;});$("#routesearch_plugin_setcoord_s").click(function(){q.setStartPoint();return false;});$("#routesearch_plugin_setcoord_g").click(function(){q.setGoalPoint();return false;});$("#routesearch_plugin_setcoord_v").click(function(){q.addViaPoint();return false;});$("#routesearch_plugin_rmvcoord").click(function(){q.removePoint();return false;});this.optionMenu=$('
                        '); this.optionMenu.css({position:"absolute",left:"2px",bottom:"18px","z-index":"1"});this.optionMenu.bind("mousedown",function(i){i.cancelBubble=true;if(i.stopPropagation){i.stopPropagation();}});this.optionMenu.bind("contextmenu",function(){return false;});this.map.mainContainer.append(this.optionMenu);this.closeOptionMenu();var l="";l+="
                          ";l+="
                        • ";l+='

                          \u7d4c\u7531\u5730\u70b9\u3092\u56de\u308b\u9806

                          ';l+='

                          '; l+='

                          ';l+="
                        • ";l+="
                        • ";l+='

                          \u4ea4\u901a\u624b\u6bb5

                          ';l+='

                          ';l+='

                          ';l+="
                        • ";l+="
                        • ";l+='

                          \u512a\u5148\u9805\u76ee

                          ';l+='

                          '; l+='';l+="

                          ";l+="
                        • ";l+="
                        • ";l+='

                          \u4ea4\u901a\u898f\u5236

                          ';l+='

                          ';l+='

                          ';l+="
                        • ";l+="";l+="
                        • ";l+='

                          \u30d5\u30a7\u30ea\u30fc

                          ';l+='

                          '; l+='';l+='

                          ';l+="
                        • ";l+="";l+="
                        • ";l+='

                          \u6709\u6599\u9053\u8def

                          ';l+='

                          ';l+=''; l+='

                          ';l+="
                        • ";l+="";l+='
                        • ';l+='

                          ';l+='';l+="

                          ";l+="
                        • ";l+="
                        ";this.optionMenu.html(l);$("#routesearch_plugin_search").click(function(i){q.params=q.getRequestOptionByMenu(); q.search();});$("#routesearch_plugin_settingend").click(function(){q.params=q.getRequestOptionByMenu();q.closeMenu(false);q.closeOptionMenu(false);});var v=this.map.getSize();var a="http://i.yimg.jp/images/map/api/yolp/images/yolp_loading.gif";var u=new Y.Size(37,38);var k=v.width/2-u.width/2;var h=v.height/2-u.height/2;this.nowloading=$("
                        ");this.nowloadingImg=$(''); this.nowloading.css({top:h+"px",left:k+"px","z-index":"2",width:u.width,height:u.height,position:"absolute"});this.map.mainContainer.append(this.nowloading);this.nowloadingTimer=null;this.reslayer.bind("drawend",this.onRequestEnd,this);this.reslayer.bind("error",function(i){alert(i.message);this.onRequestEnd();},this);if(this.latlngs.length>1){this.current=this.latlngs[0];this.setStartPoint();var r,j; for(r=1,j=this.latlngs.length-1;rb.lat()){s=b.lat();g=d.lat();}else{s=d.lat();g=b.lat();}if(d.lng()>b.lng()){o=b.lng();c=d.lng();}else{o=d.lng();c=b.lng();}var e=new Y.LatLngBounds(new Y.LatLng(s,o),new Y.LatLng(g,c)); t.drawBounds(e);}this.latlngs=null;this.loaded=true;Y.Event.trigger(this,"loaded");};RouteSearchPlugin.prototype.unload=function(){if(this.loaded){this.clearPoints();this.clearRoute();this.map.unbind(this.onmovestart);if(this.map_oncontextmenu){this.map.mapContainer.unbind("contextmenu",this.map_oncontextmenu);this.map_oncontextmenu=null;}else{if(this.map_onclick){this.map.unbind(this.map_onclick); this.map_onclick=null;}}if(this.map_onhold){this.map.unbind(this.map_onhold);}if(this.menu){this.menu.remove();this.menu=null;}this.map.removeLayer(this.reqlayer);this.map.removeLayer(this.reslayer);if(this.optionMenu){this.optionMenu.remove();this.optionMenu=null;}this.nowloading.remove();this.nowloading=null;Y.Event.trigger(this,"unloaded");}this.loaded=false;};RouteSearchPlugin.prototype.getName=function(){return"RouteSearchPlugin"; };RouteSearchPlugin.prototype.setEnable=function(a){if(!this.loaded){return;}this.enable=a;if(this.start.marker){this.start.marker.setDraggable(a);}if(this.goal.marker){this.goal.marker.setDraggable(a);}if(this.via.points.length>0){for(var c=0,b=this.via.points.length;c-1){var c=Number(b.id.substring(8));this.reqlayer.removeFeature(this.via.points[c].marker);this.via.points.splice(c,1);for(var a=0;a0){for(var b=0,a=this.via.points.length;b0){for(var a=0;a0){var d=e.features[0].property.Address; b.address=d;b.marker.setTitle("\u3010"+a+"\u3011"+d);}});};RouteSearchPlugin.prototype.clearPoints=function(){this.start.marker=null;this.start.latlng=null;this.goal.marker=null;this.goal.latlng=null;this.via.points=[];this.reqlayer.clearFeatures();this.cache.clearPoints();};RouteSearchPlugin.prototype.initMarkerTouchEventHandler=function(f){var e=f.getDOMNode();var d=null;var i=false;var b=false;var c=this.map; var g=function(){if(d){clearTimeout(d);d=null;}};var k=function(o){var n=null;if(o&&o.touches&&o.touches.length>=1){var q=o.touches[0];var m=q.pageX;var l=q.pageY;n=c.fromPagePixelToContainerPixel(new Y.Point(m,l));}return n;};var a=function(l){g();if(i){i=false;Y.Event.trigger(f,"dragend",l);}else{if(!b){Y.Event.trigger(f,"click",l);}}};var j=function(l){i=false;b=false;d=setTimeout(function(){g(); b=true;Y.Event.trigger(f,"hold",l);a(l);},500);Y.Event.trigger(f,"touchstart",l);l.preventDefault();};var h=function(m){g();if(!i){Y.Event.trigger(f,"dragstart",m);i=true;}var l=k(m);var n=c.fromContainerPixelToLatLng(l);f.setLatLng(n);Y.Event.trigger(f,"drag",m);};e.addEventListener("touchstart",j,false);e.addEventListener("touchmove",h,false);e.addEventListener("touchend",a,false);};RouteSearchPlugin.prototype.initPointMarkerEvent=function(a,b){var e=this; var d=a.getDOMNode();a.bind("dragend",function(){if(a.id.indexOf("via")===-1){e.current=a.getLatLng();}b.call(e,a);});if(e.SmartDevice){var c=function(){e.currentMarker=a;if(confirm("\u3053\u306e\u5730\u70b9\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f")){e.removePoint();}};a.bind("hold",c);a.bind("click",c);}else{$(d).bind("contextmenu",function(f){e.currentMarker=a;e.onMarkerRightClick(f);});}};RouteSearchPlugin.prototype.clearRoute=function(){this.reslayer.clearRoute(); };RouteSearchPlugin.prototype.search=function(){if(!this.start.latlng||!this.goal.latlng){return;}this.clearRoute();if(this.maxDistance>0){var d=this.estimateDistance();if(d>this.maxDistance){var c="";c+="\u3054\u6307\u5b9a\u306e\u7bc4\u56f2\u3067\u306f\u3001\u7d4c\u8def\u63a2\u7d22\u304c\u3067\u304d\u307e\u305b\u3093\u3002\n";c+=this.maxDistance+"km\u4ee5\u5185\u306e\u7bc4\u56f2\u3067\u63a2\u7d22\u3057\u3066\u304f\u3060\u3055\u3044\u3002";alert(c);return;}}var a=[this.start.latlng];for(var b=0;b