Help with code to load google maps app

crann

Registered User.
Local time
Today, 00:03
Joined
Nov 23, 2002
Messages
160
I am currently using the following code on a Cmd button to load my next address on google maps for various work locations during the day.

The problem is google maps through the website will not allow me to access the navigation option, I think this can only be done through the app. Sometimes I use windows maps but its the same problem.

Is it possible to pick up the fields as below and somehow launch the maps app and paste the address straight into app?

I basically want to be able to load maps for the current job address on my form and move from point to point with the Navigation.

My code skills are very low so obtained following code from another user.

Thanks

Code:
Private Sub Command293_Click()
Dim strAddress As String
Dim strLink As String

On Error GoTo myErr

strAddress = Me.Address & " " & Me.Town & ", " & Me.City & " " & Me.Postcode
strLink = "http://maps.google.com/maps?hl=en&q="
Application.FollowHyperlink strLink & strAddress

On Error GoTo 0
    Exit Sub
myErr:
    Resume Next
End Sub
 
don't know, but if you look to the bottom of this thread there are 6 or 7 threads on much the same subject
 
Thank CJ

Can't seem to find a post that relates to actual navigation in google maps hence why I am thinking I may need to somehow launch the app not the web address.

I can load maps with my address from form without any problem but only gives me an option to send details to phone for navigation whereas the app will offer me a start navigation option.

I use my db on several tablets in my vans so will be so helpful to get navigation working.

Thanks
 
regret I can't help - not something I've had to investigate
 
...
I can load maps with my address from form without any problem but only gives me an option to send details to phone for navigation whereas the app will offer me a start navigation option.
Could you show a printscreen of what you get and what you want to get?
 
Try it with this ;

="http://www.google.co.uk/maps/dir/" & [Home_Postcode] & ",UK/" & [Post_code] & " "
 
Hi

I have tried changing the code to your suggestion. I now get a warning saying "Hyperlinks can be dangerous etc" I click ok but nothing launches just remains on ms access form.

Any ideas?

Thanks
 
Hi JHB

Basically my current code loads the google maps website http://maps.google.com/maps etc.
The problem is google maps from the website will not give me a sat navigation option only a route planner if I want to start navigation turn by turn I have to load the google maps app.

I would be happy to use the windows map app if I thought it was possible to launch it from my db and paste the current forms address staright into the app?

Thanks
 
Hi JHB

Basically my current code loads the google maps website http://maps.google.com/maps etc.
The problem is google maps from the website will not give me a sat navigation option only a route planner if I want to start navigation turn by turn I have to load the google maps app.

I would be happy to use the windows map app if I thought it was possible to launch it from my db and paste the current forms address staright into the app?

Thanks
My problem is I don't know exactly what you want to get - therefore I asked for a printscreen what you want.
If I run the code below with a hard coded address Google map is open with a needle in the address.
Code:
strAddress = "[I]TheAddressAndNumber, TheZipcode[/I]"
strLink = "http://maps.google.com/maps?hl=en&q="
Application.FollowHyperlink strLink & strAddress
 

Attachments

  • Maps.jpg
    Maps.jpg
    84.4 KB · Views: 183
Re: Help with code to load maps app

ok so I have attached a screen shot of the windows map app I use, see how after it had a destination and current location selectred it provides the option to start navigation "GO" this then runs a turn bu turn sat nav guidance to that destination.

I want to be able to provide nav guidance for my delivery driver from within my db with the address picked up from form.

thanks
 

Attachments

  • windowsmaps.jpg
    windowsmaps.jpg
    107.4 KB · Views: 156
I have the best driving route instructions available by using the link I posted earlier;
attachment.php


As you can see this is embedded in an access form. This embedded control source is ="http://www.google.co.uk/maps/dir/" & [Home_Postcode] & ",UK/" & [Post_code] & " "

You do need to mess around with Internet Explorer settings to make this work, not sure what happens if you use Edge Browser.
 

Attachments

  • MapDrivingCapture.jpg
    MapDrivingCapture.jpg
    99.3 KB · Views: 410
Thanks Minty

The problem is that only gives a set of directions I don't believe it will allow you to access the turn by turn live guidance option that is available on many of the map apps.

My db is on several windows tablets in the centre consol of our vehicles so its a perfect format for the driver to click next job and be provided with a real time navigation to the next address.

At the moment they they leave the db and type the address into the google maps app on ipad or windows maps on windows tablets.

Is what I am trying to do just not possible, is it possible to launch a downloaded app from windows stores for example?

Thanks so much for help
 
Thanks

If I am honest that makes little sense to me as I dont have very much code experience, I understand the user is trying to detect which browser is running to decide how to launch the URL etc.

I am now only using windows platform for all my work so I need to try and find something relating to maps within the windows environment.

Are you aware of any other map software that I could somehow integrate into my database that would provide the maps navigation feature I need?

I was daft to assume launching a windows map app would be easy through the db.

Thanks
 

Users who are viewing this thread

Back
Top Bottom