Solved

Obtaining coordinates using google maps with MS Access

Posted on 2010-09-10
5
1,449 Views
Last Modified: 2012-05-10
I have tried the different ways of launching IE from MS Access to allow the user to view a Google map and that works fine.  Is there any way to retrieve in MS Access the lat/long coordinates that the user points to, assuming he/she may change the location after viewing the map?  I have a Google Map API key, but don't know how I could get the coordinates. If this is not possible, could I pass and address to an API from MS Access and have the API return either an error code or the coordinates?

Thanks!
0
Comment
Question by:beehilly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 10

Expert Comment

by:conagraman
ID: 33653425
here are a couple of non programmatic options

1:  right on a location on the map select one of the options such as "Whats here?"
then in the bottom left corner of the page the coordinates will appear.

2: the other way i found is to get a link for the current location click on  "link"  next to print and send a box will appear with the link.

hope this helps
c1.bmp
c2.bmp
0
 

Author Comment

by:beehilly
ID: 33661890
Thank you for your help, but I need programmatic options.  Any out there?
0
 
LVL 10

Accepted Solution

by:
conagraman earned 500 total points
ID: 33665102
here you go! i almost gave up on this. there is nothing on the internet that will tell you this as far as i know.

the folks at Google are darn good at not making the coordinates in the code obvious.

The coordinates are exposed by the error handlers href.
.getelementbyid("errormessage").href

here is a sample database where i use an active x web browser to navigate to Google maps then if you press the button it will give you the original link then  extract the lat and long.

*the only problem is you will have to work on the code to extract the lat  & long. depending on what the user selects the link can be different which makes my code fail. if you play around with it you will see what i mean.

the big damage is done though with the above code.
:-)
but this should do it for you.  let me know if you need help





MYGoogle.accdb
0
 
LVL 10

Expert Comment

by:conagraman
ID: 33666435
i realized i had my lat a long  switched - so i fixed that and made the code a little better.  here you go
MYGoogle.accdb
0
 

Author Closing Comment

by:beehilly
ID: 33666766
This is working exactly how I wanted it to work.  Thank you SO much.  
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question