0

I can't believe I'm having so much trouble just finding a good solution for this. I've looked at some external APIs, but they're all rate-limiting or have too many rules, or too expensive.

Basically, whenever a user logs on, I am able to get their latitude and longitude, and even the city and country.

However, the data is missing the state, so I need a solution for this.

I'm not displaying it on a map, so it doesn't sound like I can use Google. I'm just displaying City, State in a user profile. Also, I want to store this information as the user's lastLocation in my own database, so the solution should allow me to do this without violating their terms of use. This will need to happen ~100,000 times a day with room to scale.

I don't mind paying to use a service, as long it's reasonable.

atkayla
  • 8,143
  • 17
  • 72
  • 132
  • Possible duplicate of [Find the State given Latitude and Longitude Coordinates](http://stackoverflow.com/questions/14527485/find-the-state-given-latitude-and-longitude-coordinates) – OBX Nov 02 '16 at 04:47

1 Answers1

1

you should use Google reverse geocoding, you doesn't need to have a map to access it.

https://developers.google.com/maps/documentation/geocoding/start

masoud vali
  • 1,528
  • 2
  • 18
  • 29
  • What about this part? https://developers.google.com/maps/documentation/geocoding/policies "Displaying a map The Google Maps Geocoding API may only be used in conjunction with displaying results on a Google map. It is prohibited to use Google Maps Geocoding API data without displaying a Google map." It seems rather silly... – atkayla Nov 02 '16 at 06:56