Penerimaan Mahasiswa Baru Kelas Malam, Kelas Online, Kelas Karyawan

Cari di Ensiklopedia Online   
Indeks Artikel: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 +.- Daftar isi | Manual book
Artikel sebelumnya  (Vostok 1)(W3C Markup Validation ServiceArtikel berikutnya

W3C Geolocation API

W3C Geolocation API merupakan upaya oleh World Wide Web Consortium (W3C) untuk membakukan sebuah antarmuka untuk mengambil informasi lokasi geografis untuk perangkat.[1] Ini mendefinisikan satu set objek, ECMAScript standar compliant, yang mengeksekusi dalam aplikasi klien memberikan lokasi perangkat klien melalui konsultasi Server Informasi Lokasi, yang transparan untuk antarmuka pemrograman aplikasi (API). Sumber yang paling umum dari informasi lokasi yang alamat IP, Wi-Fi dan Bluetooth alamat MAC, radio-frekuensi identifikasi (RFID), Wi-Fi lokasi koneksi, atau perangkat Global Positioning System (GPS) dan GSM / CDMA. Lokasi dikembalikan dengan akurasi yang diberikan tergantung pada sumber informasi lokasi terbaik yang tersedia.

Daftar isi

Implementasi

Contoh kode

Kode JavaScript simpel yang dapat mengecek peramban web dapat menjalankan Geolocation API atau mempunyai Google Gears untuk membuat objek geolokasi dan menggunakannya untuk mendapatkan lokasi dari alat.

var gl;

function displayPosition(position) {
var p = document.getElementById("p");
p.innerHTML = "<table border='1'><tr><th>Tim estamp</th><td>" + position.timestamp +
"<tr><th>Latitude (WGS84)</th><td>" + position.coords.latitude + " deg</td></tr>" +
"<tr><th>Longitude (WGS84)</th><td>" + position.coords.longitude + " deg</td></tr></table&g t;";
}

function displayError(positionError) {
alert("error");
}

try {
if (typeof navigator.geolocation === 'undefined'){
gl = google.gears.factory.create('beta.geolocation');
} else {
gl = navigator.geolocation;
}
} catch(e) {}

if (gl) {
gl.getCurrentPosition(displayPosition, displayError);
} else {
alert("Geolocation services are not supported by your web browser.");
}

Daftar Pustaka

  1. ^ Popescu, Andrei (editor, Google Inc.) (22 Desember 2008). "Geolocation API Specification: W3C Candidate Recommendation 07 September 2010". W3C. Retrieved 23 Januari 2013. 

Pranala Luar

  • Fitur Firefox 3.5 Geolocation untuk mengembangkan aplikasi lokasi
  • Tutorial dan contoh dari Geolocation API dengan Google Gears
  • Tambah sebuah penyedia layanan lokasi ke Gears
  • WebScanNotes.com - W3C Geolocation API
Standard dari W3C (Konsorsium Waring Wera Wanua)
 
Produk dan
standar
 
Organisasi
World Wide Web Foundation · SVG Working Group · WebOnt · W3C Device Description Working Group · WHATWG
 
Perangkat lunak
Agora · Argo · Arena · Amaya · CERN httpd · Libwww · Line Mode Browser
 
Konferensi terkait
IW3C2 · World Wide Web Conference · WWW1


Sumber :
m.andrafarm.com, wiki.gilland-ganesha.com, id.wikipedia.org, dsb.