Pure Javascript Geolocation
Read How to async defer CSS JS perfectly
<script> function locationSuccess(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; var altitude = position.coords.altitude; var accuracy = position.coords.accuracy; var altitudeAccuracy = position.coords.altitudeAccuracy; var heading = position.coords.height; var speed = position.coords.speed; var timestamp = position.timestamp; // bekerja dengan informasi ini sesuka Anda! } function locationError(error) { var code = error.code; var message = error.message; // baca kode dan pesan dan putuskan bagaimana Anda ingin menangani ini! } navigator.geolocation.getCurrentPosition(locationSuccess, locationError); </script>
Comments
Post a Comment
Bila Ada posting yang kurang, atau error atau yang lainnya, silahkan tinggalkan komentar agar artikel/post di perbaiki.
Jangan Lupa Cek Box "Notify Me" agar tahu komentar kamu dibalas oleh saya.
If there are any posts that are missing, or error or anything else, please leave a comment for the article / post to be fixed.
Do not Forget Check Box "Notify Me" to know our comments replied by me.