1$("#get_geolocation").click(async function() { 2 var genre_id = $(this).data("genre_id"); 3 let smallCategoryCommaSeparated = $(this).data("small_category_comma_separated"); 4 await getPosition().then(param => { 5 let searchUrl = "/search/gps/list?genre_id=" + genre_id + "&" + param + "&" + "radius=" + RADIUS; 6 if (smallCategoryCommaSeparated) { 7 searchUrl = searchUrl + '&' + 'small_categories=' + encodeURIComponent(smallCategoryCommaSeparated); 8 } 9 location.href = searchUrl; 10 }); 11}); 12 13$(".top_location_search").click(async function() { 14 var genre_id = $(this).data("genre_id"); 15 await getPosition().then(param => { 16 location.href = "/search/gps/list?genre_id=" + genre_id + "&" + param + "&" + "radius=" + RADIUS; 17 }); 18}); 19 20function getPosition() { 21 if (!navigator.geolocation) { 22 location.href = GPS_ERROR_URL; 23 return Promise.resolve(); 24 } 25 return new Promise( (resolve, reject) => { 26 // ç¾å¨å°ãåå¾ 27 navigator.geolocation.getCurrentPosition( 28 // å徿åããå ´å 29 (position) => { 30 var lon = position.coords.longitude; 31 var lat = position.coords.latitude; 32 var result = `position=${lat},${lon}`; 33 resolve(result); 34 }, 35 // åå¾å¤±æããå ´å 36 (error) => { 37 location.href = GPS_ERROR_URL; 38 }, 39 { 40 timeout: 1000 * 60 * 5, 41 enableHighAccuracy: true 42 }); 43 }); 44}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.