10 comments

[ 3.6 ms ] story [ 36.7 ms ] thread
The author is incorrect about that being html5 - it's javascript.

I did this over two years ago with the same js call - I work for a company with multiple buildings. Go to a web page and you'll see a list of conference rooms in the buildings you are closest to and their availability. Found a web page to batch convert addresses to lat/long - made it pretty easy.

Here's something I wrote at the same time that shows your proximity to a city zip code.

http://www.linquist.net/geo.php

No, he is right. It is html5 (or commonly referred to as such). html5 is used to describe more than just the markup, it is also used to describe, location services, localStorage, etc.
Since JavaScript has 64-bit floating points you could use simpler Spherical law of Cosines (cos c = cos a cos b + sin a sin b cos C) instead of Haversine to calculate distance.
(comment deleted)
I have a feeling that it was only trivial to you because it closely matches the technology that you use. For me it was interesting and novel. I don't write web apps or web sites, I don't use HTML5 or JavaScript. I program safety-critical and security services on big iron and embedded devices, and this was a decent insight into a different world.

My knowledge is different from yours. As you said: "What happened to Hacker News? It evolved." There are people here other than just clones of you.

You can see that on the map. Visiting http://wayn.linkstore.ru (on phones with Javascript support) will open the phone's email app with a canned message titled "Where are you now?" and a link to GeoMail in the email body. If the recipient is using a phone that supports the HTML5 location provider API, such as an Android or Samsung Bada device or an iPhone, when they click the link it will launch GeoMail webapp which lets them reply with a link to a Google Map showing their location.
But please don't do this. "X.com wants to know your location - Ok - Cancel". Meh.
What do you mean? That dialog can not be affected by the developer, afaik. It is hardcoded in the browser.
Yeah it's hardcoded, more, the OS X Lion takes it to the system level, by showing a location services activity in the menu bar when you do this.
Geolocation is not a part of the HTML5 specification!