我有一些代碼爲從瀏覽器獲取GPS的代碼。 它可以得到exacly GPS:Chrome(Window 7-PC),Firefox(Window 7-PC),Firefox(Android 5.0-Smartphone)。 但與Chrome(Android 5.0智能手機)它無法獲得GPS。 我的代碼:無法從Android谷歌瀏覽器獲得GPS
function getLocation() {
if (navigator && navigator.geolocation) {
navigator.geolocation.getCurrentPosition(successGPS, errorGPS, {enableHighAccuracy: true, timeout: 60000});
} else {
console.log('Geolocation is not supported');}}
function successGPS(position) {
latLng_taxi = new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
alert(latLng_taxi);}
function errorGPS() {
alert("Cant get GPS");}
請告訴我一個關於我的問題,以及如何在Chrome瀏覽器(Android版)讓GPS