Solved

Obtaining coordinates using google maps with MS Access

Posted on 2010-09-10
5
1,429 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

730 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