Comments (8)
Basically are you supporting the following
components — A grouping of places to which you would like to restrict your results. Currently, you can use components to filter by country. The country must be passed as a two character, ISO 3166-1 Alpha-2 compatible country code. For example: components=country:fr would restrict your results to places within France.
from react-google-autocomplete.
@AlmogRnD Hi, thank you for your issue. I've made some changes regarding your issue. Please check @1.0.9 version and README.md as well.
from react-google-autocomplete.
thanks
from react-google-autocomplete.
I just tested and it's not working, did the update this is the my code
<Geosuggest
onFocus={this.onFocus}
onBlur={this.onBlur}
onChange={this.onChangeLocation}
onSuggestSelect={this.onSuggestSelect}
onSuggestNoResults={this.onSuggestNoResults}
componentRestrictions={{country: "us"}}
location={new google.maps.LatLng(37.09024, -95.712891)}
radius="20" />
from react-google-autocomplete.
@AlmogRnD This is the working code i tested out yesterday:
<Autocomplete
style={{width: '90%'}}
onPlaceSelected={(place) => {
console.log(place);
}}
types={['(regions)']}
componentRestrictions={{country: "ru"}}
/>
Did you update the library? The current version is 1.0.9. Also i will provide you the working example(jsbin) later.
from react-google-autocomplete.
When I test your code out I get the following error
Uncaught Error: Missing parameter. You must specify location.
You have to set
location={new google.maps.LatLng(37.09024, -95.712891)}
I tested the following out and If I do a search for "sp" spain still shows up
<Geosuggest
onFocus={this.onFocus}
onBlur={this.onBlur}
onChange={this.onChangeLocation}
onSuggestSelect={this.onSuggestSelect}
onSuggestNoResults={this.onSuggestNoResults}
types={['(regions)']}
componentRestrictions={{country: "us"}}
location={new google.maps.LatLng(37.09024, -95.712891)}
radius="20" />
from react-google-autocomplete.
@AlmogRnD Hey, sorry for delay. Check this out pls http://jsbin.com/dowinuzuvi/edit?js,output also i updated the doc. Now you can pass bounds
prop to google autocomplete.
The example shows only Russians places cuz im passing 'ru' as country to the component.
from react-google-autocomplete.
i'm closing this issue.
from react-google-autocomplete.
Related Issues (20)
- Type (inside options) is not working for ALL. Its work for city and region but not for ALL HOT 1
- Add criteria using the React Component
- Is it possible to change country dynamically? HOT 1
- Dynamically set defaultValue using place_id
- Autocomplete not Searching with Street Address or Number HOT 1
- Places API key restrictions
- How to verify if the input matches the selected address? HOT 3
- usePlacesAutocompleteService requests with combination of type "establishment" with any other type from table 2 always fails
- 'Autocomplete - Per Request' google cloud SKU is charged after setting sessionToken to true
- The selection is not maintained, only if I add code inside onPlaceSelected HOT 1
- how to change the zIndex in the pac-container HOT 3
- Package does multiple requests to Google Maps API for no reason
- google is not defined on NextJS production HOT 2
- How to style the Dropdown with google suggestions?
- I can't make the `inputAutocompleteValue` param work
- onPlaceSelected not being executed HOT 1
- Adding form fields dynamically to the page
- Console warning: "Google Maps JavaScript API has been loaded directly without loading=async" HOT 6
- placesService.getDetails is undefined HOT 2
- Does not work with material ui Input field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-google-autocomplete.