Get the latest tech news
Mapping latitude and longitude to country, state, or city
I made a library that takes GPS coordinates and gives you the state.
At the startup I worked at, we paid several thousands of dollars per year for the Google Maps API to do a reverse lookup (that decision was made long before I joined). It is a single-file JavaScript library with no dependencies that can run client-side to determine which state a given latitude and longitude point falls in. In these rare cases, you could fall back to a different method, such as distance checking centroid points or adding an episilon to all state borders.
Or read this on Hacker News