I believe XML is more "expensive" (less efficient) but I think it's also easier to work with in Access VBA. There is a module you can download often referred to as VBJSON but it has a little learning curve, especially if you never worked with JSON before. I've intentionally chosen to use XML instead of JSON because VBA is not overly handy with JSON, and neither am I. Set ixnDuration = lectSingleNode("/DirectionsResponse/route/leg/duration/text")ĭebug.Print "Distance: " & ixnDistance.Text 'Milesĭebug.Print "Duration: " & ixnDuration.Text 'Days Hours Minutes Set ixnDistance = lectSingleNode("/DirectionsResponse/route/leg/distance/text") setRequestHeader "Content-Type", "application/x-Set ixnStatus = lectSingleNode("//status") Set objXMLHTTP = New MSXML2.ServerXMLHTTP Note that this requires a reference to "Microsoft XML, v6.0" unless you change the code to use late binding. You are supposed to use the results obtained here in a Google Map. Do realize that Google does have some licensing requirements/limitations on using their API. Just follow this link and get the API key. Sign up and getting it is easier with Google developers account. For Google Maps GeoCoding API, you need to sign up for Google developers account. Here's some code to do what you want to do. Bing Maps API itself is a very vast library to explore, the part we are going to touch is Geocode Dataflow API and its documentation link is here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |