Reputation: 75
I have been googling this for hours and I have not found a solution. When I call:
"https://maps.googleapis.com/maps/api/place/autocomplete/json?input="+WebUtility.UrlEncode(MYADDRESSSPEC)+"&key="+MYAPIKEY;
I get things like:
123 Main St, Somewhere, Ohio United States
123 Main St, Somewhere Else, Indiana, United States
I've looked at the optional arguments and I cannot find one for ZIP/postal code. I noticed the textsearch API does return ZIP codes. I could run it through autocomplete as someone is typing the address and THEN run each result through the textsearch API but I want to accomplish this in just ONE web service call. Does anyone know how? Thanks in advance!
Upvotes: 4
Views: 12171
Reputation: 284
You can add the type=(regions)
filter to the url (as query param) and then you can search on postal codes. It is not completely fine because it still can't find all the postal codes I think. But this might be what you need.
Upvotes: 2