How do i create a link to open the google maps app on the device?
Hi Vinicius,
On iOS it should be something like this:
"external:maps://maps.google.com/maps?daddr=lat,long&ll="
on Android:
"external:https://maps.google.com/maps?daddr=lat,long&ll="
João Neves wrote:
can i add longitude and latitude?
Thanks, for ios worked, android i dont know yet;
But one thing, i want to open the google maps with direction, like i want that he make a route for me starting on my location and ending on the location that i will pass... How could i do this?
Vinicius Schonardie wrote:
can you telling me how to make redirect to google map app ?
You'll have to explore the google maps url scheme,
Just a quick addition: for iOS (and I think this will work the same on Android), I was able to use this URLs directly from this Developer Guide (https://developers.google.com/maps/documentation/urls/guide), and they all worked fine. I did not need to prefix with "external" or "maps" - in fact those did not work for me.
I was able to get this to work: "https://www.google.com/maps/search/?api=1&query=centurylink+field" in an External Site link.
I set up a variable with it so I can pass in an address and get driving directions to show up immediately.
Then I build the link according to Google's Developer Guide (linked above).
With this sort of work being done on your address:
Thanks,
----Erik
Please check the Google documentation:
https://developers.google.com/maps/documentation/urls/ios-urlscheme
Example link is OS for driving directions, opening in Google Maps iOS app. Also works in Safari browser:
SyntaxEditor Code Snippet
"comgooglemapsurl://www.google.com/maps/dir/?api=1&destination=" + EncodeUrl(AddressText) + "&travelmode=driving"