iOS Question Call Google Map App with indications programmatically

F.Campanella

Member
Licensed User
Longtime User
Hi,
I have to do this:

When the user push a button "indications" I have to call Google Maps app

I have tried to call this

Code: Copy
            Main.App.OpenURL("http://maps.google.com/maps?saddr=" & Main.LATCurrent & "," & Main.LONCurrent & "&daddr=" & LAT & "," & LON)

but the result is like in picture attached

is possible to do this? Can you help me?
 

Attachments

  • IMG_0574.PNG
    IMG_0574.PNG
    21.4 KB · Views: 575
... sorry i've passed wrong coordinates in previous example... if I pass correct coordinates the result is like in picture.

Is possible to call Google Maps App instead of google maps in the browser?
 

Attachments

  • IMG_0575.PNG
    IMG_0575.PNG
    85.5 KB · Views: 596
Upvote 0
Hi F.

With interest I read your solution. Now one question: What are you doing when a user hasn't installed the Google Map app? I did a short test and created an app with one menu item. When clicked on that menu item the call to comgooglemaps was fired. With the Google App installed, the result was nice. Without the Google App installed nothing happened at all.

Regards David
 
Upvote 0
Thanks Erel!
Meanwhile I realized that instead of <comgooglemaps> one can also use apple's map app. E.g. with
Code: Copy
App.OpenURL(http://maps.apple.com/?q=Bern)
With this there is no risk. To my knowledge apple maps cannot be removed from the device, so it is always available to the user ;)
 
Upvote 0
Back
Top