Google Extract Components

As I am learning my way through Bubble, I am once against surprised by the amazing features available with 0 code involved…
While I am extremely happy with the Google Places (Autocomplete Address) that I’ve set up on my app, I am struggling to find a way to extract further components, such as the City’s Borough, or District.

Does anyone know of a solution/walk-around that can achieve this, or would I have to request this extra feature with the Bubble Developers in the hope that it is made available?

My app relies heavily on the user inputting their home address, and only those results relating to the user’s Borough/District/Area should be returned in a repeating group, rather than the entire City that they live in. If that makes sense?

At the moment I have been trying to achieve this by messing around with Post/Zip Codes, but there are over 30,000 post codes in the London area alone, which I am trying to break down into 32 Boroughs - and needless to say, it’s turning into a bit of a complicated mess.

If anyone can steer me in the right direction, or offer any advice, I would very grateful.

If you take that input’s value and use “:extract”, there is a list of address components. Do any of those fit what you’re trying to retrieve?

2 Likes

Hi @romanmg

Unfortunately no. I’ve gone through the list and tried all, but none can extract the Borough/District/Area name from the address.

I have checked the Google Developer website and it does seem possible. Off the top of my head, I think the “component” at their end was called ‘locality’ or something.

I might have to look at getting an external postcode boundary type tool, and see if that does the trick.

If you can get to the PlaceId, then you can use the Google API to extract it ?

1 Like

Hi @NigelG

Is that under “Type”?

Yes, there is a lot more options, but unfortunately I am not finding anything that would extract the name of the Borough from any given address…

I have found a KML file during my research into this, with < Polygon > < outerBoundaryIs >< LinearRing >< coordinates > for each borough, but don’t have a clue where to start with it and whether it is even going to be suitable at all for what I am trying to do.

Postal town ?

http://maps.googleapis.com/maps/api/geocode/json?address=36%20Enfield%20Road%20Enfield,%20UK&sensor=false

1 Like

Yes! “postal_town” is exactly what I am after.

But trying to extract that component and display it, is what I am having trouble with. I can extract all other components using Bubble, with no problem…

Apologies, I have just noticed that I misread your previous post. I thought I read “Placeholder” rather than “PlaceId”. Too much time on Bubble, haha.

Actually, cancel - it’s not the postal_town I am after.

I checked another address (in the London Borough of Haringey)

http://maps.googleapis.com/maps/api/geocode/json?address=17%20seymour%20avenue%20UK&sensor=false

I am most probably better trying to do something with the post codes instead. :sweat:

Hmmm, annoying.

You will need the PAF (or the extended data, can’t recall the proper name) I would have thought, that should have it. But it isn’t free.

It’s ok if it’s not free, I have a small budget put aside to get this app running. Anything would help, as this is one of the main features of my app.

I’m not familiar with the term PAF or “the extended data”. I’ve tried Google/Developer and Bubble Forum with no joy. Any idea where I can start looking for it?

Cheers @NigelG

Sorry, Postcode Address File.

http://www.royalmail.com/business/services/marketing/data-optimisation/paf

I think there is extra data will all sorts of additional fields, like the ceremonial county. Might have the Borough name.

2 Likes

That’s great. Thanks again @NigelG

I’ll start looking into this as an alternative. :+1:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.