Open google maps app via link via Ionic 3

Asked

Viewed 2,758 times

2

I need to make a link that opens external google maps app on android and Ios (apple maps) that opens with marker in a certain coordinate. So far, the research found something similar to the presented here:

iOS (launching Apple Maps):
<a href="maps:?q=LOCATION" target="_system">Map</a>

iOS (launching Google Maps):
<a href="comgooglemaps://?q=LOCATION" target="_system">Map</a>

Android:
<a href="geo:?q=LOCATION" target="_system">Map</a>

The problem with this code is that I don’t know how to format Location. Someone’s been through it?

3 answers

1

<a href="geo:?q=LOCATION" target="_system">Map</a>

Where LOCATION would be latitude and longitude

<a href="geo:?q=-22.9121089,-43.2301558" target="_system">Map</a>

1

1

use the Launch Navigator of Ionic v3 Note... I used it yesterday on my project and everything worked out. It works for UBER, GOOGLE MAPS, WAZE ETC... if you want the user to choose which map app he wants to use just don’t set the: app: Launchnavigator.APPS.UBER http://ionicframework.com/docs/native/launch-navigator/

  • I want something simpler, just the link in case to open the Google Maps app and setting the location with marker.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.