lights_out
Posts: 0
Joined: Sat Dec 07, 2013 6:12 pm

isolating ZIP code from full address

So, I have have a service that uses a Google reverse geocoding API but it returns a full address with street number, county, state, country, ZIP code, etc. and I just want it to return a ZIP code. Is there a way to isolate the ZIP code? Thanks!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

isolating ZIP code from full address

You can do it only if the service supports it.

On the client side (in your app), you can delete everything but the zip code path in the response. You will still get all the data but in mapping you will only have the zip code available.

lights_out
Posts: 0
Joined: Sat Dec 07, 2013 6:12 pm

isolating ZIP code from full address

so, how would I go about "deleting everything but the zip code path"? would I do that in mapping, or from the database, or in the actual service? the API I am using is this url: http://maps.googleapis.com/maps/api/g.... Thank you!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

isolating ZIP code from full address

You would do it in service response tab. It's not required as you will still get the entire response. Just map the zip code parameter and don't worry about deleting anything.

lights_out
Posts: 0
Joined: Sat Dec 07, 2013 6:12 pm

isolating ZIP code from full address

OK, I think I understand however when I put a postal code parameter in under address components it always returns as undefined. What should I do?

lights_out
Posts: 0
Joined: Sat Dec 07, 2013 6:12 pm

isolating ZIP code from full address

I know it has something to do with types in the response but I am very confused as to how types work.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

isolating ZIP code from full address

Do you mean data type? Please read more here http://docs.appery.io/documentation/r...

Return to “Issues”