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

Feature: Allow for greater control over suggestions returned by Google #26

Closed
Giners opened this issue Feb 14, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@Giners
Copy link
Owner

Giners commented Feb 14, 2018

Currently the suggestions provided by the Google Places API Web Service have a wide breadth in the types of suggestions (i.e. an establishment, city/locality, specific address, etc.) returned when the user first starts searching for a place. The set of returned suggestions may also not be geospatially tight ("close to each other"). As the users search becomes more specific the types of suggestions returned start to narrow as well as tighten geospatially around each other. This is due to the fact that the request made to the Google Places API Web Service is unassuming and simply provides the users search input. This doesn't provide flexibility for meeting the use cases of those that consume <MUIPlacesAutocomplete>.

Consumers of <MUIPlacesAutocomplete> may have specific use cases in mind for their customers where they may want to:

  • Specify (i.e. narrow) the types of suggestions returned by the Google Places API Web Service
  • Bias/restrict the suggestions returned by the Google Places API Web Service to a specific area

This is a feature request to allow for more control over the suggestions returned by the Google Places API Web Service.

@Giners Giners added the feature label Feb 14, 2018
@Giners Giners self-assigned this Feb 14, 2018
Giners added a commit that referenced this issue Feb 14, 2018
This commit exposes a new prop on <MUIPlacesAutocomplete> named
'createAutocompleteRequest'. Consumers of <MUIPlacesAutocomplete> may
provide a function to the 'createAutocompleteRequest' prop that returns
an object that is used as the request to the Google Places API Web
Service when querying for suggestions. This object may be customized
(per Google API docs) to allow for greater control over what suggestions
are returned to us (the user).
	modified:   README.md
	modified:   src/MUIPlacesAutocomplete.jsx
@Giners Giners closed this as completed in 27ac6df Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant