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

componentRestrictions #75

Closed
ajarti opened this issue Jun 29, 2016 · 2 comments
Closed

componentRestrictions #75

ajarti opened this issue Jun 29, 2016 · 2 comments

Comments

@ajarti
Copy link

ajarti commented Jun 29, 2016

Hi all,
Any way to easily add componentRestrictions to the geocode?

I need to restrict the lookup country.

Any help appreciated.

@Sumragen
Copy link
Contributor

@ajarti hi! Now it simply, just write your preferences like that

$('#mapId').locationpicker({
   location: {
      latitude: 46.15242437752303,
      longitude: 2.7470703125
   },
   inputBinding: {
      locationNameInput: $('#nameInputId')
   },
   enableAutocomplete: true,
   autocompleteOptions: {
      types: ['(cities)'],
      componentRestrictions: {country: 'fr'}
   }
});

P.S. need to wait when my commit will be merged with master branch

@ajarti
Copy link
Author

ajarti commented Sep 21, 2016

@Sumragen sorry for the late reply, many thanks for the feedback, much appreciated!

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