Hey. I've been trying to add strict bounds to the usePlacesWidget in NextJS but I cannot seem to get it right. I've trying trying to pass in bounds as
var southWest = new google.maps.LatLng(southWestLat, southWestLng);
var northEast = new google.maps.LatLng(northEastLat, northEastLng);
const bounds = google.maps.LatLngBounds(southWest, northEast)
but I'm not able to use the google script as it has not loaded yet.
I surfed through closed issues and found someone using the bounds prop like this:
options: { strictBounds: true, bounds: { north: 64.168864, south: 64.017664, east: 64.101766, west: 64.106564, }, types: ['geocode', 'establishment'], componentRestrictions: { country: 'is' }, },
After typing the widget with ReactGoogleAutocompleteProps, I have confirmed that these bound parameters are in fact the latitudes in numbers. However when I set them, I get an error and my input field fills up with error signs.
Hey. I've been trying to add strict bounds to the usePlacesWidget in NextJS but I cannot seem to get it right. I've trying trying to pass in bounds as
but I'm not able to use the google script as it has not loaded yet.
I surfed through closed issues and found someone using the bounds prop like this:
options: { strictBounds: true, bounds: { north: 64.168864, south: 64.017664, east: 64.101766, west: 64.106564, }, types: ['geocode', 'establishment'], componentRestrictions: { country: 'is' }, },
After typing the widget with ReactGoogleAutocompleteProps, I have confirmed that these bound parameters are in fact the latitudes in numbers. However when I set them, I get an error and my input field fills up with error signs.