It is currently May 26th, 2022, 2:51 pm

Testers wanted: HTML5 Geolocator Addon

Skins that don't neatly fit into other categories
prince1142003
Posts: 56
Joined: December 27th, 2011, 12:32 pm

Testers wanted: HTML5 Geolocator Addon

Post by prince1142003 »

I've been experimenting with the built in geolocation features of HTML5. I've put together a wrapper using AutoIT that scrapes a website, returns the geolocated longitude and latitude, and opens a Weather Underground page to the location. I could use some help testing if this works for multiple users and multiple locations. My eventual hope is to incorporate this into a Rainmeter skin to provide an alternative (and hopefully accurate) method to auto-detect locations for weather skins.

There is a little setup involved first. I've included the source code so you can check for yourself that the file has no malicious intents. If you want to reverse the changes you made to IE, Tools -> Internet Options -> Privacy -> Location -> Clear Sites
You do not have the required permissions to view the files attached to this post.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Testers wanted: HTML5 Geolocator Addon

Post by moshi »

you have to keep in mind that these sites (there are plenty of them) report the location of your IP-Address, not your physical location. so if you are on a mobile connection like me, this is far from being accurate (actually 300 km/185 miles off).
you could cheat a little and not display the name of the location in the skin, then fewer will notice. ;)
and of course it will work for some people as well (especially those living in larger citites).

getting the GPS sensor data on a device like the MS Surface would be an interesting concept.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Testers wanted: HTML5 Geolocator Addon

Post by moshi »

if you use this: http://freegeoip.net/xml/ i think you won't need that permission cookie. it's also easier to parse.
User avatar
Mordasius
Posts: 1089
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Testers wanted: HTML5 Geolocator Addon

Post by Mordasius »

I agree http://freegeoip.net/xml/ is much easier to parse but it is nowhere near as accurate as http://www.geobytes.com/IpLocator.htm?GetLocation or http://ipinfodb.com/ for my part of the globe. They all report the same IP address but geobytes and ipinfodb are on the nail while freegeoip places me 250km North of where I really am.

Of course the most accurate method is to get the physical location of your wireless router from its MAC address (BSSID) and send that to Google Location Services. You can test the accuaracy of this by visiting http://samy.pl/mapxss/# but I've no idea if anyone has come up with the LUA script to get your MAC address which would enable this method to be used with Rainmeter.
User avatar
jsmorley
Developer
Posts: 22519
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Testers wanted: HTML5 Geolocator Addon

Post by jsmorley »

None of these are terribly close to my physical location, as they really report the location of the POP of your ISP that is associated with the IP address you were assigned. It is sorta close, up to about 20 miles away or so for me, but nowhere near as accurate for weather as just going to http://woeid.rosselliot.co.nz/, getting your Yahoo WOEID code, and using Yahoo Weather.
prince1142003
Posts: 56
Joined: December 27th, 2011, 12:32 pm

Re: Testers wanted: HTML5 Geolocator Addon

Post by prince1142003 »

Fair enough. This was the most accurate for me out of all the IP locators I tried. HTML5 geolocation is supposed to use more than just the location associated with the IP address, and it seemed to for me.
User avatar
jsmorley
Developer
Posts: 22519
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Testers wanted: HTML5 Geolocator Addon

Post by jsmorley »

prince1142003 wrote:Fair enough. This was the most accurate for me out of all the IP locators I tried. HTML5 geolocation is supposed to use more than just the location associated with the IP address, and it seemed to for me.
Yeah, that site does seem a lot closer.
User avatar
Mordasius
Posts: 1089
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Testers wanted: HTML5 Geolocator Addon

Post by Mordasius »

prince1142003 wrote:HTML5 geolocation is supposed to use more than just the location associated with the IP address, and it seemed to for me.
I suspect that HTML5 geolocation is getting your location from the MAC address of the wireless router as it requires the same permissions and gives the same coordinates as samy kamkar's demo that I posted above.

Anyway, whatever it uses it is spot on for my location (give or take 10m).