Getting browser location with tmprtr
February 02, 2013
I very recently created an app called tmprtr. It is a very simple weather app that uses your location to get weather data. I created it using
navigator.geolocation which in modern browsers requests the user to allow/deny the website from getting an accurate geolocation. This is great because I get a very accurate location for the user and they get the weather! But I wanted to do better.
From here I request the weather data from the server, just as I would had I got the coordinates from the more obtrusive (yet more accurate) request:
Overall, switching to a default IP-based location has not affected my app in any negative direction. The user has their weather information nearly instantly after visiting and is less disrupted in the process.