Question Bing, Google & Here map API's (1 Viewer)

grahamvb

Registered User.
Local time
Today, 02:46
Joined
Aug 27, 2013
Messages
57
A few years ago I worked with members of this group and Stack Overflow to develop a callable module that sent a data string to the Google Maps API and received back simple travel time and distance information. (Thank you all for your assistance!)

The data string contained Access table information; starting street address, starting city, starting state (followed by) ending street address, ending city, ending state. There was an Access form that displayed the location table and simply allowed the user to number 1-x the locations to be visited then called the module with each starting and ending string along the route, finally displaying a table with the travel time and mileage.

I am attaching the relatively simple module that worked so reliably for years and now returns nothing.

It appears that Google recently monetized their maps API service. They have a free tier that would be ok but their sign up process does not work for me. So I am examining Bing and Here map API's. I have managed to obtain free API keys from both Bing and Here (which I was unable to get at Google), and am beginning the arduous process of creating a new callable module for those services. I am experiencing the following initial issues:
  1. All the API's seem to be designed only for modern programming formats (C#, json, xml, etc.) ignoring Access VBA.
  2. The API's appear to require GPS coordinates. All my data is in the old fashioned mail address format.
This is a personal project used by about 3 of us that need to calculate travel time and mileage reimbursement for our jobs. As such there is no budget.

Does anybody have information regarding existing VBA that can be (or better yet (already has been)) adopted to the newer API's?

Does anybody have any suggestions for a quick and simple solution to the dilemma?

Could not tag "Here" for this post as too common a word.
 

Attachments

  • Google Module.accdb
    392 KB · Views: 374

June7

AWF VIP
Local time
Yesterday, 22:46
Joined
Mar 9, 2014
Messages
5,424
Explain why you are using this elaborate method to determine distance and not just logging odometer start and end numbers?

How does the API know exactly which route you took to base distance on? I suppose different routes would not vary greatly in distance but seems just logging odometer readings is really simplest and most accurate approach.
 

grahamvb

Registered User.
Local time
Today, 02:46
Joined
Aug 27, 2013
Messages
57
WOW, really?

We don't always drive the same way we bill so a map API is a defensible mechanism.

The API does not know the route, access does because the user numbered the stops. It only asks the API for one stop at a time. So a day with 7 stops actually calls the API 6 times.
 

isladogs

MVP / VIP
Local time
Today, 06:46
Joined
Jan 14, 2017
Messages
18,186
As someone who uses various Google map APIs, I agree that its a pity they have got greedy and dramatically increased their prices. However for small to medium scale use, using their APIs is still free e.g up to 22000 static maps free per month or thereabouts with different totals for route APIs etc.
In addition if done using a mobile I believe it's all free (for now)
Whilst you do now have to supply payment card details the APIs remain free.

I agree with June.
I wouldn't use their APIs for calculating mileage. Odometer readings should be accurate. Using route maps could be open to abuse.
But if you want to use a route planner, you could read the total distance using GetElementByID from the webpage at zero cost.

I've never used Bing or Here map APIs
Alternately, try Open Street Maps. Open source so absolutely free but the API isn't so easy to access

If you are UK based, I may be able to offer additional suggestions
 

jleach

Registered User.
Local time
Today, 02:46
Joined
Jan 4, 2012
Messages
308
I suspect jdraw's link will cover it, but as an FYI, there is a Google API that takes a street address and turns it into lat/lng coords (and vice-versa). Geocoding/reverse-geocoding is the term, I think.
 

Users who are viewing this thread

Top Bottom