I need to determine latitude and longitude coordinates corresponding to a list of addresses.
There are lots of tutorials that cover how to do this. This link provides code for a VBA function that will carry out this exact task.
http://www.myengineeringworld.net/2014/06/geocoding-using-vba-google-api.html
However, the code includes sections that I do not fully understand.
For example:
The comments make it clear what each line of code does, but I would like to have a deeper understanding of the syntax before proceeding. Can anyone point me to appropriate references?
Thank you.
There are lots of tutorials that cover how to do this. This link provides code for a VBA function that will carry out this exact task.
http://www.myengineeringworld.net/2014/06/geocoding-using-vba-google-api.html
However, the code includes sections that I do not fully understand.
For example:
Code:
'Create the request based on Google Geocoding API. Parameters (from Google page):
'- Address: The address that you want to geocode.
'- Sensor: Indicates whether your application used a sensor to determine the user's location.
'This parameter is no longer required.
Request.Open "GET", "http://maps.googleapis.com/maps/api/geocode/xml?" _
& "&address=" & Address & "&sensor=false", False
'Send the request to the Google server.
Request.send
'Read the results from the request.
Results.LoadXML Request.responseText
'Get the status node value.
Set StatusNode = Results.SelectSingleNode("//status")
The comments make it clear what each line of code does, but I would like to have a deeper understanding of the syntax before proceeding. Can anyone point me to appropriate references?
Thank you.
Last edited: