Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,136 members, 7,814,975 topics. Date: Thursday, 02 May 2024 at 03:20 AM

HTML5 Geolocation - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / HTML5 Geolocation (930 Views)

Crownhill - Responsive HTML5 Church Template - FREE DOWNLOAD | Hug A Geek / How To Create A HTML5 Calendar / My Free Javascript Html5 Bar Chart Script (2) (3) (4)

(1) (Reply) (Go Down)

HTML5 Geolocation by Javanian: 5:46pm On Aug 24, 2012
Hello guys, i just wanted to know if its only me that has noticed this, HTML5 GeoLocation always tells me i'm in Lagos, but its a lie undecided Does anyone know the reason??
Please is there an alternative?
Re: HTML5 Geolocation by yawatide(f): 7:18pm On Aug 24, 2012
1) Where's the code?
2) Where's your ISP?
Re: HTML5 Geolocation by Javanian: 7:28pm On Aug 24, 2012
Honestly, i don't think its from the code because i have also tried it on other websites like w3schools and it still tells me am in lagos, My Internet service is from MTN and i dont know where they are...lol...
Re: HTML5 Geolocation by yawatide(f): 9:16pm On Aug 24, 2012
1) Where's the code?
2) Where are you, in relation to Lagos?
Re: HTML5 Geolocation by Javanian: 9:19pm On Aug 24, 2012
<script>
var x=document.getElementById("demo"wink;
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML="Geolocation is not supported by this browser.";}
}
function showPosition(position)
{
x.innerHTML="Latitude: " + position.coords.latitude +
"<br />Longitude: " + position.coords.longitude;
}
</script>
i am no where near Lagos...in fact I'm in PH.
Re: HTML5 Geolocation by yawatide(f): 12:15pm On Aug 25, 2012
Thanks for sharing the code, which happens not to be the problem.

So this reminds me of a friends smartphone at work (in the US). Whenever he is at home, the weather app gives him the right zip, city and weather but when at work (20 miles away) and within the office's network (I work for a telecom and his phone service is the same as the telecom's), his weather app on the phone says he is in a city 2500 miles away tongue

After some ground work, he narrowed it down to the fact that while at work and with his wifi turned on, he was actually using bandwidth from work that was actually getting "its signal" from a server at another location, hence the false reading.

Maybe this is what is happening here. Either way, very weird behavior.
Re: HTML5 Geolocation by Javanian: 1:52pm On Aug 25, 2012
^ Thanks for the explanation...like i asked earlier is there an alternative to HTML5??
Re: HTML5 Geolocation by yawatide(f): 2:58am On Aug 26, 2012
There is an alternative to everything. The problem is finding it, abi? tongue

I remember a long time ago, buying a book that uses google API to do something similar. Perhaps you should try that. All you would need, I believe, is a google API key. The process is the same - using coordinates/entered data, your position on the globe is determined.

Good luck!
Re: HTML5 Geolocation by Javanian: 7:18pm On Aug 26, 2012
^ Thanks alot...

(1) (Reply)

Promote Website For Almost Free With Google Adword Online Advertising / Website Review / Is N1,000,000 Per Year Owkay For Web Developer

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.