Limiting Google Maps API Results

Hello fellow Bubble users,

for my app I currently have a Searchbox that is searching for Geographic places. Once a user starts typing in the adress,city etc. , google displays some options according to the text that is typed. However, adresses, cities etc. from all over the world are show, but we just want to limit the options to adresses within Germany. Our users are complaining that this is confusing, as there are many places in the world with the same name and our app solely focuses on Germany.
Is this a thing I can solve on Bubble or do I have to change something in the Google Cloud Platform (Im on the Personal Plan).

Looking forward to your replies?

Kind Regards,

1 Like

I don’t believe there’s a current way to do this directly in Bubble.

You can likely go through Google’s API directly and set up something like this.

If anyone has additional info, please let us know.

1 Like

It is just an API, so you can use the API connector to retrieve suggestions, and within that limit to cities in countries etc etc

Getting a list of suggestions is therefore IMHO the easy bit. Making a decent UX of it … perhaps less so. I think it would be an input and Repeating Group combination.

Beyond that the “proper” solution is javascripty stuff, and well beyond me.

1 Like

Ok , I will look into that :+1:

@nl.lorenz did you eventually manage to do a workaround? There is now a setting in bubble to “limit results around” for a map, but I need to limit results to suburbs/city and not exact address, so maybe whatever you found could be useful to me.

1 Like

I had the same problem like you (limiting the results to certain cities).
I have not yet found another solution unfortunately.
The only thing you can maybe try is to go on google maps and choose an adress right in the center of the city you want the results to be displayed in and then add a radius which more or less includes the whole city.

thanks, appreciate the quick reply. Probably not very accurate for oddly-shaped cities, but may work in some situations !

In SearchBox editor, “Prefer results around…” I wrote in the United States and then a radius has to be defined, in meters. And it works.