var closes = true; function ktrnty(name,d,cn,positiona){ zhixng = true; var n = 10; console.log("获取经度的"+positiona[0]+" 获取纬度的 "+positiona[1]); setseconds(n,positiona[0],positiona[1]); console.log("位置信息 "+positiona); var str = '
停车诱导
' +'10s后自动进入导航
' +'
'+name+'
' +'
' +'
距您'+d+'km
' +'
' +'
'+cn+'
空位' +'
最优路线
自动选最优
最优路线
驾车更安全
最优路线
指引好停车
' +'
' +'
'; $('body').append(str); setTimeout(function(){ $('.hhshade').css('display','block'); var h = ($('.hhcontent').outerHeight())/2; $('.hhcontent').animate({top:'50%',marginTop:'-'+h+'px'},150,'swing'); },100); } function ktrntw(n1,d1,s1,positiona,n2,d2,s2,positionb){ closes = false; zhixng = true; var n = 10; setseconds(n,positionb[0],positionb[1]); var str = '
' +'
停车诱导
' +'10s后自动进入导航' +'
目的车场
' +'
' +'
'+n1+'
' +'
' +'' +'距您'+d1+'km' +'
' +'
'+s1+'
空位' +'
' +'
推荐车场
' +'
' +'
'+n2+'
' +'
' +'距您'+d2+'km' +'
' +'
'+s2+'
空位' +'
最优路线
自动选最优
最优路线
驾车更安全
最优路线
指引好停车
' +'
' +'
'; //$('.hhshade').css('display','block'); $('body').append(str); setTimeout(function(){ $('.hhshade').css('display','block'); var h = ($('.hhcontent').outerHeight())/2; console.log($('.hhcontent').outerWidth()+" jjjjj "+h); $('.hhcontent').animate({top:'50%',marginTop:'-'+h+'px'},150,'swing'); },100); } function wktrnt(name,juli,positiona){ closes = false; zhixng = true; var n = 10; setseconds(n,positiona[0],positiona[1]); var str = '
' +'
停车诱导
' +'10s后自动进入导航' +'
' +'
'+name+'

(因暂未开通任你停,数据可能不准确)

' +'
' +'
距您'+juli+'km
' +'
空闲
空位' +'
最优路线
自动选最优
最优路线
驾车更安全
最优路线
指引好停车
' +'
' +'
'; $('body').append(str); setTimeout(function(){ $('.hhshade').css('display','block'); var h = ($('.hhcontent').outerHeight())/2; console.log($('.hhcontent').outerWidth()+" jjjjj "+h); $('.hhcontent').animate({top:'50%',marginTop:'-'+h+'px'},150,'swing'); },100); } function closetcyd(){ $('.hhcontent').animate({top:'100%',marginTop:'0px'},150,'swing'); $('.hhshade').fadeOut(150); zhixng = false;//设置不执行秒数 setTimeout(function(){ $('.hhshade').remove(); $('.hhcontent').remove(); },150); return false; } function dqgaode(lon,lat){ var lng,plat; console.log('daohang '+sessionStorage.getItem('rntlonandlat')); if(sessionStorage.getItem('rntlonandlat')){ var splon = sessionStorage.getItem('rntlonandlat'); splon = JSON.parse(splon); if(splon!=''){ lng = splon.plon; plat = splon.plat; } } window.location.href = '//uri.amap.com/navigation?from='+lng+','+plat+',startpoint&to='+lon+','+lat+',endpoint&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1'; } var zhixng = true; function setseconds(n,lon,lat){ console.log("根据调用的参数获取经纬度"+lon+" "+lat); if(zhixng){ n = n-1; if(n==0){ var lng,plat; if(sessionStorage.getItem('rntlonandlat')){ var splon = sessionStorage.getItem('rntlonandlat'); splon = JSON.parse(splon); if(splon!=''){ lng = splon.plon; plat = splon.plat; } } window.location.href = '//uri.amap.com/navigation?from='+lng+','+plat+',startpoint&to='+lon+','+lat+',endpoint&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1'; } setTimeout(function(){ setseconds(n,lon,lat); $('.tipseconds span').text(n+"s"); },1000); }else{ return false; } }