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

after enabling strict bounds search results not working #155

Open
suthura opened this issue Nov 16, 2021 · 1 comment
Open

after enabling strict bounds search results not working #155

suthura opened this issue Nov 16, 2021 · 1 comment

Comments

@suthura
Copy link

suthura commented Nov 16, 2021

Hi, I tried to enable the strict bounds in this plugin. So I added region: 'LK' and strictbounds: true properties.
After enabling the strict bound search results are not appearing.

In my case I want to stop the searching the results from other countries.
Since these parameters didn't work I tried using autocompleteRadius: 500. But the issue was same. No search results !.

my plugin version : ### google_maps_place_picker: ^2.1.0-nullsafety.3
my flutter version : ### 2.5.3

Code I used


                   PlacePicker(
                          apiKey: "${Constants.GOOGLE_API_KEY}",
                          automaticallyImplyAppBarLeading: true,
                          enableMapTypeButton: false,
                          usePlaceDetailSearch: false,
                          searchForInitialValue: true,
                          selectInitialPosition: true,
                          region: 'LK',
                          strictbounds: true,
                          autocompleteRadius: 500,
                          onPlacePicked: (result) {
                            setState(() {
                              selectedLat = result.geometry!.location.lat;
                              selectedLng = result.geometry!.location.lng;                        
                            });
                          },
                          initialPosition: LatLng(
                              selectedLat ?? _location.getLat,
                              selectedLng ?? _location.getLng),
                          useCurrentLocation: false,
                     )

Please let me know if the way I used parameters is incorrect. Thanks.

@meloDramatic007
Copy link

did you solve it @suthura

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