feat: add Da Lat

This commit is contained in:
tiennm99 committed 2025-07-31 21:31:22 +07:00
1 parent 5d10bb6db9
commit 1e5122ea01
3 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -1 +1 @@
'use strict';const _0x2f3f3d=_0x522a;(function(_0x28c52f,_0x241c32){const _0x6471a4=_0x522a,_0x10f607=_0x28c52f();while(!![]){try{const _0x49c61a=-parseInt(_0x6471a4(0x1af))/0x1+-parseInt(_0x6471a4(0x1db))/0x2*(parseInt(_0x6471a4(0x1b4))/0x3)+parseInt(_0x6471a4(0x1b7))/0x4+parseInt(_0x6471a4(0x198))/0x5+parseInt(_0x6471a4(0x1cc))/0x6+parseInt(_0x6471a4(0x19e))/0x7+parseInt(_0x6471a4(0x1a6))/0x8;if(_0x49c61a===_0x241c32)break;else _0x10f607['push'](_0x10f607['shift']());}catch(_0xcf1bba){_0x10f607['push'](_0x10f607['shift']());}}}(_0x4cf1,0x5c6ed));var map,resultmap,markers=[],guess_coordinates=[],true_location=[],accumulated_distance=0x0,current_name='',distance_from_guess=[],check_count=0x0,choiceLocation='HN';const boundingBoxVN={'HN':[105.77,20.96,105.88,21.05,0.003],'TPHCM':[106.62,10.71,106.75,10.83,0.005],'HP':[106.65,20.8,106.75,20.9,0.05],'ND':[0x6a,20.35,106.25,20.5,0.005],'DN':[108.17,0x10,108.25,16.1,0.005]};var minLat=boundingBoxVN[choiceLocation][0x1],maxLat=boundingBoxVN[choiceLocation][0x3],minLong=boundingBoxVN[choiceLocation][0x0],maxLong=boundingBoxVN[choiceLocation][0x2],delta=boundingBoxVN[choiceLocation][0x4];const accessToken='MLY|24113623194974280|5bf83fa202912f1cc3210b2cf968fb65';async function getRandomMapillaryImage(){const _0x4eb278=_0x522a,_0x1e5b33=Math[_0x4eb278(0x1cd)]()*(maxLat-minLat)+minLat,_0x211128=Math[_0x4eb278(0x1cd)]()*(maxLong-minLong)+minLong,_0x2454d8=[(_0x211128-delta)[_0x4eb278(0x18c)](0x4),(_0x1e5b33-delta)['toFixed'](0x4),(_0x211128+delta)[_0x4eb278(0x18c)](0x4),(_0x1e5b33+delta)[_0x4eb278(0x18c)](0x4)][_0x4eb278(0x1c0)](','),_0x514f4a=_0x4eb278(0x1de)+accessToken+'&fields=id,thumb_original_url,geometry,is_pano&limit=3&bbox='+_0x2454d8+'&is_pano=true';try{console['log'](_0x4eb278(0x1e8));const _0x36adbf=await fetch(_0x514f4a),_0x5e2489=await _0x36adbf[_0x4eb278(0x1c9)]();if(_0x5e2489['data']&&_0x5e2489['data']['length']>0x0){const _0x20dd30=_0x5e2489['data'][_0x4eb278(0x190)](_0x5bcfd5=>_0x5bcfd5[_0x4eb278(0x18a)]),_0x2e6a28=_0x20dd30[_0x4eb278(0x1ab)]>0x0?_0x20dd30[Math[_0x4eb278(0x186)](Math[_0x4eb278(0x1cd)]()*_0x20dd30[_0x4eb278(0x1ab)])]:_0x5e2489[_0x4eb278(0x1cf)][0x0];return console[_0x4eb278(0x1a1)](_0x4eb278(0x1ca)),{'lat':_0x2e6a28[_0x4eb278(0x189)][_0x4eb278(0x1b1)][0x1],'lng':_0x2e6a28[_0x4eb278(0x189)][_0x4eb278(0x1b1)][0x0],'url':_0x2e6a28['thumb_original_url'],'id':_0x2e6a28['id'],'isPano':_0x2e6a28[_0x4eb278(0x18a)]||![]};}else return console[_0x4eb278(0x1a1)](_0x4eb278(0x1c7)),getRandomMapillaryImage();}catch(_0x498c14){console['error']('Error\x20fetching\x20image:',_0x498c14),document[_0x4eb278(0x1b0)](_0x4eb278(0x1e1))[_0x4eb278(0x19d)]=_0x4eb278(0x1aa),setTimeout(()=>getRandomMapillaryImage(),0x7d0);}}function checkLibrariesLoaded(){return new Promise(_0x5b45ac=>{const _0x53b944=setInterval(()=>{window['L']&&window['PhotoSphereViewer']&&(clearInterval(_0x53b944),_0x5b45ac());},0x64);});}function showLoading(){const _0x5a4801=_0x522a;document['getElementById'](_0x5a4801(0x1e1))[_0x5a4801(0x19d)]=_0x5a4801(0x1c5);if(!document[_0x5a4801(0x1b0)]('loading-styles')){const _0x54e63f=document[_0x5a4801(0x1a9)](_0x5a4801(0x1e2));_0x54e63f['id']=_0x5a4801(0x1e7),_0x54e63f['textContent']=_0x5a4801(0x1cb),document['head'][_0x5a4801(0x199)](_0x54e63f);}}function hideLoading(){const _0x37fc0f=_0x522a,_0x336799=document['getElementById'](_0x37fc0f(0x1e1));_0x336799&&_0x336799[_0x37fc0f(0x19d)][_0x37fc0f(0x1b3)](_0x37fc0f(0x1c1))&&(_0x336799[_0x37fc0f(0x19d)]='');}function initialize(){const _0x5f0fbe=_0x522a;check_count=0x0,disableButton(_0x5f0fbe(0x1ba)),showLoading(),getRandomMapillaryImage()[_0x5f0fbe(0x1c6)](_0x322477=>{const _0x20a7c9=_0x5f0fbe;if(!_0x322477)return location[_0x20a7c9(0x1bb)]();true_location=[_0x322477[_0x20a7c9(0x1c8)],_0x322477['lng']],current_name=_0x20a7c9(0x19b),document['getElementById'](_0x20a7c9(0x1e1))[_0x20a7c9(0x19d)]='';try{if(window[_0x20a7c9(0x1dc)]&&window[_0x20a7c9(0x1dc)][_0x20a7c9(0x1df)]){hideLoading();const _0x106e35=new PhotoSphereViewer[(_0x20a7c9(0x1df))]({'container':document[_0x20a7c9(0x1b0)](_0x20a7c9(0x1e1)),'panorama':_0x322477['url'],'loadingImg':null,'defaultYaw':0x0,'defaultZoomLvl':-0x60,'navbar':[_0x20a7c9(0x1bc),_0x20a7c9(0x1a5)],'mousewheel':!![],'touchmoveTwoFingers':!![]});_0x106e35[_0x20a7c9(0x1c4)]('ready',()=>{const _0x2b61e9=_0x20a7c9;console['log'](_0x2b61e9(0x1e3));}),_0x106e35[_0x20a7c9(0x1c4)](_0x20a7c9(0x1ad),()=>{const _0x318013=_0x20a7c9;console[_0x318013(0x1a1)](_0x318013(0x1d0));}),_0x106e35['addEventListener']('panorama-error',_0x1c0c5c=>{const _0x61576b=_0x20a7c9;console['error'](_0x61576b(0x1ce),_0x1c0c5c),hideLoading(),document[_0x61576b(0x1b0)]('pano')[_0x61576b(0x19d)]=_0x61576b(0x19c)+_0x322477[_0x61576b(0x18b)]+'\x22\x20style=\x22width:100%;\x20height:100%;\x20object-fit:cover;\x20border-radius:10px;\x22\x20/>';});}else console[_0x20a7c9(0x1b6)](_0x20a7c9(0x1a3)),hideLoading(),document[_0x20a7c9(0x1b0)]('pano')[_0x20a7c9(0x19d)]='<img\x20src=\x22'+_0x322477['url']+'\x22\x20stylLine truncated
'use strict';const _0x2f3f3d=_0x522a;(function(_0x28c52f,_0x241c32){const _0x6471a4=_0x522a,_0x10f607=_0x28c52f();while(!![]){try{const _0x49c61a=-parseInt(_0x6471a4(0x1af))/0x1+-parseInt(_0x6471a4(0x1db))/0x2*(parseInt(_0x6471a4(0x1b4))/0x3)+parseInt(_0x6471a4(0x1b7))/0x4+parseInt(_0x6471a4(0x198))/0x5+parseInt(_0x6471a4(0x1cc))/0x6+parseInt(_0x6471a4(0x19e))/0x7+parseInt(_0x6471a4(0x1a6))/0x8;if(_0x49c61a===_0x241c32)break;else _0x10f607['push'](_0x10f607['shift']());}catch(_0xcf1bba){_0x10f607['push'](_0x10f607['shift']());}}}(_0x4cf1,0x5c6ed));var map,resultmap,markers=[],guess_coordinates=[],true_location=[],accumulated_distance=0x0,current_name='',distance_from_guess=[],check_count=0x0,choiceLocation='HN';const boundingBoxVN={'HN':[105.77,20.96,105.88,21.05,0.003],'TPHCM':[106.62,10.71,106.75,10.83,0.005],'HP':[106.65,20.8,106.75,20.9,0.05],'ND':[0x6a,20.35,106.25,20.5,0.005],'DN':[108.17,0x10,108.25,16.1,0.005],'DL':[108.38,11.89,108.50,12.00,0.005]};var minLat=boundingBoxVN[choiceLocation][0x1],maxLat=boundingBoxVN[choiceLocation][0x3],minLong=boundingBoxVN[choiceLocation][0x0],maxLong=boundingBoxVN[choiceLocation][0x2],delta=boundingBoxVN[choiceLocation][0x4];const accessToken='MLY|24113623194974280|5bf83fa202912f1cc3210b2cf968fb65';async function getRandomMapillaryImage(){const _0x4eb278=_0x522a,_0x1e5b33=Math[_0x4eb278(0x1cd)]()*(maxLat-minLat)+minLat,_0x211128=Math[_0x4eb278(0x1cd)]()*(maxLong-minLong)+minLong,_0x2454d8=[(_0x211128-delta)[_0x4eb278(0x18c)](0x4),(_0x1e5b33-delta)['toFixed'](0x4),(_0x211128+delta)[_0x4eb278(0x18c)](0x4),(_0x1e5b33+delta)[_0x4eb278(0x18c)](0x4)][_0x4eb278(0x1c0)](','),_0x514f4a=_0x4eb278(0x1de)+accessToken+'&fields=id,thumb_original_url,geometry,is_pano&limit=3&bbox='+_0x2454d8+'&is_pano=true';try{console['log'](_0x4eb278(0x1e8));const _0x36adbf=await fetch(_0x514f4a),_0x5e2489=await _0x36adbf[_0x4eb278(0x1c9)]();if(_0x5e2489['data']&&_0x5e2489['data']['length']>0x0){const _0x20dd30=_0x5e2489['data'][_0x4eb278(0x190)](_0x5bcfd5=>_0x5bcfd5[_0x4eb278(0x18a)]),_0x2e6a28=_0x20dd30[_0x4eb278(0x1ab)]>0x0?_0x20dd30[Math[_0x4eb278(0x186)](Math[_0x4eb278(0x1cd)]()*_0x20dd30[_0x4eb278(0x1ab)])]:_0x5e2489[_0x4eb278(0x1cf)][0x0];return console[_0x4eb278(0x1a1)](_0x4eb278(0x1ca)),{'lat':_0x2e6a28[_0x4eb278(0x189)][_0x4eb278(0x1b1)][0x1],'lng':_0x2e6a28[_0x4eb278(0x189)][_0x4eb278(0x1b1)][0x0],'url':_0x2e6a28['thumb_original_url'],'id':_0x2e6a28['id'],'isPano':_0x2e6a28[_0x4eb278(0x18a)]||![]};}else return console[_0x4eb278(0x1a1)](_0x4eb278(0x1c7)),getRandomMapillaryImage();}catch(_0x498c14){console['error']('Error\x20fetching\x20image:',_0x498c14),document[_0x4eb278(0x1b0)](_0x4eb278(0x1e1))[_0x4eb278(0x19d)]=_0x4eb278(0x1aa),setTimeout(()=>getRandomMapillaryImage(),0x7d0);}}function checkLibrariesLoaded(){return new Promise(_0x5b45ac=>{const _0x53b944=setInterval(()=>{window['L']&&window['PhotoSphereViewer']&&(clearInterval(_0x53b944),_0x5b45ac());},0x64);});}function showLoading(){const _0x5a4801=_0x522a;document['getElementById'](_0x5a4801(0x1e1))[_0x5a4801(0x19d)]=_0x5a4801(0x1c5);if(!document[_0x5a4801(0x1b0)]('loading-styles')){const _0x54e63f=document[_0x5a4801(0x1a9)](_0x5a4801(0x1e2));_0x54e63f['id']=_0x5a4801(0x1e7),_0x54e63f['textContent']=_0x5a4801(0x1cb),document['head'][_0x5a4801(0x199)](_0x54e63f);}}function hideLoading(){const _0x37fc0f=_0x522a,_0x336799=document['getElementById'](_0x37fc0f(0x1e1));_0x336799&&_0x336799[_0x37fc0f(0x19d)][_0x37fc0f(0x1b3)](_0x37fc0f(0x1c1))&&(_0x336799[_0x37fc0f(0x19d)]='');}function initialize(){const _0x5f0fbe=_0x522a;check_count=0x0,disableButton(_0x5f0fbe(0x1ba)),showLoading(),getRandomMapillaryImage()[_0x5f0fbe(0x1c6)](_0x322477=>{const _0x20a7c9=_0x5f0fbe;if(!_0x322477)return location[_0x20a7c9(0x1bb)]();true_location=[_0x322477[_0x20a7c9(0x1c8)],_0x322477['lng']],current_name=_0x20a7c9(0x19b),document['getElementById'](_0x20a7c9(0x1e1))[_0x20a7c9(0x19d)]='';try{if(window[_0x20a7c9(0x1dc)]&&window[_0x20a7c9(0x1dc)][_0x20a7c9(0x1df)]){hideLoading();const _0x106e35=new PhotoSphereViewer[(_0x20a7c9(0x1df))]({'container':document[_0x20a7c9(0x1b0)](_0x20a7c9(0x1e1)),'panorama':_0x322477['url'],'loadingImg':null,'defaultYaw':0x0,'defaultZoomLvl':-0x60,'navbar':[_0x20a7c9(0x1bc),_0x20a7c9(0x1a5)],'mousewheel':!![],'touchmoveTwoFingers':!![]});_0x106e35[_0x20a7c9(0x1c4)]('ready',()=>{const _0x2b61e9=_0x20a7c9;console['log'](_0x2b61e9(0x1e3));}),_0x106e35[_0x20a7c9(0x1c4)](_0x20a7c9(0x1ad),()=>{const _0x318013=_0x20a7c9;console[_0x318013(0x1a1)](_0x318013(0x1d0));}),_0x106e35['addEventListener']('panorama-error',_0x1c0c5c=>{const _0x61576b=_0x20a7c9;console['error'](_0x61576b(0x1ce),_0x1c0c5c),hideLoading(),document[_0x61576b(0x1b0)]('pano')[_0x61576b(0x19d)]=_0x61576b(0x19c)+_0x322477[_0x61576b(0x18b)]+'\x22\x20style=\x22width:100%;\x20height:100%;\x20object-fit:cover;\x20border-radius:10px;\x22\x20/>';});}else console[_0x20a7c9(0x1b6)](_0x20a7c9(0x1a3)),hideLoading(),document[_0x20a7c9(0x1b0)]('pano')[_0x20a7c9(0x19d)]='<img\x20sLine truncated
View File
Whitespace-only changes.
+3
View File
@@ -82,6 +82,9 @@
<button class="bridge-btn" onclick="startGame('ND')">
<div class="bridge-text">NAM DINH</div>
</button>
<button class="bridge-btn" onclick="startGame('DL')">
<div class="bridge-text">DALAT</div>
</button>
</div>
</div>