Google Places API

Hi everyone,

I’m trying to

  1. get the map to center on Washington, DC
  2. Be able to type in Verizon Center and get the map to place a marker on it.

I’m guessing the API can only search for places that are near where you have the map centered?

I keep trying to search for Verizon Center in the search bar and nothing comes up. Does the Bubble integration with the API only return certain places from its library. @NigelG I saw you mentioned this in another post but wanted to confirm.

Here is the forum app:

Thanks!

1 Like

Yes, I might need to refresh my memory. But ISTR that we it uses the “Radius” search.

Bubble mapping has got a lot of love overnight it seems :kissing_heart:

Very excited by this, so will dig up my mothballed locations project and have a look.

Google Places and the Address Search are not the same. At the moment the forum app doesn’t have the Places API key filled in, so it won’t work. I have added mine for now.

Do you want to search address for Verizon Centre ? Or Google Places ?

Ok, have made some tweaks.

You can’t type ahead search in google places like you can with addresses.

So, the bottom map shows how you can search for Verizon Center (how long did it take me searching for CentRE and getting frustrated :slight_smile: ) … within 100 miles of Washington, DC.

Above I was just looking at how you could have a list of Google Places pulled out as you type, then you can select one. That is about as close to how you started I think.

In terms of Q1, centering the map on DC. That is done by setting the map, via Place to Washington, DC.

Then the workflow action on the input field overrides this with the search results.

Think it now works !

1 Like

lol sorry about the center vs centre.

“Above I was just looking at how you could have a list of Google Places pulled out as you type, then you can select one. That is about as close to how you started I think.”

  • Did you say this because its not possible to use a search box that has a drop down menu? Please see the Search Box I put in the forum. I can’t seem to get the search box to pair up to the map (even when I delete the text box).

Thanks again for your help Nigel!

I was able to get the map to pair with the search box but I don’t understand why now I cant search for verizon center…

Thanks!

Have a look here…

https://forum_app.bubbleapps.io/version-test/placevsaddress

On the left is the Geocoding “address” database. It is just addresses. Verizon Center is a Place, not an Address.

I can search the left for the address, but not the place.

The type ahead search works on addresses, and things, but not on an API.

So we can’t type Verizon into a search box and see “Verizon Center” come up as a Google Place. We would have to use a repeating group and select from that.

Ah that makes a lot of sense, thanks for explaining that. It looks like the repeating groups is the best solution for now.

@emmanuel is there any way to combine both Geocoding and Places API into one search box that has the “type ahead” feature Nigel mentioned?

Would Blockspring be able to help with this? Don’t know too much about them and if they only deal with plugins for spreadsheets. Would be happy to reach out to them if need be. Please advise.

Thanks everyone!

2 Likes

Not currently. The Search Box is a native Bubble element, and it’s a bit tricky to have different data sources. We’ll look into adding more things, but currently it’s only Places API for addresses.

Blockspring blocks won’t be plugged to the autocomplete element, so it won’t help there. But with an input and a repeating group you can have a similar UX and then you can display what you want in ths list (and merge two data sources in the block).

2 Likes

Thanks for the quick feedback Emmanuel.

1 Like

Do you have any plans to include the Places “Radius” search as well as the “Text” search @emmanuel ?

So instead of having to enter some text, you search for a category within a radius ? So all Restaurants within 5 miles.

The query is require by Google, but you can add a radius/location in the search. See the screenshot below

That’s required for a text search.

What I want is either the nearby or the radar.

Very different to the text search.

https://developers.google.com/places/web-service/search

If you want to find places locally you won’t always know a keyword. For example… “All galleries near here”.

Oh I see. Wel we don’t have that yet, but i’ll put that on the list.

1 Like

Thanks, it would be really handy.

We just added this. Check the API Box, you can pick ‘text’, ‘radar’ or ‘search’ and have the relevant calls.

4 Likes

Awesome, thanks.

1 Like

Ok, works a treat :slightly_smiling:

While you are in the area, could you possibly include all the supported Place Types in the Bubble List ?

https://developers.google.com/places/supported_types

1 Like

Yeah I’ll add that.

3 Likes

For some reason I’m unable to make Google Places API work and it seems that forum app doesn’t work either…

Anyone else experiencing issues with it?

Here is my workflow, I’m trying to fetch schools nearby based on input.

Yes, have the same issue.

Places API is being changed by Google so assume this is to keep Bubble in step with that.

1 Like