traviblog

just some sort of lame blog

Hey, Travis, Why Do You Need My Location?

Is Travis spying on everyone?

With HTML5 you can always view-source. On this site, I'm using window.navigator.geolocation.getCurrentPosition to get the longitude and latitude. Then with those I use the nice free api provided by worldweatheronline.com. The gist of what happens before it gets minified is in this JSBin. I then take the resulting value for the current conditions an display a little CSS animated node that scrolls across. Learn more about geolocation at Dive Into HTML5 and MDN's WebAPI geolocation documentation.

comments

Previously…