Solved

Obtaining coordinates using google maps with MS Access

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

630 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