Search code examples
javascriptgoogle-maps-api-3

Google geocoder finds Georgia state, not country


I have a global-scale map with a search bar that allows the user to search for a country, and when they click the button it will zoom in to the country they searched for (using the Google Geocoder). My issue is that when I pass 'Georgia' to the geocoder, it finds the state of Georgia, not the country. Is there any way to avoid this? How do I specify the country of Georgia, and ignore the USA's Georgia?

Try it out here: https://mywebspace.wisc.edu/csterling/web/practice.html


Solution

  • It worked for me and I did the following:

    Clicked in the "Search by country" and instead of typing just "Georgia" I put "Country Georgia" and it works.

    Since the Google maps geocoder is just like a google search, it's "smart". ;)