-
Notifications
You must be signed in to change notification settings - Fork 290
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
This module needs the ability to remove the location bias from the autocomplete. #88
Comments
Hi @chapeljuice, there are a few other params you can pass to |
@tolu360, thanks for the reply. I read the README and the docs. I don't want to search around a single point with a radius. I want to eliminate the location bias entirely using the same LatLngBounds functionality that is available in the Google Places library. If you look at my post above it doesn't use a single lat & long point, nor a radius. Any way to REMOVE of the location bias? |
Funnily enough Ryan, I think we are referring to the same functionality (if you check the source). And yes, you can set the bounds to a region with a set of Perhaps I would provide support for an array of |
Hrm, apologies, I guess I don't know what you mean there. Do you have a code example of how I could achieve this? This is what I'm currently using to search with autocomplete:
So my question is what would that look like removing the location bias, and using the entire earth for autocomplete search? What would I put in-between the openAutocompleteModal parens? Thanks a lot for your help and replies, btw. I really appreciate it, and love the module! |
To be clear, right now you can only bias to a single RNGooglePlaces.openAutocompleteModal({
type: 'establishment',
country: 'CA',
latitude: 53.544389,
longitude: -113.490927,
radius: 10
})
.then((place) => {
console.log(place);
})
.catch(error => console.log(error.message)); All params are optional |
I see, okay, so this is not possible at the moment. Thanks for replying and confirming. Would be awesome to get in a future update, not sure how difficult that would be for someone. I don't think I have the native skills to pull it off. |
Not a problem, I'd add that in but you'd be surprised what you can pull off by just having a go at it! Stay tuned for the update. Cheers! |
Any update here? |
Better late than never, please see the changes in the very latest beta release, see #198 |
I have a web app using the Google Places Library Autocomplete service. In it, we are able to remove the location bias from the search so autocomplete does NOT have a bias around the users current location.
Here is the url for that documentation:
https://developers.google.com/maps/documentation/javascript/places-autocomplete
Here is the relevant section I'm referencing:
This the snippet we use for that web app:
I would like to do the same for the RNGooglePlaces.openAutocompleteModal() function.
Is that possible?
I didn't see a LatLngBounds option or configuration anywhere in this module.
My versions, for clarity:
The text was updated successfully, but these errors were encountered: