google_maps_place_picker icon indicating copy to clipboard operation
google_maps_place_picker copied to clipboard

after enabling strict bounds search results not working

Open suthura opened this issue 3 years ago • 1 comments

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.

suthura avatar Nov 16 '21 14:11 suthura

did you solve it @suthura

meloDramatic007 avatar Feb 03 '22 08:02 meloDramatic007