Sorry I said zip code but meant County like I had in the initial question. How do I get the County for an address provided by a client.
I never use the address field. So, I don't know. I always integrate Google places myself so I have full access to the Google map object.
How do you integrate with Google Places, does it have the County for the address?
I was integrating Google's API long before there was a Geolocation add-on. The Places API has a lot of information in it, including the following:
{
"long_name": "Australia",
"short_name": "AU",
"types": ["country", "political"],
},
The shortcoming with the Geolocation add-on is that the data object returned from Google's API is scoped inside of a non-static function in a final OOP class. Final classes cannot be extended. This renders the API object inaccessible to further manipulation by a developer.
The Strategy 11 developers can resolve this by adding a filter to the function, but I suppose someone would have to open a ticket and ask for a filter as a feature request.
In the meantime, to access all of Google's APIs features, it's a DIY process. You can use JavaScript or the webservice to get the full data object. See this: https://developers.google.com/maps/documentation/places/web-service/details
Please login or Register to submit your answer