googlemap from table address data example?

BreakdownBrian

New member
Local time
Today, 01:43
Joined
Sep 12, 2012
Messages
6
Is there an example of a form somewhere that shows a googlemap from address data in a table, on a button press?

Any help greatly appreciated.
 
What version of MS Access are you using?

I have attached an example in Access 2007 that will display the map in a brower window using a user provided address.

I have not experimented with the new browser control only available in 2010 but I would think that there would really be no major issue to having the map to be displayed in the browser control instead of being displayed in a new browser window. You would simple need to add the browser control and change the VBA code to specifically show the map in that control.

If you are using 2010, you may find that it is even easier that what I have done in my demo file. Check out this video:
http://www.youtube.com/watch?v=GHoy6hsAltc
 

Attachments

Last edited:
Breakdown Google Maps has quite a flexible API that will accept parameters passed to its url

You can pass it all sorts of things and it will find it for you automatically

Finding postcodes is a good one.

"http://maps.google.com/?q=EH8 9JP&t=k&z=17&output=embed&iwloc=0"

and in link form

EH8 9JP - the location of a pub!

Of course postcodes aren't completely accurate as they are a grouping of houses. The above pub is about 20m to the west.

It looks up its own database for the location of any postcode that it is passed but if you want to be more specific you can pass lat and longitude but you will have to either have a table of this or calculate it from something else.

lat and long (Decimal degrees) - syntax as follows - Edinburgh castle

"http://maps.google.com/?ll=55.948541,-3.200481&t=k&z=17&output=embed&iwloc=0"

So you could make up a button which calls the standard string and pass your postcode/town or lats and long field into the string and then call the url.

There were a few websites that listed the parameters that Google Maps accepts but they seem to be all down at the moment. Sabotage me thinks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom