Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Google Maps from access database and setting marker to be an arrow based on bearing

Status
Not open for further replies.

juddymar58

Programmer
Nov 15, 2011
17
AU
Hi, I have created some code in an access form which allows users to select a vehicle from a dropdown list click a button which opens internet explorer with the current position of a vehicle shown as a marker on a google map. To do this I use the following code
DoCmd.Hourglass (True)
Dim strMyGoogleMapUrl As String
strMyGoogleMapUrl = " & strLatitude & "+" & strLongitude
Call Shell("C:\Program Files\Internet Explorer\Iexplore.exe " & strMyGoogleMapUrl, 1)

This is working fine however in the table where I get the latitude and longitude from there is also a bearing field stores a numeric value which identifies what direction the vehicle is pointing. From searching online I think this value is the Azimuth?? What I want to do is open the map like I currently do but instead of showing the marker show the direction the vehicle is pointing (an arrow) based on this value.
I'm wondering if its possible to pass something in via the url I have created to do this?

I have been searching online and found the following url which I can change to make the marker a different colour/label etc but I'm not sure if there is any syntax to make it an arrow

Any help greatly appreciated,

Thanks
Justin
 
While somebody may know, my recommendation would be search for it as what you really want to know is what the URL should look like not how to do it in Access as you already have a solution for that. Regarding your solution, you can use a follow or maybe it is followhyperlink method of a hyperlink datatype/control that would instead just open the user's default browser. It has been a long time since I've done the like so the details are a little sketchy but I'd recommend that over passing a URL to a specific application.
 
I did a bit of additional work on it today. I have found out I can change the marker by specifying an additional url as one of the properties in the maps.googleapis.com url. I think what I'll do is setup 8 separate url's (each pointing to an image of an arrow pointing in a different direction). Then what I'll do in the access form is based on the value in the bearing pick the url of the arrow I want to use then put that into the main maps.googleapis.com url that I intend to use (if that makes sense). The arrows don't need to be exact so I figure 8 different arrows will be accurate enough.
I'll keep you updated how I go as I figure it might come in handy for other people.
Thanks
Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top