alexa-tracking

Longtitude Undefined Kenapa Ya?

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/5b3c7f541854f7557b8b4572/longtitude-undefined-kenapa-ya
Longtitude Undefined Kenapa Ya?
Saya lagi coba2 ngoding buat nampilin fitur geolocation..tpi waktu saya test, longtitude nya undefined tpi langtitudenya normal...

var demo=document.getElementById('demo');
function getLocation(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(showpos);
}else{
demo.innerHTML="your browser is not support geolocation";
};
};
function showpos(position){
demo.innerHTML="latitude ="+position.coords.latitude+"<br>Longtitude ="+position.coords.longtitude;
};
NB : iya ane lupa udh di ganti ya kodenya dan hasil tetp sama longtitude : undefined
memang ada langtidude?
coba baca Google Map dengan Geolocation
image-url-apps
Coba ganti itu longtitude jadi longitude 😁
×