I came across a situation today where I needed to interface with a third party component in my Joomla! application which handled store locations using the Google Maps API. I already added the ability to associate each entry with a user account and manage the entry from within the user profile manager (thanks to the new Joomla! 2.5 extended profile), but the problem came in when a user edited the address that it would not update the latitude and longitude within the component. To fix that, I hooked into the onUserAfterSave event, and used the following code to geocode the address that was entered, and then push the results to the store locator database.
This will work for anyone needing to Geocode an address using PHP.