Open agrigg opened 5 years ago
Thanks for the feedback, I think this is a good idea. Feel free to submit a PR if possible.
Cool. I'm working on a PR. I see you already have a geocode method, it is just calling it every time it renders the map. I have most of this in place, but I'm stuck on where to do the save. You have any suggestions on how to hook in? I posted a question on Stack Exchange about it here: https://craftcms.stackexchange.com/questions/31128/geocode-address-when-saving-custom-field-type-in-plugin
Created a PR here: https://github.com/superbigco/craft-vzaddress/pull/3
It would be great to save the latitude and longitude for the address when it is saved / changed using the Google Geocoding API.
Something like using the below geocode method and then saving those additional values in Craft with the address info.