/* カスタマイズ用のJavaScriptコードをここに記述してください */ function searchGps() { custSearchTopSubmit(document.formGps); ZdcEmapMakeGPSCondParams(document.formGps); document.formAddrL.AddrLSubmit.click(); // document.formGps.submit(); } function searchAdcd(adcd) { document.formAddrL.adcd.value = adcd; document.formAddrL.AddrLSubmit.click(); } // 住所リストをスキップして県庁所在地の店舗一覧へ遷移する /* function directAdcd(adcd, lat, lon, srchnm) { document.nmapdirect.adcd.value = adcd; document.nmapdirect.lat.value = lat; document.nmapdirect.lon.value = lon; document.nmapdirect.srchnm.value = srchnm; document.nmapdirect.nmapdirectSubmit.click(); } */ function searchArea(areacd) { document.formSA.area1.value = areacd; document.formSA.SASubmit.click(); } function searchGeocoding(position) { document.nmapdirect.lat.value = position.coords.latitude; document.nmapdirect.lon.value = position.coords.longitude; document.nmapdirect.nmapdirectSubmit.click(); } // 検索ボタンを押して、(固定の)駅/住所一覧が表示 window.onload = function(){ /*$(function(){*/ $('#search-btn').click(function() { $('.station-address-list').toggle(false); }); /*});*/ }; // 駅一覧をクリックで、(固定の)ルート探索結果が表示 window.onload = function(){ /*$(function(){*/ $('.station-list').click(function() { $('.route-result').toggle(false); }); /*});*/ }; /* 絞込条件 */ function custSearchTopSubmit(frm) { var cnd_chk,cnd_hid; cnd_chk = ""; cnd_hid = ""; var frmCond = document.formCond; if (frmCond) { for (i=1; i<=6; i++) { cnd_chk = eval("frmCond.cond"+i); cnd_hid = eval("frm.cond"+i); if (cnd_chk && cnd_hid) { if (cnd_chk.checked){ cnd_hid.value = cnd_chk.value; } else { cnd_hid.value = ""; } } } } var fil; var fil_list = frmCond.plfilter; if (fil_list) { if (fil_list.type == "select-one") { fil = fil_list.options[fil_list.selectedIndex].value; } else { fil = fil_list.value; } if (frm.plfilter) { frm.plfilter.value = fil; } if (frm.filter) { frm.filter.value = fil; } } } //最寄駅ルート関連 function searchNearEki() { ZdcEmapNekiListObj = document.getElementById('ZdcEmapNekiList'); ZdcEmapNekiLat = ZdcEmapMapShopDetailMrkId.lat; ZdcEmapNekiLon = ZdcEmapMapShopDetailMrkId.lon; ZdcEmapStationList(0); } function routeListEventSet() { // $('.routeList li').click(function(e) { // $('.routeList li').removeClass('ptb2').find('a').removeClass('select'); // $(this).addClass('ptb2').find('a').addClass('select'); // }); } function clickRouteByStation(idx, lat, lon) { ZdcEmapMapPoiMrkId[idx] = {}; ZdcEmapMapPoiMrkId[idx].lat = lat; ZdcEmapMapPoiMrkId[idx].lon = lon; ZdcEmapShopMsgClose(); ZdcEmapSearchEventStop(); ZdcEmapRouteType=1; } //複合ルート関連 function searchCombRootDept(keyword) { if (keyword.trim() == '') return; ZdcEmapShopMsgClose(); ZdcEmapSearchEventStop(); ZdcEmapPoiRouteClear(); hideNekiList(); ZdcEmapSrchCombRootDept(keyword); } function combRootDeptEventSet() { showCombDepature(); hideCombRoot(); $('.tab01 a').click(function(e) { e.preventDefault(); var $tab = $('.tab01 a'); var index = $tab.index(this); $tab.removeClass('current'); $(this).addClass('current'); $('#ZdcEmapSrchCombRootDept .routeBox').hide().eq(index).show(); }); } function combRootResultEventSet() { hideCombDepature(); showCombRoot(); $('.tab02 a').click(function(e) { ZdcEmapPoiRouteClear(); e.preventDefault(); var $tab = $('.tab02 a'); var index = $tab.index(this); $tab.removeClass('current'); $(this).addClass('current'); var $rd = $('#ZdcEmapSrchCombRootResult .routeBox') .hide().eq(index).show(); if ($rd.find('a.route-draw')[0]) $rd.find('a.route-draw')[0].click(); if (index === 1) { $rd.find('a.routeRank').removeClass('current').eq(0).addClass('current'); $rd.find('.routeList3').hide().eq(0).show(); } }); $('.route-summary2 a.routeRank').click(function(e) { e.preventDefault(); var self = this; $('.route-summary2 a.routeRank').each(function(i, elem) { if ($(elem).is($(self))) { if ($(elem).hasClass('current')) { ZdcEmapPoiRouteClear(); } else { $(elem).parent().next().find('a.route-draw')[0].click(); } $(elem) .toggleClass('current') .parent().next().slideToggle(); } else { $(elem) .removeClass('current') .parent().next().slideUp(); } }); }); $('.tab02 a')[0].click(); } function returnShopDetail() { ZdcEmapPoiRouteClear(); formComb.keyword.value = ""; // $('.routeList li').removeClass('ptb2').find('a').removeClass('select'); document.getElementById('dtlmapInit').click(); hideCombDepature(); hideCombRoot(); showNekiList(); } //画面表示制御 function showNekiList() { $("#nekiList").show(); } function hideNekiList() { $("#nekiList").hide(); } function showCombDepature() { $("#combDepature").show(); } function hideCombDepature() { $("#combDepature").hide(); } function showCombRoot() { $("#combRoot").show(); } function hideCombRoot() { $("#combRoot").hide(); }