[AccessD] Google API for address sanitising
Gustav Brock
gustav at cactus.dk
Wed Dec 21 08:28:40 CST 2016
Hi Jim
Good point. I justed checked with Bing, and the syntax is similar:
http://dev.virtualearth.net/REST/v1/Locations?countryRegion=denmark&locality=copenhagen&postalCode=2100&addressLine=kalkbrænderiløbskaj%204A&key=YourVeryLongBingApiKeyString
Partly result is:
"address":{
"addressLine":"Kalkbrænderiløbskaj 4A",
"adminDistrict":"Capital Region",
"adminDistrict2":"København",
"countryRegion":"Denmark"
"formattedAddress":"Kalkbrænderiløbskaj 4A, 2100 Copenhagen, Denmark","
As you will see, the formatted address is not localised. I tried with the German and French examples too, but they behave the same. Of course, that could be an advantage.
I'm not familiar with MapQuest.
/gustav
-----Oprindelig meddelelse-----
Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] På vegne af Jim Dettman
Sendt: 21. december 2016 14:47
Til: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com>
Emne: Re: [AccessD] Google API for address sanitising
and if your just getting into stuff like this, this will be helpful:
https://github.com/VBA-tools/VBA-Web
and on the point of sanitizing addresses, just about any of the map
services will do that (MapQuest and Bing for example). All have different
usage requirements though and at some point, you have to start paying.
MapQuest has made some recent changes that might make it more attractive than Google as they are trying to compete.
The only other thing I'd add is be careful adding this into your apps. In regards to Google, I thought 2000 calls a day would never be hit, but what you find is that it's quite easy to get there, even on a moderate sized app.
That's because it's not 2000 calls of checking an address, but 2000 calls a
day to the site in total. That includes addressing, lat/long lookups, push
pin mapping, getting info on a place, etc. Depending on the task, you may
make multiple calls in order to get it done. Those can add up quickly.
Jim.
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, December 21, 2016 02:34 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Google API for address sanitising
Hi all
Did you know that you can sanitise an address by a single call to Google API? It even accepts our European and localised spelling and returns these correctly. For example, a call containing our malformed company address:
https://maps.googleapis.com/maps/api/geocode/json?address=kalkbranderiloebsk
4A, DK - 2100 København
returns a Json with the correct spelling and postal code (country code DK should not be prefixed):
"Kalkbrænderiløbskaj 4A, 2100 København Ø, Danmark",
Replace the commas, and you have the correct address block:
Kalkbrænderiløbskaj 4A
2100 København Ø
Danmark
Indeed, for our US friends it can very useful, as you have a bad habit of abbreviating street names.
As you may know, there is a limit for free calls of 2000 per day. If more, you need a paid license - it should be quite fair though.
/gustav
More information about the AccessD
mailing list