So the website asks Google for the user’s location, and it all happens transparently without the user’s knowledge? I’m not sure if I’d like that.
Instead, it's probably being used for an autocomplete widget to help users type in an address.
edit: I asked Bard about this, and it told me that websites can get the approx. location of their visitors via the Google Geolocation API:
> To use the Google Geolocation API, a website must first obtain a Google Maps API key. Once they have a key, they can add the following code to their website:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script>
<script>
function getGeolocation() {
var location = navigator.geolocation.getCurrentPosition();
if (location) {
var lat = location.latitude;
var lng = location.longitude;
// Do something with the location information.
}
}
</script>