2016-05-23 208 views

回答

0

您可以使用HTML地理位置:

function getLocation() { 
    if (navigator.geolocation) { 
     navigator.geolocation.getCurrentPosition(showPosition); 
    } else { 
     console.log("Geolocation is not supported by this browser."); 
    } 
} 
function showPosition(position) { 
    console.log("Latitude: " + position.coords.latitude); 
    console.log("Longitude: " + position.coords.longitude); 
} 
+0

謝謝你,但我想我的應用程序直接我像谷歌地圖應用程序。用聲音:) @ sebastiaan-mearadji – oihi08