swixpop / craft-locate

Harness the power of the Google Maps API Autocomplete feature inside Craft CMS
MIT License
15 stars 6 forks source link

Feature Request: Add more detailed output #1

Closed mikestecker closed 8 years ago

mikestecker commented 8 years ago

I'd love to see more detailed output from the field so that I can better style the address returned.

Can you split out:

swixpop commented 8 years ago

The plugin is used to return placeid which is a textual identifier that uniquely identifies a place, and lat and lng. It's then up to you to use the these to query the Google Maps API.

The autocomplete field contents is just a string from Google. There is no failsafe way to parse this string to get the day you're looking for. The correct way to get this info is to make a place details request to the Google Maps API. This will give you the data you're looking for.