Hi Guys,
I would like to enter GPS coordinates into a form / table and by pushing a command button, open a screen that displays a google map or opens google earth at that coordinate..... Can someone please help me?![]()
Hi Guys,
I would like to enter GPS coordinates into a form / table and by pushing a command button, open a screen that displays a google map or opens google earth at that coordinate..... Can someone please help me?![]()
You may find something here.
http://www.access-programmers.co.uk/...18#post1008218
Orange,
Thanks for the reply.... Wow I never knew it would be so difficult to do..... I thought it would be much easier.... Umm it is scarywell let me work at it and see what I can do.
Thanks.
I haven't worked with Google Earth, but I just happened to find that link a few days ago when doing some searching. It was the only site I found that had a sample database. I agree that it seems quite complex, and I'm sure there are others who have working code.
A few years ago I did find a sample with Google maps where someone had code to identify things within a certain radius. I was working on a small project to see what companies (or their products/services) existed within a selected radius of a given postal code. I used the original code, without really understanding it, and placed some variables in the original code to identify the start point and the radius. I then set up that code as a function and just passed it parameters. Then did an application.FollowHyperlink (with the address) to open a new window with the proper map and radius.
Please post any links or sample code as your project evolves. I'm sure it will be helpful to others and we can all learn. Good luck.
Try a google search using these terms " google map polyline example" and you'll get some info on Maps.
Thanks Orange, will keep all informed when I come right![]()
Pgill,
I responded to another Google Map question here
https://www.accessforums.net/forms/g...html#post67126
Not exactly what you were asking, but post your status. I may have more info.
Hi Orange,
Thanks for the code.... I have now taken a copy of it.... I solved my problem last night by creating a Kmz file and attaching it into my database.... Now if you see Kmz in a box, you can just double click it and it opens GoogleEarth.... It works well, and is great...
Thanks so much for your help and all the others who gave me info, it is greatly appreciated.
Pgill,
Glad you got your stuff working. Can you post your KMZ and or links you used to resolve your issue?
Thanks.
Also, in the sample I gave at the other post, you can enter a LatLong and get a map also.
eg. MyLatLong = "32.2194017,-110.9656253"
StreetToGoogleMap (MyLatLong)
Hi Orange....
What I did was to go to a destination in GoogleEarth, and I created a "Placemark" which I saved onto my desktop.
In my Database I created a "GPS Coordinate" field and set it to "OLE Object", In the Form I created a "Bound Object Frame" which I set to "Embedded" file.
What I do is click on "Insert" and "Object" and then "Create from File" then "Browse" to the Kmz on my desktop. What it does is shows a "Kmz" icon in the frame..... When you double click the icon, GoogleEarth opens and takes you straight to the destination.
This is great for what I need.
I found this mainly from just playing around in a test base.... Is it the best way..... probably not, but it is accurate and quick to insert.
Hope my description helps others....
I have created a textbox (it happens to be Text70) on my form with control source
=[coordinates]. Coordinates is the field in my database that has the lat and lon in the format 50.1235,-1.2345.
Then I have another textbox (it happens to be Text64) with control source
="http://maps.google.com/maps?q=" & [Text70]
You can also use [postcode] if that's in your database.
Anyhow, by some means or other you have to produce a text string like
"http://maps.google.com/maps?q=50.1235,-1.2345" or
"http://maps.google.com/maps?q=AB12 3CD"
Then you put a button on the form and in the "on click" event code builder you build
Private Sub Command67_Click()
Dim MyHyperlink As String
Dim strGoogleLocation As String
strGoogleLocation = Text64
MyHyperlink = strGoogleLocation
Application.FollowHyperlink MyHyperlink
End Sub
Hi Graham,
Thanks for the idea..... That sounds like something I was looking forthanks you so much, I will give it a try and see what happens. At the moment I am just importing a KLM file into the database.
Regards
Peter Gill