wellyshen / use-places-autocomplete

😎 📍 React hook for Google Maps Places Autocomplete.
https://use-places-autocomplete.netlify.app
MIT License
1.25k stars 64 forks source link

Is administrativeArea accepted in componentRestrictions #1134

Closed pierre-phil closed 1 year ago

pierre-phil commented 1 year ago

I've been trying to use administrativeArea to restrict the suggested results to a region of the US.

This works :

 requestOptions: {
      componentRestrictions: {
        country: "us",
      },
    },

but not this :

    requestOptions: {
      componentRestrictions: {
        country: "us",
        administrativeArea: "MN",
      },
    },

nor this :

    requestOptions: {
      componentRestrictions: {
        administrativeArea: "MN",
      },
    },

Won't show any suggestions with this. Am I missing something ?