Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict results to a country #81

Closed
joshdickerson92 opened this issue Jul 23, 2016 · 2 comments
Closed

Restrict results to a country #81

joshdickerson92 opened this issue Jul 23, 2016 · 2 comments

Comments

@joshdickerson92
Copy link

I have been trying to restrict the results of a search to the UK using the Google API and changing the URL to include an address and component filtering, however this doesn't appear to work, is there a better way of doing this?

@joshdickerson92
Copy link
Author

Okay, after a bit of further reading, it seems the component filter should be applied to the parameters which seems to work perfectly.

    var parameters = L.Util.extend({
            address: qry,
            componentRestrictions: {
                country: 'UK'
            }
        }, this.options);

@mauriau
Copy link

mauriau commented Apr 20, 2018

Hi @joshdickerson92
Do you know if we can use multiple coutry code if it's limited to one?
I'm french and I need to include the DOM-TOM (others french territories) and they dont have the same coutry code as France métropolitaine.
Seem like :

  components: 'country:FR,TF,GF,PF,MF,P,RE,GPM',

or something else ?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants