user1164027
user1164027

Reputation: 9

google maps - get state name by city or zip input

how is it possible to get the name of the state by entering a zip or city name?

for example:

city name: buffalo

get state name: new york

thanks for your help.

Upvotes: 1

Views: 1638

Answers (1)

skarE
skarE

Reputation: 5890

You can use the Geocoding API to try to get the info. For example see a Geocode request for buffalo and in the response the administrative_area_level_1 is "New York"

Upvotes: 2

Related Questions