News for hackers. Stuff that matters.
Re:Show HN: The current sky at your approximate location, as... by wonger_ on Saturday August 09, 2025 @12:43PM (#44847965)
(not author) from the source:

  const { latitude = "0", longitude = "0" } = Astro.locals.runtime.cf || {};
To do it client-side, you would probably have to call some less-reputable IP geolocation service, or settle for navigator.geolocation which has a permission popup
Re:Show HN: The current sky at your approximate location, as... by mcteamster on Sunday August 10, 2025 @02:30AM (#44853207)
Depending on how "approximate" is acceptable, I've found that using timezone names can be a good proxy for location. As most users have their timezones set correctly it's more consistent and private than IP or GPS.

I've made a library for my own use cases that does this (https://github.com/mcteamster/virgo), but it's also pretty straightforward to parse the city/state name out of the timezone and look it up somewhere.